forked from ESCOMP/CMEPS
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Sync w/ latest ESCOMP/main #129
Merged
DeniseWorthen
merged 791 commits into
NOAA-EMC:emc/develop
from
DeniseWorthen:feature/updcmeps
Dec 16, 2024
Merged
Sync w/ latest ESCOMP/main #129
DeniseWorthen
merged 791 commits into
NOAA-EMC:emc/develop
from
DeniseWorthen:feature/updcmeps
Dec 16, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CMEPS PR for CDEPS Inline implementation
* add new cpl_scalar for mediator history files for tiled gridded domains, eg cube-sphere. Replaces existing use of config variables which restricted the use to 6-tiles domain * remove unnecessary trims, fix minor typos and indentation
Previously we hadn't been doing the mapping from MED -> GLC when CISM was running in NOEVOLVE mode. This was a problem because this downscaled SMB is one of the main benefits of running CISM in NOEVOLVE mode. Resolves ESCOMP#426. See that issue for details. One other change here is that I skip GLC -> MED in NOEVOLVE mode. I *think* that's a safe thing to do, but I'm not 100% sure of it.
Add unstructured grid support for use with new Spectral Elements SCAM
* testing of this feature w/ UFS noahmp lnd component, which currently runs on the CSG, found two issues. One to write the mediator fractions and areas on the tiles when using the single history file. A second fix is the mapping masking for lnd-atm coupling in UFS.
Copied POP2%ECO values to use as MOM6%MARBL values (want them for abio as well as base bio runs)
cmeps0.14.50
Add index to cpl_scalars to allow CSG or regional (single tile) mediator history files for ATM component in UFS
When this was based on run_glc, NOEVOLVE cases were failing like this: 20240319 135112.648 ERROR PET0000 ESMF_ArrayGet.F90:1949 ESMF_ArrayGetFPtr Object being used before creation - Bad Object 20240319 135112.649 ERROR PET0000 ESMF_FieldGet.F90:2634 ESMF_FieldGetDataPtr Object being used before creation - Internal subroutine call returned Error 20240319 135112.649 ERROR PET0000 nuopc_shr_methods.F90:304 Object being used before creation - Passing error in return code 20240319 135112.649 ERROR PET0000 glc_import_export.F90:475 Object being used before creation - Passing error in return code 20240319 135112.649 ERROR PET0000 glc_comp_nuopc.F90:481 Object being used before creation - Passing error in return code 20240319 135112.649 ERROR PET0000 ESM0001:src/addon/NUOPC/src/NUOPC_Driver.F90:2901 Object being used before creation - Phase 'IPDv01p3' Initialize for modelComp 3: GLC did not return ESMF_SUCCESS 20240319 135112.649 ERROR PET0000 ESM0001:src/addon/NUOPC/src/NUOPC_Driver.F90:1985 Object being used before creation - Passing error in return code 20240319 135112.649 ERROR PET0000 ensemble:src/addon/NUOPC/src/NUOPC_Driver.F90:2901 Object being used before creation - Phase 'IPDv02p3' Initialize for modelComp 1: ESM0001 did not return ESMF_SUCCESS 20240319 135112.649 ERROR PET0000 ensemble:src/addon/NUOPC/src/NUOPC_Driver.F90:1990 Object being used before creation - Passing error in return code 20240319 135112.649 ERROR PET0000 ensemble:src/addon/NUOPC/src/NUOPC_Driver.F90:489 Object being used before creation - Passing error in return code 20240319 135112.649 ERROR PET0000 esmApp.F90:134 Object being used before creation - Passing error in return code 20240319 135112.649 INFO PET0000 Finalizing ESMF This fails in the InitializeRealize call to export_fields, and specifically in this: ! Set scalars in export state call State_SetScalar(dble(get_nx_tot(instance_index=ns)), flds_scalar_index_nx, & NStateExp(ns), flds_scalar_name, flds_scalar_num, rc) So it seems like we need to have GLC -> MED in the run sequence for initialization to work correctly.
…teU10 Update U10 to be resolved wind; add variable for U10+gusts
fix leap day issue
Based on discussion in ESCOMP#514
Fix logic for adding psfc to aoflux_in ### Description of changes Fix the logic for adding psfc to aoflux_in, particularly needed for cases using the exchange grid. This is needed to avoid a segmentation fault in the call to flux_atmocn in SMS_Ld2.ne30pg3_t232.BMT1850.derecho_gnu.allactive-defaultio when running with aoflux_grid=xgrid. (This shows up when running with xgrid because the FB_fldchk can't be used in this situation - see details in my [comment below](ESCOMP#514 (comment)).) ### Specific notes Contributors other than yourself, if any: CMEPS Issues Fixed (include github issue #): Are changes expected to change answers? No Any User Interface Changes (namelist or namelist defaults changes)? No ### Testing performed SMS_Ld2.ne30pg3_t232.BMT1850.derecho_gnu.allactive-defaultio with aoflux_grid="xgrid", from cesm3_0_beta03 Also ran many other tests from the CESM prealpha and prebeta test suite.
Make xgrid the default aoflux_grid when atm and ocn are running on different grids
add memory usage variables for use on derecho
Add timestamp rpointer
do not write restart at end of erc test
Fix/ocnalb orbprint
* create a FB to hold the returned dststatus fields * write all dststatus fields into one file via med_io_write_FB in med.F90 if requested * add mask to the FBdststatus
update retrieval and writing of dststatus fields
Update ice2wav maps
restart at end of run needs to be false for these tests
DeniseWorthen
requested review from
uturuncoglu,
NickSzapiro-NOAA and
dpsarmie
December 12, 2024 13:13
dpsarmie
approved these changes
Dec 12, 2024
NickSzapiro-NOAA
approved these changes
Dec 12, 2024
14 tasks
uturuncoglu
approved these changes
Dec 12, 2024
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.
It looks good to me.
Testing for #2469 has completed, please continue with the merge process, thank you. |
This was referenced Dec 19, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes
This PR updates CMEPS to improve the usability of the
RegridStatus
field, which is returned during RH formation. When enabled withwrite_dststatus = true
, a file namedcase_name.dststatus.nc
will be produced. Each field in this file will report an integer flag indicating how a given point was mapped. These values are documented in the ESMF Ref manual here. Note that in order to "bin" the status among types a tolerance has been used, which can result in a speckled pattern for the conservative mapping types. These are generally not important (ie, the difference between a value=5,6,7).The file produced will contain a set of fields in the form
dstcomp_source_destination_maptype
. For example,dstice_atm_ice_consf
, which is the "conservative fraction mapping from atm to ice" anddstatm_ice_atm_consf
, which is in the opposite direction (the atm fields are available decomposed onto the tiles).This dststatus fields can be used to verify the correct mapping. For example, for the C96mx025 test case created to debug the grid imprint issue (ufs-community/ufs-weather-model#2466), mapping bilinear from atm->ice shows this mapping result around Bering Strait:
This clearly shows that coastal areas on the ice grid are unmapped (value=1, "The destination location is within a masked part of the source grid; no regridding"). This means to implement bilinear mapping from atm->ice, the srcMask value needs to be changed to map all atm points to the ice. With this change, the following dststatus is generated, showing that all ice points now being mapped to (value=4, "The destination location is within the unmasked source grid; regridded").
(Note that for the unstructured wave, the dststatus fields cannot be visualized w/o external information, namely the element and node coordinates. These can be retrieved from the SCRIP file used to generate the ESMF mesh.)
PR also updates to latest ESCOMP, which utilizes a centralized location (use nuopc_shr_methods in CDEPS share code) to initialize Alarms and provides updates to CESM-specific uses.
Specific notes
CMEPS Issues Fixed (include github issue #):
Are changes expected to change answers? (specify if bfb, different at roundoff, more substantial)
Any User Interface Changes (namelist or namelist defaults changes)?
This feature is enabled by adding
write_dststatus = true
to the MED attributes.Testing performed
Please describe the tests along with the target model and machine(s)
If possible, please also added hashes that were used in the testing