global_cycle
1.13.0
|
Update surface and NSST fields. More...
Go to the source code of this file.
Functions/Subroutines | |
subroutine | adjust_nsst (RLA, RLO, SLMSK_TILE, SLMSK_FG_TILE, SKINT_TILE, SICET_TILE, sice_tile, sice_fg_tile, SOILT_TILE, NSST, LENSFC, LSOIL, IDIM, JDIM, ZSEA1, ZSEA2, tf_clm_tile, tf_trd_tile, sal_clm_tile, LANDFRAC, FRAC_GRID) |
Read in gsi file with the updated reference temperature increments (on the gaussian grid), interpolate increments to the cubed-sphere tile, and perform required nsst adjustments and qc. More... | |
subroutine | climo_trend (LATITUDE, MON, DAY, DELTSFC, DTREF) |
If the tile point is an isolated water point that has no corresponding gsi water point, then tref is updated using the rtg sst climo trend. More... | |
subroutine | dtzm_point (XT, XZ, DT_COOL, ZC, Z1, Z2, DTZM) |
Compute the vertical mean of the NSST t-profile. More... | |
subroutine | get_sal_clm (xlats_ij, xlons_ij, ny, nx, iy, im, id, ih, sal_clm) |
Get salinity climatology at the valid time on the target grid. More... | |
subroutine | get_sal_clm_ta (sal_clm_ta, xlats, xlons, nlat, nlon, mon1, mon2, wei1, wei2) |
Get climatological salinity at the analysis time. More... | |
subroutine | get_tf_clm (xlats_ij, xlons_ij, ny, nx, iy, im, id, ih, tf_clm, tf_trd) |
Get the sst climatology at the valid time and on the target grid. More... | |
subroutine | get_tf_clm_ta (tf_clm_ta, tf_clm_trend, xlats, xlons, nlat, nlon, mon1, mon2, wei1, wei2) |
Get the reference temperature/sst climatology and its trend at analysis time. More... | |
subroutine | get_tim_wei (iy, im, id, ih, mon1, mon2, wei1, wei2) |
For a given date, determine the bounding months and the linear time interpolation weights. More... | |
subroutine | intp_tile (tf_lalo, dlats_lalo, dlons_lalo, jdim_lalo, idim_lalo, tf_tile, xlats_tile, xlons_tile, jdim_tile, idim_tile) |
Interpolate lon/lat grid data to the fv3 native grid (tf_lalo => tf_tile). More... | |
subroutine | nsst_water_reset (nsst, ij, tf_thaw) |
If the first guess was sea ice, but the analysis is open water, reset all nsst variables. More... | |
program | sfc_drv |
Stand alone surface/NSST cycle driver for the cubed-sphere grid. More... | |
subroutine | sfcdrv (LUGB, IDIM, JDIM, LENSFC, LSOIL, DELTSFC, IY, IM, ID, IH, FH, IALB, USE_UFO, DO_NSST, DO_SFCCYCLE, DO_LNDINC, FRAC_GRID, ZSEA1, ZSEA2, ISOT, IVEGSRC, MYRANK) |
Driver routine for updating the surface fields. More... | |
subroutine | tf_thaw_set (tf_ij, mask_ij, itile, jtile, tice, tclm, tf_thaw, nx, ny, nset_thaw_s, nset_thaw_i, nset_thaw_c) |
Set the background reference temperature (tf) for points where the ice has just melted. More... | |
real function | tfreez (salinity) |
Compute the freezing point of water as a function of salinity. More... | |
Update surface and NSST fields.
Definition in file cycle.f90.
subroutine adjust_nsst | ( | real, dimension(lensfc), intent(in) | RLA, |
real, dimension(lensfc), intent(in) | RLO, | ||
real, dimension(lensfc), intent(in) | SLMSK_TILE, | ||
real, dimension(lensfc), intent(in) | SLMSK_FG_TILE, | ||
real, dimension(lensfc), intent(inout) | SKINT_TILE, | ||
real, dimension(lensfc), intent(inout) | SICET_TILE, | ||
real, dimension(lensfc), intent(in) | sice_tile, | ||
real, dimension(lensfc), intent(in) | sice_fg_tile, | ||
real, dimension(lensfc,lsoil), intent(inout) | SOILT_TILE, | ||
type(nsst_data) | NSST, | ||
integer, intent(in) | LENSFC, | ||
integer, intent(in) | LSOIL, | ||
integer, intent(in) | IDIM, | ||
integer, intent(in) | JDIM, | ||
real, intent(in) | ZSEA1, | ||
real, intent(in) | ZSEA2, | ||
real, dimension(lensfc), intent(in) | tf_clm_tile, | ||
real, dimension(lensfc), intent(in) | tf_trd_tile, | ||
real, dimension(lensfc), intent(in) | sal_clm_tile, | ||
real, dimension(lensfc), intent(in) | LANDFRAC, | ||
logical, intent(in) | FRAC_GRID | ||
) |
Read in gsi file with the updated reference temperature increments (on the gaussian grid), interpolate increments to the cubed-sphere tile, and perform required nsst adjustments and qc.
[in] | RLA | Latitude on the cubed-sphere tile |
[in] | RLO | Longitude on the cubed-sphere tile |
[in] | SLMSK_TILE | Land-sea mask on the cubed-sphere tile |
[in] | SLMSK_FG_TILE | First guess land-sea mask on the cubed-sphere tile |
[in,out] | SKINT_TILE | Skin temperature on the cubed-sphere tile |
[in,out] | SICET_TILE | Ice temperature on the cubed-sphere tile |
[in] | sice_tile | Ice concentration on the cubed-sphere tile |
[in] | sice_fg_tile | First guess ice concentration on the cubed-sphere tile |
[in,out] | SOILT_TILE | Soil temperature on the cubed-sphere tile |
[in] | NSST | Data structure holding nsst fields |
[in] | LENSFC | Number of points on a tile |
[in] | LSOIL | Number of soil layers |
[in] | IDIM | 'I' dimension of a tile |
[in] | JDIM | 'J' dimension of a tile |
[in] | ZSEA1 | When running nsst model, this is the lower bound of depth of sea temperature. In whole mm. |
[in] | ZSEA2 | When running nsst model, this is the upper bound of depth of sea temperature. In whole mm. |
[in] | tf_clm_tile | Climatological reference temperature on the cubed-sphere tile. |
[in] | tf_trd_tile | Climatolocial reference temperature trend on the cubed-sphere tile. |
[in] | sal_clm_tile | Climatological salinity on the cubed-sphere tile. |
[in] | LANDFRAC | Land fraction |
[in] | FRAC_GRID | Process fractional grid when true. |
Definition at line 859 of file cycle.f90.
References dtzm_point(), nsst_water_reset(), utils::remap_coef(), tf_thaw_set(), and tfreez().
Referenced by sfcdrv().
subroutine climo_trend | ( | real, intent(in) | LATITUDE, |
integer, intent(in) | MON, | ||
integer, intent(in) | DAY, | ||
real, intent(in) | DELTSFC, | ||
real, intent(out) | DTREF | ||
) |
If the tile point is an isolated water point that has no corresponding gsi water point, then tref is updated using the rtg sst climo trend.
This monthly trend is sorted by latitude band.
[in] | LATITUDE | Latitude of tile point |
[in] | MON | Month |
[in] | DAY | Day |
[in] | DELTSFC | Cycling frequency in hours |
[out] | DTREF | Monthly trend of reference temperature |
subroutine dtzm_point | ( | real, intent(in) | XT, |
real, intent(in) | XZ, | ||
real, intent(in) | DT_COOL, | ||
real, intent(in) | ZC, | ||
real, intent(in) | Z1, | ||
real, intent(in) | Z2, | ||
real, intent(out) | DTZM | ||
) |
Compute the vertical mean of the NSST t-profile.
[in] | xt | Heat content in the diurnal thermocline layer. |
[in] | xz | Thickness of the diurnal thermocline layer. |
[in] | dt_cool | Skin-layer cooling amount. |
[in] | zc | Thickness of skin-layer. |
[in] | z1 | Lower bound of depth of sea temperature. |
[in] | z2 | Upper bound of depth of sea temperature. |
[out] | dtzm | Mean of the NSST t-profile from z1 to z2. |
Definition at line 1440 of file cycle.f90.
Referenced by adjust_nsst().
subroutine get_sal_clm | ( | real, dimension(nx*ny), intent(in) | xlats_ij, |
real, dimension(nx*ny), intent(in) | xlons_ij, | ||
integer, intent(in) | ny, | ||
integer, intent(in) | nx, | ||
integer, intent(in) | iy, | ||
integer, intent(in) | im, | ||
integer, intent(in) | id, | ||
integer, intent(in) | ih, | ||
real, dimension(nx,ny), intent(out) | sal_clm | ||
) |
Get salinity climatology at the valid time on the target grid.
[in] | xlats_ij | Latitudes of target grid |
[in] | xlons_ij | Longitudes of target grid |
[in] | ny | 'j' dimension of target grid |
[in] | nx | 'i' dimension of target grid |
[in] | iy | Year |
[in] | im | Month |
[in] | id | Day |
[in] | ih | Hour |
[out] | sal_clm | Salinity climatology on the target grid at the valid time |
Definition at line 1766 of file cycle.f90.
References read_write_data::get_dim_nc(), get_sal_clm_ta(), get_tim_wei(), and intp_tile().
Referenced by sfcdrv().
subroutine get_sal_clm_ta | ( | real, dimension(nlon,nlat), intent(out) | sal_clm_ta, |
real, dimension(nlat), intent(out) | xlats, | ||
real, dimension(nlon), intent(out) | xlons, | ||
integer, intent(in) | nlat, | ||
integer, intent(in) | nlon, | ||
integer, intent(in) | mon1, | ||
integer, intent(in) | mon2, | ||
real, intent(in) | wei1, | ||
real, intent(in) | wei2 | ||
) |
Get climatological salinity at the analysis time.
[in] | nlat | 'j' dimension of climatological data |
[in] | nlon | 'i' dimension of climatological data |
[in] | mon1 | First bounding month |
[in] | mon2 | Second bounding month |
[in] | wei1 | Weight of first bounding month |
[in] | wei2 | Weight of second bounding month |
[out] | sal_clm_ta | Climatological salinity at the analysis time |
[out] | xlats | Latitudes on the climatological grid |
[out] | xlons | Longitudes on the climatological grid |
Definition at line 1826 of file cycle.f90.
References read_write_data::read_salclm_gfs_nc().
Referenced by get_sal_clm().
subroutine get_tf_clm | ( | real, dimension(nx*ny), intent(in) | xlats_ij, |
real, dimension(nx*ny), intent(in) | xlons_ij, | ||
integer, intent(in) | ny, | ||
integer, intent(in) | nx, | ||
integer, intent(in) | iy, | ||
integer, intent(in) | im, | ||
integer, intent(in) | id, | ||
integer, intent(in) | ih, | ||
real, dimension(nx,ny), intent(out) | tf_clm, | ||
real, dimension(nx,ny), intent(out) | tf_trd | ||
) |
Get the sst climatology at the valid time and on the target grid.
[in] | xlats_ij | latitude of target grid |
[in] | xlons_ij | longitude of target grid |
[in] | ny | 'j' dimension of target grid |
[in] | nx | 'i' dimension of target grid |
[in] | iy | Year |
[in] | im | Month |
[in] | id | Day |
[in] | ih | Hour |
[out] | tf_clm | sst climatology at the valid time and on the target grid |
[out] | tf_trd | 6-hourly sst climatology tendency at the valid time and on the target grid. |
Definition at line 1649 of file cycle.f90.
References read_write_data::get_tf_clm_dim(), get_tf_clm_ta(), get_tim_wei(), and intp_tile().
Referenced by sfcdrv().
subroutine get_tf_clm_ta | ( | real, dimension(nlon,nlat), intent(out) | tf_clm_ta, |
real, dimension(nlon,nlat), intent(out) | tf_clm_trend, | ||
real, dimension(nlat), intent(out) | xlats, | ||
real, dimension(nlon), intent(out) | xlons, | ||
integer, intent(in) | nlat, | ||
integer, intent(in) | nlon, | ||
integer, intent(in) | mon1, | ||
integer, intent(in) | mon2, | ||
real, intent(in) | wei1, | ||
real, intent(in) | wei2 | ||
) |
Get the reference temperature/sst climatology and its trend at analysis time.
The data is time interpolated between two bounding months.
[out] | tf_clm_ta | Climatological tf/sst at analysis time |
[out] | tf_clm_trend | Climatological tf/sst trend at analysis time |
[out] | xlats | Latitudes on the climatological data grid |
[out] | xlons | Longitudes on the climatological data grid |
[in] | nlat | 'j' dimension on the climatological grid |
[in] | nlon | 'i' dimension on the climatological grid |
[in] | mon1 | First bounding month |
[in] | mon2 | Second bounding month |
[in] | wei1 | Weighting of first bounding month |
[in] | wei2 | Weighting of second bounding month |
Definition at line 1718 of file cycle.f90.
References read_write_data::read_tf_clim_grb().
Referenced by get_tf_clm().
subroutine get_tim_wei | ( | integer, intent(in) | iy, |
integer, intent(in) | im, | ||
integer, intent(in) | id, | ||
integer, intent(in) | ih, | ||
integer, intent(out) | mon1, | ||
integer, intent(out) | mon2, | ||
real, intent(out) | wei1, | ||
real, intent(out) | wei2 | ||
) |
For a given date, determine the bounding months and the linear time interpolation weights.
[in] | iy | The year |
[in] | im | The month |
[in] | id | The day |
[in] | ih | The hour |
[out] | mon1 | First bounding month |
[out] | mon2 | Second bounding month |
[out] | wei1 | Weighting of first bounding month |
[out] | wei2 | Weighting of second bounding month |
Definition at line 1960 of file cycle.f90.
Referenced by get_sal_clm(), and get_tf_clm().
subroutine intp_tile | ( | real, dimension(idim_lalo,jdim_lalo), intent(in) | tf_lalo, |
real, dimension(jdim_lalo), intent(in) | dlats_lalo, | ||
real, dimension(idim_lalo), intent(in) | dlons_lalo, | ||
integer, intent(in) | jdim_lalo, | ||
integer, intent(in) | idim_lalo, | ||
real, dimension(jdim_tile*idim_tile), intent(out) | tf_tile, | ||
real, dimension(jdim_tile*idim_tile), intent(in) | xlats_tile, | ||
real, dimension(jdim_tile*idim_tile), intent(in) | xlons_tile, | ||
integer, intent(in) | jdim_tile, | ||
integer, intent(in) | idim_tile | ||
) |
Interpolate lon/lat grid data to the fv3 native grid (tf_lalo => tf_tile).
Does not account for a mask.
[in] | tf_lalo | (idim_lalo,idim_lalo) field on the lat/lon regular grid. |
[in] | dlats_lalo | (jdim_lalo) latitudes along y direction of lat/lon regular grid points. |
[in] | dlons_lalo | (idim_lalo) longitudes along x direction of lat/lon regular grid points. |
[in] | jdim_lalo | number of y dimension of tf_lalo. |
[in] | idim_lalo | number of x dimension of tf_lalo. |
[in] | xlats_tile | (jdim_tile*idim_tile) latitudes of all tile grid points. |
[in] | xlons_tile | (jdim_tile*idim_tile) longitudes of all tile grid points. |
[in] | jdim_tile | number of y dimension of tf_tile. |
[in] | idim_tile | number of x dimension of tf_tile. |
[out] | tf_tile | (jdim_tile*idim_tile) field on the cubed sphere grid. |
Definition at line 1871 of file cycle.f90.
References utils::remap_coef().
Referenced by get_sal_clm(), and get_tf_clm().
subroutine nsst_water_reset | ( | type(nsst_data), intent(inout) | nsst, |
integer, intent(in) | ij, | ||
real, intent(in) | tf_thaw | ||
) |
If the first guess was sea ice, but the analysis is open water, reset all nsst variables.
[in,out] | nsst | Data structure that holds the nsst fields |
[in] | ij | Index of point to be updated |
[in] | tf_thaw | Reference temperature for former ice points |
Definition at line 1603 of file cycle.f90.
Referenced by adjust_nsst().
program sfc_drv | ( | ) |
Stand alone surface/NSST cycle driver for the cubed-sphere grid.
Each cubed-sphere tile runs independently on its own mpi task. The surface update component runs with threads. The NSST update component in not threaded.
There are three main options (which can be called in combination):
3a. Update the NSST TREF field using GSI increments on the Gaussian grid. All other NSST fields are cycled. Invoke this option by setting namelist variable DONST=.true. and NST_FILE to the name of the GSI increment file.
3b. Run with NSST, but postpone the TREF update. Here all NSST fields are cycled. But the NSST IFD field is used to flag points that flipped from ice to open water. To invoke this option, set DONST=.true. and NST_FILE="NULL".
INPUT FILES:
OUTPUT FILES:
NOTE: $NNN corresponds to (mpi rank + 1)
NAMELIST VARIABLE DEFINITIONS:
-2005-02-03: Iredell for global_analysis -2014-11-30: xuli add nst_anl -2015-05-26: Hang Lei Added NEMSIO read/write function in the code -2017-08-08: Gayno Modify to work on cubed-sphere grid. Added processing of NSST and TREF update. Added mpi directives. -2020-02-17: Clara Draper Added soil state increments capability.
Definition at line 101 of file cycle.f90.
References num_parthds(), and sfcdrv().
subroutine sfcdrv | ( | integer, intent(in) | LUGB, |
integer, intent(in) | IDIM, | ||
integer, intent(in) | JDIM, | ||
integer, intent(in) | LENSFC, | ||
integer, intent(in) | LSOIL, | ||
real, intent(in) | DELTSFC, | ||
integer, intent(in) | IY, | ||
integer, intent(in) | IM, | ||
integer, intent(in) | ID, | ||
integer, intent(in) | IH, | ||
real, intent(in) | FH, | ||
integer, intent(in) | IALB, | ||
logical, intent(in) | USE_UFO, | ||
logical, intent(in) | DO_NSST, | ||
logical, intent(in) | DO_SFCCYCLE, | ||
logical, intent(in) | DO_LNDINC, | ||
logical, intent(in) | FRAC_GRID, | ||
real, intent(in) | ZSEA1, | ||
real, intent(in) | ZSEA2, | ||
integer, intent(in) | ISOT, | ||
integer, intent(in) | IVEGSRC, | ||
integer, intent(in) | MYRANK | ||
) |
Driver routine for updating the surface fields.
This program runs in two different modes:
Analysis mode (FH=0.)
This program merges climatology, analysis and forecast guess to create new surface fields. If analysis file is given, the program uses it if date of the analysis matches with IY,IM,ID,IH (see Note below).
Forecast mode (FH.GT.0.)
This program interpolates climatology to the date corresponding to the forecast hour. If surface analysis file is given, for the corresponding dates, the program will use it. This is forcing-by-observation experiment.
If the date of the analysis does not match given IY,IM,ID,IH, (and FH), the program searches an old analysis by going back 6 hours, then 12 hours, then one day upto NREPMX days (parameter statement in the SUBROTINE FIXRD. Now defined as 15). This allows the user to provide non-daily analysis to be used. If matching field is not found, the forecast guess will be used.
Variable naming convention for this program:
Most fields have a blending coefficient. This controls the blending of the forecast (first guess) and interpolated climatology or analyzed fields. When it is equal to 1.0, the pure forecast is used. When the coefficient is equal to 0, the pure climatology or analysis is used. The default values are set as follows:
Variables | Land | Sea |
---|---|---|
Surface temperature | Forecast | Analysis |
Albedo | Analysis | Analysis |
Sea-ice | Analysis | Analysis |
Snow | Analysis | Forecast (over sea ice) |
Roughness | Analysis | Forecast |
Plant resistance | Analysis | Analysis |
Soil moisture | Weighted average | Analysis |
Soil temperature | Forecast | Analysis |
Canopy waver content | Forecast | Forecast |
Convective cloud cover | Forecast | Forecast |
Convective cloud bottm | Forecast | Forecast |
Convective cloud top | Forecast | Forecast |
Vegetation greenness | Analysis | Analysis |
Vegetation type | Analysis | Analysis |
Soil type | Analysis | Analysis |
[in] | LUGB | Fortran unit number uses in sfccycle subprogram to read input datasets. |
[in] | IDIM | 'i' dimension of the cubed-sphere tile |
[in] | JDIM | 'j' dimension of the cubed-sphere tile |
[in] | LENSFC | Total numberof points for the cubed-sphere tile |
[in] | LSOIL | Number of soil layers |
[in] | DELTSFC | Cycling frequency in hours |
[in] | IY | Year of initial state |
[in] | IM | Month of initial state |
[in] | ID | Day of initial state |
[in] | IH | Hour of initial state |
[in] | FH | Forecast hour |
[in] | IALB | Use modis albedo when '1'. Use brigleb when '0'. |
[in] | USE_UFO | When true, adjust SST and soil temperature for differences between the filtered and unfiltered terrain. |
[in] | DO_NSST | When true, process NSST records. |
[in] | DO_SFCCYCLE | Call sfccycle routine to update surface fields |
[in] | DO_LNDINC | Read in land increment files, and add increments to requested states. |
[in] | FRAC_GRID | When true, run with fractional grid. |
[in] | ZSEA1 | When running NSST model, this is the lower bound of depth of sea temperature. In whole mm. |
[in] | ZSEA2 | When running NSST model, this is the upper bound of depth of sea temperature. In whole mm. |
[in] | ISOT | Use STATSGO soil type when '1'. Use Zobler when '0'. |
[in] | IVEGSRC | Use IGBP vegetation type when '1'. Use SIB when '2'. |
[in] | MYRANK | MPI rank number |
Definition at line 299 of file cycle.f90.
References land_increments::add_increment_snow(), land_increments::add_increment_soil(), adjust_nsst(), land_increments::apply_land_da_adjustments_snd(), land_increments::apply_land_da_adjustments_soil(), land_increments::calculate_landinc_mask(), get_sal_clm(), get_tf_clm(), num_parthds(), read_write_data::read_data(), read_write_data::read_gsi_data(), read_write_data::read_lat_lon_orog(), and read_write_data::write_data().
Referenced by sfc_drv().
subroutine tf_thaw_set | ( | real, dimension(nx*ny), intent(in) | tf_ij, |
integer, dimension(nx*ny), intent(in) | mask_ij, | ||
integer, intent(in) | itile, | ||
integer, intent(in) | jtile, | ||
real, intent(in) | tice, | ||
real, intent(in) | tclm, | ||
real, intent(out) | tf_thaw, | ||
integer, intent(in) | nx, | ||
integer, intent(in) | ny, | ||
integer, intent(inout) | nset_thaw_s, | ||
integer, intent(inout) | nset_thaw_i, | ||
integer, intent(inout) | nset_thaw_c | ||
) |
Set the background reference temperature (tf) for points where the ice has just melted.
[in] | tf_ij | Foundation temperature background on FV3 native grids. |
[in] | mask_ij | Mask of the tile (FV3 native grids). |
[in] | itile | Location index in the 'i' direction. |
[in] | jtile | Location index in the 'j' direction. |
[in] | tice | Water temperature (calulated with a salinity formula). |
[in] | tclm | SST climatology valid at the analysis time. |
[out] | tf_thaw | Foundation temperature of thawed points. |
[in,out] | nx | 'i' dimension of tf_ij |
[in,out] | ny | 'j' dimension of tf_ij |
[in,out] | nset_thaw_s | Number of foundation temperature points filled via a search. |
[in,out] | nset_thaw_i | Number of ice points filled with a calculated tice. |
[in,out] | nset_thaw_c | Number of points filled with a weighted average of tice and tclm. |
Definition at line 1512 of file cycle.f90.
Referenced by adjust_nsst().
real function tfreez | ( | real | salinity | ) |
Compute the freezing point of water as a function of salinity.
Constants taken from Gill, 1982.
[in] | salinity | The salinity. |
Definition at line 2027 of file cycle.f90.
Referenced by adjust_nsst().