Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Question about running with anomaly forcing (CLM5)

mengqi

mj
Member
Hi,

I am trying to run my land-only simulations forced with atmospheric data from SSP-RCP scenarios using CLM5. I understand there are some previous threads; however, I still have a few questions after reading these threads. On my side, I want to simulate GPP and crop yield changes from 2025 to 2100, and I am using the GSWP3V1 forcing dataset. This is my understanding below:

a. Identify the anomaly forcing data on derecho: p/cesmdata/cseg/inputdata/atm/datm7/anomaly_forcing/xxx
Identify the driver on derecho: nuopc

b. Create a new case: ./create_newcase --case ~/XXX/XXX --res CLM_USRDAT --compset SSP370_DATM%GSWP3v1_CLM50%BGC-CROP_SICE_SOCN_MOSART_SGLC_SWAV --project UIUC0025 --run-unsupported

c. Revised env_run.xml:
<entry id="DATM_CLMNCEP_YR_ALIGN" value="2000">
<entry id="DATM_CLMNCEP_YR_START" value="2000">
<entry id="DATM_CLMNCEP_YR_END" value="2014">
<entry id="RUN_STARTDATE" value="2025-01-01">
<entry id="STOP_OPTION" value="nyears">
<entry id="STOP_N" value="76">
<entry id="HIST_OPTION" value="nyears">
<entry id="HIST_N" value="1">

d. Revised user_nl_datm:
anomaly_forcing = 'Anomaly.Forcing.Precip','Anomaly.Forcing.Temperature','Anomaly.Forcing.Pressure','Anomaly.Forcing.Humidity','Anomaly.Forcing.Uwind','Anomaly.Forcing.Vwind','Anomaly.Forcing.Shortwave','Anomaly.Forcing.Longwave'

As stated, I wrote all the steps I knew. (1) Could anyone please help me check if I consider all the stuff? In addition, for step d (Revised user_nl_datm), although I followed the instructions in 1.5.9. Running with anomaly forcing — ctsm CTSM master documentation, I am not sure if it is right. (2) Could anyone please show me a SSP example that contains the content in the user_nl_datm? I'd like to look at what it is.

Thanks!
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
Those instructions look like they might be for mct, not nuopc. I found this post about anomaly forcing with nuopc for a single point case that might help:


It referred to this directory:

/glade/work/wwieder/ctsm/hillslope_updates/cime/scripts/US-NR1_hh_test2_sp_anom

I haven't tried this myself but it looks like the stream Anomaly.Forcing.Temperature refers to all of the anomaly forcing variables.
 

mengqi

mj
Member
Hi @oleson

Thanks for your input! Much appreciated!

For anomaly forcing, I summarize all the steps for nuopc, but I have a few questions:

(a) Set up a new case:
According to this case, I noticed that the compset was assigned to "2000_DATM%1PT_CLM51%SP_SICE_SOCN_SROF_SGLC_SWAV_SESP", instead of SSP's compset (e.g., SSP434_DATM%GSWP3v1_CLM50%BGC-CROP_SICE_SOCN_MOSART_SGLC_SWAV). I am not sure why it is.

(b) revise user_nl_datm

anomaly_forcing = 'Anomaly.Forcing.Temperature'

(c) user_nl_datm_streams
Anomaly.Forcing.Temperature:year_first=2021
Anomaly.Forcing.Temperature:year_last=2100
Anomaly.Forcing.Temperature:year_align=2021
Anomaly.Forcing.Temperature:meshfile =$DIN_LOC_ROOT/share/meshes/fv0.9x1.25_141008_polemod_ESMFmesh.nc
Anomaly.Forcing.Temperature:datavars = pr Faxa_prec_af, \
tas Sa_tbot_af, \
ps Sa_pbot_af, \
huss Sa_shum_af, \
uas Sa_u_af, \
vas Sa_v_af, \
rsds Faxa_swdn_af, \
rlds Faxa_lwdn_af
Anomaly.Forcing.Temperature:datafiles =$DIN_LOC_ROOT/atm/datm7/anomaly_forcing/CMIP6-SSP3-7.0/af.allvars.CESM.SSP3-7.0.2015-2100_c20220628.nc

I also noticed some commands below in the user_nl_datm_streams, although they do not work. I was wondering what they mean.
!presaero.trans_1850-2000:datafiles = /glade/p/cesmdata/cseg/inputdata/atm/cam/chem/trop_mozart_aero/aero/aerodep_clm_SSP370_b.e21.BWSSP370cmip6.f09_g17.CMIP6-SSP3-7.0-WACCM.001_1849-2101_monthly_0.9x1.25_c201103.nc
!presaero.trans_1850-2000:year_first=2021
!presaero.trans_1850-2000:year_last=2100
!presaero.trans_1850-2000:year_align=2021
!presaero.trans_1850-2000:dtlimit=30

