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

Update bufr codes to handle one forecast at a time #75

Merged
merged 6 commits into from
Aug 24, 2024

Conversation

BoCui-NOAA
Copy link
Contributor

@BoCui-NOAA BoCui-NOAA commented Aug 21, 2024

Description

This PR includes the follow changes to bufr sounding codes:

  1. added the function to judge and process 3D soil variables, which are new outputs from GFSv17
  2. modified the code to process forecast hour individually
  3. code clean-up and removal of nemsio input files that are not used anymore
  4. added a new module modpr_module.f90, which is a simplified version of sigio_module.f
  5. removed linking with 'nemsio' and 'sigio' library in CMakeLists.txt

With the updates of bufr codes and scripts, there is no need to add restart capability to GFS post-process job JGFS_ATMOS_POSTSND.

The related bufr job script update is another PR NOAA-EMC/global-workflow#2853

Refs NOAA-EMC/global-workflow#1257
Refs NOAA-EMC/global-workflow#2853

Type of change

  • Maintenance (code refactor, clean-up, new CI test, etc.)

Change characteristics

  • Is this a breaking change (a change in existing functionality)? NO
  • Does this change require a documentation update? NO

How has this been tested?

  • Cycled test on WCOSS2

Checklist

  • Any dependent changes have been merged and published
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing tests pass with my changes
  • I have made corresponding changes to the documentation if necessary

@BoCui-NOAA BoCui-NOAA changed the title update bufr codes to hadle one forecast at a time update bufr codes to handle one forecast at a time Aug 21, 2024
Copy link
Contributor

@aerorahul aerorahul left a comment

Choose a reason for hiding this comment

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

code changes look reasonable to me.
A couple of questions:

  1. I notice sigio_module is being used. Is it possible to remove the dependency on sigio from this program. We have long deprecated the spectral dycore. I noticed only a couple places where sigio is referenced.
  2. Since nemsio is removed, we can remove linking with nemsio library in CMakeLists.txt.
    Thanks

@BoCui-NOAA
Copy link
Contributor Author

1. I notice `sigio_module` is being used.  Is it possible to remove the dependency on `sigio` from this program.  We have long deprecated the spectral dycore. I noticed only a couple places where `sigio` is referenced.

The bufr code uses subroutine sigio_modpr(). I will read the code to see why it is called, and see if it can removed.

2. Since `nemsio` is removed, we can remove linking with `nemsio` library in `CMakeLists.txt`.

Will do, thanks!

@BoCui-NOAA
Copy link
Contributor Author

Subroutine sigio_modpr is used to compute model pressures. It is sourced from: /apps/ops/prod/libs/build/v1.1.0/pkg/sigio-v2.3.2/src/sigio_module.f. I did the following modifications to remove the dependency on 'sigio'.

  • Copied the original sigio_module.f to the folder gfs_bufr.fd and renamed it to modpr_module.f90
  • Retained only the sigio_modpr subroutine and its related code
  • Removed all other subroutines and associated code that were present in sigio_module.f
  • Updated bufr codes to use module modpr_module instead of using and linking to 'sigio' library

Copy link
Contributor

@aerorahul aerorahul left a comment

Choose a reason for hiding this comment

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

looks good.
Thank you for removing the dependency on sigio library.
I have just one comment re. an mpif.h file that is being included.

@@ -60,18 +65,15 @@ subroutine meteorg(npoint,rlat,rlon,istat,cstat,elevstn,
!
!$$$
use netcdf
use nemsio_module
use sigio_module
use modpr_module
use physcons
use mersenne_twister
! use funcphys, only : gfuncphys
use funcphys
implicit none
include 'mpif.h'
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need this include mpif.h if this is no longer a parallel program?

@BoCui-NOAA
Copy link
Contributor Author

Code meteorg.f and read_netcdf.f were updated, "mpif.h" was removed.

Copy link
Contributor

@aerorahul aerorahul left a comment

Choose a reason for hiding this comment

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

looks good.
thanks for accepting the suggestions and getting rid of nemsio and sigio library dependencies from this program.

@WalterKolczynski-NOAA WalterKolczynski-NOAA changed the title update bufr codes to handle one forecast at a time Update bufr codes to handle one forecast at a time Aug 24, 2024
@WalterKolczynski-NOAA WalterKolczynski-NOAA merged commit bd8f13d into NOAA-EMC:develop Aug 24, 2024
3 checks passed
@BoCui-NOAA
Copy link
Contributor Author

Great. Thanks, Rahul and Walter.
@HuiyaChuang-NOAA

WalterKolczynski-NOAA pushed a commit to NOAA-EMC/global-workflow that referenced this pull request Sep 7, 2024
The current operational BUFR job begins concurrently with the GFS model
run. This PR updates the script and ush to process all forecast hour
data simultaneously, then combines the temporary outputs to create BUFR
sounding products for each station. The updated job will now start
processing data only after the GFS model completes its 180-hour run,
handling all forecast files from 000hr to 180hr at a time. The new
version job running will need 7 nodes instead of the current operational
4 nodes.

This PR depends on the GFS bufr code update NOAA-EMC/gfs-utils#75

With the updates of bufr codes and scripts, there is no need to add
restart capability to GFS post-process job JGFS_ATMOS_POSTSND.

This PR includes the other changes:

Rename the following table files:

parm/product/bufr_ij13km.txt to parm/product/bufr_ij_gfs_C768.txt
parm/product/bufr_ij9km.txt to parm/product/bufr_ij_gfs_C1152.txt

Add a new table file: parm/product/bufr_ij_gfs_C96.txt for GFSv17 C96
testing.

Added a new capability to the BUFR package. The job priority is to read
bufr_ij_gfs_${CASE}.txt. If the table file is not available, the code
will automatically find the nearest neighbor grid point (i, j).

Refs #1257
Refs NOAA-EMC/gfs-utils#75
DavidHuber-NOAA added a commit to DavidHuber-NOAA/gfs-utils that referenced this pull request Sep 9, 2024
* origin/develop:
  Use contrib installation of spack-stack on Jet (NOAA-EMC#79)
  Update bufr codes to handle one forecast at a time (NOAA-EMC#75)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants