-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to process ocean/ice products specific to GEFS (#2561)
This PR begins to add the capability to produce GEFSv13 ocean and ice products in the global-workflow according to stakeholder requirements. The following features are added. - An oceanice prod yaml file has been added to address the ocean and ice products specific to GEFSv13. - The rocoto dependencies and config.base for GEFS have also been modified to allow for 24-hour averaged ocean and ice output. - Various scripts have been modified to allow for ocean and ice output frequencies of 24 hours. - `FHOUT_OCNICE` has been split into two variables called `FHOUT_OCN` and `FHOUT_ICE`. The same has been done for `FHOUT_OCNICE_GFS`. Refs #1878
- Loading branch information
1 parent
6691e74
commit 15eaf35
Showing
19 changed files
with
216 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#! /usr/bin/env bash | ||
|
||
########## config.oceanice_products ########## | ||
|
||
echo "BEGIN: config.oceanice_products" | ||
|
||
# Get task specific resources | ||
source "${EXPDIR}/config.resources" oceanice_products | ||
|
||
export OCEANICEPRODUCTS_CONFIG="${PARMgfs}/post/oceanice_products_gefs.yaml" | ||
|
||
# No. of forecast hours to process in a single job | ||
export NFHRS_PER_GROUP=3 | ||
|
||
echo "END: config.oceanice_products" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
ocnicepost: | ||
executable: "ocnicepost.x" | ||
namelist: | ||
debug: False | ||
fix_data: | ||
mkdir: | ||
- "{{ DATA }}" | ||
copy: | ||
- ["{{ EXECgfs }}/ocnicepost.x", "{{ DATA }}/"] | ||
- ["{{ PARMgfs }}/post/ocnicepost.nml.jinja2", "{{ DATA }}/"] | ||
- ["{{ PARMgfs }}/post/{{ component }}.csv", "{{ DATA }}/"] | ||
- ["{{ FIXgfs }}/mom6/post/{{ model_grid }}/tripole.{{ model_grid }}.Bu.to.Ct.bilinear.nc", "{{ DATA }}/"] | ||
- ["{{ FIXgfs }}/mom6/post/{{ model_grid }}/tripole.{{ model_grid }}.Cu.to.Ct.bilinear.nc", "{{ DATA }}/"] | ||
- ["{{ FIXgfs }}/mom6/post/{{ model_grid }}/tripole.{{ model_grid }}.Cv.to.Ct.bilinear.nc", "{{ DATA }}/"] | ||
{% for grid in product_grids %} | ||
- ["{{ FIXgfs }}/mom6/post/{{ model_grid }}/tripole.{{ model_grid }}.Ct.to.rect.{{ grid }}.bilinear.nc", "{{ DATA }}/"] | ||
- ["{{ FIXgfs }}/mom6/post/{{ model_grid }}/tripole.{{ model_grid }}.Ct.to.rect.{{ grid }}.conserve.nc", "{{ DATA }}/"] | ||
- ["{{ FIXgfs }}/mom6/post/template.global.{{ grid }}.gb2", "{{ DATA }}/"] | ||
{% endfor %} | ||
|
||
nc2grib2: | ||
script: "{{ USHgfs }}/oceanice_nc2grib2.sh" | ||
|
||
ocean: | ||
namelist: | ||
ftype: "ocean" | ||
maskvar: "temp" | ||
sinvar: "sin_rot" | ||
cosvar: "cos_rot" | ||
angvar: "" | ||
{% if model_grid == 'mx025' or model_grid == 'mx050' or model_grid == 'mx100' %} | ||
ocean_levels: [5, 15, 25, 35, 45, 55, 65, 75, 85, 95, 105, 115, 125, 135, 145, 155, 165, 175, 185, 195, 205, 215, 226, 241, 267, 309, 374, 467, 594, 757, 960, 1204, 1490, 1817, 2184, 2587, 3024, 3489, 3977, 4481] | ||
{% elif model_grid == 'mx500' %} | ||
ocean_levels: [5, 15, 25, 35, 45, 55, 65, 75, 85, 95, 105, 115, 125, 135, 145, 155, 165, 175, 185, 195, 205, 215, 226, 241, 267] | ||
{% endif %} | ||
subset: ['SSH', 'SST', 'SSS', 'speed', 'MLD_003', 'latent', 'sensible', 'SW', 'LW', 'LwLatSens', 'Heat_PmE', 'SSU', 'SSV', 'taux', 'tauy', 'temp', 'so', 'uo', 'vo'] | ||
data_in: | ||
copy: | ||
- ["{{ COM_OCEAN_HISTORY }}/{{ RUN }}.ocean.t{{ current_cycle | strftime('%H') }}z.{{ interval }}hr_avg.f{{ '%03d' % forecast_hour }}.nc", "{{ DATA }}/ocean.nc"] | ||
data_out: | ||
mkdir: | ||
- "{{ COM_OCEAN_NETCDF }}" | ||
{% for grid in product_grids %} | ||
- "{{ COM_OCEAN_GRIB }}/{{ grid }}" | ||
{% endfor %} | ||
copy: | ||
- ["{{ DATA }}/ocean_subset.nc", "{{ COM_OCEAN_NETCDF }}/{{ RUN }}.ocean.t{{ current_cycle | strftime('%H') }}z.native.f{{ '%03d' % forecast_hour }}.nc"] | ||
{% for grid in product_grids %} | ||
- ["{{ DATA }}/ocean.{{ grid }}.nc", "{{ COM_OCEAN_NETCDF }}/{{ RUN }}.ocean.t{{ current_cycle | strftime('%H') }}z.{{ grid }}.f{{ '%03d' % forecast_hour }}.nc"] | ||
{% endfor %} | ||
|
||
ice: | ||
namelist: | ||
ftype: "ice" | ||
maskvar: "tmask" | ||
sinvar: "" | ||
cosvar: "" | ||
angvar: "ANGLET" | ||
subset: ['hi_h', 'hs_h', 'aice_h', 'Tsfc_h', 'uvel_h', 'vvel_h', 'frzmlt_h', 'albsni_h', 'mlt_onset_h', 'frz_onset_h'] | ||
data_in: | ||
copy: | ||
- ["{{ COM_ICE_HISTORY }}/{{ RUN }}.ice.t{{ current_cycle | strftime('%H') }}z.{{ interval }}hr_avg.f{{ '%03d' % forecast_hour }}.nc", "{{ DATA }}/ice.nc"] | ||
data_out: | ||
mkdir: | ||
- "{{ COM_ICE_NETCDF }}" | ||
{% for grid in product_grids %} | ||
- "{{ COM_ICE_GRIB }}/{{ grid }}" | ||
{% endfor %} | ||
copy: | ||
- ["{{ DATA }}/ice_subset.nc", "{{ COM_ICE_NETCDF }}/{{ RUN }}.ice.t{{ current_cycle | strftime('%H') }}z.native.f{{ '%03d' % forecast_hour }}.nc"] | ||
{% for grid in product_grids %} | ||
- ["{{ DATA }}/ice.{{ grid }}.nc", "{{ COM_ICE_NETCDF }}/{{ RUN }}.ice.t{{ current_cycle | strftime('%H') }}z.{{ grid }}.f{{ '%03d' % forecast_hour }}.nc"] | ||
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#! /usr/bin/env bash | ||
|
||
yyyy=${1?} | ||
mm=${2?} | ||
dd=${3?} | ||
cyc=${4?} | ||
fhr=${5?} | ||
ROTDIR=${6?} | ||
member=${7?} | ||
FHOUT_ICE_GFS=${8?} | ||
|
||
fhri=$((10#${fhr})) | ||
|
||
#Will need to consider fhmin in the future to calculate the offset if we are to stick with this approach. | ||
((offset = ( cyc ) % FHOUT_ICE_GFS)) | ||
|
||
if (( offset != 0 )); then | ||
(( fhri = fhri - cyc )) | ||
fhr3=$(printf %03i "${fhri}") | ||
if (( fhri <= FHOUT_ICE_GFS )); then | ||
(( interval = FHOUT_ICE_GFS - cyc )) | ||
ncfile=${ROTDIR}/gefs.${yyyy}${mm}${dd}/${cyc}/mem${member}/model_data/ice/history/gefs.ice.t${cyc}z.${interval}hr_avg.f${fhr3}.nc | ||
else | ||
ncfile=${ROTDIR}/gefs.${yyyy}${mm}${dd}/${cyc}/mem${member}/model_data/ice/history/gefs.ice.t${cyc}z.${FHOUT_ICE_GFS}hr_avg.f${fhr3}.nc | ||
fi | ||
else | ||
ncfile=${ROTDIR}/gefs.${yyyy}${mm}${dd}/${cyc}/mem${member}/model_data/ice/history/gefs.ice.t${cyc}z.${FHOUT_ICE_GFS}hr_avg.f${fhr}.nc | ||
fi | ||
|
||
#Check if netcdf file exists. | ||
if [[ ! -f "${ncfile}" ]];then | ||
rc=1 | ||
else | ||
#Check if netcdf file is older than 2 minutes. | ||
ncage="$(find "${ncfile}" -mmin -2)" | ||
if [[ -n "${ncage}" ]]; then | ||
rc=1 | ||
else | ||
rc=0 | ||
fi | ||
fi | ||
|
||
exit "${rc}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.