Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example, user_nl_datm_streams file for anomaly forcing for NUOPC coupler #1730

Open
3 tasks
ekluzek opened this issue Apr 29, 2022 · 21 comments
Open
3 tasks
Assignees
Labels
documentation additions or edits to user-facing documentation

Comments

@ekluzek
Copy link
Collaborator

ekluzek commented Apr 29, 2022

We need an example user_nl_datm_streams file for anomaly forcing for the NUOPC coupler. @wwieder has a test case to base this off of here:

/glade/work/wwieder/ctsm/ctsm5.1.dev054/cime/scripts/NEON_NIWO54_mm_zbed1.3_LowGDD_anom

There he edited the datm.stream.xml, we need an example that just changes user_nl_datm and user_nl_datm_streams.

Definition of Done:

@ekluzek
Copy link
Collaborator Author

ekluzek commented Jun 3, 2022

OK I think I've reproduced the above case with the following changes:

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'
user_nl_datm_streams:
Anomaly.Forcing.Temperature:year_first=2020
Anomaly.Forcing.Temperature:year_last=2100
Anomaly.Forcing.Temperature:year_align=2020
Anomaly.Forcing.Temperature:tintalgo = linear
Anomaly.Forcing.Temperature:meshfile=$DIN_LOC_ROOT/share/meshes/fv0.9x1.25_141008_polemod_ESMFmesh.nc
Anomaly.Forcing.Temperature:datafiles = /glade/p/cgd/tss/people/oleson/anomaly_forcing/af.tas.CESM.SSP370.2015-2100.nc

Anomaly.Forcing.Precip:year_first=2020
Anomaly.Forcing.Precip:year_last=2100
Anomaly.Forcing.Precip:year_align=2020
Anomaly.Forcing.Precip:tintalgo = nearest
Anomaly.Forcing.Precip:meshfile=$DIN_LOC_ROOT/share/meshes/fv0.9x1.25_141008_polemod_ESMFmesh.nc
Anomaly.Forcing.Precip:datafiles = /glade/p/cgd/tss/people/oleson/anomaly_forcing/af.pr.CESM.SSP370.2015-2100.nc

Anomaly.Forcing.Humidity:year_first=2020
Anomaly.Forcing.Humidity:year_last=2100
Anomaly.Forcing.Humidity:year_align=2020
Anomaly.Forcing.Humidity:tintalgo = linear
Anomaly.Forcing.Humidity:meshfile=$DIN_LOC_ROOT/share/meshes/fv0.9x1.25_141008_polemod_ESMFmesh.nc
Anomaly.Forcing.Humidity:datafiles = /glade/p/cgd/tss/people/oleson/anomaly_forcing/af.huss.CESM.SSP370.2015-2100.nc

Anomaly.Forcing.Pressure:year_first=2020
Anomaly.Forcing.Pressure:year_last=2100
Anomaly.Forcing.Pressure:year_align=2020
Anomaly.Forcing.Pressure:tintalgo = linear
Anomaly.Forcing.Pressure:meshfile=$DIN_LOC_ROOT/share/meshes/fv0.9x1.25_141008_polemod_ESMFmesh.nc
Anomaly.Forcing.Pressure:datafiles = /glade/p/cgd/tss/people/oleson/anomaly_forcing/af.ps.CESM.SSP370.2015-2100.nc

Anomaly.Forcing.Longwave:year_first=2020
Anomaly.Forcing.Longwave:year_last=2100
Anomaly.Forcing.Longwave:year_align=2020
Anomaly.Forcing.Longwave:tintalgo = linear
Anomaly.Forcing.Longwave:meshfile=$DIN_LOC_ROOT/share/meshes/fv0.9x1.25_141008_polemod_ESMFmesh.nc
Anomaly.Forcing.Longwave:datafiles = /glade/p/cgd/tss/people/oleson/anomaly_forcing/af.rlds.CESM.SSP370.2015-2100.nc

Anomaly.Forcing.Shortwave:year_first=2020
Anomaly.Forcing.Shortwave:year_last=2100
Anomaly.Forcing.Shortwave:year_align=2020
Anomaly.Forcing.Shortwave:tintalgo = linear
Anomaly.Forcing.Shortwave:meshfile=$DIN_LOC_ROOT/share/meshes/fv0.9x1.25_141008_polemod_ESMFmesh.nc
Anomaly.Forcing.Shortwave:datafiles = /glade/p/cgd/tss/people/oleson/anomaly_forcing/af.rsds.CESM.SSP370.2015-2100.nc

Anomaly.Forcing.Uwind:year_first=2020
Anomaly.Forcing.Uwind:year_last=2100
Anomaly.Forcing.Uwind:year_align=2020
Anomaly.Forcing.Uwind:tintalgo = linear
Anomaly.Forcing.Uwind:meshfile=$DIN_LOC_ROOT/share/meshes/fv0.9x1.25_141008_polemod_ESMFmesh.nc
Anomaly.Forcing.Uwind:datafiles = /glade/p/cgd/tss/people/oleson/anomaly_forcing/af.uas.CESM.SSP370.2015-2100.nc

Anomaly.Forcing.Vwind:year_first=2020
Anomaly.Forcing.Vwind:year_last=2100
Anomaly.Forcing.Vwind:year_align=2020
Anomaly.Forcing.Vwind:tintalgo = linear
Anomaly.Forcing.Vwind:meshfile=$DIN_LOC_ROOT/share/meshes/fv0.9x1.25_141008_polemod_ESMFmesh.nc
Anomaly.Forcing.Vwind:datafiles = /glade/p/cgd/tss/people/oleson/anomaly_forcing/af.vas.CESM.SSP370.2015-2100.nc

@ekluzek
Copy link
Collaborator Author

ekluzek commented Jun 3, 2022

Since the Anomaly Forcing (AF) data are all monthly and normally you want the different variables to be coordinated together, this could be changed so that all variables were on one file and you only use two streams to manage the data. That would cut down on the number of changes you have to add to the user_nl_datm_streams file.

@slevis-lmwg
Copy link
Contributor

Thank you @ekluzek
I will try your changes in #1654

@wwieder
Copy link
Contributor

wwieder commented Jun 6, 2022

@ekluzek if we're running with GSWP3 should year_first and year_align=2015?

@slevis-lmwg
Copy link
Contributor

@wwieder the gswp3 data ranges 1901-2014, so I think that year_first=2015 won't work and that you just pick the range of years that you want to cycle for the rest of the run (eg 1991-2010).

@wwieder
Copy link
Contributor

wwieder commented Jun 6, 2022

The SSP370 compset defaults to DATM_YR_START=2001 (in env_run.xml), and cycles over data from 2001-2014 (in CaseDocs/datm_streams)

But I think we want the year_first and year_align in user_nl_datm_streams (above) to be 2015? e.g.

user_nl_datm_streams:
Anomaly.Forcing.Temperature:year_first=2015
Anomaly.Forcing.Temperature:year_last=2100
Anomaly.Forcing.Temperature:year_align=2015
Anomaly.Forcing.Temperature:tintalgo = linear
...

Again, this would be specific for GSWP3 runs.

@wwieder
Copy link
Contributor

wwieder commented Jun 6, 2022

Now that I"m looking more carefully at datm_streams...

Does this for the year first and year align look right for presaero in a simulation starting in 2015 that's using anomaly forcing @ekluzek?

  <stream_info name="presaero.SSP3-7.0">
   <taxmode>cycle</taxmode>
   <tintalgo>linear</tintalgo>
   <readmode>single</readmode>
   <mapalgo>bilinear</mapalgo>
   <dtlimit>1.5</dtlimit>
   <year_first>2014</year_first>
   <year_last>2101</year_last>
   <year_align>2014</year_align>

my case is here
/glade/work/wwieder/ctsm/flexLeafCN/cime/scripts/ctsm51d074_2deg_GSWP3V1_ssp370_cnSlope0

@slevis-lmwg
Copy link
Contributor

The SSP370 compset defaults to DATM_YR_START=2001 (in env_run.xml), and cycles over data from 2001-2014 (in CaseDocs/datm_streams)

But I think we want the year_first and year_align in user_nl_datm_streams (above) to be 2015? e.g.

user_nl_datm_streams:
Anomaly.Forcing.Temperature:year_first=2015
Anomaly.Forcing.Temperature:year_last=2100
Anomaly.Forcing.Temperature:year_align=2015
Anomaly.Forcing.Temperature:tintalgo = linear
...

Again, this would be specific for GSWP3 runs.

I see what you mean, and I think you're right.

@ekluzek
Copy link
Collaborator Author

ekluzek commented Jun 23, 2022

We have this example working, so I'm closing.

@ekluzek ekluzek closed this as completed Jun 23, 2022
Repository owner moved this from Todo ~ weeks to Done in CESM: infrastructure / cross-component SE priorities Jun 23, 2022
@wwieder
Copy link
Contributor

wwieder commented Jun 23, 2022

Thanks @ekluzek are there any changes to the information above that need to be made? Specifically,

  • are the data files in a different location?
  • do the Anomaly.Forcing year_first and year_align need to be modified?

I'd like to try this out as well and then discuss the best way to facilitate others using this feature (e.g. tutorial, user_mod_dirs, etc.)

