Welcome to the new DiscussCESM forum!
We are still working on the website migration, so you may experience downtime during this process.

Existing users, please reset your password before logging in here: https://xenforo.cgd.ucar.edu/cesm/index.php?lost-password/

Running with your own atmosphere forcing

MrIgnition

Member
Hi all,
I am trying to run CLM5 using my own atmospheric forcing. I followed the guide on http://www.cesm.ucar.edu/models/cesm1.2/clm/models/lnd/clm/doc/UsersGuide/x12979.html but somethings still appear unclear.
1. the file link_dirtree does not seem to exist in my scripts directory
2. the guide recommends data path as $MYCSMDATA/atm/datm7/CLM1PT_data/$MYUSRDAT but after case submission the directory checked was $MYCSMDATA/atm/datm7/$MYUSRDAT/CLM1PT_data/.
3. the file naming convention YYYY-MM.nc as instructed does not signify variable or field name. How will the files belonging to a stream be identified.

Please I will appreciate it if anyone who has used his/her own atmospheric forcing for a regional simulation or any other person who is able to please assist in this.
Thanks.
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
Those instructions are for an earlier version of the model, so some things will not work with the current version.
The file link_dirtree was removed quite a while ago. Alternatives are to either put your new data in the "inputdata" directory on your machine ($CSMDATA), or preferably set up a "mydatafiles" directory within your code directory (or elsewhere). For example, my atmospheric data for single point simulations is here:

$CTSMROOT/tools/PTCLM/mydatafiles/1x1pt_US-UMB/CLM1PT_data

For single point simulations, since all of the forcing data is at the same time resolution as the model timestep (e.g., 1/2 hourly), all the of the forcing data is contained within one file (e.g., 1980-01.nc) and hence is all in the above directory.

If your atmospheric data is similar to that in GSWP3 or CRUNCEP, etc., then there are separate streams depending on the nature of the variable. E.g,, solar radiation, precipitation, and other variables are treated differently. Thus, these files should be in separate subdirectories, e.g.,

Solar/1980-01.nc
Precip/1980-01.nc
TPHWL/1980-01.nc

And then you would point to these directories explicitly in your streams files:

datm.streams.txt.CLMGSWP3v1.Solar
datm.streams.txt.CLMGSWP3v1.Precip
datm.streams.txt.CLMGSWP3v1.TPQW
 

MrIgnition

Member
Thanks for this guide. I will try this out. I have a question please regarding the stream files. Which of the streamfiles should be edited? The ones in the caseroot/Buildconf or the ones on the rundir? My experience is that the streamfiles get overwritten once the case is submitted.
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
Don't change the files in caseroot/Buildconf or the ones in the rundir.
You need to make "user" copies of the ones in CaseDocs and put them in your case directory, e.g., do this in your run directory:

cp CaseDocs/datm.streams.txt.CLMGSWP3v1.Precip user_datm.streams.txt.CLMGSWP3v1.Precip

and then edit the user_* files. Running preview_namelists will use those and generate new streams files for your run.
 

MrIgnition

Member
I have now made the user copies and edited them as directed. The case submits successfully now. But I keep getting:
ERROR:
(shr_stream_getCalendar) ERROR: nf90_open file /p/scratch/cjicg41/bamidele/inp
utdata/atm/datm7/atm_forcing.datm7.ERA5BC.0.5d.bc.c200316/CLM1PT_data/TPHWL1Hrl
y/2000-01.nc

I have attempted converting the netcdf files to Classic and nc4 but the error keeps coming. I also used both cdo setcalendar and cdo setreftime to set the calendar to 365 days calendar and reference time to 0000-01-01 respectively. What could I have done wrong please?
 

MrIgnition

