Skip to content
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
merged 15 commits into from
Dec 19, 2024

Conversation

ClaraDraper-NOAA
Copy link
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
Collaborator Author

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

@@ -0,0 +1,31 @@
&config
n_vars=4, ! number of vars in list below
variable_list(1)="soilt1_inc ",
Copy link

@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
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
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
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
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.

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

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
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.

jres=48,
fname="inc2ens.sfc_data",
dir="./output/",
fname_mask="20211221.090000.sfc_data"
Copy link

@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
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
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.

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

Choose a reason for hiding this comment

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

output

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed.

* 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

Choose a reason for hiding this comment

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

will

Copy link
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

@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
Collaborator Author

Thanks @tsga I fixed it all.

@ClaraDraper-NOAA
Copy link
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
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