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

UPP bugfixes for inline post and g2tmpl 1.12.0 compatibility (and number concentration updates) #974

Merged
merged 12 commits into from
Jun 20, 2024

Conversation

SamuelTrahanNOAA
Copy link
Contributor

@SamuelTrahanNOAA SamuelTrahanNOAA commented Jun 12, 2024

Updates UPP to be compatible with the ufs-weather-model inline post. Also fixes a bug that produced thousands of error messages from g2tmpl.

This was originally a PR to add number concentration on pressure levels, but I had to fix those unrelated bugs to get this in the ufs-weather-model.

@SamuelTrahanNOAA SamuelTrahanNOAA changed the title number concentration and HAFS-AR xml that use it number concentration and HAFS-AR xml that uses it Jun 12, 2024
@SamuelTrahanNOAA
Copy link
Contributor Author

The GCC Linux Build is failing due to an error in a spack stack script:

/home/runner/work/UPP/UPP/spack/lib/spack/env/gcc/gcc: 246: [[: not found

The script is a bash script, but claims to be sh. Hence, sh is rejecting the line with the optional feature [[. This script was probably developed on an RedHat-like system, and never tested with a more limited /bin/sh found on most other UNIX variants.

You must either add this as the first line:

#! /bin/bash

or rewrite the script to use only POSIX sh without its optional features.

@WenMeng-NOAA
Copy link
Collaborator

@SamuelTrahanNOAA Can you provide model output in netcdf for my UPP standalone test?

@SamuelTrahanNOAA
Copy link
Contributor Author

Can you provide model output in netcdf for my UPP standalone test?

For testing what, specifically?

@WenMeng-NOAA
Copy link
Collaborator

Can you provide model output in netcdf for my UPP standalone test?

For testing what, specifically?

Run your branch with *hafs_ar_*control file to generate grib2 file including these number concentrations on pressure levels.

@SamuelTrahanNOAA
Copy link
Contributor Author

SamuelTrahanNOAA commented Jun 13, 2024

EDIT: I have fixed the problem described in this comment.

The problem that was fixed.

Presently, the UPP won't run my latest txt file because the xml_perl_data.f can't read the output of PostXMLPreprocessor.pl.

221: forrtl: severe (59): list-directed I/O syntax error, unit 22, file /scratch1/NCEPDEV/stmp2/Samuel.Trahan/FV3_RT/rt_2870606/gnv1_nested_intel/postxconfig-NT_FH00.txt
221: Image              PC                Routine            Line        Source
221: fv3.exe            00000000048C0BE8  Unknown               Unknown  Unknown
221: fv3.exe            00000000048FDA02  Unknown               Unknown  Unknown
221: fv3.exe            00000000048FC467  Unknown               Unknown  Unknown
221: fv3.exe            000000000401343F  xml_perl_data_mp_         290  xml_perl_data.f
221: fv3.exe            0000000003F0FAB9  read_xml_                  59  READ_xml.f
221: fv3.exe            000000000226FEB5  post_fv3_mp_post_         162  post_fv3.F90
221: fv3.exe            000000000222E842  module_wrt_grid_c        2036  module_wrt_grid_comp.F90

It fails here:

            read(22,*)paramset(i)%param(j)%scale_fact_1st_size
            read(22,*)paramset(i)%param(j)%scale_val_1st_size
            read(22,*)paramset(i)%param(j)%scale_fact_2nd_size
            read(22,*)paramset(i)%param(j)%scale_val_2nd_size    ! <----- fails here
            read(22,*)paramset(i)%param(j)%typ_intvl_wvlen
              call filter_char_inp(paramset(i)%param(j)%typ_intvl_wvlen)

@SamuelTrahanNOAA
Copy link
Contributor Author

SamuelTrahanNOAA commented Jun 13, 2024

This may be due to problems in my regression test changes. I'll investigate and report back soon...

EDIT: It was, but I have a new problem!

@SamuelTrahanNOAA
Copy link
Contributor Author

SamuelTrahanNOAA commented Jun 13, 2024

EDIT: I have fixed the problem described in this comment.

The problem that has been fixed.

My regression test was using an older postxconfig file.

Now the inline post is failing due to missing deallocates:

I've fixed that, and now I seek the next bug...

@SamuelTrahanNOAA
Copy link
Contributor Author

@WenMeng-NOAA - Do you know why the inline post is making this complaint? I'm seeing a lot of them.

234:  get_g2_fixedsurfacetypes key:          255  not found in table 4.5

You can find the output here:

LOG: /scratch1/NCEPDEV/stmp2/Samuel.Trahan/FV3_RT/rt_3037467/gnv1_nested_intel.log
RUN: /scratch1/NCEPDEV/stmp2/Samuel.Trahan/FV3_RT/rt_3037467/gnv1_nested_intel

Many ranks give the same error many times, but it's always the same error.

@SamuelTrahanNOAA
Copy link
Contributor Author

Code is here:

ufs-community/ufs-weather-model#2326

The regression test is gnv1_nested, but you can only run on Hera. Other machines don't have g2tmpl 1.12.0 in the same Spack Stack as ufs-weather-model prerequisites.

@WenMeng-NOAA WenMeng-NOAA added the enhancement New feature or request label Jun 14, 2024
@WenMeng-NOAA
Copy link
Collaborator

@SamuelTrahanNOAA Can you sync your branch with the UPP develop?

@WenMeng-NOAA WenMeng-NOAA added the Ready for Review This PR is ready for code review. label Jun 14, 2024
@WenMeng-NOAA
Copy link
Collaborator

The GCC Linux Build is failing due to an error in a spack stack script:

/home/runner/work/UPP/UPP/spack/lib/spack/env/gcc/gcc: 246: [[: not found

The script is a bash script, but claims to be sh. Hence, sh is rejecting the line with the optional feature [[. This script was probably developed on an RedHat-like system, and never tested with a more limited /bin/sh found on most other UNIX variants.

You must either add this as the first line:

#! /bin/bash

or rewrite the script to use only POSIX sh without its optional features.

@AlexanderRichert-NOAA Could you add the fix per @SamuelTrahanNOAA 's suggestion? Thanks!

@WenMeng-NOAA
Copy link
Collaborator

@WenMeng-NOAA - Do you know why the inline post is making this complaint? I'm seeing a lot of them.

234:  get_g2_fixedsurfacetypes key:          255  not found in table 4.5

You can find the output here:

LOG: /scratch1/NCEPDEV/stmp2/Samuel.Trahan/FV3_RT/rt_3037467/gnv1_nested_intel.log RUN: /scratch1/NCEPDEV/stmp2/Samuel.Trahan/FV3_RT/rt_3037467/gnv1_nested_intel

Many ranks give the same error many times, but it's always the same error.

@SamuelTrahanNOAA Is this test for global or regional domain?

@WenMeng-NOAA
Copy link
Collaborator

RUN: /scratch1/NCEPDEV/stmp2/Samuel.Trahan/FV3_RT/rt_3037467/gnv1_nested_intel

@SamuelTrahanNOAA Can you update itag in the run directory as

&MODEL_INPUTS
 MODELNAME='FV3R'
/
&NAMPGB
KPO=47,PO=1000.,975.,950.,925.,900.,875.,850.,825.,800.,775.,750.,725.,700.,675.,650.,625.,600.,575.,550.,525.,500.,475.,450.,425.,400.,375.,350.,325.,300.,275.,250.,225.,200.,175.,150.,125.,100.,70.,50.,30.,20.,10.,7.,5.,3.,2.,1.,
/

@climbfuji
Copy link
Contributor

@SamuelTrahanNOAA The bug fix for the spack wrapper was merged. Submodule pointer update for spack-stack will follow this morning. Thanks for figuring this out. I had tested on Ubuntu, macOS, Oracle Linux and CentOS (both Red Hat derivates). What system is UPP CI running on?

@SamuelTrahanNOAA
Copy link
Contributor Author

Is this test for global or regional domain?

"And," not "or."

There's a globe with a regional nest.

@SamuelTrahanNOAA
Copy link
Contributor Author

SamuelTrahanNOAA commented Jun 14, 2024

Can you update itag in the run directory as

I think you're telling me the pressure levels in itag don't match the xml. That is because I started with the HAFS xml, but forgot to update the pressure levels. I'm going to make the opposite change to what you suggest: copy the GFS pressure levels into the hafs_ar xml.

EDIT: I meant to type "hafs_ar xml." This has been corrected.

@WenMeng-NOAA
Copy link
Collaborator

@SamuelTrahanNOAA The bug fixes were implemented in the RRFS branch 'release/rrfs_v1' to solve the issue of unduplicated RRFS grib2 metadata. I will submit a PR to sync these changes to the develop branch before your PR is processed.

@SamuelTrahanNOAA
Copy link
Contributor Author

The bug fixes were implemented in the RRFS branch 'release/rrfs_v1' to solve the issue of unduplicated RRFS grib2 metadata.

@WenMeng-NOAA - I looked at #979 and I don't see any of the bug fixes from this PR in that one. There are bug fixes, but they're entirely unrelated and do not overlap.

@WenMeng-NOAA
Copy link
Collaborator

The bug fixes were implemented in the RRFS branch 'release/rrfs_v1' to solve the issue of unduplicated RRFS grib2 metadata.

@WenMeng-NOAA - I looked at #979 and I don't see any of the bug fixes from this PR in that one. There are bug fixes, but they're entirely unrelated and do not overlap.

@SamuelTrahanNOAA The bug fixes in #797, first implemented in the develop branch, will ensure to the generation of consistent grib2 metadata in RRFS dataset.
example for QPFFG in PRSLEV:

test1:
< 772:4824832913:vt=2024022023:surface:11-12 hour acc fcst:var discipline=1 center=7 local_table=1 parmcat
=1 parm=197:prob >1:prob fcst 72/110
test2:
772:4824832913:vt=2024022023:surface:11-12 hour acc fcst:var discipline=1 center=7 local_table=1 parmcat
=1 parm=197:prob >1:prob fcst 96/110
6177c6177

@WenMeng-NOAA
Copy link
Collaborator

@SamuelTrahanNOAA Can you sync your branch with the latest UPP develop? We will process your PR.

@SamuelTrahanNOAA
Copy link
Contributor Author

Before you merge this, I want to confirm the inline post works after I update the branch.

@WenMeng-NOAA
Copy link
Collaborator

Before you merge this, I want to confirm the inline post works after I update the branch.

@SamuelTrahanNOAA Sure. Right now, we would like you to sync your branch so we can run the UPP RTs.

@SamuelTrahanNOAA
Copy link
Contributor Author

My branch is updated and the inline post seems to work. (Hera queues were unusually fast today.) This branch is ready for regression testing.

@WenMeng-NOAA
Copy link
Collaborator

The UPP RTs were completed on WCOSS2 without baseline changes.

@WenMeng-NOAA WenMeng-NOAA added the No Baseline Change No baseline of the UPP regression tests are made. label Jun 19, 2024
@WenMeng-NOAA
Copy link
Collaborator

@FernandoAndrade-NOAA You may start the UPP RTs on Hera and Orion. There should be no baseline update in this PR.

@FernandoAndrade-NOAA
Copy link
Collaborator

FernandoAndrade-NOAA commented Jun 20, 2024

@FernandoAndrade-NOAA You may start the UPP RTs on Hera and Orion. There should be no baseline update in this PR.

Permission restrictions on the branch prevent me from pushing RT logs, but there are no changes in RT results on Hera and Hercules. Looks good from my side.

@WenMeng-NOAA
Copy link
Collaborator

@FernandoAndrade-NOAA You may start the UPP RTs on Hera and Orion. There should be no baseline update in this PR.

Permission restrictions on the branch prevent me from pushing RT logs, but there are no changes in RT results on Hera and Hercules. Looks good from my side.

@SamuelTrahanNOAA Can you give access permission to @FernandoAndrade-NOAA so the UPP RT logs can be pushed in your branch?

@SamuelTrahanNOAA
Copy link
Contributor Author

Can you give access permission to @FernandoAndrade-NOAA so the UPP RT logs can be pushed in your branch?

@FernandoAndrade-NOAA - I invited you as a collaborator to my repository so you can push logs to it. Please check the email connected to your github account for an invitation email. If you accept the invitation, github should let you push logs.

@FernandoAndrade-NOAA
Copy link
Collaborator

Thanks! We should be good to go for merging, @WenMeng-NOAA

@WenMeng-NOAA
Copy link
Collaborator

@SamuelTrahanNOAA Can you confirm this PR is working in inline post at ufs-weather-model side before we merge it?

@SamuelTrahanNOAA
Copy link
Contributor Author

Can you confirm this PR is working in inline post at ufs-weather-model side before we merge it?

The ufs-weather-model baseline generation ran without incident. I didn't check the GRIB files's contents since there are hundreds of them, with thousands of records in each.

@SamuelTrahanNOAA
Copy link
Contributor Author

The ufs-weather-model code managers will run the regression tests on all supported platforms sometime in the next few weeks. At that point, we'll have broader assurances that the inline post works. However, they don't run regression tests until subcomponent pull requests are merged, including this one. That means you must merge this pull request before we can do large-scale testing of the inline post across all platforms.

@WenMeng-NOAA
Copy link
Collaborator

@SamuelTrahanNOAA We can merge this PR now and address inline post issues later if needed.

@WenMeng-NOAA
Copy link
Collaborator

This PR is ready for merging.

@WenMeng-NOAA WenMeng-NOAA merged commit 70fc762 into NOAA-EMC:develop Jun 20, 2024
4 of 5 checks passed
DavidHuber-NOAA added a commit to DavidHuber-NOAA/UPP that referenced this pull request Sep 9, 2024
* origin/develop:
  Updates to support MPAS applications (RRFS and HFIP) (NOAA-EMC#1029)
  Add 6-hrly max winds at 10m to SFS (NOAA-EMC#1019)
  Update jet.lua (NOAA-EMC#1027)
  Updates to support UPP use with MPAS (NOAA-EMC#1018)
  [develop]: Turn on WARN_AS_ERROR for Doxygen Documentation Builds (NOAA-EMC#1023)
  Sample PR for testing (NOAA-EMC#1007)
  Enable template 4-49 to obtain aerosol ensemble information (NOAA-EMC#1011)
  Relocate gfs/gefs/sfs control files (NOAA-EMC#990)
  update g2tmp on aws to 1.12.0 (NOAA-EMC#996)
  [develop]: Update requirements files (NOAA-EMC#994)
  Bump zipp from 3.17.0 to 3.19.1 in /doc/UserGuide (NOAA-EMC#991)
  remove stack-python load for Gaea build (NOAA-EMC#993)
  Bump certifi from 2024.2.2 to 2024.7.4 in /doc/UserGuide (NOAA-EMC#988)
  [develop]: Add Doxygen variable definitions to modules (NOAA-EMC#965)
  Read bucket either as an integer or float (NOAA-EMC#984)
  Update Orion module file for Rocky 9 upgrade (NOAA-EMC#987)
  UPP bugfixes for inline post and g2tmpl 1.12.0 compatibility (and number concentration updates) (NOAA-EMC#974)
  Sync the RRFS hotfix NOAA-EMC#967 and NOAA-EMC#968. (NOAA-EMC#979)
  Bump urllib3 from 2.2.1 to 2.2.2 in /doc/UserGuide (NOAA-EMC#981)
  Fix for hydrostatic runs - write out Omega and HGT from model output (NOAA-EMC#959)
  Bump requests from 2.31.0 to 2.32.0 in /doc/UserGuide (NOAA-EMC#963)
  Correct rt.sh paths (NOAA-EMC#957)
  Updates to use GRIB2 template 4.9 for QPFFFG and QPFARI variables in RRFS (NOAA-EMC#929)
  Add hourly averaged smoke PM2.5 and dust PM10 (NOAA-EMC#917)
  Update Namelist documentation for all namelist options (NOAA-EMC#940)
  update gtg code revision to v.4.16.3 (NOAA-EMC#954)
  Bump jinja2 from 3.1.3 to 3.1.4 in /doc/UserGuide (NOAA-EMC#953)
  Clean up labeling for 15-min accumulated fields (NOAA-EMC#948)
  Updates to the GSL exp1 ceiling diagnostic (NOAA-EMC#947)
  Additional RT log information (NOAA-EMC#941)
  add cmake load to modulefile/gaea.lua (NOAA-EMC#945)
  RRFS updates (NOAA-EMC#938)
  add module for AWS (NOAA-EMC#934)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request No Baseline Change No baseline of the UPP regression tests are made. Ready for Review This PR is ready for code review.
Projects
None yet
4 participants