-
Notifications
You must be signed in to change notification settings - Fork 301
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
Implement diurnal ozone downscaling #2496
base: master
Are you sure you want to change the base?
Conversation
TL; DR: The big thing we still need to decide is how to implement the namelist options and whether we want to automatically downscale ozone any time we get multi-day average, or only optionally do this if
My vote: just automatically do it. Or optionally turn it off |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adrifoster I looked at your PR and came up with a comment about indentation. If I were nit-picky, I would have pointed out other, aesthetic, indentation issues, but I'm not :-))
Otherwise, this looks great and it seems straightforward enough that I'm comfortable approving without further follow-up.
A question / comment seeking confirmation: I think this is the land model's first example of a stream with an interp function to take data to subdaily, right?
I'd like to be consistent, could you point out the other nit-picky things? |
Yes I believe that is correct. |
All tests PASS except for expected fails, and NLCOMP diffs (which is expected because of the namelist changes I made)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adrifoster I added a few "nit" comments about indentation since you asked.
Description of changes
Adds the capability to downscale daily or multi-day ozone into sub-daily ozone input (DATM or from CAM).
As laid out in CTSM Issue #270 we want to downscale input ozone partial pressure (mol/mol) temporally if we receive a multi-day average input ozone (usually in DATM mode).
We have the infrastructure laid out for CAM and DATM to inform CTSM which type of input we are receiving (i.e., 'multiday_average' or 'subdaily'). We only apply this downscaling when receiving multi-day average ozone.
Specific notes
A gridded file provided by @lkemmons for a diurnal ozone variation factor is read in via a new ozone streams module. This streams file is then used to downscale the ozone provided by DATM or otherwise.
Inside the existing
CalcOzoneUptake
routine, if we are using multi-day average ozone, interpolate/downscale theforc_o3
array using the newInterp
subroutine.Right now we are assuming that the units of the input diurnal file are going to be in seconds, and that the file covers the whole day.
There is no need to assume that the dimension will be 1-24 (i.e. on the hour) or that the dimensions be equal intervals.
The file is read in using a new
src/share_esmf/diurnalOzoneStreamMod
module, with associated updates tobld/CLMBuildNamelist.pm
,bld/namelist_files/namelist_defaults_ctsm.xml
andbld/namelist_files/namelist_definition_csvm.xml
Right now the new variable
use_do3_streams
is set in theuser_nl_clm
file. And the other namelist variables (stream_fldfilename_do3
,stream_meshfile_do3
, anddo3_mapalgo
) are inside thelnd_in
file under ado3_streams
namelist.I'm not sure setting up the
use_do3_streams
namelist variable is the best way to go about this, since we essentially want this feature on whenever the ozone frequency is 'multiday_average' @billsacks what do you think?Right now we are hard-coding the
stream_var_name
, andstream_lev_dimname
. I think this is okay. Otherwise, we would want them to be namelist variables that get read in.These updates do change answers, namely ozone uptake is decreased (@danicalombardozzi does this make sense?)
ozone forcing for non-diurnal vs. diurnal for the first simulation day:
![ozone_forcing_hist](https://private-user-images.githubusercontent.com/13225250/326110137-09902f6a-eff2-4137-871d-f1cea63e9c4c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjEwMzY0NjIsIm5iZiI6MTcyMTAzNjE2MiwicGF0aCI6Ii8xMzIyNTI1MC8zMjYxMTAxMzctMDk5MDJmNmEtZWZmMi00MTM3LTg3MWQtZjFjZWE2M2U5YzRjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzE1VDA5MzYwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTg2NzE3MmNjNWEwMzJhNzU2OTE3MjM3NjI4MDI4MTYyMzk1MWY2NmM5YTg1Nzg2MGY3NzgyMDQzYzJiZTdlZmImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.1zDfKFy_nA7VmjFjansfxcEhz5PeLaE8JBpR1CLHN8U)
ozone uptake for the same day:
![ozone_uptake_hourly_hist](https://private-user-images.githubusercontent.com/13225250/326110245-106b00d2-ac5d-4f51-9f86-8f8933815511.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjEwMzY0NjIsIm5iZiI6MTcyMTAzNjE2MiwicGF0aCI6Ii8xMzIyNTI1MC8zMjYxMTAyNDUtMTA2YjAwZDItYWM1ZC00ZjUxLTlmODYtOGY4OTMzODE1NTExLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzE1VDA5MzYwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRjY2I2YTA1MjUyNGUyMGQxNzk2MzA4NWJmZjZiODE5ZGFhNzJlMjhlMTE4NmRkMDIwMWViNDU5ZWQ0ZjU4MjcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0._v8hHOvbAIBGmCpVz7yBf4muX3UCnht_2VO1bNFbvGs)
ozone uptake summed up over the year:
![ozone_uptake_sum_hist](https://private-user-images.githubusercontent.com/13225250/326110283-99b49c3f-9b2f-49a5-80be-254317fb95eb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjEwMzY0NjIsIm5iZiI6MTcyMTAzNjE2MiwicGF0aCI6Ii8xMzIyNTI1MC8zMjYxMTAyODMtOTliNDljM2YtOWIyZi00OWE1LTgwYmUtMjU0MzE3ZmI5NWViLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzE1VDA5MzYwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTljYTRiY2QxNWI5YjY5NzgzNTI5YjhlODcxOTE1ODcwMmJkYjg3ZWZjYWQ3MDhlYjQ3NzA0NWZjZmVjZmFmNTEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.uC4SJPqKoPMHu1nMWY8nA19X5Hgf7f_iYuwTX25qslk)
@danicalombardozzi i'm not sure about the units for these ozone history variables, they are in mol/m2/time step... do we want to convert them to a per second? Or is this already done somewhere?
Contributors other than yourself, if any:
@billsacks @danicalombardozzi @lkemmons
CTSM Issues Fixed (include github issue #): Fixes #270
Are answers expected to change (and if so in what way)? Yes, see above. If turned on will modify ozone uptake. If ozone damage and ozone downscaling are not on, this will have no effect.
Any User Interface Changes (namelist or namelist defaults changes)? Yes, adds new namelist options for do3_streams. We also need to decide if we want to only optionally do this, or automatically do this all the time if we have multi-day ozone.
Testing performed, if any:
See above, will also do system testing