-
When I selected SOIL_DATA_OPTION=2 for single-point execution, I attempted to modify the bondville_xx.dat file (my data file) based on my understanding. The specific modifications are as follows: ! Location Information real :: latitude ! latitude [degrees] real :: snow_depth ! snow depth [m] ! Metadata integer :: grid_id ! used for grid labeling ! Conversion logical :: have_relative_humidity ! set to true if you need to convert relative to specific ! Text forcing variables integer :: yyyy ! NETCDF variables integer :: ncid integer :: itime namelist / location / latitude, longitude, vegetation_category, soil_category, & namelist / initial / snow_depth, snow_water_equivalent, canopy_water, & namelist / metadata / grid_id, water_classification, urban_classification, & namelist / conversion / have_relative_humidity, temperature_offset, & !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! open(30, file="bondville_2003-2005.dat", form="FORMATTED") allocate(soil_layer_thickness(nsoil)) read(30, initial) ! Create the NetCDF file mimicing WRF input files. iret = nf90_create("hrldas_setup_single_point.nc", NF90_CLOBBER, ncid) ! Define dimensions in the file. iret = nf90_def_dim(ncid, "west_east" , 1 , dim_id_we) iret = nf90_def_var(ncid, "XLAT", NF90_FLOAT, (/dim_id_we,dim_id_sn,dim_id_time/), var_id_xlat) iret = nf90_def_var(ncid, "XLONG", NF90_FLOAT, (/dim_id_we,dim_id_sn,dim_id_time/), var_id_xlong) iret = nf90_def_var(ncid, "TMN", NF90_FLOAT, (/dim_id_we,dim_id_sn,dim_id_time/), var_id_tmn) iret = nf90_def_var(ncid, "HGT", NF90_FLOAT, (/dim_id_we,dim_id_sn,dim_id_time/), var_id_hgt) iret = nf90_def_var(ncid, "SHDMAX", NF90_FLOAT, (/dim_id_we,dim_id_sn,dim_id_time/), var_id_vegmax) iret = nf90_def_var(ncid, "SHDMIN", NF90_FLOAT, (/dim_id_we,dim_id_sn,dim_id_time/), var_id_vegmin) iret = nf90_def_var(ncid, "LAI", NF90_FLOAT, (/dim_id_we,dim_id_sn,dim_id_time/), var_id_lai) iret = nf90_def_var(ncid, "XLAND", NF90_INT, (/dim_id_we,dim_id_sn,dim_id_time/), var_id_mask) iret = nf90_def_var(ncid, "IVGTYP", NF90_INT, (/dim_id_we,dim_id_sn,dim_id_time/), var_id_veg) iret = nf90_def_var(ncid, "ISLTYP", NF90_INT, (/dim_id_we,dim_id_sn,dim_id_time/), var_id_soil) iret = nf90_def_var(ncid, "SNODEP", NF90_FLOAT, (/dim_id_we,dim_id_sn,dim_id_time/), var_id_depth) iret = nf90_def_var(ncid, "CANWAT", NF90_FLOAT, (/dim_id_we,dim_id_sn,dim_id_time/), var_id_canwat) iret = nf90_def_var(ncid, "TSK", NF90_FLOAT, (/dim_id_we,dim_id_sn,dim_id_time/), var_id_tsk) iret = nf90_def_var(ncid, "DZS", NF90_FLOAT, (/dim_id_soil,dim_id_time/) , var_id_thick) iret = nf90_def_var(ncid, "ZS", NF90_FLOAT, (/dim_id_soil,dim_id_time/) , var_id_nodes) iret = nf90_def_var(ncid, "TSLB", NF90_FLOAT, (/dim_id_we,dim_id_sn,dim_id_soil,dim_id_time/), var_id_stemp) iret = nf90_def_var(ncid, "SMOIS", NF90_FLOAT, (/dim_id_we,dim_id_sn,dim_id_soil,dim_id_time/), var_id_smois) iret = nf90_put_att(ncid, NF90_GLOBAL, "GRID_ID" , grid_id) iret = nf90_enddef(ncid) iret = nf90_put_var(ncid, var_id_xlat , latitude ) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Please see if this helps |
Beta Was this translation helpful? Give feedback.
-
I guess you should use comma, not colon for soilcl1. for each layer soil type should have only one value |
Beta Was this translation helpful? Give feedback.
Hi,
you can try borrowing the code logistics for other variables like soil_category or leaf_area_index to implement SOILCL1, SOILCL2, SOILCL3, SOILCL4, and you had to give each layer soil type variable a value for soil type either in the namelist or in this code directly.
if you do it in the code directly, for example, you give each variable a number to represent soil type for each layer of soil
real :: SOILCL1 = 1
real :: SOILCL2 = 2
real :: SOILCL3 = 2
real :: SOILCL4 = 1
1 means SAND and 2 means LOAMY SAND, you can change to the type you want based on the number you give
Then you will add each variable in the netCDF format, such as