-
Notifications
You must be signed in to change notification settings - Fork 145
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
MOM6 static file mask missing values #727
Conversation
fixes #685 force longitudes to be between 0-360. The missing value 1e20 is in this calculation. Not sure whether to put missing value back in to avoid accidental use.
mask where geolon is the fillvalue. Note the mask for geolon/lat/u/v is not the same as 'wet' from the ocean_geometry.nc file. Setting the masked lat lon values to a land value. This is because set_location is used on all the lat, lon vaues and 1e20 will blow up set_location
perfect_model_obs init time as -1 -1
note added this fix to https://github.com/NCAR/DART/tree/mom6-scripting |
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.
DART/models/MOM6/model_mod.f90
Lines 621 to 624 in f04bf42
! mom6 has missing values in the grid | |
mask(:,:) = .false. | |
call nc_get_attribute_from_variable(ncid, 'geolon', '_FillValue', fillval) | |
where (geolon == fillval) mask = .true. |
Why don't we need to repeat this process done in the lines above for geolon_u and geolon_v and have a separate mask array for each? These mask arrays, for example, mask_geolon_u
would be passed into their respective calls to set_quad_coords. Example:
call set_quad_coords(interp_u_grid, geolon_u, geolat_u, mask_geolon_u)
Is this because the missing values are always going to be in the same place for gelon, geolon_u, and geolon_v? And therefore the mask array would be simply be duplicated for geolon_u and geolon_v?
There are in the same place for the case , but you're correct there's no guarantee that that will always be the case. I'll add a mask for each |
Cautious approach, since it is possible that the missing value mask may not be at the same place
Should we have a separate array for the fillval as well or is that not needed? |
Do you mean move the
|
Yep that's exactly it And do So the full thing would be
|
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.
Everything looks good. Nice fix Helen
I ended up testing with the case you had in /glade/derecho/scratch/hkershaw/DART/Crocodile/DART_Runs/c.TL319_t232.001
I was getting the error message shown in the corresponding issue when running filter on the main branch, but I was able to run filter successfully on the mom6-missing-grid branch with all the latest commits.
Description:
CESM3 MOM6 TL319_t232 (new workhorse grid) has missing/fill values in the static file for geolat|lon|u|v written out by CESM.
This pull request:
Note the missing value locations are not the same as the ocean_geometry 'wet' mask.
Also I have set the MOM6/work/input.nml cutoff to something not giant. Not sure if 0.03 is appropriate for the ocean.
& set the perfect_model_obs namelist init_time_days to -1 -1.
Fixes issue
fixes #685
Types of changes
Documentation changes needed?
Tests
Please describe any tests you ran to verify your changes.
Running cesm3_0_alpha03a
/glade/derecho/scratch/hkershaw/DART/Crocodile/DART_Runs/c.TL319_t232.001
perturbed from a single instance.
CESM:
Checklist for merging
Checklist for release
Testing Datasets