-
Notifications
You must be signed in to change notification settings - Fork 134
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 2 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| add_subdirectory(orog.fd) | ||
| add_subdirectory(orog_gsl.fd) | ||
| add_subdirectory(lake.fd) | ||
| add_subdirectory(inland.fd) |
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 @@ | ||
| set(fortran_src | ||
| module_gsl_oro_data_lg_scale.f90 | ||
| module_gsl_oro_data_lg_scale.sar.f90 | ||
| module_gsl_oro_data_sm_scale.f90 | ||
| module_gsl_oro_data_sm_scale.sar.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} | ||
| bacio::bacio_4 | ||
| w3nco::w3nco_d | ||
| ip::ip_d | ||
| sp::sp_d | ||
| NetCDF::NetCDF_Fortran) | ||
| if(OpenMP_Fortran_FOUND) | ||
| target_link_libraries(${exe_name} OpenMP::OpenMP_Fortran) | ||
| endif() | ||
|
|
||
| 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,16 @@ | ||
| 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) | ||
| ol1,ol2,ol3,ol4 -- orographic effective length of subgrid topography (for 4 orientations) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you list the orientations here and in the prologs? 1 is N? 2 is SW? |
||
|
|
||
| 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,93 @@ | ||
| 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: | ||
| ! var, con, ol{1,2,3,4} and oa{1,2,3,4} | ||
| ! or in FV3 parlance: | ||
| ! stddev, convexity, ol{1,2,3,4} and oa{1,2,3,4} | ||
| ! These variables are output to netCDF. | ||
| ! | ||
| ! Note: This program works for both the global FV3GFS cubed | ||
| ! sphere, i.e., for tiles 1 through 6, and for the | ||
| ! regional lam, i.e., for tile 7 | ||
| ! | ||
| ! Author: Michael Toy -- NOAA/GSL January 27, 2021 | ||
| ! Based on code by Michael Duda provided by NCAR/MMM | ||
| !-------------------------------------------------------------------- | ||
|
|
||
| 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 | ||
| use gsl_oro_data_sm_scale_sar, only: calc_gsl_oro_data_sm_scale_sar | ||
| use gsl_oro_data_lg_scale_sar, only: calc_gsl_oro_data_lg_scale_sar | ||
|
|
||
| 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 | ||
| integer :: tile_num_int | ||
|
|
||
| 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 *, "Creating tile oro_data for tile number: ", tile_num | ||
| print *, "Grid resolution = ", res_indx | ||
| print * | ||
|
|
||
|
|
||
| read(tile_num,*) tile_num_int ! integer form of tile_num | ||
|
|
||
| if ( tile_num_int.le.6 ) then ! tile is a global tile | ||
|
|
||
| call calc_gsl_oro_data_sm_scale(tile_num,res_indx,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) | ||
| end if | ||
|
|
||
| elseif ( tile_num_int.eq.7 ) then ! tile is a regional tile | ||
|
|
||
| ! print *, "this is a regional tile" | ||
| ! print * | ||
|
|
||
| call calc_gsl_oro_data_sm_scale_sar(tile_num,res_indx, & | ||
| duplicate_oro_data_file) | ||
|
|
||
| print *, "duplicate_oro_data_file =", duplicate_oro_data_file | ||
|
|
||
| if ( .not.duplicate_oro_data_file ) then | ||
| call calc_gsl_oro_data_lg_scale_sar(tile_num,res_indx) | ||
| end if | ||
|
|
||
| else | ||
|
|
||
| print *, "Error: ", tile_num, " is not a valid tile number" | ||
|
|
||
| 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.