-
Notifications
You must be signed in to change notification settings - Fork 9
Boundary conditions v14 based on MOM6/v2 ocean bathymetry (OM4) and "v2" topography for atmosphere #1149
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
base: develop
Are you sure you want to change the base?
Conversation
sinakhani
commented
Aug 28, 2025
- This PR adds updates for files in makebcs directory to include MOM6/v2 ocean bathymetry.
- This is non-zero diff for MOM6 in coupled mode, but zero-diff otherwise (AMIP).
gmao-rreichle
left a comment
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.
see comments below
...dComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/makebcs/make_bcs_questionary.py
Outdated
Show resolved
Hide resolved
...gcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/makebcs/make_bcs_cube.py
Outdated
Show resolved
Hide resolved
...idComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/makebcs/rmTinyCatchParaMod.F90
Outdated
Show resolved
Hide resolved
...idComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/makebcs/rmTinyCatchParaMod.F90
Outdated
Show resolved
Hide resolved
|
I have make changes based on the given comments. Please let me know what you think about this version. Thank you @gmao-rreichle @mathomp4 @biljanaorescanin |
gmao-rreichle
left a comment
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.
Thanks, @sinakhani. See more comments below
...dComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/makebcs/make_bcs_questionary.py
Outdated
Show resolved
Hide resolved
...gcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/makebcs/make_bcs_cube.py
Outdated
Show resolved
Hide resolved
| "v11 : NL3 + JPL veg height + PEATMAP + MODIS snow alb v2", \ | ||
| "v12 : NL3 + JPL veg height + PEATMAP + MODIS snow alb v2 + Argentina peatland fix", \ | ||
| "v13 : NL3 + JPL veg height + PEATMAP + MODIS snow alb v2 + Argentina peatland fix + mean land elevation fix", \ | ||
| "v14 : NL3 + JPL veg height + PEATMAP + MODIS snow alb v2 + Argentina peatland fix + mean land elevation fix + v2 (OM4) ocean-seaice bathymetry", \ |
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.
The "v2 bathymetry" language needs to include "MOM6" because the v2 bathymetry appears to be specific to MOM6. Maybe I'm missing something.
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.
The suggested change has been made.
| case ("v14") | ||
|
|
||
| ! "v14", "v13", and "v12" are identical except for: | ||
| ! - topography used for the atm (processed outside of make_bcs) | ||
| ! - v14 is used for coupled atm-ocean-seaice with v2 (OM4) ocean bathymetry | ||
|
|
||
| LAIBCS = 'MODGEO' | ||
| SOILBCS = 'HWSD_b' | ||
| MODALB = 'MODIS2' | ||
| SNOWALB = 'MODC061v2' | ||
| OUTLETV = "v2" | ||
| GNU = 1.0 | ||
| use_PEATMAP = .true. | ||
| jpl_height = .true. | ||
|
|
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.
This block should be merged into "case ("v12","v13"). The variables within the case statements for v12,v13 and v14 are identical. The documentation in the comments within the case statements needs to be updated accordingly. @biljanaorescanin: More info is needed somewhere about how the top files change between v12, v13, and v14.
Generally, the problem here is that some of the bcs version config variables are in F90 (i.e., in the block right here), while others are purely in the py portion (e.g, "v1"/"v2" MOM6 bathymetry). I don't know how this can be resolved more cleanly. Maybe we need an nml or rc file that py manages and that Fortran can read. But this type of change is probably more than we want to tackle as part of the present PR
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.
I have not made changes here. I will wait until @biljanaorescanin makes comments. It might need some thoughts/decisions on how we want to label "v12", "v13", and "v14" considering their differences and similarities.
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.
I merged the "case" statements for clarity. @biljanaorescanin: The comments still need to be merged and edited
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.
I just cleaned up the text for merged cases "v12", "v13", and "v14". Please feel free to make further changes. Thank you.
Thanks, Sina. @biljanaorescanin: What I'm looking for here is a more detailed set of comments that specify what exactly is in each version for each of the bullet points (and possibly additional bullet points with differences that aren't mentioned yet -- I forget if there are more differences). E.g., the catchment.def topo fix is not in v12 but is in v13 and v14.
a4f68f7 to
02fe5c7
Compare
|
I just cleaned up the text for merged cases "v12", "v13", and "v14". Please feel free to make further changes. Thank you. |
|
This PR was tested for BCS creation for both old |
gmao-rreichle
left a comment
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.
see comments below
|
|
||
| def _resolve_versions(bcs_version: str): | ||
| """ | ||
| Returns (mom6_bathy_version, topo_version) as 'v1' or 'v2' |
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.
The fact that bcs "v14" happen to use "v2" for both TOPO and MOM6_BATHY_VERSION is pure coincidence. If in the next bcs version we update TOPO but not MOM6_BATHY_VERSION (or vice versa), this code won't work anymore. It may be clearer to use a look-up table approach as in
Line 117 in a5871db
| select case (trim(LBCSV)) |
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.
Good point, I missed that one... I will decouple them with a small, explicit lookup table.
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.
Done in this commit: c16644c
| Build csh lines to symlink MOM6 datasets. | ||
| Prefer `preferred_version` (v1 or v2) per size; if missing, fall back to the other version. | ||
| Emits an echo note on fallback; warns if a size is missing in both. | ||
| """ | ||
| sizes = ["72x36", "540x458", "1440x1080"] | ||
| other = "v1" if preferred_version == "v2" else "v2" | ||
|
|
||
| lines = ['if ( ! -d data/MOM6 ) mkdir -p data/MOM6'] | ||
| for size in sizes: | ||
| src_pref = os.path.join(inputdir, "ocean", "MOM6", preferred_version, size) | ||
| src_other = os.path.join(inputdir, "ocean", "MOM6", other, size) | ||
|
|
||
| if os.path.isdir(src_pref): | ||
| src = src_pref | ||
| note = "" | ||
| elif os.path.isdir(src_other): | ||
| src = src_other | ||
| note = f'echo "NOTE: MOM6 {preferred_version}/{size} not found; using {other}/{size}"' |
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.
Are you linking v1 MOM6_BATHY_VERSION into v14 because we don't have v2 data? That will create all sorts of confusion. Why can't we generate v2 bathymetry for all resolutions? Rather than linking the "wrong" version, I think we should omit the link if the v2 bathymetry isn't available for a given resolution.
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.
That would mean we can't run GCM v12 model version at c90 or c12 resolutions. Not even for nightly testing we have to do for GCM. Since I won't be able to create bcs files for them. So that is not an option to my understanding. Why there is no version 2 of files for those resolutions maybe @sinakhani can chime in. In general, as soon as he ads them code will always grab v2.
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.
For now, I assume nightly tests don't run with v14 bcs. The AGCM can run just fine at all resolutions with v14 bcs, independent of the presence of bathymetry files. If v14 bcs aren't ready for the coupled model, then they're not ready. It is not ok to mix and match bathymetry versions within a single bcs version.
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.
@mathomp4 can you chime in and and let us know is there plan to run coupled runs (testing like nightly or any runs at all really) with new bcs (v14) GCMv12 will use at c12 or c90 res? @gmao-rreichle proposed edit will create for v14 bcs only one resolution for coupled runs and that is CF0180x6C_M6TP1440x1080 if that is what group wants I can edit code.
To me easiest resolution so everyone is happy is for @sinakhani to create other resolutions (c90 and c12) . But I don't know how fast he can do that or can he do that.
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.
The new ocean bathymetry (MOM6/v2) is at 1/4 deg for now (this is an adoption from GFDL-OM4_025). My plan is to have it at 1 deg as well (this has been in my to-do list for some time!). And probably at 1/8 deg at some point. I am not sure if we need c12 with the new bathymetry (it is rather too coarse for ocean test exp).
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.
@sinakhani : Keep in mind that the c12 tests are not for science testing, they're for 0-diff testing. I'll defer to @mathomp4 about what makes sense here, but I would strongly advise against mixing bathymetry versions within a single bcs version. If the easiest way to create "v2" bathymetry for c12 is to copy the "v1" file, so be it. But for any resolution that may be useful for science, it's a hard no from my end.
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.
I've adopted suggested change in last commit (c16644c), now code will abort if that res is not present. Once Sina adds it, code will work with no additional changes.
Grid_type: Cubed-Sphere
orslv: T3MOM6
resolution: c90
ABORT: Missing MOM6 bathymetry: /discover/nobackup/projects/gmao/bcs_shared/make_bcs_inputs/ocean/MOM6/v2/540x458 (LBCSV=v14 MOM6=v2)