Member
Here is my file header:
netcdf 2000-01 {
dimensions:
time = UNLIMITED ; // (744 currently)
lon = 720 ;
lat = 360 ;

variables:
double time(time) ;
time:standard_name = "time" ;
time:long_name = "Time" ;
time:units = "hours since 0-1-1 00:00:00" ;
time:calendar = "365_day" ;
time:axis = "T" ;
double lon(lon) ;
lon:standard_name = "longitude" ;
lon:long_name = "Longitude" ;
lon:units = "degrees_east" ;
lon:axis = "X" ;
double lat(lat) ;
lat:standard_name = "latitude" ;
lat:long_name = "Latitude" ;
lat:units = "degrees_north" ;
lat:axis = "Y" ;
float Tair(time, lat, lon) ;
Tair:standard_name = "air_temperature" ;
Tair:long_name = "Near-Surface Air Temperature" ;
Tair:units = "K" ;
Tair:_FillValue = 1.e+20f ;
Tair:missing_value = 1.e+20f ;
float PSurf(time, lat, lon) ;
PSurf:standard_name = "surface_air_pressure" ;
PSurf:long_name = "Surface Air Pressure" ;
PSurf:units = "Pa" ;
PSurf:_FillValue = 1.e+20f ;
PSurf:missing_value = 1.e+20f ;
float Qair(time, lat, lon) ;
Qair:standard_name = "specific_humidity" ;
Qair:long_name = "Near-Surface Specific Humidity" ;
Qair:units = "kg kg-1" ;
Qair:_FillValue = 1.e+20f ;
Qair:missing_value = 1.e+20f ;
float LWdown(time, lat, lon) ;
LWdown:standard_name = "surface_downwelling_longwave_flux_in_air" ;
LWdown:long_name = "Surface Downwelling Longwave Radiation" ;
LWdown:units = "W m-2" ;
LWdown:_FillValue = 1.e+20f ;
LWdown:missing_value = 1.e+20f ;
float Wind(time, lat, lon) ;
Wind:standard_name = "wind_speed" ;
Wind:long_name = "Near-Surface Wind Speed" ;
Wind:units = "m s-1" ;
Wind:_FillValue = 1.e+20f ;
Wind:missing_value = 1.e+20f ;

// global attributes:
:CDI = "Climate Data Interface version 1.9.5 (Overview - CDI - Project Management Service)" ;
:Conventions = "CF-1.7" ;
:history = "Sat Mar 28 07:12:56 2020: cdo setreftime,0000-01-01,0,1h -setcalendar,365_day n2000-01.nc mn2000-01.nc\n",
"Fri Mar 27 23:05:01 2020: cdo setreftime,0000-01-01,0,1h 2000-01.nc n2000-01.nc\n",
"Tue Mar 17 09:52:52 2020: cdo -P 10 merge Tair_WFDE5_CRU_200001_v1.0.nc PSurf_WFDE5_CRU_200001_v1.0.nc Qair_WFDE5_CRU_200001_v1.0.nc LWdown_WFDE5_CRU_200001_v1.0.nc Wind_WFDE5_CRU_200001_v1.0.nc TPQLW_WFDE5_CRU_200001_v1.0.nc" ;
:institution = "Copernicus Climate Change Service" ;
:title = "WATCH Forcing Data methodology applied to ERA5 data" ;
:contact = "http://copernicus-support.ecmwf.int" ;
:summary = "ERA5 data regridded to half degree regular lat-lon; Genuine land points from CRU grid and ERA5 land-sea mask only; Tair elevation & bias-corrected using CRU TS4.03 mean monthly temperature and mean diurnal temperature range" ;
:comment = "Methodology implementation for ERA5 and dataset production by B-Open Solutions for the Copernicus Climate Change Service in the context of contract C3S_25c" ;
:reference = "Weedon et al. 2014 Water Resources Res. 50, 7505-7514, doi:10.1002/2014WR015638; Harris et al. 2014 Int. J. Climatol. 34, 623-642, doi:10.1002/joc.3711; Cucchi et al. 2020 (in preparation)" ;
:licence = "The dataset is distributed under the Licence to Use Copernicus Products. The corrections applied are based upon CRU TS4.03, distributed under the Open Database License (ODbL)" ;
:cdo_openmp_thread_number = 10 ;
:CDO = "Climate Data Operators version 1.9.5 (Overview - CDO - Project Management Service)" ;
 

MrIgnition

Member
This Error has now been resolved. There was a typo in my file path and my time units have been corrected accordingly. Thanks.
 
Top