-
Notifications
You must be signed in to change notification settings - Fork 152
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
gmtb/develop: address physics issue 300 and coupled code with bugfix #308
gmtb/develop: address physics issue 300 and coupled code with bugfix #308
Conversation
Gmtb/develop
…he code for RUC LSM); change units of soil moisture content and runoff variables to kg m-2 (CCPP metadata had been in error and they only were in kg m-2 after a conversion in GFS_diagnostics.F90); should be merged with removal of conversion factor in GFS_diagnostics.F90 in FV3 repo
modified according to Dom's comments passed regression test.
modified sfc_cice.f
… correct logic for cice land-sea-ice mask
Associated PRs: https://github.com/NCAR/FV3/pull/195 Tested together with NCAR/NEMS#3 and https://github.com/NCAR/NEMSfv3gfs/pull/234 |
@@ -263,28 +261,19 @@ subroutine sfc_sice_run & | |||
errflg = 0 | |||
|
|||
if(cplflx)then | |||
write(*,*)'Fatal error: CCPP is not ready for cplflx=true!!' | |||
write(*,*)'Fatal error: CCPP not been tested with cplflx=true!' |
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.
Do we still need this here after this PR? Until the NEMSCompset changes are made to work with CCPP?
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.
Yes, we agreed to keep this in here until we have actually tested it on our end in a coupled configuration.
endif | ||
enddo | ||
endif | ||
if (cplflx) then |
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.
I like this syntax. It makes sense to me.
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.
Thanks! Very pythonic and easily readable.
physics/GFS_surface_generic.F90
Outdated
hice_cice(i) = hice(i) | ||
if(flag_cice(i)) tsfc(i) = fice_cice(i)*tisfc_cice(i) + (1. - fice_cice(i))*tsea_cice(i) | ||
enddo | ||
else |
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.
flag_cice is already set to F in interstitial_phys_reset, so this isn't necessary, although it doesn't hurt.
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.
You are correct. Same for line 266 just above. I can remove lines 265-266 and lines 279-281 if you prefer (I'll repeat a small set of tests, e.g. rt_ccpp_gsd in verify mode).
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.
I removed those lines
physics/GFS_PBL_generic.F90
Outdated
!! | q1 | water_vapor_specific_humidity_at_lowest_model_layer_for_diag | layer 1 specific humidity for diag | kg kg-1 | 1 | real | kind_phys | in | F | | ||
!! | prsl | air_pressure | mean layer pressure | Pa | 2 | real | kind_phys | in | F | | ||
!! | hflx | kinematic_surface_upward_sensible_heat_flux | kinematic surface upward sensible heat flux | K m s-1 | 1 | real | kind_phys | in | F | | ||
!! | ushfsfci | instantaneous_upward_sensible_heat_flux | instantaneous upward sensible heat flux | W m-2 | 1 | real | kind_phys | out | F | |
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.
This is very close to the other standard name 'instantaneous_surface_upward_sensible_heat_flux'. Other variables in the Coupling DDT that have similar names (or represent the same physical quantities) as those in other DDTs have been distinguished by appending "for_coupling" to the end. So, maybe consider "instantaneous_surface_upward_sensible_heat_flux_for_coupling" for a standard name (also change in GFS_typedefs metadata).
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.
But dtsfci_cpl already has the standard name instantaneous_surface_upward_sensible_heat_flux_for_coupling (also present in the same metadata table)
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.
What shall we do with this? Keep the "dangerous" name or decorate with something else?
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.
I wonder if you can hear my sigh through the internet. :)
So many variables for the same thing with tiny nuances. In this instance, I cannot tell at first glance the difference between dtsfci_cpl and ushfsfci. Different sign? Looks like ushfsfci is only used for chemistry coupling. Could we add "for_chemistry_coupling" instead?
It would be really nice to have a written procedure for this.
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.
Ok I will do this. You should be glad that you can't hear my cursing through the internet!
physics/GFS_PBL_generic.F90
Outdated
tem = prsl(i,1) / (rd*t1(i)*(1.0+fvirt*tem1)) | ||
ushfsfci(i) = -cp * tem * hflx(i) ! upward sensible heat flux | ||
enddo | ||
!! Coupling%dkt (:,:) = dkt (:,:) |
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.
How can we get away with not setting this? dkt is an interstitial and is reset every time step, whereas Coupling%dkt is not.
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.
I would ask the original author as to why. But noting that Interstitial%dkt has dimensions (IM,Model%levs-1), while Coupling%dkt has (IM,Model%levs). Hence, we'd have to make this line
dkt_cpl(1:im,1:levs-1) = dkt(1:im,1:levs-1)
I can make this change as well.
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.
I made this change.
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.
Maybe we can only get away with it because cplchm has not been turned on? @panll
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.
Already done.
physics/GFS_surface_generic.F90
Outdated
dvsfc_cice(i) = dvsfcin_cpl(i) | ||
dtsfc_cice(i) = dtsfcin_cpl(i) | ||
dqsfc_cice(i) = dqsfcin_cpl(i) | ||
tisfc_cice(i) = tisfc(i) |
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.
I don't see the equivalent of lines 273-276 in GFS_physics_driver.F90 anymore. Are they still needed?
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.
I removed them, can't find any reference to this code in GFS_physics_driver.F90 either.
…titial dkt to coupling dkt
… no longer in GFS_physics_driver.F90, remove redundant assignment of default values for flag_cice
…t_flux to instantaneous_surface_upward_sensible_heat_flux_for_chemistry_coupling
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.
Looks good to me now after @climbfuji's changes. Thanks @climbfuji and @panll
Thanks. I will rerun the rt_ccpp_gsd.conf verify-mode tests and the rt_ccpp_gmtb.conf verify-mode tests. This should be sufficient evidence that the code still gives the same answer. |
Features: - Implemented sharing of atmospheric tracer metadata (name, units) to coupled model component via a standard NUOPC connector if coupling tracer field is accessed by shared memory reference - Introduced additional metadata to tracer records in field_table to identify and validate prognostic and diagnostic chemistry tracers. A new record line starting with the `tracer_usage` keyword is now required to recognize chemistry tracer as follows: "tracer_usage", "chemistry" (default, prognostic) "tracer_usage", "chemistry", "type=diagnostic" (diagnostic) - Added sanity check for input chemistry tracers, ensuring that both prognostic and diagnostic tracers in field_table are contiguous, and diagnostic tracers follow prognostic ones. - Improved algorithm to set aerosol scavenging factors - Exported instantaneous fields for: - 3D non-convective liquid and ice precipitation fluxes - 3D cloud fraction - normalized soil wetness - ice fraction (as used in the atmospheric model) - lake fraction - ocean fraction - surface snow area fraction - Enabled import of diagnostic tracers Fixes: - Prevent a divide by zero error when constant arrays are rescaled for lossy compression in `write_netcdf_parallel()` - Correctly sample and compute elapsed time for field bundle regridding operations. - Include hotfix (see PR NCAR#308) to allow latest `setup_exportdata()` to work with coupled chemistry. Co-authored-by: Dom Heinzeller <[email protected]>
This PR combines PRs address issue 300 (#302) from @grantfirl and add capability to run in coupled configuration (#299) from @panll, with bugfixes from @climbfuji for PR #299.
See https://github.com/NCAR/FV3/pull/195 for regression testing information.