Skip to content

Feature/gauss grid#5

Merged
CoryMartin-NOAA merged 15 commits into
NOAA-EMC:developfrom
ClaraDraper-NOAA:feature/GaussGrid
Dec 19, 2024
Merged

Feature/gauss grid#5
CoryMartin-NOAA merged 15 commits into
NOAA-EMC:developfrom
ClaraDraper-NOAA:feature/GaussGrid

Conversation

@ClaraDraper-NOAA
Copy link
Copy Markdown
Collaborator

Expanded DA-utils ESMF regridding routine to also be able to regrid GSI-output increment files onto the fv3 grid:

  • added option to work with Gauss grids
  • added option to use soilsnow_mask from the increment files
  • generalized lots of routines
  • split up input namelist into overall, input, and output
  • added readin_setup to setup the grid details needed for input and output (current options are fv3, and gau_inc).

@ClaraDraper-NOAA
Copy link
Copy Markdown
Collaborator Author

@CoryMartin-NOAA Good reviewers would be George and Tseganeh.

Comment thread src/regridStates/gauIncr2native.nml Outdated
@@ -0,0 +1,31 @@
&config
n_vars=4, ! number of vars in list below
variable_list(1)="soilt1_inc ",
Copy link
Copy Markdown

@tsga tsga Dec 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need the space in "soilt1_inc"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do need it. Here's the gsi output

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think he means the trailing spaces, not the underscore?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes more sense! I believe we do need the fixed length for specifying a char array in a namelist, but will double check.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It worked! I changed it.

Comment thread src/regridStates/gauIncr2native.nml Outdated
n_vars=4, ! number of vars in list below
variable_list(1)="soilt1_inc ",
variable_list(2)="soilt2_inc ",
variable_list(3)="slc1_inc ",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Var list in one line might be better (personal preference to save space)
variable_list="soilt1_inc","slc1_inc","",

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed - see above.

Comment thread src/regridStates/gauIncr2native.nml Outdated
jres=48,
fname="inc2ens.sfc_data",
dir="./output/",
fname_mask="20211221.090000.sfc_data"
Copy link
Copy Markdown

@tsga tsga Dec 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this template for mask? as in mask will be written in this file format? I am guessing it is not an actual output file?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the file that is read in to get the mask. I changed the code to use a fix file instead of a restart though - so I need to change the entry here too. I'll also add a block of comments explaining each variable.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed this file, and added comment block at the end of the example namelist.

Comment thread src/regridStates/regridStates.F90 Outdated
if (ierr /= 0) call error_handler("READING input NAMELIST.", ierr)
case ("output")
read(unt, nml=output, iostat=ierr)
if (ierr /= 0) call error_handler("READING input NAMELIST.", ierr)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

output

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed.

Comment thread src/regridStates/regridStates.F90
Comment thread src/regridStates/README Outdated
* 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 with have mapped values, by design. CANNOT BY USED FOR RESTARTS (could be changed though).
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Copy link
Copy Markdown

@tsga tsga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added minor comments, but my test runs successfully as expected (apart from the namelist needing to be fully specified).

@ClaraDraper-NOAA
Copy link
Copy Markdown
Collaborator Author

Thanks @tsga I fixed it all.

@ClaraDraper-NOAA
Copy link
Copy Markdown
Collaborator Author

I added an example to call the regridding here:
/scratch2/BMC/gsienkf/Clara.Draper/DA_test_cases/regridding

ClaraDraper-NOAA added a commit to ClaraDraper-NOAA/global-workflow that referenced this pull request Dec 18, 2024
i) write out the ensemble mean reanalysis, and apply it to the deterministic member.
ii) replace UFS_UTILS regridding of Gaussian soil analysis to model grid with an external ESMF-based program (with appropriate land masking)

Requires:
sorc/gsi_enkf.fd develop after Tue Nov 12. Latest works.
sorc/gdas.cd/sorc/da-utils PR: NOAA-EMC/DA-utils#5
sorc/ufs_utils.fd from PR: ufs-community/UFS_UTILS#1010
@@ -0,0 +1,45 @@
&config
Copy link
Copy Markdown
Contributor

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"

@CoryMartin-NOAA CoryMartin-NOAA merged commit 86a25d0 into NOAA-EMC:develop Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants