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

cam6_4_033: Add updated ncdata and bnd_topo files for MPASv8 #1029

Merged
merged 28 commits into from
Sep 13, 2024

Conversation

gdicker1
Copy link
Collaborator

@gdicker1 gdicker1 commented May 13, 2024

The new initial condition files contain fields that are expected by routines in cam_dev (cam7) physics. The new topo files were regenerated due to changes in the NCAR/Topo software. These files are only used when phys="cam_dev" to ensure previous compsets and/or tests aren't affected.

These files were checked for NaNs and runs were attempted for the F2000dev compset before making this PR.

Fixes #995 and #1094

The new IC files contain fields that are expected by routines in cam_dev
(cam7) physics. The new topo files were regenerated due to changes in
the NCAR/Topo software. These files are only used when 'phys="cam_dev"'
to ensure previous compsets and/or tests aren't affected.
@gdicker1 gdicker1 self-assigned this May 13, 2024
@gdicker1
Copy link
Collaborator Author

gdicker1 commented May 13, 2024

NOTE: This PR branch is based on cam6_3_148 for compatibility with EarthWorks. This can be updated at any time, in whatever way reviewers would prefer.

Remaining work:

    • Monitor and update branch based on review
    • Work with others to add these files to CESM input data server1
    • Update branch w/ cam_development work
    • Run test suite and record results

Footnotes

  1. Until the files are added, Derecho users can copy my test input data within "/glade/derecho/scratch/gdicker/2024Apr04_CAMMPASv8Grids/test_inputdata2". This directory contains symlinks to my files, you may need to run something like cp -LR ${test_data} ${dest}

This commit addresses issues that were seen when using ncdata with
longitudes in the [-pi, pi] range in cases with full physics.  This
would cause the atmosphere to become unphysical and runs to fail. This
change is made just after the longitude values are read to ensure they
are correct for the remainder of execution.
NOTE: this is before the 'aux_cam' tests have been run
Previous versions of the lonCell_arr adjustment used an explicit loop. Without this loop, the nCells variable and the routine to fetch it are no longer needed.
Makes code consistent with CAM coding standards: 'All variables of type
real must have a specified kind, including literals.'
This commit also extends the comment that was with this code block,
includes an if condition so valid values aren't modified, uses kinds and
constants (pi) that are already used in the new file, and updates the
ChangeLog so the correct file is referenced.
This aligns the files with changes in cam6_4_001 (PR ESCOMP#1028).
@gdicker1
Copy link
Collaborator Author

gdicker1 commented Jul 26, 2024

    • Update branch w/ cam_development work
    • Run test suite and record results

At this point 3.1 has been addressed by b608af1. I plan to proceed with step 3 and 4 once I have a tag number or directed otherwise.

@gdicker1 gdicker1 marked this pull request as ready for review July 26, 2024 17:57
Conform to CAM Coding Standards: 'Use symbolic numerical comparison
operators (e.g., ==, /=, <, >=) not old character versions (e.g.,
.eq.).'
@cacraigucar cacraigucar changed the title Add updated ncdata and bnd_topo files for MPASv8 part of cam6_4_021?: Add updated ncdata and bnd_topo files for MPASv8 Aug 13, 2024
@cacraigucar cacraigucar changed the title part of cam6_4_021?: Add updated ncdata and bnd_topo files for MPASv8 Add updated ncdata and bnd_topo files for MPASv8 Aug 14, 2024
The correct file for these physics schemes must include topography.
Enable no-topography, idealized test cases with the mpas dycore when
running 58L or 93L on 480, 120, 60, and 30km grids.
NOTE: these files also support running with analytic_ic.
Duplicates an entry to ensure that the following two files are used
together:
- mpasa120_L32_topo_coords_c240508.nc
-
mpasa120_gmted2010_modis_bedmachine_nc3000_Laplace0100_noleak_20240507.nc

Matches the physics specification on new real-data ICs, so the correct *_20240507.nc
bnd_topo files are used with them.
@gdicker1
Copy link
Collaborator Author

gdicker1 commented Aug 15, 2024

@adamrher could you take a look at this and see if it matches the files you expect? I want to make sure before I try to get these added to the CESM data repo.

This PR now:

  • Replaces the L32 analytic_ic files with updated versions
    • the *_topo_*.nc file here uses the new bnd_topo
  • Adds notopo files for product {mpasa480, 120, 60, 30} x {58L, 93L}
  • Adds new real-data IC files for the product {mpasa480, 120} x {58L, 93L}
    • these use the new bnd_topo below
    • generated using the MPAS init_atmosphere core to add CSFR initial conditions from 2000-01-01T00:00:00Z1
  • Adds 2 new bnd_topo files for mpasa480 and mpasa120

Footnotes

  1. I couldn't get ctsm to use the correct files for mpasa480 and generate from analytic_ic.

@gdicker1 gdicker1 requested a review from adamrher August 15, 2024 20:29
@gdicker1
Copy link
Collaborator Author

@adamrher

I also wanted to see what you thought of this point:

[the real data ICs were] generated using the MPAS init_atmosphere core to add CSFR initial conditions from 2000-01-01T00:00:00Z

I've been told that some tracers and other fields would be missing if I didn't create the file from a year-long run (as you suggested before).

If this is a problem, I think it would be easier to drop mpasa480 cami*.nc and bnd_topo files from this PR than for me to figure out the CLM files needed for mpasa480. Then I could do what's needed to generate the correct mpasa120 ncdata.

@adamrher
Copy link

adamrher commented Aug 16, 2024

As long as the CFSR ncdata files work for a real world case, then I say move forward with the CFSR file. If the model doesn't complain, and some tracers are missing, then the model will probably initialize them to zero which is fine by me.

What's the issue with mpasa480? It looks like there is CTSM support for F2000climo/dev, but not FHIST.

@gdicker1
Copy link
Collaborator Author

Moving forward sounds good, these files can always be replaced if they cause a problem.

CTSM support for F2000climo/dev, but not FHIST

This was my problem, I was trying to use FLTHIST and didn't consider the F2000 compsets.

@jtruesdal
Copy link
Collaborator

I do not know what the analytic ic topo cases are for and would agree that they seem to be unneeded. The analytic no topo (just vertical coordinates) are used and they also provide a way to run a new grid or start the model using a standard atmosphere initial condition.

@adamrher
Copy link

and they also provide a way to run a new grid or start the model using a standard atmosphere initial condition.

Is this true for mpasa coords files? I had thought that the vertical coordinate is a function of ncol and therefore must be consistent with the horizontal grid you're running? If this is not the case, than we only need one analytic_ic ncdata file for each vertical grid, as they would work for any arbitrary mpasaXXX grid.

@gdicker1
Copy link
Collaborator Author

the vertical coordinate is a function of ncol and therefore must be consistent with the horizontal grid you're running

This is my understanding with MPAS. We get horizontal grid info from meshes generated by code not in the main MPAS-Model repo. It's easy to add vertical levels to that. I don't think that it would be efficient to do the Voronoi tessellation online (especially for high resolution) to run MPAS from only a set of vertical levels.

@adamrher
Copy link

Dylan I think what @jtruesdal is referring to is that, for example with the se dycore, when you want to run a new grid and you don't have an inic file, you can add a new grid entry in ccs_config/ pointing to a new ESMF mesh file (meaning you're supplying the new grid, not generating it in a run), and then run with analytic_ic. For the se dycore (and all but mpasa, maybe), the ncdata file only needs to have vertical level information, and the analytic_ic's are generated in the horizontal using the supplied mesh file and analytic_ic code in src/dynamics/. That's why there are only three coordinate files in the analytic_ic section (L26, L30, L32); they work for any arbitrary horizontal grid/dycore.

For no_topo mpasa, I think the zgrid is identical for every grid column. But I wouldn't be surprised if mpasa requires analytic_ic to have a ncdata file on the horizontal grid, which is indicated by the comments in the mpasa analytic_ic section of namelists_defaults.xml.

@jtruesdal
Copy link
Collaborator

Is this true for mpasa coords files? I had thought that the vertical coordinate is a function of ncol and therefore must be consistent with the horizontal grid you're running? If this is not the case, than we only need one analytic_ic ncdata file for each vertical grid, as they would work for any arbitrary mpasaXXX grid.

The MPAS vertical coordinate is height based so does have a dependence on the height of each ncol. The mpass coords files are very useful for aquaplanet cases where there is no topo. As you mentioned then we only need one coord file for each supported vertical resolution. I've also generated quick initial condition files from the aquaplanet runs that I've also used for non-aquaplanet cases.

@gdicker1
Copy link
Collaborator Author

gdicker1 commented Aug 16, 2024

Thanks for explaining, my understanding of CAM/CESM was off. It seems to me the reason is:

  1. MPAS separates the logic for vertical levels into the init_atmosphere core (may be easy to adapt in the CAM interface)
  2. As they are created by mpas2esmf now, ESMF and SCRIP files in CESM don't have the horizontal grid info MPAS-A would need. (I think non-trivial to large amount of work to address)

