NCAR / DART

Data Assimilation Research Testbed
https://dart.ucar.edu/
Apache License 2.0
197 stars 145 forks source link

MOM6 static file mask missing values #727

Closed hkershaw-brown closed 1 month ago

hkershaw-brown commented 2 months ago

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:

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:

/glade/derecho/scratch/hkershaw/DART/Crocodile/CESM((cesm3_0_alpha03a))
/glade/derecho/scratch/hkershaw/DART/Crocodile/Runs/c.TL319_t232.001
../CESM/cime/scripts/create_newcase --run-unsupported --res TL319_t232 --compset C_JRA --case c.TL319_t232.001 --project P86850054

Checklist for merging

Checklist for release

Testing Datasets

hkershaw-brown commented 2 months ago

note added this fix to https://github.com/NCAR/DART/tree/mom6-scripting which has the mom6 assimilate.sh that Enrico is kicking the tires on.

hkershaw-brown commented 2 months ago

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

mjs2369 commented 2 months ago

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

Should we have a separate array for the fillval as well or is that not needed? fillval, fillval_u, fillval_v

hkershaw-brown commented 2 months ago

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

Should we have a separate array for the fillval as well or is that not needed? fillval, fillval_u, fillval_v

Do you mean move the where (geolon_u == fillval) geolon_u = 72.51 in case the fill values are different for each variable? Yeah probably wise.

call nc_get_attribute_from_variable(ncid, 'geolon_u', '_FillValue', fillval)
where (geolon_u == fillval) mask_u = .true.  
where (geolon_u == fillval) geolon_u = 72.51`
mjs2369 commented 2 months ago

Do you mean move the where (geolon_u == fillval) geolon_u = 72.51 in case the fill values are different for each variable? Yeah probably wise.

call nc_get_attribute_from_variable(ncid, 'geolon_u', '_FillValue', fillval)
where (geolon_u == fillval) mask_u = .true.  
where (geolon_u == fillval) geolon_u = 72.51`

Yep that's exactly it

And do where (geolat_u == fillval) geolat_u = 42.56 as well before the next call to nc_get_attribute_from_variable

So the full thing would be

call nc_get_attribute_from_variable(ncid, 'geolon_u', '_FillValue', fillval)
where (geolon_u == fillval) 
  mask_u = .true.  
  geolon_u = 72.51
where (geolat_u == fillval) geolat_u = 42.56