@wwieder wwieder reopened this Jun 23, 2022
Repository owner moved this from Done to Needs Prioritization in CESM: infrastructure / cross-component SE priorities Jun 23, 2022
@wwieder wwieder added the next this should get some attention in the next week or two. Normally each Thursday SE meeting. label Jun 23, 2022
@billsacks billsacks removed the next this should get some attention in the next week or two. Normally each Thursday SE meeting. label Jun 23, 2022
@billsacks billsacks moved this from Needs Prioritization to Todo ~ weeks in CESM: infrastructure / cross-component SE priorities Jun 30, 2022
@billsacks billsacks moved this from Todo ~ weeks to In Progress in CESM: infrastructure / cross-component SE priorities Jun 30, 2022
@wwieder
Copy link
Contributor

wwieder commented Jul 14, 2022

OK Erik's modifications seem to work. I think this issue is resolved, but need to work on documenting this for users now. Should this go into another issue?

user_nl_datm_streams needs the following

Anomaly.Forcing.Temperature:year_first=2015
Anomaly.Forcing.Temperature:year_last=2100
Anomaly.Forcing.Temperature:year_align=2015
Anomaly.Forcing.Temperature:meshfile =$DIN_LOC_ROOT/share/meshes/fv0.9x1.25_141008_polemod_ESMFmesh.nc
! List of Data types to use
! Remove the variables you do NOT want to include in the Anomaly forcing:
!     pr is preciptiation
!     tas is temperature
!     huss is humidity
!     uas and vas are U and V winds
!     rsds is solare
!     rlds is LW down
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-SSP1-2.6/af.allvars.CESM.SSP1-2.6.2015-2100_c20220628.nc

user_nl_datm just needs:

anomaly_forcing = 'Anomaly.Forcing.Temperature'

@wwieder
Copy link
Contributor

wwieder commented Jul 14, 2022

note, the example above is for SSP1-2.6, but other scenarios are also available for users.

The case I have working is below:

/glade/work/wwieder/ctsm/flexLeafCN/cime/scripts/ctsm51d074_2deg_GSWP3V1_ssp370_cnSlope0

@ekluzek ekluzek added the next this should get some attention in the next week or two. Normally each Thursday SE meeting. label Aug 25, 2022
@ekluzek
Copy link
Collaborator Author

ekluzek commented Aug 25, 2022

The example Sean has in the user's guide is for MCT, rather than NUOPC. We need to have the NUOPC example in place.

@billsacks billsacks removed type: -discussion next this should get some attention in the next week or two. Normally each Thursday SE meeting. labels Aug 25, 2022
@billsacks billsacks added the documentation additions or edits to user-facing documentation label Aug 25, 2022
@wwieder
Copy link
Contributor

wwieder commented Aug 25, 2022

Here's an example for a tower site simulation that then applies anomaly forcing too.

/glade/work/jayka/ctsm/hillslope_updates/cime/scripts/NEON_NIWO_pheno_saddle_hh2_WMbedrock_anom

I think this simulation has constant CO2, but all the atmospheric forcing cycles over on observed record and applies the anomaly forcing. This example run a 'historic' run 2008-2021 and then uses SSP370 from 2022-2100.

@wwieder
Copy link
Contributor

wwieder commented Aug 25, 2022

Here is the important information in user_nl_datm

anomaly_forcing = 'Anomaly.Forcing.Temperature'

and for user_nl_datm_streams, notably the MESH FILE IS REQUIRED (as far as I know).

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=2022
presaero.trans_1850-2000:year_last=2100
presaero.trans_1850-2000:year_align=2022
presaero.trans_1850-2000:dtlimit=30

Anomaly.Forcing.Temperature:year_first=2022
Anomaly.Forcing.Temperature:year_last=2100
Anomaly.Forcing.Temperature:year_align=2022
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


@adrifoster
Copy link
Collaborator

Hey thanks for these explanations! I just had a chat with @wwieder and @swensosc about this. Could we change the stream name from Anomaly.Forcing.Temperature to something more all-encompassing? I think it might be confusing for naive users, since it does cover more than just temperature.

@ekluzek
Copy link
Collaborator Author

ekluzek commented Aug 26, 2022

Yes we can do that with a CDEPS change. I think that's a good idea and I'll file an issue in CDEPS.

@adrifoster
Copy link
Collaborator

It looks on CDEPS like all those individual streams are still there (Temperature still seemingly is just temperature?), perhaps we just want to create a new stream(s) to encompass all of them? Would that then negate the need to do this every time? Then we'd only have to update it if we want to only do individual vars?

@ekluzek
Copy link
Collaborator Author

ekluzek commented Aug 26, 2022

Yes I'll remove the specific variable names and only have one generic name for all variables. To change what variables you want you change the datavars list in your user nl datm streams file.

Having individual files for each variable only makes it harder to manage.

@wwieder
Copy link
Contributor

wwieder commented Aug 26, 2022

Thanks for clearing this up!

@wwieder
Copy link
Contributor

wwieder commented Sep 1, 2022

Once the cdeps issue is resolved I suggest we close this issue and move the 'correct' answer to discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation additions or edits to user-facing documentation
Projects
Status: Done (or no longer holding things up)
Development

No branches or pull requests

6 participants