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

fix to external IC ingest when the NetCDF global attribute is set to source_fv3gfs (GFS ICs) #93

Closed
wants to merge 1 commit into from

Conversation

bensonr
Copy link
Contributor

@bensonr bensonr commented Apr 5, 2021

Description

After much discussion with EMC, it was determined a change was needed to properly compute pressure when ingesting ICs based on GFS v15 and later analyses needed. The code has been updated to properly account for the incoming pressure representation. Inline comments regarding the ingested quantities has also been provided.

Fixes # (issue)

How Has This Been Tested?

Updates were tested as part of the extensive RTS during the merge of master into dev/emc.

Checklist:

Please check all whether they apply or not

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

Atm%q(i,j,k,rainwat) + &
Atm%q(i,j,k,snowwat) + &
Atm%q(i,j,k,graupel)))
qt = wt/(1. + (Atm%q(i,j,k,liq_wat) + &
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original code was correct, see attachment. I may have gotten confused as to which version this was.
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lharris4 thanks for the review. I guess we need to reopen this with EMC. The dev/emc sync has the logic in external_ic::get_nggps_ic as it appears in this PR since that seemed to be the conclusion I thought we arrived at.

@junwang-noaa
Copy link
Collaborator

@bensonr Can you add Kate and Fanglin in this PR?

@yangfanglin
Copy link

Please see https://docs.google.com/document/d/1vgoXO6XMDW8Qx5BXLeFZV_PykU00Ce3pYl47B4sF_3g/edit for the discussion we had back in March 2021. Here are the major points coming out of the discussion

  1. for ICs created from the "old" GSM analyses and history files, both pressures and tracers need to be converted from moist air based to total mass based.
  2. for ICs created from GFS.v15/v16 warm restart files (on the tiles) and analyses (on the Gaussian grid), no conversion is needed.
  3. for ICs created from GFS.v15/v16 history files (on the Gaussian grid), pressures need to be converted from moist air based to total mass based.

For the future: Jun has created a ticket to change tracer mixing ratios from total-mass based to moist-air based in model forecast history files. This change is necessary for providing consistent products to downstream applications and forecasters. After this change is implemented (likely in GFS.v17/GEFS.v13 in 2024), conversions need to be applied to both pressures and tracers if history files are used to create FV3 ICs.

Add @junwang-noaa @XiaqiongZhou-NOAA @[email protected] @[email protected]

@yangfanglin
Copy link

Based on Lucas's derivation and the documentation, it appears if analyses or restart files from GFS.v15/GFS.v16 are used, the original code qt = wt/(1. - (Atm%q(i,j,k,liq_wat) ... is correct. If GFS.v14 data are used, the correction is needed qt = wt/(1. + sum(Atm%q(i,j,k,2:Atm%flagstruct%nwat)))

@yangfanglin
Copy link


From Juan Wang:
In the current code, GFDL master and dev/emc branch (ufs is using dev/emc branch). we have following data sources for GFS ICs:

FV3GFS GAUSSIAN NEMSIO FILE: GFSv14/15
FV3GFS GAUSSIAN NETCDF FILE: GFSv16
FV3GFS GRIB2 FILE: all the GFS ICs, including early ones before GFSv14

If ICs contains one of those attribute values, the "data_source_fv3gfs" will be set to true and the "-" sign will be used. I think we need to update those source attributes to represent correct GFS versions.

@yangfanglin
Copy link


From Linjiong Zhou:

In our version of the code, we get the value of "source" from the global attributes/source of IC file gfs_data.tile1.nc.
If there is no such attribute, that is GFSv14 ICs.
If "source == FV3GFS GAUSSIAN NEMSIO FILE", that is GFS.v15 ICs.
If "source == FV3GFS GAUSSIAN NETCDF FILE", that is GFS.v16 ICs.

For GFS.v15 ICs and GFS.v16 ICs, use the "-" sign, otherwise, use the "+" sign.


Fanglin's reply

It is not guaranteed NEMSIO files will be from GFS.v15. Please see Jun's comments I pasted in PR93.

I think we need to check and update CHGRES to better identify model versions since all cold start ICs on the tiles are generated by the CHGRES.

nwat might be a better identifier. In all GFS versions 14 and older (spectral model) nwat=1. GFS.v15 and 16 have nwat=6. nwat will always be greater than 1 in any future versions. If nwat is used, there is no need to update CHGRES

@yangfanglin
Copy link

Well, nwat may not work. It is the current configuration for running the model. It is not read in from the ICs. Although one can still determine if the ICs are from the old spectral GSM or the fv3-based GFS versions by checking the number of cloud hydrometer variables in the initial conditions.

@arunchawla-NOAA
Copy link

I think we should specifically state what type of ICs are being read in chgres. While this will require code changes in two different code it will explicitly state that and can be documented so future coders do not get tripped by this

@bensonr
Copy link
Contributor Author

bensonr commented Aug 4, 2021

Sorry - I was out of the office for a bit, but please see the discussion in PR #96 on a similar topic. Hunting down the internal document mentioned there will be key.

@bensonr
Copy link
Contributor Author

bensonr commented Aug 13, 2021

Closing as it is no longer needed. This PR was to update master when it should have pushed the logic in master into dev/emc.

@bensonr bensonr closed this Aug 13, 2021
MicroTed pushed a commit to MicroTed/GFDL_atmos_cubed_sphere that referenced this pull request Sep 22, 2021
* Merge branch 'man_hafs_sas_without_updates_of_dtc_develop_49b73a8f4149ca88f071dbaae81f1769b120f1e0' into HEAD
* gfsphysics/physics/GFS_debug.F90: add capability to debug 1-d logical arrays
* Clean up error messages in gfsphysics/GFS_layer/GFS_typedefs.F90

Co-authored-by: Dusan Jovic <[email protected]>
MicroTed pushed a commit to MicroTed/GFDL_atmos_cubed_sphere that referenced this pull request Sep 22, 2021
* Merge branch 'man_hafs_sas_without_updates_of_dtc_develop_49b73a8f4149ca88f071dbaae81f1769b120f1e0' into HEAD
* gfsphysics/physics/GFS_debug.F90: add capability to debug 1-d logical arrays
* Clean up error messages in gfsphysics/GFS_layer/GFS_typedefs.F90

Co-authored-by: Dusan Jovic <[email protected]>
@bensonr bensonr deleted the external_ic_fix branch April 14, 2022 13:30
climbfuji pushed a commit to climbfuji/GFDL_atmos_cubed_sphere that referenced this pull request Apr 24, 2024
…oord_fix

Added a missing protection to run Schmidt transform only when needed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants