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

chgres_cube: output in restart format when input from warm start files #520

Closed
ZhanZhang-NOAA opened this issue May 19, 2021 · 11 comments
Closed
Assignees
Labels
enhancement New feature or request

Comments

@ZhanZhang-NOAA
Copy link

Current version of chgres_cube is able to take a FV3 warm restart file and interpolate/remap it to a different resolution/domain-coverage in cold-start format, but not in fv3 warm restart format.

Is it possible to enhance the current chgres_cube capability to write output file in warm restart format when input from warm start file. This capability will be very useful for conversions, fields remapping between different domain coverages and resolutions, which are needed in HAFS and other UFS applications.

@GeorgeGayno-NOAA GeorgeGayno-NOAA added the enhancement New feature or request label May 20, 2021
@GeorgeGayno-NOAA
Copy link
Collaborator

@ZhanZhang-NOAA To whom should I assign this task?

@GeorgeGayno-NOAA
Copy link
Collaborator

Initial scope of work:

  • New routines to output data in the warm restart format. Like the cold start files, the warm start files are NetCDF. However, unlike the cold start format, the warm restart atmospheric data is stored in multiple files.
  • In the cold start files, the u/v winds are on the 'a' grid and earth relative. In the warm restart files, they are staggered and tile relative. So routines to turn the winds to the tile will need to be identified and added to chgres.

@GeorgeGayno-NOAA
Copy link
Collaborator

Some notes about the surface files: The cold and warm restart files contain most of the same fields, with the same record id and the same units. That is a good thing. But there are some differences:

  • The cold start files contain 'geolat' and 'geolon' records. Those records are not in the warm start files.
  • The 'zm' field is zeroed out in the cold start files. It contains real data in the warm start files.
  • The warm start files have a snow cover record ('sncovr') that is not in the cold start file.
  • The 'srflag' (snow/rain flag) record is zeroed out in the cold start files. It contains real data in the warm start files.
  • The 'ffhh' record is zeroed out in the cold start files. It contains real data in the warm start files.

GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Jun 22, 2021
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Jun 22, 2021
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Jun 22, 2021
@GeorgeGayno-NOAA
Copy link
Collaborator

@HelinWei-NOAA How is snow cover computed by the LSM? Which routine?

@HelinWei-NOAA
Copy link
Collaborator

@HelinWei-NOAA How is snow cover computed by the LSM? Which routine?

snow cover is computed differently in three different LSMs inside UFS. However the Noah LSM routine is used to initialize the snow cover inGFS_phys_time_vary.fv3.F90:

!$OMP section
!--- if sncovr does not exist in the restart, need to create it
if (all(sncovr < zero)) then
if (me == master ) write(0,'(a)') 'GFS_phys_time_vary_init: compute sncovr from weasd and soil vegetation parameters'
!--- compute sncovr from existing variables
!--- code taken directly from read_fix.f
sncovr(:) = zero
do ix=1,im
if (landfrac(ix) >= drythresh .or. fice(ix) >= min_seaice) then
vegtyp = vtype(ix)
if (vegtyp == 0) vegtyp = 7
rsnow = 0.001_kind_physweasd(ix)/snupx(vegtyp)
if (0.001_kind_phys
weasd(ix) < snupx(vegtyp)) then
sncovr(ix) = one - (exp(-salp_datarsnow) - rsnowexp(-salp_data))
else
sncovr(ix) = one
endif
endif
enddo
endif

This is corresponding to the subroutine snfrac inside sflx.f (Noah LSM)

GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Jun 23, 2021
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Jun 24, 2021
@GeorgeGayno-NOAA
Copy link
Collaborator

@junwang-noaa I have questions about starting the model with warm restart files. For example, are all records in the restart files actually needed or are some diagnostic? Who would I ask? Which model routine reads the restart files?

GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Jun 24, 2021
@junwang-noaa
Copy link
Contributor

junwang-noaa commented Jun 24, 2021 via email

GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Jun 24, 2021
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Jun 24, 2021
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Jun 24, 2021
@GeorgeGayno-NOAA
Copy link
Collaborator

GeorgeGayno-NOAA commented Jun 29, 2021

George, There are some diagnostic fields in the restart files (e.g. non bucket total avg precip and total ave convective precip) in restart phy_data in order to get restart reproducibility. The code to read restart files are: in dycore, subroutine fv_io_read_restart in FV3/atmos_cubed_sphere/tools/fv_io.F90 and subroutine sfc_prop_restart_read and phys_restart_read in FV3/io/FV3GFS_io.F90 for physics restart files .

https://github.com/NOAA-GFDL/GFDL_atmos_cubed_sphere/blob/3720aeae54eeed54d4e8274756857542b3e5dccc/tools/fv_io.F90#L145

https://github.com/NOAA-EMC/fv3atm/blob/6a1e4f29e1b353d6faa006bfb4488d7aab9ef1b5/io/FV3GFS_io.F90#L476

https://github.com/NOAA-EMC/fv3atm/blob/6a1e4f29e1b353d6faa006bfb4488d7aab9ef1b5/io/FV3GFS_io.F90#L1848

GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Jun 29, 2021
@BinLiu-NOAA
Copy link
Collaborator

@GeorgeGayno-NOAA, is it ok that I point you to the regional FV3 restart files for you to look at or test with? Or you would prefer to start with global model (saying GFSv16) restart files to start with? For GFSv16 (GFS/GDAS) restart files, I can point you to the wcoss operational location. For regional restart files, I can create/point you to the corresponding files on Orion (or other platforms).

Thanks!

Bin

GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Jun 30, 2021
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Jun 30, 2021
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Jul 1, 2021
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Jul 1, 2021
@GeorgeGayno-NOAA
Copy link
Collaborator

Code to turn the winds from earth relative to grid relative (when reading coldstart files):

https://github.com/NOAA-GFDL/GFDL_atmos_cubed_sphere/blob/3720aeae54eeed54d4e8274756857542b3e5dccc/tools/external_ic.F90#L735

GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Jul 8, 2021
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Jul 9, 2021
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Jul 9, 2021
Increase precision of gravity when computing phis to better
match the forecast model.

Fixes ufs-community#520.
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Jul 9, 2021
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Jul 9, 2021
will tell the forecast model to initialize that field.

Fixes ufs-community#520.
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Jul 16, 2021
The previous method would not give correct results with
more than six mpi tasks.

Fixes ufs-community#520.
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Aug 2, 2021
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Aug 17, 2021
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Sep 1, 2021
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Sep 29, 2021
@BinLiu-NOAA
Copy link
Collaborator

@GeorgeGayno-NOAA, when choosing to write out the warm start files with your feature/warm_start branch, is there a restriction that the input data have to be restart files? Or the input can also be GFS/GDAS netcdf/grib2 files? Thanks!

GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants