Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

metgrid error

suleiman

New member
Dear Users,
I encountered an issue after successfully running metgrid.exe. The process completes without errors, as indicated by the message:
! Successful completion of metgrid. !
However, the generated met_em.d0* files do not contain any variables—only attributes are present.
Here is the ncdump output for one of the met_em files:

ncdump -h met_em.d01.2024-06-30_00\:00\:00.nc
netcdf met_em.d01.2024-06-30_00\:00\:00 {
dimensions:
Time = UNLIMITED ; // (0 currently)
DateStrLen = 19 ;
variables:
char Times(Time, DateStrLen) ;

// global attributes:
:TITLE = "OUTPUT FROM METGRID V4.6.0" ;
:SIMULATION_START_DATE = "2024-06-30_00:00:00" ;
:WEST-EAST_GRID_DIMENSION = 142 ;
:SOUTH-NORTH_GRID_DIMENSION = 94 ;
:BOTTOM-TOP_GRID_DIMENSION = 34 ;
:WEST-EAST_PATCH_START_UNSTAG = 1 ;
:WEST-EAST_PATCH_END_UNSTAG = 141 ;
:WEST-EAST_PATCH_START_STAG = 1 ;
:WEST-EAST_PATCH_END_STAG = 142 ;
:SOUTH-NORTH_PATCH_START_UNSTAG = 1 ;
:SOUTH-NORTH_PATCH_END_UNSTAG = 93 ;
:SOUTH-NORTH_PATCH_START_STAG = 1 ;
:SOUTH-NORTH_PATCH_END_STAG = 94 ;
:GRIDTYPE = "C" ;
:DX = 9000.f ;
:DY = 9000.f ;
:DYN_OPT = 2 ;
:CEN_LAT = 41.52201f ;
:CEN_LON = 74.026f ;
:TRUELAT1 = 41.522f ;
:TRUELAT2 = 41.522f ;
:MOAD_CEN_LAT = 41.52201f ;
:STAND_LON = 74.026f ;
:pOLE_LAT = 90.f ;
:pOLE_LON = 0.f ;
:corner_lats = 37.56713f, 44.98096f, 44.98096f, 37.56713f, 37.56378f, 44.97721f, 44.97721f, 37.56378f, 37.52688f, 45.02119f, 45.02119f, 37.52688f, 37.52354f, 45.01743f, 45.01743f, 37.52354f ;
:corner_lons = 66.88553f, 66.01828f, 82.03372f, 81.16647f, 66.83478f, 65.9614f, 82.09061f, 81.21722f, 66.88974f, 66.013f, 82.039f, 81.16226f, 66.83899f, 65.95609f, 82.09592f, 81.21301f ;
:MAP_PROJ = 1 ;
:MMINLU = "MODIFIED_IGBP_MODIS_NOAH" ;
:NUM_LAND_CAT = 21 ;
:ISWATER = 17 ;
:ISLAKE = 21 ;
:ISICE = 15 ;
:ISURBAN = 13 ;
:ISOILWATER = 14 ;
:grid_id = 1 ;
:parent_id = 1 ;
:i_parent_start = 1 ;
:j_parent_start = 1 ;
:i_parent_end = 142 ;
:j_parent_end = 94 ;
:parent_grid_ratio = 1 ;
:sr_x = 1 ;
:sr_y = 1 ;
:NUM_METGRID_SOIL_LEVELS = 4 ;
:FLAG_METGRID = 1 ;
:FLAG_EXCLUDED_MIDDLE = 0 ;
:FLAG_SOIL_LAYERS = 1 ;
:FLAG_SNOW = 1 ;
:FLAG_PSFC = 1 ;
:FLAG_SM000010 = 1 ;
:FLAG_SM010040 = 1 ;
:FLAG_SM040100 = 1 ;
:FLAG_SM100200 = 1 ;
:FLAG_ST000010 = 1 ;
:FLAG_ST010040 = 1 ;
:FLAG_ST040100 = 1 ;
:FLAG_ST100200 = 1 ;
:FLAG_SLP = 1 ;
:FLAG_SNOWH = 1 ;
:FLAG_SOILHGT = 1 ;
:FLAG_UTROP = 1 ;
:FLAG_VTROP = 1 ;
:FLAG_TTROP = 1 ;
:FLAG_PTROP = 1 ;
:FLAG_PTROPNN = 1 ;
:FLAG_HGTTROP = 1 ;
:FLAG_UMAXW = 1 ;
:FLAG_VMAXW = 1 ;
:FLAG_TMAXW = 1 ;
:FLAG_PMAXW = 1 ;
:FLAG_PMAXWNN = 1 ;
:FLAG_HGTMAXW = 1 ;
:FLAG_MF_XY = 1 ;
:FLAG_LAI12M = 1 ;
:FLAG_VAR_SSO = 1 ;
}

WRF version 4.6.1
WPS version 4.6
compiler gfortran 14
netcdf version 4.9
netcdf-fortran version 4.6

ldd metgrid.exe
linux-vdso.so.1 => (0x00007ffee63cf000)
libnetcdff.so.7 => /data/WRF/local.gfor/lib/libnetcdff.so.7 (0x00002b9cdb4c3000)
libnetcdf.so.19 => /data/WRF/local.gfor/lib/libnetcdf.so.19 (0x00002b9cdb572000)
libgomp.so.1 => /data/anaconda3/envs/gfor/lib/libgomp.so.1 (0x00002b9cdb75b000)
libgfortran.so.5 => /data/anaconda3/envs/gfor/lib/libgfortran.so.5 (0x00002b9cdb79a000)
libm.so.6 => /lib64/libm.so.6 (0x00002b9cdb955000)
libgcc_s.so.1 => /data/anaconda3/envs/gfor/lib/libgcc_s.so.1 (0x00002b9cdbc57000)
libquadmath.so.0 => /data/anaconda3/envs/gfor/lib/libquadmath.so.0 (0x00002b9cdbc76000)
libc.so.6 => /lib64/libc.so.6 (0x00002b9cdbcaf000)
libstdc++.so.6 => /data/anaconda3/envs/gfor/lib/libstdc++.so.6 (0x00002b9cdc072000)
libhdf5_hl.so.310 => /data/WRF/local.gfor/lib/libhdf5_hl.so.310 (0x00002b9cdc254000)
libhdf5.so.310 => /data/WRF/local.gfor/lib/libhdf5.so.310 (0x00002b9cdc27b000)
libz.so.1 => /data/WRF/local.gfor/lib/libz.so.1 (0x00002b9cdc6b7000)
libsz.so.2 => /data/WRF/local.gfor/lib/libsz.so.2 (0x00002b9cdc6d5000)
libbz2.so.1.0 => /data/anaconda3/envs/gfor/lib/libbz2.so.1.0 (0x00002b9cdc6ec000)
libdl.so.2 => /lib64/libdl.so.2 (0x00002b9cdc700000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b9cdc905000)
librt.so.1 => /lib64/librt.so.1 (0x00002b9cdcb21000)
/lib64/ld-linux-x86-64.so.2 (0x000055cf962ed000)

namelist.wps and metgrid.log file are attached.

I would appreciate any guidance or suggestions to resolve this problem.

Thanks

Suleiman
 

Attachments

  • metgrid.log
    2 MB · Views: 0
  • namelist.wps
    1.6 KB · Views: 1
  • met_em.tar.gz
    1.4 KB · Views: 0
What data did you use for this case? Did ungrib.exe run successfully?

Please upload a single intermediate file for me to take a look. Thanks.
 
Dear Ming,
Thanks for your help.
I wrote a small Fortran code to check the ungrib files:

program read_ungrib
integer :: IFV, NX, NY, IPROJ
character :: HDATE*24, MAP_SOURCE*32, FIELD*9, UNITS*25, DESC*46
real :: XFCST, XLVL
character :: startloc*8
real :: startlon, startlat, dx, dy, xlonc, truelat1, truelat2, EARTH_RADIUS, pval
logical :: IS_WIND_EARTH_REL
real, allocatable, dimension:),:) :: pole
integer :: i, j

open (1,file='fl1', form='unformatted',access='sequential', convert='big_endian')
!open (1,file='fl1', form='unformatted',access='sequential')

!do while(.not. EOF(1))
do while (.true.)
read(1,end=990) IFV
read(1)HDATE, XFCST, MAP_SOURCE, FIELD, UNITS, DESC, XLVL, NX, NY, IPROJ
if (IPROJ==0) then
read(1)startloc, startlat, startlon, dx,dy,EARTH_RADIUS
elseif (IPROJ==1) then
read(1)startloc, startlat, startlon, dx,dy, truelat1,EARTH_RADIUS
elseif (IPROJ==3) then
read(1)startloc, startlat, startlon, dx,dy, xlonc,truelat1, truelat2,EARTH_RADIUS
elseif (IPROJ==4) then
read(1)STARTLOC, STARTLAT, STARTLON, ny,dx, EARTH_RADIUS
else
read(1)startloc, startlat, startlon, dx,dy, xlonc,truelat1,EARTH_RADIUS
endif
if (IPROJ > 0 ) then
print *, xlonc, truelat1, truelat2
endif
read(1) IS_WIND_EARTH_REL
allocate(pole(NX, NY))
read(1) pole

!==========================================================================
print *, "IFV=", IFV
print *, "HDATE=", HDATE
print *, "XFCST=", XFCST
print *, "MAP_SOURCE=",MAP_SOURCE
print *, "FIELD=",FIELD
print *, "UNITS=",UNITS
print *, "DESC=", DESC
print *, "CLVL=",XLVL
print *, "NX=",NX
print *, "Ny=",NY
print *, "IPROJ=",IPROJ
print *, "STARTLOC=",startloc
print *, "lat0=",startlat
print *, "lon0=",startlon
print *, "DX, DY=", dx, dy
print *, "Earth_radius=", EARTH_RADIUS
print *, "IS_WIND_EARTH_REL=", IS_WIND_EARTH_REL
print *, "Value at center of grid(nx/2,ny/2)=", pole(NX/2, NY/2)
print *, "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
!=============================================================================
deallocate(pole)
enddo
990 continue
close(1)
end program read_ungrib



Best regards,
Suleiman
 
I looked at your data saved in "FILE: 2024-06-30_00". This file contains correct information required by metgrid. Please see the log file I attached, which shows all variables.

I don't think that something is wrong with the datafile. Can you check your namelist.wps, specifically the time period specified by

start_date = '2024-06-29_12:00:00', '2024-06-29_12:00:00',
end_date = '2024-07-03_18:00:00', '2024-07-03_18:00:00',

Make sure they are consistent with the time of your intermediate file. Please keep me updated whether it works or not.
 

Attachments

  • log.txt
    76.8 KB · Views: 1
Top