NCAR/hrldas

Calculation of Specific Humidity

Closed this issue · 11 comments

cdo -s -setparam,133.128 -expr,"var133=(0.622*var1)/(var134/100.-(0.378*var1))/1000." $outfile2 $outfile3

Hello, is there an issue with the calculation of specific humidity? 🤔
When I using other forcing data, the specific humidity is measured in kg/kg, but the results calculated using this bash script for ERA5 seem to have a different magnitude.
Or does using ERA5-land as the input require the units to be in g/kg ? 🥲

https://archive.eol.ucar.edu/projects/ceop/dm/documents/refdata_report/eqns.html

According to Bolton 1980, is the specific humidity calculated using this formula in kg/kg?

@CharlesZheZhang Could you please take a look? The specific forcing input variable should be in unit of kg/kg.

Thank you for pointing out this issue. I think the issue is with the "/1000." in this line.
The q is already in kg/kg, so don't need to divide it again by 1000, which can give you a very small number of the specific humidity.
I will create a PR to correct this today.

Thank you for pointing out this issue. I think the issue is with the "/1000." in this line. The q is already in kg/kg, so don't need to divide it again by 1000, which can give you a very small number of the specific humidity. I will create a PR to correct this today.

Please see this pull request:
#204

So is this "/1000" related to the use of ERA5-Land vs. ERA5 atmospheric data ? Just want to make sure if this bug fix would work for both ERA5-Land and ERA5 atmospheric data. Have you checked if the updated code produces reasonable specific humidity magnitude?

So is this "/1000" related to the use of ERA5-Land vs. ERA5 atmospheric data ? Just want to make sure if this bug fix would work for both ERA5-Land and ERA5 atmospheric data. Have you checked if the updated code produces reasonable specific humidity magnitude?

We only have pre-processing code for ERA5-Land for now.

OK, I see. Does the specific humidity magnitude looks reasonable after bug fix?

OK, I see. Does the specific humidity magnitude looks reasonable after bug fix?

Yes, the range of specific humidity is about 0~0.025 [kg/kg] after this fix, which is typical range for global values:
https://geography.name/how-does-specific-humidity-vary-globally-and-seasonally/

I sincerely appreciate your attention to this issue I’ve raised. 🤗
I’m uncertain whether HRLDAS automatically converts the units when generating forcing data.

  • After decumulate the three cumulative variables in the script, would it be necessary to also convert their units?
  • For instance, should precipitation, currently measured in m, be converted to mm/s, and J/m^2 for radiation to W/m^2.🤔

This bug has been fixed in this PR: #204

I sincerely appreciate your attention to this issue I’ve raised. 🤗 I’m uncertain whether HRLDAS automatically converts the units when generating forcing data.

  • After decumulate the three cumulative variables in the script, would it be necessary to also convert their units?
  • For instance, should precipitation, currently measured in m, be converted to mm/s, and J/m^2 for radiation to W/m^2.🤔

I do not think we need further unit conversion after running all the ERA5-Land pre-processing scripts provided here. @CharlesZheZhang is this correct?

After reviewing the units in the Vtable, I’ve realized that these variables indeed do not require conversion.
I appreciate your assistance and attention to these matter.🤗