-
Notifications
You must be signed in to change notification settings - Fork 131
Run sfc_climo_gen utility on Hera #791
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
Merged
GeorgeGayno-NOAA
merged 15 commits into
ufs-community:develop
from
GeorgeGayno-NOAA:feature/hera_scg
Apr 12, 2023
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
7e09899
Baseline initial version of Hera script.
GeorgeGayno-NOAA 88e860e
Update the wcoss2 script for 'frac oro' data.
GeorgeGayno-NOAA 35f2a6d
Move common logic into a new script - sfc_gen.sh
GeorgeGayno-NOAA a655a23
Update Hera script to invoke sfc_gen.sh.
GeorgeGayno-NOAA 6a9e814
Merge branch 'develop' into feature/hera_scg
GeorgeGayno-NOAA c472e34
Merge branch 'develop' into feature/hera_scg
GeorgeGayno-NOAA 99c464f
Merge branch 'develop' into feature/hera_scg
GeorgeGayno-NOAA 5741d10
Fix typo.
GeorgeGayno-NOAA f0353e5
Update comments.
GeorgeGayno-NOAA 5baa903
Update logic for regional grids. Create a local 'fixed'
GeorgeGayno-NOAA 4e2895d
Fix typo.
GeorgeGayno-NOAA 726b841
Merge branch 'develop' into feature/hera_scg
GeorgeGayno-NOAA 90e1a77
Merge branch 'develop' into feature/hera_scg
GeorgeGayno-NOAA 619864d
Add new namelist varaible - vegsoil_frac - to sfc_gen.sh
GeorgeGayno-NOAA d5c31d4
Merge branch 'develop' into feature/hera_scg
GeorgeGayno-NOAA File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -1,4 +1,8 @@ | ||
| Run the sfc_climo_gen program stand-alone on WCOSS2 using | ||
| pre-exiting 'grid' and 'orography' files. | ||
| pre-exiting 'grid' and 'orography' files. See the | ||
| sfc_gen.sh script for details. | ||
|
|
||
| Outputs surface fields such as soil and vegetation type. | ||
|
|
||
| Set the configuration variables in sfc_gen.sh. Then | ||
| run using the machine specific driver script. |
This file contains hidden or 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,30 @@ | ||
| #!/bin/bash | ||
|
|
||
| #------------------------------------------------------------ | ||
| # Run the sfc_climo_gen program stand-alone on Hera using | ||
| # pre-exiting 'grid' and 'orography' files. See the | ||
| # sfc_gen.sh script for details. | ||
| # | ||
| # Set the configuration variables in sfc_gen.sh. Then | ||
| # run this script as follows: 'sbatch $script' | ||
| #------------------------------------------------------------ | ||
|
|
||
|
JeffBeck-NOAA marked this conversation as resolved.
|
||
| #SBATCH -J sfc_climo_gen | ||
| #SBATCH -A fv3-cpu | ||
| #SBATCH --open-mode=truncate | ||
| #SBATCH -o log | ||
| #SBATCH -e log | ||
| #SBATCH --nodes=1 --ntasks-per-node=24 | ||
| #SBATCH --partition=bigmem | ||
| #SBATCH -q debug | ||
| #SBATCH -t 00:10:00 | ||
|
|
||
| set -x | ||
|
|
||
| export APRUN_SFC="srun" | ||
|
|
||
| export BASE_DIR=$SLURM_SUBMIT_DIR/../.. | ||
|
|
||
| $SLURM_SUBMIT_DIR/sfc_gen.sh | ||
|
|
||
| exit | ||
This file contains hidden or 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 hidden or 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,127 @@ | ||
| #!/bin/bash | ||
|
|
||
| #----------------------------------------------------------------------- | ||
| # | ||
| # This script is run by the machine specific driver script. | ||
| # | ||
| # Set the following variables: | ||
| # | ||
| # res - Grid resolution. Example: 384 or 384.mx025. | ||
| # | ||
| # FIX_FV3 - Location of the pre-existing 'grid' and 'orography' | ||
| # files. Defaults to ${BASE_DIR}/fix/orog/C${res}, where | ||
| # BASE_DIR is the location of the checked out repository. | ||
| # | ||
| # The required files are: | ||
| # | ||
| # 'mosaic' file - C${res}_mosaic.nc (Note: 'res' without | ||
| # the 'mx' extension.) | ||
| # | ||
| # 'grid' files - C${res}_grid.tile7.halo${HALO}.nc (regional grids). | ||
| # C${res}_grid.tile[1-6].nc (global grids). | ||
| # Note: 'res' without the 'mx' extension. | ||
| # | ||
| # 'orog' files - C${res}_oro_data.tile7.halo${HALO}.nc (regional grids). | ||
| # C${res}_oro_data.tile[1-6].nc (global grids). | ||
| # | ||
| # GRIDTYPE - set to 'regional' for regional grids. Otherwise, | ||
| # comment out. | ||
| # | ||
| # FIX_REG - For regional grids. Hold links to the 'grid' and 'orog' files | ||
| # with names expected by the program. | ||
| # | ||
| # HALO - The number of halo rows/cols. Only for regional grids. | ||
| # Otherwise, comment out. | ||
| # | ||
| # WORK_DIR - Working directory. | ||
| # | ||
| # SAVE_DIR - Directory where the surface files will be saved. | ||
| # | ||
| # veg_type_src - Input vegetation type data. Choices are: | ||
| # For viirs-based vegetation type data, set to: | ||
| # - "viirs.igbp.0.1" for global 0.10-deg data | ||
| # - "viirs.igbp.0.05" for global 0.05-deg data | ||
| # - "viirs.igbp.0.03" for global 0.03-deg data | ||
| # - "viirs.igbp.conus.30s" for CONUS 30s data | ||
| # - "viirs.igbp.nh.30s" for NH 30s data | ||
| # - "viirs.igbp.30s" for global 30s data | ||
| # For the modis-based vegetation data, set to: | ||
| # - "modis.igbp.0.05" for global 0.05-deg data | ||
| # - "modis.igbp.0.03" for global 0.03-deg data | ||
| # - "modis.igbp.conus.30s" for CONUS 30s data | ||
| # - "modis.igbp.nh.30s" for NH 30s data | ||
| # - "modis.igbp.30s" for global 30s data | ||
| # | ||
| # soil_type_src - Input soil type data. Choices are: | ||
| # For STATSGO soil type data | ||
| # - "statsgo.0.05" for global 0.05-deg data | ||
| # - "statsgo.0.03" for global 0.03-deg data | ||
| # - "statsgo.conus.30s" for CONUS 30s data | ||
| # - "statsgo.nh.30s" for NH 30s data | ||
| # - "statsgo.30s" for global 30s data | ||
| # For Beijing Norm. Univ. soil type data | ||
| # - "bnu.30s" for global 30s data | ||
| # | ||
| # vegsoilt_frac - When .true., output the fraction of each | ||
| # vegetation and soil type and the dominant | ||
| # category. When .false., output dominant | ||
| # category only. | ||
| #----------------------------------------------------------------------- | ||
|
|
||
| set -x | ||
|
|
||
| #export res=96 | ||
| export res=96.mx100 | ||
|
|
||
| #HALO=4 | ||
| #export GRIDTYPE=regional | ||
| #FIX_REG=/lfs/h2/emc/stmp/$LOGNAME/fix.reg | ||
|
|
||
| export veg_type_src="modis.igbp.0.05" | ||
|
|
||
| export soil_type_src="statsgo.0.05" | ||
|
|
||
| export WORK_DIR=/lfs/h2/emc/stmp/$LOGNAME/work.sfc | ||
| export SAVE_DIR=/lfs/h2/emc/stmp/$LOGNAME/sfc.C${res} | ||
|
|
||
| export FIX_FV3=${BASE_DIR}/fix/orog/C${res} | ||
|
|
||
| export vegsoilt_frac=.true. | ||
|
|
||
| #------------------------------------------------------------------------ | ||
| #------------------------------------------------------------------------ | ||
| # Should not have to touch anything below here. | ||
| #------------------------------------------------------------------------ | ||
| #------------------------------------------------------------------------ | ||
|
|
||
| if [[ "$GRIDTYPE" = "regional" ]]; then | ||
| mkdir -p $FIX_REG | ||
| ln -fs $FIX_FV3/C${res}_grid.tile7.halo${HALO}.nc $FIX_REG/C${res}_grid.tile7.halo${HALO}.nc | ||
| ln -fs $FIX_FV3/C${res}_oro_data.tile7.halo${HALO}.nc $FIX_REG/C${res}_oro_data.tile7.nc | ||
| ln -fs $FIX_FV3/C${res}_mosaic.nc $FIX_REG/C${res}_mosaic.nc | ||
| export mosaic_file=$FIX_REG/C${res}_mosaic.nc | ||
| export FIX_FV3=$FIX_REG | ||
| HALO=$(( $HALO + 1 )) | ||
| export HALO | ||
| else | ||
| res2=${res//".mx"*} | ||
| export mosaic_file=$FIX_FV3/C${res2}_mosaic.nc | ||
| fi | ||
|
|
||
| export input_sfc_climo_dir=${BASE_DIR}/fix/sfc_climo | ||
|
|
||
| ulimit -a | ||
| ulimit -s unlimited | ||
|
|
||
| source ${BASE_DIR}/sorc/machine-setup.sh > /dev/null 2>&1 | ||
| module use ${BASE_DIR}/modulefiles | ||
| module load build.$target.intel | ||
| module list | ||
|
|
||
| rm -fr $WORK_DIR $SAVE_DIR | ||
|
|
||
| export APRUN | ||
|
|
||
| ${BASE_DIR}/ush/sfc_climo_gen.sh | ||
|
|
||
| exit |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.