(d) revise env_run.xml:
./xmlchange STOP_OPTION=nyears
./xmlchange DATM_YR_ALIGN=2001
./xmlchange DATM_YR_START=2001
./xmlchange DATM_YR_END=2020
./xmlchange RUN_STARTDATE= 2021-01-01
./xmlchange RUN_REFDATE=2021-01-01
./xmlchange RUN_REFDATE=2021-01-01
./xmlchange STOP_N=40
./xmlchange REST=40
./xmlchange CLM_USRDAT_NAME=CLM_USRDAT
./xmlchange DATM_PRESAERO=SSP3-7.0
./xmlchange DATM_PRESNDEP=SSP3-7.0
./xmlchange DATM_PRESO3=SSP3-7.0
./xmlchange DATM_CO2_TSERIES=SSP3-7.0
./xmlchange CLM_CO2_TYPE=constant

For these xml changes, I tried to get info from this case. However, I was wondering if they are full or not. I'd appreciate it if you could give me some input here.

(e) revise env_run.xml:
fsurdat = '/glade/scratch/wwieder/US-NR1_single_point_data/254.45_40.03/surfdata_0.125d_HAND_4_col_hillslope_geo_params_section_quad_0.125d_254.45_40.03_ASTER_NR1_ww_forest.nc'
finidat = '/glade/scratch/wwieder/archive/US-NR1_hh_test2_sp_hist/rest/2021-01-01-00000/US-NR1_hh_test2_sp_hist.clm2.r.2021-01-01-00000.nc'

What is the initial condition of SSP simulation? It looks like a spinup case here.

Thanks!
 

mengqi

mj
Member
Hi @oleson I am working on the anomaly forcing but it gets stuck. So it would be great if you could offer some insights here at your convenience. Thank you so much!
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
Sorry for the slow response, I've been out on vacation. Have you got this working yet?
 

mengqi

mj
Member
Hi @oleson No worries at all. I am still confused about this issue although I read other threads. It would be great if you could give me some insights. Thanks in advance! I refined four questions:

On my side, I summarize all the steps for nuopc:

(a) Set up a new case:
According to this case, I noticed that the compset was assigned to "2000_DATM%1PT_CLM51%SP_SICE_SOCN_SROF_SGLC_SWAV_SESP", instead of SSP's compset (e.g., SSP434_DATM%GSWP3v1_CLM50%BGC-CROP_SICE_SOCN_MOSART_SGLC_SWAV).
Q1: I am not sure which one is right.

(b) revise user_nl_datm

anomaly_forcing = 'Anomaly.Forcing.Temperature'

(c) user_nl_datm_streams
Anomaly.Forcing.Temperature:year_first=2021
Anomaly.Forcing.Temperature:year_last=2100
Anomaly.Forcing.Temperature:year_align=2021
Anomaly.Forcing.Temperature:meshfile =$DIN_LOC_ROOT/share/meshes/fv0.9x1.25_141008_polemod_ESMFmesh.nc
Anomaly.Forcing.Temperature:datavars = pr Faxa_prec_af, \
tas Sa_tbot_af, \
ps Sa_pbot_af, \
huss Sa_shum_af, \
uas Sa_u_af, \
vas Sa_v_af, \
rsds Faxa_swdn_af, \
rlds Faxa_lwdn_af
Anomaly.Forcing.Temperature:datafiles =$DIN_LOC_ROOT/atm/datm7/anomaly_forcing/CMIP6-SSP3-7.0/af.allvars.CESM.SSP3-7.0.2015-2100_c20220628.nc

Q2: I also noticed some commands below in the user_nl_datm_streams, although they do not work. I was wondering what they mean.
!presaero.trans_1850-2000:datafiles = /glade/p/cesmdata/cseg/inputdata/atm/cam/chem/trop_mozart_aero/aero/aerodep_clm_SSP370_b.e21.BWSSP370cmip6.f09_g17.CMIP6-SSP3-7.0-WACCM.001_1849-2101_monthly_0.9x1.25_c201103.nc
!presaero.trans_1850-2000:year_first=2021
!presaero.trans_1850-2000:year_last=2100
!presaero.trans_1850-2000:year_align=2021
!presaero.trans_1850-2000:dtlimit=30

(d) revise env_run.xml:
./xmlchange STOP_OPTION=nyears
./xmlchange DATM_YR_ALIGN=2001
./xmlchange DATM_YR_START=2001
./xmlchange DATM_YR_END=2020
./xmlchange RUN_STARTDATE= 2021-01-01
./xmlchange RUN_REFDATE=2021-01-01
./xmlchange RUN_REFDATE=2021-01-01
./xmlchange STOP_N=40
./xmlchange REST=40
./xmlchange CLM_USRDAT_NAME=CLM_USRDAT
./xmlchange DATM_PRESAERO=SSP3-7.0
./xmlchange DATM_PRESNDEP=SSP3-7.0
./xmlchange DATM_PRESO3=SSP3-7.0
./xmlchange DATM_CO2_TSERIES=SSP3-7.0
./xmlchange CLM_CO2_TYPE=constant
Q3: For these xml changes, I tried to find the items from this case; but I was wondering if they are enough or not.

(e) revise env_run.xml:

fsurdat = '/glade/scratch/wwieder/US-NR1_single_point_data/254.45_40.03/surfdata_0.125d_HAND_4_col_hillslope_geo_params_section_quad_0.125d_254.45_40.03_ASTER_NR1_ww_forest.nc'
finidat = '/glade/scratch/wwieder/archive/US-NR1_hh_test2_sp_hist/rest/2021-01-01-00000/US-NR1_hh_test2_sp_hist.clm2.r.2021-01-01-00000.nc'
Q4: What is the initial condition of SSP simulation? It looks like a spinup case here.
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
The example we pointed you to was just so you could see how anomaly forcing was implemented. There may be other details of that case that may be different from your case, depending what you are trying to simulate. It seems like the case is not the best cleanest example.
Q1 It looks like that case was setup as an I2000 compset basically and then xmlchanges were made to convert it to SSP370 (see CaseStatus in the case directory, as you've indicated in your (d)), instead of using an SSP370 compset. It seems to me that you could do it either way.
Q2 It looks like those changes were probably put in initially but then when the xmlchanges were implemented, those changes were no longer necessary and were commented out.
Q3: I'm not sure I understand your question here, sorry. They may nor may not be enough for your case. You can try setting up your case and running it and see if it works properly
Q4: Yes, it looks like the case is using a spinup initial file from another simulation.
 

mengqi

mj
Member
Thank you, @oleson Much appreciated! I can run a case successfully. One more question about an initial issue:

I am working on CLM5 simulations in the US Midwest. My case was conducted from 2000 to 2014 using GSWP3 forcing, and I got some interesting results. In this context, I tried to see what happens under future climate conditions (e.g., SSP1-2.6, SSP2-4.5, and SSP5-8.5).

For the initial condition of future climate forcing, however, there are two options: (a) the model should run from 2000 to 2014 using GSWP3 and then add anomaly forcing (i.e., history climate forcing: GSWP3; future climate forcing: SSP); and (b) the model should run from 2000 to 2014 using SSP history data and then anomaly forcing (i.e., history climate forcing: SSP; future climate forcing: SSP).

I was wondering if the first option does work. I was saying this because GSWP3 (history) is not fully consistent with SSP (history). In other words, if I want to use GSWP3 history climate forcing, I should find a relationship between GSWP3 history climate forcing and SSP history climate forcing.

Is my understanding right? Thanks for your help in advance!
 

slevis

Moderator
Here's how I understand the use of anomaly forcing:
You run the land model with a historical DATM dataset until you run out of historical data. In GSWP3 that's 2014. Beyond 2014 then, you apply the anomaly forcing on the same historical data.

So I think I see a flaw in your question, but maybe I misunderstood. It sounds as though you have two historical DATM datasets. If so, then it's fine to apply the same anomaly data on the different historical datasets, and you can expect the model to give different answers.
 

slevis

Moderator
Now I realize the flaw in my thinking:
For consistency I think you would apply the anomaly forcing before 2014, as well, and maybe that's what you were asking.

So the whole simulation (before and after 2014) uses GSWP3 DATM data plus the anomaly forcing. This makes the before and after 2014 more consistent than switching from GSWP3 without anomaly (which means observed data) to SSP without anomaly (that is, simulated data).

I hope this makes sense...
 

wzhang

zw
New Member
Hello!
I am running my own anomaly forcing data for CMIP6 future scenarios following the example data (af.pr.CESM.SSP370.2015-2100.nc), using the compset SSP370_DATM%GSWP3v1_CLM50%BGC-CROP_SICE_ SOCN_MOSART_SGLC_SWAV, but I found that the model doesn't work, the error reported is a bit of log, I guess it is because the size of the value of the data I made and the size of the value of the anomaly forcing data is too much difference in magnitude, but the value of the original CMIP6 data I downloaded is very large, please ask how to solve it?
Q1、--WARNING-- skipping CN balance check for first timesteps after startup or data assimilation
CH4 Conservation Error in CH4Mod during diffusion, nstep, c, errch4 (mol /m^2.timestep) 0 1 3.906250000000000E-003
Latdeg,Londeg= 37.6200000000000 101.320000000000
ENDRUN:ERROR:
ERROR: CH4 Conservation Error in CH4Mod during diffusionERROR in ch4Mod.F90 at line 3998
 

slevis

Moderator
Unfortunately we cannot help you solve the problem, since you made your own input data. To troubleshoot I would suggest to you the following steps:
1) Confirm that you can run the model with the default data.
2) Make your data as similar as possible to the default data, other than the values. So make sure formatting agrees, units agree, and whatever else you can think of.
 
Top