Add ERA5 Copernicus CDS metforcing plugin - #1813
Conversation
…t 0.25 degree, on the custom LIS grid).
…ew zterp correction encountered with ERA5CDS.
|
Hi @hkato1 I can't find your landmask_mod44w_025.1gdr file needed to run your LDT test case. Please advise. |
|
I knew I had seen this file around before; here it is (same file in both directories):
./clsmf25_parms/GLDAS_0.25-deg/landmask_mod44w_025.1gd4r |
|
Thanks @dmocko! |
|
Okay, here's a new one: Where is era5cds_elev.nc? |
|
Hi! I followed the instruction by Jim on creating testcase. The input files for LDT should be included in era5cdsforcingtest_ldt.tar.gz. |
|
@hkato1 Ah, okay. Sorry, I was looking at the work directory itself. I'll work with the tar files. Thanks. |
|
Sorry, I forgot to mention them in README. I updated the README file. |
|
Update: Test output has been reproduced. I will now play a bit with the code. |
|
...aaand we have a bug. ../metforcing/era5cds/get_era5cds.F90(190): error #6784: The number of actual arguments cannot be greater than the number of dummy arguments. [ERA5CDSFILES] The subroutine is defined as: subroutine era5cdsfiles(n, kk, findex, era5cdsdir, yr, mo, da, fname) So, an extra filename is being passed as an argument. era5cdsfiles needs to be fixed. I'll continue looking at this tomorrow. |
|
oh, oops. I didn't update the routines in ldt/metforcing/era5cds after making latest changes to equivalent routines in lis/metforcing/era5cds. I don't know how it compiled without error when I tested. Thanks for catching that! |
|
Hi @hkato1 Your test case doesn't use the get_era5cds subroutine in LDT. Can you update your test case to do so? BTW, I'm looking in /discover/nobackup/projects/lis/MET_FORCING/ERA5/single_hourly, and I don't see any time averaged files. The three file types I see are "accum", "instant", and "ml_instant". So I'm questioning how this is supposed to work. |
|
In addition, the LDT and LIS documentation need to be updated. Please edit: ldt/configs/ldt.config.adoc |
Hi @emkemp It's not exactly time averaged, it's time accumulated. Sorry, it was confusing, I should clarify that in the routines. "accum" file contains the fields (i.e. precip, swdown, lwdown) that has different time stamps from "instant" and "ml_instant". |
|
Hi @hkato1 You can push additional changes to this PR--I have it marked as "Not Ready", so we won't approve it yet. I can then get the latest changes. |
…accfile in both ldt and lis. Update documentation and clean up.
|
Hi @emkemp I just pushed the changes. I have a new LDT test case for using ERA5CDS in Metforce processing mode. Please see /discover/nobackup/hkato/LIS/LIS7/era5cds/testcase/ldt.config_met. The outputs are in TEST_OUTPUT/FORCING/194001. Also updated the original LDT testcase for LSM parameter processing in ldt.config following the update. However, there are two problems.
Please let me know what your thoughts are. |
|
Hi @hkato1 LIS will not compile with strict checks (-3). I get the following errors. ../metforcing/era5cds/get_era5cds.F90(211): error #6404: This name does not have a type, and must have an explicit type. [AVGFILENAME] [ERR] Compile failedI'll look at your questions for LDT. |
|
Sorry about that! It's amazing it didn't catch it when I compiled with -1. Please try again. |
|
Hi @hkato1 LIS compiles with your latest changes, but it crashes on your test case. I just reran with strict checks, and I get this error: forrtl: severe (408): fort: (2): Subscript #1 of the array METDATA1 has value 2 which is greater than the upper bound of 1 Image PC Routine Line Source So I'm afraid more work is needed. |
|
Hi @emkemp Thanks for pointing out the problem. I finally fixed it and committed the update. There was a section of routine that got copied over twice accidentally. I was able to run the testcase. Please try again. |
|
Thanks @hkato1. I succeeded in reproducing your LIS results. Going back to your LDT metforcing results, your ldt_forcing_vars.txt is not formatted correctly. You only have four columns (plus the comment describing the variable). There are actually six columns -- column 5 indicates time averaging or accumulation option, and column 6 indicates this is a forcing variable. Column 6 must be set to 1 to be processed correctly. If a column is missing, it will use the default value (I believe 0). Also, the units must be correct for the variable in question. You had: Wind_E: 1 1 W/m2 # Eastward wind That is an invalid unit for Wind_E. In my test version, I replaced with: Wind_E: 1 1 m/s 0 1 # Eastward wind And I get forcing data output. Look in /discover/nobackup/projects/usaf_lis/emkemp/pr/1813/work/TEST_OUTPUT/FORCING/194001 I request you rerun your test case with the corrected ldt_forcing_vars.txt. |
… Metforce processing mode.
|
Hi @emkemp Thanks for figuring out that my ldt_forcing_vars.txt was in wrong format. I was using forcing_variables.txt in LIS, which I had no idea that the contents were different. I was able to produce forcing data outputs, but examining the contents made me realize that the elevation correction was not working correctly. It took a while, but I finally fixed it and just committed the updates. In my testcase directory, you will see two sets of config file and outputs: As expected, these outputs match the forcing fields generated with template option in LIS (TEST_OUTPUT/SURFACEMODEL/ and TEST_OUTPUT2/SURFACEMODEL/ with lapse-rate correction and without it, respectively), except for the SWdown fields where I have new zterp correction in LIS. This goes back to the issue 2 that I mentioned earlier. Without the modification, SWdown fields are too high due to artificially large weights returned from zterp. In LDT, zterp is turned on via "LDT_rc%met_zterp(findex) = .true." in era5cds_forcingMod.F90. |
|
Good morning @hkato1 Can you open up permissions for your latest directories: /discover/nobackup/hkato/LIS/LIS7/era5cds/testcase/TEST_OUTPUT/FORCING ? I have a meeting scheduled today with @jvgeiger to review PRs. We will discuss your question about LDT_rc%new_met_zterp. |
|
Good morning, @emkemp |
|
Nope, not yet. [emkemp@discover35 /discover/nobackup/hkato/LIS/LIS7/era5cds/testcase/TEST_OUTPUT]$ ls -l FORCING [emkemp@discover35 /discover/nobackup/hkato/LIS/LIS7/era5cds/testcase/TEST_OUTPUT2]$ ls -l FORCING |
|
Sorry!, Please try again. |
|
Hi @hkato1: I can access your test output. Bad news: I cannot reproduce your TEST_OUTPUT results with ldt.config_met, even with I used the intel_2023.2.1 compiler set. MY compile settings are in /discover/nobackup/projects/usaf_lis/emkemp/pr/1813/LISF/ldt/make/configure.ldt. Can you point me to your configure.ldt so I can compare? |
|
Hi @emkemp |
|
Do you mean your LDT executable is dated 18 Apr 2025? I'm expecting you generated your latest results with the same code as in this pull request. |
|
@emkemp |
|
Okay, so an update: I still cannot reproduce your LDT met test results. I went ahead and copied your source code in /discover/nobackup/hkato/LIS/LIS7/era5cds/src and compiled several times, most recently with the environment specified by /home/hkato1/privatemodules/lisf_7.5_intel_2023.2.1. Note that I'm using your configure.ldt, LIS_misc.h, and LDT_NetCDF_inc.h files. At this point I'm guessing there's something in your .cshrc file that is causing this difference. These are not major differences, but I expect bitwise identical results. I will continue to investigate. |
|
Good morning, @emkemp |
|
Hi @hkato1 I can reproduce your latest TEST_OUTPUT results, but not TEST_OUTPUT2. For TEST_OUTPUT2, I see differences with SWdown_inst. |
|
Follow-up: When I run LDT compiled with strict checks (-3), I get a floating invalid error when running with ldt.config_met_noecor. forrtl: error (65): floating invalid It seems more work is needed. |
|
Hi @emkemp Some variables were not initialized in the timeinterp routine. This was the reason why we couldn't replicate identical swdown fields and swdown fields in LDT were not valid. I compiled both LDT and LIS with strict checks (-3) and re-run testcases in OUTPUT (with elevation correction) and OUTPUT2 (no elevation correction). I also re-run ldt.config for LSM parameter processing to make sure that the update didn't break it. Were you able to discuss LDT_rc%new_met_zterp? |
|
Hi @emkemp It turns out that "zterp_correction" was already available in LDT. I just had to turn it on in ldt.config. I added the modification in zterp in LDT, so the routine is consistent with LIS. Please see ldt.config_met_zterp_correction and TEST_OUTPUT in my testcase directory. |
Description
ERA5 data is publicly available in 0.25-deg gridded format from the Copernicus Climate Data Store. This implementation works with the dataset downloaded from CDS, "ERA5 hourly data on single levels from 1940 to present".
The LDT/LIS reader for ERA5 exists in metforcing/era5 but they are in different structure and not updated to present.
This reader is named "era5cds" and the ERA5 data is continuously updated daily with 5-day latency.
Resolves #1812
Testcase
/discover/nobackup/hkato/LIS/LIS7/era5cds/testcase