ufs-community / UFS_UTILS

Utilities for the NCEP models.
Other
21 stars 104 forks source link

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

Closed ZhanZhang-NOAA closed 3 months ago

ZhanZhang-NOAA commented 3 years ago

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 commented 3 years ago

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

GeorgeGayno-NOAA commented 3 years ago

Initial scope of work:

GeorgeGayno-NOAA commented 3 years ago

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:

GeorgeGayno-NOAA commented 3 years ago

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

HelinWei-NOAA commented 3 years ago

@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_physweasd(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 commented 3 years ago

@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?

junwang-noaa commented 3 years ago

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 .

On Thu, Jun 24, 2021 at 10:28 AM GeorgeGayno-NOAA @.***> wrote:

@junwang-noaa https://github.com/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?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/NOAA-EMC/UFS_UTILS/issues/520#issuecomment-867682476, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI7D6TLGCGVTKD5JYZ3GZFDTUM6JJANCNFSM45FLMAYQ .

GeorgeGayno-NOAA commented 3 years ago

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

BinLiu-NOAA commented 3 years ago

@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 commented 3 years ago

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

BinLiu-NOAA commented 2 years ago

@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!