-
Notifications
You must be signed in to change notification settings - Fork 132
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
Changes from 3 commits
48046f5
b0029c8
2086561
ff9fc11
a95c670
5170ce1
b2209d7
5b1f52e
31fe141
7e4f7d0
8aa2f5e
9262b9a
1c6c9d4
0f28810
9cd0f8e
673d382
6dced69
c6cebae
a10f6c6
67d704b
a6c2b29
810dc07
d94441f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| 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} | ||
| NetCDF::NetCDF_Fortran) | ||
|
|
||
| install(TARGETS ${exe_name} RUNTIME DESTINATION ${exec_dir}) | ||
| 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)) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| !> @file | ||
| !! @brief Create orographic (oro_data) files for use by GSL drag suite | ||
| !! | ||
| !! 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} | ||
|
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 make these proper lists? Just use a hyphen, like this: |
||
| !! 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 | ||
|
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. Please use the doxygen author and date tags. |
||
| !! Based on code by Michael Duda provided by NCAR/MMM | ||
| !! | ||
| 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 | ||
| 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 | ||
Uh oh!
There was an error while loading. Please reload this page.