-
Notifications
You must be signed in to change notification settings - Fork 548
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
grid_imask created with SCRIPNC contains garbage values #1328
Comments
To clarify - as long as we've created the structured meshes used with NUOPC to be via NCO as described here: https://ufs-weather-model.readthedocs.io/en/develop/InputsOutputs.html#mesh-generation we would not run into this issue? |
Yes, that should work. The SCRIP file can be generated like so
EDIT: typo in above...should be -90:90, not -90:-90 |
Okay I believe that's how we have been generating things before so hopefully most things are okay as of now - but should definitely get this fixed! |
In UFS, the meshes for HAFS were generated in this way, the only other rectilinear structured mesh is used in the |
Note also that generating via NCO will put the grid centers at the min/max values of +/- 89.875 and the corners will now be at +/- 90. With the current |
It turns out you cannot create an evenly divided rectilinear 0.25 resolution w/ 721 latitudes. If you try, the bottom left grid box corners are at -90.00000, -90.00000,-89.75035,-89.75035 and the center is at -89.87517. Only by using 720 latitudes can you generate an exact 0.25 resolution, giving for the bottom left grid box corners -90.00000, -90.00000, -89.75000, -89.75000 and a center at -89.875. The thing to remember when generating w/ NCO is that the When specifying rectilinear in the inp file, the values appear to be the center lat and lon of the first (lower left) grid box. |
@JessicaMeixner-NOAA Maybe GEFS (EP6) needs fix for glo_025 mesh? Running GEFS RT with:
changes baselines. |
Tagging @sbanihash as she is the the waves GEFS POC I'm not sure who (or how) the mesh.glo_025 mesh was created. I'm fairly sure I created the HAFS ones, but I don't remember for the GEFS. But if we need an update, we should do that! |
Also @NickSzapiro-NOAA - to get the new mesh, I"m assuming this bug needs fixed asap? |
Denise knows better but I think we need to replace glo_025 with a new one with different dimensions (and SCRIP made via nco commands) |
Do you want @sbanihash and I to recreate a mesh file and test? |
I think so. Right @DeniseWorthen? |
Job script: /scratch1/NCEPDEV/climate/Jessica.Meixner/MakeMeshesWW3CMEPS/makemeshww3_rocky8_025.job
scrip inbetween file: /scratch1/NCEPDEV/climate/Jessica.Meixner/MakeMeshesWW3CMEPS/glo_025.SCRIP.nc mesh file: /scratch1/NCEPDEV/climate/Jessica.Meixner/MakeMeshesWW3CMEPS/mesh.glo_025.nc Haven't tested yet... but sharing now all the same |
@DeniseWorthen - Okay i think i need to recreate the glo_900 grid that I have made recently... I don't have the scripts to check the HAFS, but why did i think you had to do latitudes: (first point)-dy/2:(last point)-dy/2? similar to how the longitudes are done? |
The correct, 025 degree rectilinear grid should be created with only 720 latitudes via the NCO command.
However, using 720 will change the dimensions of the mesh and then the question is how much disruption that causes for the case Nick is trying to replicate (ie, the CMEPS restarts will not work, since now the WW3 domain will be different.) |
@JessicaMeixner-NOAA The HAFS meshes I believe were all created by me, since they are rectlinear. Let me try to dig up the SCRIP file (amazed if it still exists....) |
@DeniseWorthen that makes sense why I can't find the script to create them. |
One option for "fixing" the mesh but maintaining (I think) the current ICs/warmstarts etc is to use NCO on the existing mesh and simply replace all values of mask with 1. That doesn't require any code changes, but would change all answers (I think). |
See /scratch1/NCEPDEV/nems/Denise.Worthen/WORK/meshes |
Thanks @DeniseWorthen - I plan to look at this tomorrow morning with fresh eyes. |
Describe the bug
When generating the SCRIPNC file in
w3gridmd
, thegrid_imask
variable is defined with dimension sizeGRID1_SIZE
. When allocated and filled, it is only valid forGRID1_DIMS(1)
. It should be allocated and filled to sizeGRID1_SIZE
. This bug results in agrid_imask
field which is valid only on the first row of the domain.For the mesh cap, having non-valid values in the grid_imask propagates to the ESMF Unstructured mesh. For structured grids, the mesh cap will replace the mask obtained from the unstructured ESMF mesh if it does not currently contain a mask (ie, if the current values are ==1 everywhere). In this case however, the
meshmin
is neither 0 or 1 (it is in fact -2147483647 for the glo_025.SCRIP.nc). This means that destination and source masking in CMEPS is not working correctly since it relies on a mask value of either 0 or 1 and mask in the mesh sent to CMEPS has a single row (j=1) which can be used as a mask.Note: The code segment below needs to be read knowing that for structured meshes, the mesh that WW3 sends has the land points at the end of the distribution. So, the entire mask is set 0, and then the points which are WW3 "sea" points (ie, the values 1:nseal_cpl) are set to 1.
WW3/model/src/wav_comp_nuopc.F90
Lines 914 to 936 in 4f518cf
This is not an issue with rectilinear SCRIP files created from NCO (https://ufs-weather-model.readthedocs.io/en/develop/InputsOutputs.html#mesh-generation).
To Reproduce
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: