-
Notifications
You must be signed in to change notification settings - Fork 6
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
Feature/gauss grid #5
Merged
CoryMartin-NOAA
merged 15 commits into
NOAA-EMC:develop
from
ClaraDraper-NOAA:feature/GaussGrid
Dec 19, 2024
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
ab79082
Generalized routine names.
ClaraDraper-NOAA 9d4cc45
moved grid creation into separate routine. Runs.
ClaraDraper-NOAA 646c49a
Started generalizing creation of the mask.
ClaraDraper-NOAA 1bca7a3
Generalized dimension inputs.
ClaraDraper-NOAA af1b4fd
pre-adding derived type
ClaraDraper-NOAA 30fa44e
Moved grid setup details into a derived type.
ClaraDraper-NOAA 03d788e
Fixed up new data type.
ClaraDraper-NOAA b6a6819
Sorted out Coord bugs. Started generalizing reading in lat/lon for G…
ClaraDraper-NOAA e4561ce
Finished genaalizing lat,lon input. Switched to using weightgen file …
ClaraDraper-NOAA 3578f93
Switched to setting up gauss grid from SCRIP file.
ClaraDraper-NOAA acd9943
Added soil-snow mask for gsi increment files.
ClaraDraper-NOAA 7a01a16
Destroyed all fields, added corner locations to gauss grid.
ClaraDraper-NOAA f81758f
Switched to reading in vegtype from fix files instead of restart.
ClaraDraper-NOAA 4408d9e
Tidy up README, update example namelist.
ClaraDraper-NOAA e4a4f88
Fixes for Tseganeh's review.
ClaraDraper-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 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 |
---|---|---|
@@ -1,28 +1,20 @@ | ||
This program is designed to convert individual variables between resolutions, for DA applications (specificially re-gridding for use in re-centering, and regridding increments). | ||
|
||
Clara Draper, Aug 13, 2024. | ||
Clara Draper, Aug 17, 2024. | ||
|
||
* Uses bi-linear interpolation, with masking of the input and output. | ||
* Only mask option right now is "soil" (no water, no land-ice). Could add others easily. | ||
* Does not guarantee all output grid cells with have mapped values, by design. | ||
* Current masking options are all soil (land, no glaciers) and snow-free soil (input increment only) | ||
* Does not guarantee all output grid cells will have mapped values, by design. CANNOT BY USED FOR RESTARTS (could be changed though). | ||
* Output grid cells that do not have a value after the interpolation step are filled with the nearest neighbouring output grid cell. If there are no mapped neighbours within two layers of surrounding neighbours, the output grid cell will remain unmapped. In this way, islands do not get filled with distant values. | ||
* Currently, only reads in / writes out fv3 files (TO-DO, add Gaussian grid option for GSI increments). | ||
* Reads in / writes out fv3 files and Gaussian grid (gsi output increment) files. | ||
* Handling Gaussian files requires a scrip file with the grid details. This can be generated using the ufs_utils weigh_gen program. | ||
* has separate namelist for input and output. Required options depend on the grid type and whether it's in/out. Look in readin_setup routine to check what is needed. | ||
* example nml provided for input Gaussian increment -> fv3 grid. | ||
|
||
FEATURES TO ADD: | ||
* Can only process 2D variables (no vertical dimension; TO-DO fix this) | ||
* Add time dimension to put all gsi increments in a single file (for reading in by IAU) | ||
* Re-think parallelization so can do multiple ensemble members at once | ||
* Add code to check required options are available for requested set-up grid | ||
|
||
Options are controlled by the namelist: | ||
|
||
dir_fix -> base directory for the orog files (one layer below C$RES dir) | ||
res_atm_in -> atmos input resolution | ||
res_atm_out -> atmos output resolution | ||
fname_in -> start of the input restart file name (everything before ".tile?.nc" ) | ||
dir_in -> directory where input restarts are | ||
fname_out -> start of the output restart file name (everything before ".tile?.nc" ) | ||
dir_out -> directory where output restarts will go | ||
! the next two are needed to read in veg_type for calculating the output mask | ||
fname_out_rst -> start of file name for example restart at output res (everything before ".tile?.nc" ) | ||
dir_out_rst -> directory where example restarts at output res are | ||
variable_list(1) -> list of variables names to remap. Right-pad with spaces to length of 10 | ||
variable_list(2) -> | ||
n_vars -> number of variables to remap (current max. set to 10). | ||
missing_value -> value used for grid cells that remain unmapped | ||
mask_type -> only options for now are "none", and "soil" (no water, no land-ice). |
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,45 @@ | ||
&config | ||
n_vars=4, ! number of vars in list below | ||
variable_list="soilt1_inc", "soilt2_inc", "slc1_inc", "slc2_inc ", ! vars to be regridded | ||
missing_value=0., ! any un-filled grid cell takes this value. | ||
! use 0. for increments | ||
/ | ||
|
||
! required fields depend on gridtype, and whether input or output. See below for description. | ||
&input | ||
gridtype="gau_inc", | ||
ires=192, | ||
jres=96, | ||
fname="enkfgdas.t12z.sfci003.ensmean.nc", | ||
dir="./input/", | ||
fname_coord="gaussian.192.96.nc", | ||
dir_coord="./input/" | ||
/ | ||
|
||
&output | ||
gridtype="fv3_rst", | ||
ires=48, | ||
jres=48, | ||
fname="inc2ens.sfc_data", | ||
dir="./output/", | ||
fname_mask="vegetation_type" | ||
dir_mask="./output_rst/", | ||
dir_coord="./fixdir/", ! orog dir in fix | ||
/ | ||
|
||
!input and output namelist options: | ||
! Note: designed for files to be linked prior to executing (arguments aren't long enough for full paths) | ||
! | ||
!fname ! filename to be interpolated to/from | ||
!dir ! directory of above file | ||
!gridtype ! "gau_inc" for GSI/Gaussian increment file , | ||
! ! "fv3_rst" any native model grid file (increment or restart) | ||
!fname_mask ! filename with mask information. Only needed for fv3 files. Set to the | ||
! ! vegetation_type files in ${FIXorog}/${CRES}/sfc/ | ||
!dir_mask ! directory of above file | ||
!fname_coord ! File name with lat/lon info. Only needed for Gaussian files. Set to the | ||
! ! scrip file generated by ufs_utils weight_gen | ||
!dir_coord ! Gaussian - directory with above file | ||
! ! FV3 - set to $FIXorog | ||
!ires ! longitudinal dimension | ||
!jres ! latitudinal dimension |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noting here to move this out of src/ "eventually"