NCAR / hrldas

HRLDAS (High Resolution Land Data Assimilation System)
Other
50 stars 53 forks source link

Output netcdf format from HRLDAS #196

Open shekhar-cloud opened 4 months ago

shekhar-cloud commented 4 months ago

I am forcing HRLDAS from GLDAS data , i have a big domain of 7kms , but as the domain size is big the size of the restart file is exceeding 2.2 GB , as the output nrecdf format is classic net-cdf , the model is blowing off. Please help me to change the output format type from the model.

cenlinhe commented 4 months ago

If you are in a Linux system supporting Large File System (LFS), then you should be able to write the netcdf files > 2GB. Check your system by using this command: ulimit -a Below is an example from my system:

image

You could probably set something like "ulimit -f unlimited" and "ulimit -d unlimited" Otherwise, you will have to change the netcdf outputing subroutine in the model: https://github.com/NCAR/hrldas/blob/master/hrldas/IO_code/module_hrldas_netcdf_io.F#L3151-L3281 to add a flag in the netcdf file attribute to allow it to write large file size.

Anyone else has any suggestions?

xuelingbo commented 4 months ago

If you are in a Linux system supporting Large File System (LFS), then you should be able to write the netcdf files > 2GB. Check your system by using this command: ulimit -a Below is an example from my system: image You could probably set something like "ulimit -f unlimited" and "ulimit -d unlimited" Otherwise, you will have to change the netcdf outputing subroutine in the model: https://github.com/NCAR/hrldas/blob/master/hrldas/IO_code/module_hrldas_netcdf_io.F#L3151-L3281 to add a flag in the netcdf file attribute to allow it to write large file size.

Anyone else has any suggestions?

I think the advice provided by cenlin works, but the easiest way to do it is actually to comment out some outputs that you don't need. The code of outputs starts from here: https://github.com/NCAR/hrldas/blob/087f1fd78601b37eaeead93da9f30253441f7cc2/hrldas/IO_code/module_NoahMP_hrldas_driver.F#L1101

shekhar-cloud commented 3 months ago

Thanks , the problem is solved now . Will you please tell me which variables from the ' LDASOUT ' file are updated in the wrfinput file .

cenlinhe commented 3 months ago

mainly the soil and snow related variables (please note that the variable names in wrfinput file may not be exactly the same as the ones shown below in LDASOUT file): "SNICE" , "Snow layer ice"
"SNLIQ" , "Snow layer liquid water"
"SOIL_T" , "soil temperature"
"SOIL_M" , "volumetric soil moisture"
"SOIL_W" , "liquid volumetric soil moisture"
"SNOW_T" , "snow temperature"
"SNOWH" , "Snow depth"
"SNEQV" , "Snow water equivalent"
"ISNOW" , "Number of snow layers"
"CANLIQ" , "Canopy liquid water content"
"CANICE" , "Canopy ice water content"

shekhar-cloud commented 3 months ago

Sir, In my LDAS_OUT file the soil temperature values are 'NaN', Can you kindly tell me what changes in the namelist file do I have to make.

START_YEAR = 2018 START_MONTH = 01 START_DAY = 01 START_HOUR = 00 START_MIN = 00

! RESTART_FILENAME_REQUESTED = "/home/dell/Desktop/chandra_hrldas/data/ldas_run/run/output2/RESTART.2022020900_DOMAIN2"

KDAY = 3000 SPINUP_LOOPS = 0

!FORC_TYP = 1 !HRLDAS_ini_typ = 1

FORCING_NAME_T = "T2D" FORCING_NAME_Q = "Q2D" FORCING_NAME_U = "U2D" FORCING_NAME_V = "V2D" FORCING_NAME_P = "PSFC" FORCING_NAME_LW = "LWDOWN" FORCING_NAME_SW = "SWDOWN" FORCING_NAME_PR = "RAINRATE"

DYNAMIC_VEG_OPTION = 4 CANOPY_STOMATAL_RESISTANCE_OPTION = 1 BTR_OPTION = 1 SURFACE_RUNOFF_OPTION = 3 SUBSURFACE_RUNOFF_OPTION = 3 DVIC_INFILTRATION_OPTION = 1 SURFACE_DRAG_OPTION = 1 FROZEN_SOIL_OPTION = 1 SUPERCOOLED_WATER_OPTION = 1 RADIATIVE_TRANSFER_OPTION = 3 SNOW_ALBEDO_OPTION = 2 PCP_PARTITION_OPTION = 1 SNOW_THERMAL_CONDUCTIVITY = 1 TBOT_OPTION = 2 TEMP_TIME_SCHEME_OPTION = 1 GLACIER_OPTION = 1 SURFACE_RESISTANCE_OPTION = 1 SOIL_DATA_OPTION = 1 PEDOTRANSFER_OPTION = 1 CROP_OPTION = 0 IRRIGATION_OPTION = 0 IRRIGATION_METHOD = 0 TILE_DRAINAGE_OPTION = 0

FORCING_TIMESTEP = 3600 NOAH_TIMESTEP = 1800 OUTPUT_TIMESTEP = 3600

SPLIT_OUTPUT_COUNT = 1 SKIP_FIRST_OUTPUT = .false. RESTART_FREQUENCY_HOURS = 720

! XSTART = 20 ! XEND = 20 ! YSTART = 203 ! YEND = 203

NSOIL=4 soil_thick_input(1) = 0.10 soil_thick_input(2) = 0.30 soil_thick_input(3) = 0.60 soil_thick_input(4) = 1.00

ZLVL = 10.0

SF_URBAN_PHYSICS = 0 USE_WUDAPT_LCZ = 0

!UCMCALL = 0 !ZLVL_URBAN = 15.0 /

cenlinhe commented 3 months ago

Your namelist looks good. not sure why your soil temperature is NaN. Is it all NaN in your study domain and during all your simulation period?

shekhar-cloud commented 3 months ago

Most of the points , its is nan an a few(just 10/12 points only) points are showing some values , others are all 'NaN'.

cenlinhe commented 3 months ago
  1. Do you also see NaN in your Soil moisture variable for most points?
  2. please check the soil temperature variable in your HRLDAS_setup_file to see if they are NaN.
shekhar-cloud commented 3 months ago

No sir , The soil moisture values are continous . I have checked the HRLDAS_setup_file , the soil temperature values are present there.

cenlinhe commented 3 months ago

This is weird. Try another short test run with TBOT_OPTION =1. Also, please check each of your other output variables to see if there is any other output variables showing the similar NaN issues. This will help to diagnose the potential related variables and point toward the cause of the issue.

shekhar-cloud commented 3 months ago

Sir, apart from SOIl Moisture , mostly the other variables are having NaN values. I also checked TBOT_OPTION =1, but the smae outcome . Can you please share a namelist.hrldas file so that i can check it with mine

cenlinhe commented 3 months ago

If you just use the namelist.hrldas with the default physics option, it should work.

  1. Your issue looks like some variables in your HRLDAS_setup file or your forcing file has NaN or unreasonable values. Please check all your variables in HRLDAS_setup file and the first few steps of the forcing file.
  2. Does the NaN issue occur at the first output file or after a few output files?
  3. Also double check the forcing variable names you add to your forcing file are exactly the same as those set in the namelist.