-
Notifications
You must be signed in to change notification settings - Fork 131
Adding orog gsl to orog mask tools #273
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 23 commits into
ufs-community:develop
from
mdtoy:adding_orog_gsl_to_orog_mask_tools
Apr 9, 2021
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
48046f5
First step toward adding gsl drag suite oro_data file creation
mdtoyNOAA b0029c8
Added 'orog_gsl.fd' for creation of orographic static files required …
mdtoyNOAA 2086561
Updated netCDF calls to Fortran90 standard
mdtoyNOAA ff9fc11
Cleaned up doxygen entries
mdtoyNOAA a95c670
Merge branch 'develop' of https://github.com/NOAA-EMC/UFS_UTILS into …
mdtoyNOAA 5170ce1
Added error management features to code
mdtoyNOAA b2209d7
Merge branch 'develop' of https://github.com/NOAA-EMC/UFS_UTILS into …
mdtoyNOAA 5b1f52e
Updated gsl_oro_data program and modules to automatically differentia…
mdtoyNOAA 31fe141
Added testing of gsl orog_data maker to driver_grid.hera script sequence
mdtoyNOAA 7e4f7d0
Merge branch 'develop' of https://github.com/NOAA-EMC/UFS_UTILS into …
mdtoyNOAA 8aa2f5e
Merge branch 'develop' of https://github.com/NOAA-EMC/UFS_UTILS into …
mdtoyNOAA 9262b9a
Clear doxygen warnings from ./orog_gsl.fd
GeorgeGayno-NOAA 1c6c9d4
Merge branch 'adding_orog_gsl_to_orog_mask_tools' of https://github.c…
mdtoyNOAA 0f28810
Added doxygen comments to orog_gsl.fd Fortran code
mdtoyNOAA 9cd0f8e
Added details about orientations of directional variables in orog_gsl…
mdtoyNOAA 673d382
Added flag 'make_gsl_orog' so the user can create extra 'orog' files …
mdtoyNOAA 6dced69
Add regression test for regional grid that uses GSL GWD
GeorgeGayno-NOAA c6cebae
Add regression test to Orion.
GeorgeGayno-NOAA a10f6c6
Fixed Fortran orog stats code such that out-of-bounds array indices a…
mdtoyNOAA 67d704b
Merge branch 'develop' of https://github.com/NOAA-EMC/UFS_UTILS into …
mdtoyNOAA a6c2b29
Update regression test driver scripts for Cray and Dell.
GeorgeGayno-NOAA 810dc07
Update jet driver script for new regression test.
GeorgeGayno-NOAA d94441f
Merge branch 'develop' of https://github.com/NOAA-EMC/UFS_UTILS into …
mdtoyNOAA 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
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
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
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
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
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,69 @@ | ||
| #!/bin/bash | ||
|
|
||
| #----------------------------------------------------------------------- | ||
| # Create a regional esg grid with GSL gravity wave drag files. | ||
| # Compare output to a set of baseline files using the 'nccmp' utility. | ||
| # This script is run by the machine specific driver script. | ||
| #----------------------------------------------------------------------- | ||
|
|
||
| set -x | ||
|
|
||
| export TEMP_DIR=${WORK_DIR}/regional.gsl.gwd.work | ||
| export out_dir=${WORK_DIR}/regional.gsl.gwd | ||
|
|
||
| export gtype=regional_esg | ||
| export make_gsl_orog=true # Create GSL gravity wave drag fields | ||
| export target_lon=-97.5 # Center longitude of the highest resolution tile | ||
| export target_lat=35.5 # Center latitude of the highest resolution tile | ||
| export idim=301 # Dimension of grid in 'i' direction | ||
| export jdim=200 # Dimension of grid in 'j' direction | ||
| export delx=0.0585 # Grid spacing in degrees in 'i' direction | ||
| export dely=0.0585 # Grid spacing in degrees in 'j' direction | ||
| export halo=4 | ||
|
|
||
| NCCMP=${NCCMP:-$(which nccmp)} | ||
|
|
||
| #----------------------------------------------------------------------- | ||
| # Start script. | ||
| #----------------------------------------------------------------------- | ||
|
|
||
| echo "Starting at: " `date` | ||
|
|
||
| $home_dir/ush/fv3gfs_driver_grid.sh | ||
|
|
||
| iret=$? | ||
| if [ $iret -ne 0 ]; then | ||
| set +x | ||
| echo "<<< REGIONAL GSL GWD TEST FAILED. <<<" | ||
| exit $iret | ||
| fi | ||
|
|
||
| echo "Ending at: " `date` | ||
|
|
||
| #----------------------------------------------------------------------------- | ||
| # Compare output to baseline set of data. | ||
| #----------------------------------------------------------------------------- | ||
|
|
||
| cd $out_dir/C772 | ||
|
|
||
| test_failed=0 | ||
| for files in *tile*.nc ./fix_sfc/*tile*.nc | ||
| do | ||
| if [ -f $files ]; then | ||
| echo CHECK $files | ||
| $NCCMP -dmfqS $files $HOMEreg/regional.gsl.gwd/$files | ||
| iret=$? | ||
| if [ $iret -ne 0 ]; then | ||
| test_failed=1 | ||
| fi | ||
| fi | ||
| done | ||
|
|
||
| set +x | ||
| if [ $test_failed -ne 0 ]; then | ||
| echo "<<< REGIONAL GSL GWD TEST FAILED. >>>" | ||
| else | ||
| echo "<<< REGIONAL GSL GWD TEST PASSED. >>>" | ||
| fi | ||
|
|
||
| exit 0 |
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,21 @@ | ||
| set(fortran_src | ||
| module_gsl_oro_data_lg_scale.f90 | ||
| module_gsl_oro_data_sm_scale.f90 | ||
| gsl_oro_data.f90) | ||
|
|
||
| if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$") | ||
| set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -r8 -convert big_endian -assume byterecl") | ||
| elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$") | ||
| set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fdefault-real-8 -fconvert=big-endian -fno-range-check") | ||
| if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 10) | ||
| set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch -fallow-invalid-boz") | ||
| endif() | ||
| endif() | ||
|
|
||
| set(exe_name orog_gsl) | ||
| add_executable(${exe_name} ${fortran_src}) | ||
| target_link_libraries( | ||
| ${exe_name} | ||
| NetCDF::NetCDF_Fortran) | ||
|
|
||
| install(TARGETS ${exe_name} RUNTIME DESTINATION ${exec_dir}) | ||
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,18 @@ | ||
| This code creates orographic statistics fields required for the orographic drag suite developed by NOAA's Global Systems Laboratory (GSL). The fields are a subset of the ones calculated by "orog.fd" except that they are calculated in a different manner. The fields are: | ||
| stddev -- standard deviation of subgrid topography | ||
| convexity -- convexity of subgrid topography | ||
| oa1,oa2,oa3,oa4 -- orographic asymmetry of subgrid topography (for 4 orientations: | ||
| 1-westerly, 2-southerly, 3-southwesterly, 4-northwesterly) | ||
| ol1,ol2,ol3,ol4 -- orographic effective length of subgrid topography (for 4 orientations: | ||
| 1-westerly, 2-southerly, 3-southwesterly, 4-northwesterly) | ||
|
|
||
| Two Cxxx_oro_data files are created: | ||
| - an "ls" (large-scale) file for the gravity wave drag and blocking schemes of Kim and Doyle (QJRMS, 2005) | ||
| - a "ss" (small-scale) file for the small-scale gravity wave drag scheme of Tsiringakis et al. (QJRMS, 2017) and the turbulent orographic form drag (TOFD) scheme of Beljaars et al. (QJRMS, 2004) | ||
|
|
||
| The inputs to be passed to the executable are tile number (1-6 for global, 7 for stand-alone regional) and grid resolution, e.g., 768 for C768. | ||
|
|
||
| The source data are the following two files to be located in the "fix" directory: | ||
| - geo_em.d01.lat-lon.2.5m.HGT_M.nc -- global topographic data on 2.5-minute lat-lon grid (interpolated from GMTED2010 30-second topographic data) | ||
| - HGT.Beljaars_filtered.lat-lon.30s_res.nc -- global topographic data on 30-second lat-lon grid (GMTED2010 data smoothed according to Beljaars et al. (QJRMS, 2004)) | ||
|
|
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,86 @@ | ||
| !> @file | ||
| !! @brief Create orographic (oro_data) files for use by GSL drag suite | ||
| !! @author Michael Toy, NOAA/GSL | ||
| !! @date 2021-03-12 | ||
| !! | ||
| !! Program GSL_ORO_DATA | ||
| !! | ||
| !! This program calls subroutines which calculate the parameters | ||
| !! required for the GSL subgrid-scale orographic gravity-wave drag (GWDO) | ||
| !! suite on the FV3 grid. These parameters are for the small-scale | ||
| !! GWD (Tsiringakis et al., 2017) and turbulent orographic form drag (TOFD) | ||
| !! (Beljaars et al., 2004) schemes of the GSL drag suite. | ||
| !! The output fields are: | ||
| !! - stddev standard deviation of subgrid-scale topograpy | ||
| !! - convexity convexity (kurtosis) of subgrid-scale topography | ||
| !! - ol{1,2,3,4} orographic effective lengths of subgrid-scale topography | ||
| !! for 4 orientations: 1-westerly, 2-southerly, 3-southwesterly, 4-northwesterly | ||
| !! - oa{1,2,3,4} orographic asymmetries of subgrid-scale topography | ||
| !! for 4 orientations: 1-westerly, 2-southerly, 3-southwesterly, 4-northwesterly | ||
| !! | ||
| !! Note: This program works for both the global FV3GFS cubed | ||
| !! sphere, i.e., for tiles 1 through 6, (and 7 if nested | ||
| !! grid) (halo.eq.-999 for no halo), and for the stand-alone | ||
| !! regional lam (tile 7 and halo.ne.-999) | ||
| !! If a halo number is given, this is only to specify the | ||
| !! Cxxx_grid.halox data used for input. The oro_data files | ||
| !! are always "halo0" output. | ||
| !! | ||
| !! Based on code by Michael Duda provided by NCAR/MMM | ||
|
|
||
| !> Brief description of program: Creates orographic (oro_data) files | ||
| !! needed by the GSL drag suite physics parameterization | ||
| !! | ||
| !! @author Michaei Toy, NOAA/GSL | ||
| !! @return 0 for success, error code otherwise. | ||
| program gsl_oro_data | ||
|
|
||
| use gsl_oro_data_sm_scale, only: calc_gsl_oro_data_sm_scale | ||
| use gsl_oro_data_lg_scale, only: calc_gsl_oro_data_lg_scale | ||
|
|
||
| implicit none | ||
|
|
||
|
|
||
| character(len=2) :: tile_num ! tile number entered by user | ||
| character(len=7) :: res_indx ! grid-resolution index, e.g., 96, 192, 384, 768, | ||
| ! etc. entered by user | ||
| character(len=4) :: halo ! halo value entered by user (for input grid data) | ||
|
|
||
| logical :: duplicate_oro_data_file ! flag for whether oro_data_ls file is a duplicate | ||
| ! of oro_data_ss due to minimum grid size being less than 7.5km | ||
|
|
||
|
|
||
|
|
||
| ! Read in FV3GFS grid info | ||
| print * | ||
| print *, "Enter tile number:" | ||
| read (5,*) tile_num | ||
| print * | ||
| print *, "Enter grid-resolution index:" | ||
| read (5,*) res_indx | ||
| print * | ||
| print *, "Enter halo number (-999 for no halo):" | ||
| read (5,*) halo | ||
| print * | ||
| print *, "Creating tile oro_data for tile number: ", tile_num | ||
| print *, "Grid resolution = ", res_indx | ||
| print *, "Halo = ", halo | ||
| print * | ||
|
|
||
|
|
||
| call calc_gsl_oro_data_sm_scale(tile_num,res_indx,halo,duplicate_oro_data_file) | ||
|
|
||
| print *, "duplicate_oro_data_file =", duplicate_oro_data_file | ||
| print * | ||
|
|
||
| if ( .not.duplicate_oro_data_file ) then | ||
| call calc_gsl_oro_data_lg_scale(tile_num,res_indx,halo) | ||
| end if | ||
|
|
||
|
|
||
| print * | ||
| print *, "End program gsl_oro_data" | ||
| print * | ||
|
|
||
|
|
||
| end program gsl_oro_data |
Oops, something went wrong.
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.