Remove old L32 real-data files and all physics specififiers from new
real-data files. The old mpasa bnd_topo is similarly replaced.

One entry with the old mpasa120 bnd_topo file remains, it is still used
by the mpas120km.waccm_fulltopo_c220818.nc ncdata. Specifiers are used to
match these entries.
@gdicker1
Copy link
Collaborator Author

gdicker1 commented Aug 19, 2024

After pushing 939a92d, 9afb3cd, and 24012df. The remaining work seems to be:

  • Generate an entry to replace mpas120km.waccm_fulltopo_c220818.nc
  • Replace mpasa120, 70L waccm ncdata with new file and remove mpas_120_nc3000_Co060_Fi001_MulG_PF_Nsw042_c200921.nc bnd_topo entry
  • Push approved files to CESM data repository
  • Prepare to test, merge in cam_development
  • Do aux_cam testing

The mpasa120km.waccm_fulltopo_c220818.nc was the last file using
mpas_120_nc3000_Co060_Fi001_MulG_PF_Nsw042_c200921.nc, allowing it to be
removed.
@gdicker1
Copy link
Collaborator Author

gdicker1 commented Sep 5, 2024

@adamrher @jtruesdal @cacraigucar, I'm looking for another round of reviews or comments on this. Once any changes are made and this PR approved, I will ask for help getting the files below added to CESM data.

Files to add to atm/cam/inic/mpas (12):

  • mpasa120_L58_notopo_coords_c240814.nc
  • mpasa120_L93_notopo_coords_c240814.nc
  • mpasa30_L58_notopo_coords_c240814.nc
  • mpasa30_L93_notopo_coords_c240814.nc
  • mpasa480_L58_notopo_coords_c240814.nc
  • mpasa480_L93_notopo_coords_c240814.nc
  • mpasa60_L58_notopo_coords_c240814.nc
  • mpasa60_L93_notopo_coords_c240814.nc
  • cami_01-01-2000_00Z_mpasa120_L93_CFSR_c240814.nc
  • cami_01-01-2000_00Z_mpasa120_L58_CFSR_c240814.nc
  • cami_01-01-2000_00Z_mpasa480_L58_CFSR_c240814.nc
  • cami_01-01-2000_00Z_mpasa480_L93_CFSR_c240814.nc

Files to add to atm/waccm/ic (1):

  • mpasa120_L70.waccm_topography_SC_c240904.nc

Accessible on Derecho, within sub-dirs of: "/glade/derecho/scratch/gdicker/2024Jun04_CAMMPASv8Grids_2/files_for_cesmdata3"

Copy link

@adamrher adamrher left a comment

Choose a reason for hiding this comment

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

Looks great Dylan, thanks for doing this!

ESCOMP#1095)

These changes address run-time failures that were seen when using MPAS
ncdata with longitudes in the [-pi, pi] range in cases with non-simple
physics. The atmospheric state would become unphysical and fail.
Part of catching up to cam_development
Catch PR branch up to current head of cam_development
@gdicker1
Copy link
Collaborator Author

gdicker1 commented Sep 11, 2024

Commit a0db53f is a convenience for me as I bring in these changes to EarthWorksOrg/CAM as well. EarthWorksOrg/CAM is currently based on cam6_4_030.

Disregard this comment, EarthWorksOrg/CAM is actually based on cam6_4_019

@gdicker1 gdicker1 changed the title Add updated ncdata and bnd_topo files for MPASv8 cam6_4_033: Add updated ncdata and bnd_topo files for MPASv8 Sep 11, 2024
@gdicker1 gdicker1 added enhancement New feature or request SIMA labels Sep 11, 2024
These files currently can't be added to the CESM data repository due to
size. Interested users may find these files within the CESM inputdata
directory on Derecho and/or GLADE.
@gdicker1 gdicker1 merged commit fa94177 into ESCOMP:cam_development Sep 13, 2024
2 checks passed
gdicker1 added a commit to EarthWorksOrg/CAM that referenced this pull request Sep 20, 2024
…w-develop (PR #33)

Add updated ncdata and bnd_topo files for MPASv8.

This PR brings in a feature branch that was contributed to ESCOMP/CAM ESCOMP#1029
(tagged cam6_4_033) and adds a few extra EarthWorks-specific files on top.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request SIMA
Projects
Status: Tag
Development

Successfully merging this pull request may close these issues.

4 participants