Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output netcdf format from HRLDAS #196

Open
shekhar-cloud opened this issue Jul 19, 2024 · 12 comments
Open

Output netcdf format from HRLDAS #196

shekhar-cloud opened this issue Jul 19, 2024 · 12 comments

Comments

@shekhar-cloud
Copy link

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
Copy link
Collaborator

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
Copy link
Collaborator

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:

call add_to_output(NoahmpIO%IVGTYP , "IVGTYP" , "Dominant vegetation category" , "category" )

@shekhar-cloud
Copy link
Author

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

@cenlinhe
Copy link
Collaborator

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
Copy link
Author

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
Copy link
Collaborator

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
Copy link
Author

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
Copy link
Collaborator

  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
Copy link
Author

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

@cenlinhe
Copy link
Collaborator

cenlinhe commented Aug 1, 2024

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
Copy link
Author

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
Copy link
Collaborator

cenlinhe commented Aug 3, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants