Skip to content

Add ERA5 Copernicus CDS metforcing plugin#1813

Draft
hkato1 wants to merge 11 commits into
NASA-LIS:masterfrom
hkato1:feature/era5cds
Draft

Add ERA5 Copernicus CDS metforcing plugin#1813
hkato1 wants to merge 11 commits into
NASA-LIS:masterfrom
hkato1:feature/era5cds

Conversation

@hkato1

@hkato1 hkato1 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

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

@dmocko dmocko changed the title Feature/era5cds Add ERA5 Copernicus CDF metforcing plugin Jun 9, 2026
@emkemp

emkemp commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Hi @hkato1

I can't find your landmask_mod44w_025.1gdr file needed to run your LDT test case. Please advise.

@dmocko

dmocko commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

@emkemp

I knew I had seen this file around before; here it is (same file in both directories):

/discover/nobackup/projects/lis/LS_PARAMETERS> find . -name landmask_mod44w_025.1gd4r -print 2>&1 | grep -v 'permission denied' | grep -v old

./clsmf25_parms/GLDAS_0.25-deg/landmask_mod44w_025.1gd4r
./MODIS/MOD44W.005/landmask_mod44w_025.1gd4r

@emkemp

emkemp commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Thanks @dmocko!

@emkemp

emkemp commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Okay, here's a new one: Where is era5cds_elev.nc?

@hkato1

hkato1 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

Hi! I followed the instruction by Jim on creating testcase. The input files for LDT should be included in era5cdsforcingtest_ldt.tar.gz.

@hkato1 hkato1 changed the title Add ERA5 Copernicus CDF metforcing plugin Add ERA5 Copernicus CDS metforcing plugin Jun 11, 2026
@emkemp

emkemp commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

@hkato1 Ah, okay. Sorry, I was looking at the work directory itself. I'll work with the tar files. Thanks.

@hkato1

hkato1 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

Sorry, I forgot to mention them in README. I updated the README file.

@emkemp

emkemp commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Update: Test output has been reproduced. I will now play a bit with the code.

@emkemp

emkemp commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

...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]
call era5cdsfiles(n,kk,findex,era5cds_struc(n)%era5cdsdir, &
-------------^
../metforcing/era5cds/get_era5cds.F90(191): error #6633: The type of the actual argument differs from the type of the dummy argument. [HR1]
yr1, mo1, da1, hr1, instfilename, avgfilename)

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.

@hkato1

hkato1 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

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!

@emkemp

emkemp commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

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.

@emkemp emkemp added enhancement New feature or request NotReady labels Jun 16, 2026
@emkemp

emkemp commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

In addition, the LDT and LIS documentation need to be updated. Please edit:

ldt/configs/ldt.config.adoc
lis/configs/lis.config.adoc

@hkato1

hkato1 commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

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.

Hi @emkemp
Ah, that's why the LDT testcase didn't crash. I expect that I will need to update/modify the routines for the bug first. How does it work with the PR? Do I commit the changes in my branch then you can get updates?

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".

@emkemp

emkemp commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

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.

@emkemp emkemp marked this pull request as draft June 16, 2026 16:32
@emkemp emkemp added the Draft label Jun 16, 2026
…accfile in both ldt and lis. Update documentation and clean up.
@hkato1

hkato1 commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

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.

  1. The output of ldt.config.met contains only, lat, lon, and time. How can I add the meteorological fields? I checked another testcase using NLDAS2 met forcing, but it also outputs only lat, lon, and time.
  2. As you can see in ldtlog.met.0000, there are many points with high SWdown field that are reset to solar constant value. This is an artifact of zenith angle computation and a fix needs to be inserted in zterp.F90. It is implemented and can be configured using "Enable new zterp correction (met forcing): .true." in LIS. LDT has slightly different structure and I am wondering how best to incorporate a modification in zterp routine.
  3. LDT's Metforce processing is similar but not the same as how met forcing are processed in LIS? Is it ok if ERA5CDS in LDT doesn't have options supported such as ensemble, forecast, and "average" upscaling?

Please let me know what your thoughts are.
Thank you!
Hiroko

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Draft enhancement New feature or request NotReady

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add met forcing reader for ERA5 from the Climate Data Store

3 participants