-
Notifications
You must be signed in to change notification settings - Fork 114
Add zenith angle dependence to sea ice albedo calculations #438
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
Open
Dan Copsey (DanCopsey)
wants to merge
19
commits into
MetOffice:main
Choose a base branch
from
DanCopsey:zenith_angle_seaice
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 10 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
87d36df
Merge in FCM version of this branch
DanCopsey ae547c1
Upgrade to vn3.0
DanCopsey 39b1520
Added two changes that were lost in the merge
DanCopsey 1abbc34
Corrected location of lfric_gal_diagnostics.nc file
DanCopsey 5d8186e
Add upgrade macro
DanCopsey c2557b3
Upgraded to vn3.1
DanCopsey 6c67282
Add upgrade macro
DanCopsey 2671c95
Removed manual settings added through rose-stem
DanCopsey 3f0ce0d
Improve command to help black
DanCopsey 517bee9
Added bracked
DanCopsey a4ca6a1
Removed .versions.py file that got acidentally added
DanCopsey 45ca8fb
Make all 3 new inputs double precision. This is in response to Ian Bo…
DanCopsey 1208956
Make new code turned on the default (will change KGOs)
DanCopsey ab396f5
Changed checksums for new code turned on
DanCopsey 54c5432
Moved meta data to lfric-jules-shared as per reviewer comments
DanCopsey 3770d53
Ran rose config-dump -C interfaces/jules_interface/rose-meta/lfric-ju…
DanCopsey 8121639
Merge in trunk at vn3.2
DanCopsey c9f633b
Use parameters to choose albedo version
DanCopsey f17f07a
Change upgrade tags to reflect we are now at vn3.2
DanCopsey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
interfaces/jules_interface/rose-meta/jules-lfric/.versions.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| import re | ||
| import sys | ||
|
|
||
| from metomi.rose.upgrade import MacroUpgrade # noqa: F401 | ||
|
|
||
| from .version30_31 import * | ||
|
|
||
|
|
||
| class UpgradeError(Exception): | ||
| """Exception created when an upgrade fails.""" | ||
|
|
||
| def __init__(self, msg): | ||
| self.msg = msg | ||
|
|
||
| def __repr__(self): | ||
| sys.tracebacklimit = 0 | ||
| return self.msg | ||
|
|
||
| __str__ = __repr__ | ||
|
|
||
|
|
||
| """ | ||
| Copy this template and complete to add your macro | ||
| class vnXX_txxx(MacroUpgrade): | ||
| # Upgrade macro for <TICKET> by <Author> | ||
| BEFORE_TAG = "vnX.X" | ||
| AFTER_TAG = "vnX.X_txxx" | ||
| def upgrade(self, config, meta_config=None): | ||
| # Add settings | ||
| return config, self.reports | ||
| """ | ||
| class vn31_t400(MacroUpgrade): | ||
| """Upgrade macro for ticket #400 by Dan Copsey.""" | ||
|
|
||
| BEFORE_TAG = "vn3.1" | ||
| AFTER_TAG = "vn3.1_t400" | ||
|
|
||
| def upgrade(self, config, meta_config=None): | ||
| # Commands From: rose-meta/jules-lfric | ||
| # Is this a coupled model? The easiest way to get this is from the number of sea ice categories. | ||
| nice = int(self.get_setting_value(config, ["namelist:jules_sea_seaice", "nice"]) | ||
| is_coupled = nice > 1 | ||
| # Add the new namelist settings | ||
| self.add_setting(config, ["namelist:jules_sea_seaice", "l_zenith_albedo"], ".false.") | ||
| if is_coupled: | ||
| self.add_setting(config, ["namelist:jules_sea_seaice", "meltpond_alb_vn"], "'cice'") | ||
| else: | ||
| self.add_setting(config, ["namelist:jules_sea_seaice", "meltpond_alb_vn"], "'none'") | ||
| self.add_setting(config, ["namelist:jules_sea_seaice", "snow_grain_size_max"], "100.0") | ||
| self.add_setting(config, ["namelist:jules_sea_seaice", "snow_grain_size_min"], "70.0") | ||
| self.add_setting(config, ["namelist:jules_sea_seaice", "snowpatch"], "0.02") | ||
|
|
||
|
|
||
| return config, self.reports |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -70,6 +70,83 @@ trigger=namelist:files=albedo_vis_ancil_path: .true. ; | |
| [namelist:jules_radiation=l_sea_alb_var_chl] | ||
| trigger=namelist:files=sea_ancil_path: .true. ; | ||
|
|
||
| [namelist:jules_sea_seaice=l_zenith_albedo] | ||
| compulsory=true | ||
| description=Use zenith angles in the calculation of sea ice | ||
| = (and snow on sea ice) albedos | ||
| help=With this set to true then the sea ice albedo is adjusted in the same | ||
| =way as bare soil in order to adjust the albedo to take into account | ||
| =zenith angle. | ||
| =The snow on sea ice will also use the same code as snow on land in | ||
| =order to calculate the snow albedo which also takes into account | ||
| =the zenith angle. | ||
| !kind=default | ||
| ns=namelist/Science/JULES Surface/Sea and sea-ice | ||
| sort-key=Panel-C12 | ||
| type=logical | ||
|
|
||
| [namelist:jules_sea_seaice=snow_grain_size_min] | ||
| compulsory=true | ||
| description=Minimum snow grain size | ||
| help=The snow albedo scheme includes a snow grain size temperature | ||
| =dependence. For snow on sea ice this goes from a minimum snow | ||
| =grain size at -30oC to a maximum snow grain size at melting point. | ||
| =The minimum snow grain size is set here. The larger the snow grain | ||
| =size the lower the albedo in the NIR part of the spectrum. The | ||
| =recommended value is 50 um. | ||
| !kind=default | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would suggest setting !kind=double here and for the other 2 real-valued inputs - we are going to pass these values direct to jules at double precision (r_um), hence it makes sense to read them in at double precision (rather than the default which is usually single now) |
||
| ns=namelist/Science/JULES Surface/Sea and sea-ice | ||
| sort-key=Panel-C12a | ||
| type=real | ||
|
|
||
| [namelist:jules_sea_seaice=snow_grain_size_max] | ||
| compulsory=true | ||
| description=Maximum snow grain size | ||
| help=The snow albedo scheme includes a snow grain size temperature | ||
| =dependence. For snow on sea ice this goes from a minimum snow | ||
| =grain size at -30oC to a maximum snow grain size at melting point. | ||
| =The maximum snow grain size is set here. The larger the snow grain | ||
| =size the lower the albedo in the NIR part of the spectrum. The | ||
| =recommended value is 200 um. | ||
| !kind=default | ||
| ns=namelist/Science/JULES Surface/Sea and sea-ice | ||
| sort-key=Panel-C12b | ||
| type=real | ||
|
|
||
| [namelist:jules_sea_seaice=snowpatch] | ||
| compulsory=true | ||
| description=snowpatch length scale (m) | ||
| help=Length scale for parameterizing non uniform snow coverage (m). | ||
| =This is the depth of snow at which half of the sea ice is | ||
| =covered in snow. The smaller this number the more the sea ice | ||
| =is covered by snow. | ||
| !kind=default | ||
| ns=namelist/Science/JULES Surface/Sea and sea-ice | ||
| sort-key=Panel-C12c | ||
| type=real | ||
|
|
||
| [namelist:jules_sea_seaice=meltpond_alb_vn] | ||
| compulsory=true | ||
| description=Melt pond albedo scheme | ||
| !enumeration=true | ||
| help=The scheme used to calculate the albedo of melt ponds | ||
| =none: Use this if no melt ponds are used in the model which | ||
| = instead adds a temperature dependence on albedo to | ||
| = represent how melt ponds would have made the surface | ||
| = darker if they existed. | ||
| =cice: Use the CICE melt pond albedo scheme which uses a fixed value | ||
| = (from albpondv_cice and albpondi_cice) which is linearly | ||
| = ramped to with melt pond depth. No zenith angle dependence is | ||
| = included. | ||
| =malinka: Use the Malinka et al melt pond albedo scheme which uses | ||
| = Fresnel equations for reflection off the surface and multiple | ||
| = scattering within the pond. This has inbuilt zenith angle | ||
| = dependence and more realistic depth dependence. | ||
| ns=namelist/Science/JULES Surface/Sea and sea-ice | ||
| sort-key=Panel-C11 | ||
| value-titles="none","cice","malinka" | ||
| values='none','cice','malinka' | ||
|
|
||
| [namelist:jules_snow=can_clump] | ||
| fail-if=len(this) != namelist:jules_surface_types=npft; # A value must be given for each PFT | ||
| =all(this == 0) and any(namelist:jules_snow=cansnowpft == '.true.'); # Results in floating point exception if 0. Only used if can_model = 4 (JULES default), cansnowpft = TRUE on that tile and l_embedded_snow = TRUE (LFRic default). | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Can these metadata changes please be moved to:
interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-sea-seaice/HEAD/rose-meta.conf
Thanks.
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.
Can you please run
rose config-dump -C interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-sea-seaice/HEAD/thanks.