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

Add capability to use RAP/HRRR MASSDEN as smoke IC/LBCs #923

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

jordanschnell
Copy link

@jordanschnell jordanschnell commented Mar 20, 2024

DESCRIPTION OF CHANGES:

Previously, massden/smoke was not part of the variable list to ingest into IC/LBCs from RAP/HRRR models. This PR adds the massden/smoke to the mapping table and adds the necessary functionality to read in and convert to the correct units. An additional allocated array is created when using RAP/HRRR for ICs/LBCs during the smoke read to be able to convert units. Other models (e.g., GFS) will not attempt to read in smoke.

TESTS CONDUCTED:

  • Changes based on develop (72fb94f)
  • Compiled on CENTOS node on Jet
  • Created IC/BCs from RAP for RRFS 05/14/2023 00Z cycle using RAP cycle 05/13/2023 21Z.

Describe any additional tests performed.

DEPENDENCIES:

none

DOCUMENTATION:

If this PR is contributing new capabilities that need to be documented, please also include updates to the RST files in the docs/source directory as supporting material.

ISSUE:

Fixes #851.

CONTRIBUTORS:

Johana Romero-Alvarez (CIRES/NOAA GSL)

Screenshot 2024-03-1 <img width="725" alt="Screenshot 2024-03-19 at 6 37 28 PM" src="https://github.com/ufs-community/UFS_UTILS/assets/46031459/2fd276fa-4e8a-481f-9ed2-34c7a35eda50"> 9 at 6 35 55 PM
Screenshot 2024-03-19 at 6 39 17 PM

Screenshot 2024-03-19 at 6 37 28 PM

@GeorgeGayno-NOAA
Copy link
Collaborator

I am curious what project or implementation this PR supports.

@jordanschnell
Copy link
Author

I am curious what project or implementation this PR supports.

I'm not sure exactly which details you need, but this is largely research oriented e.g., For computational efficiency, for retrospective experiments prior to RRFS-A SD implementation, we often only want to run the CONUS domain but would still like e.g., Canadian originated smoke to enter the domain (e.g., DRSA FIRE3). The same could be said for using HRRR IC/BCs for the fire nest. This wIll also support NOAA ERB funded work.

@GeorgeGayno-NOAA
Copy link
Collaborator

We ask that developers run the consistency tests located in ./reg_tests/chgres_cube. I ran them on Hera (CentOS nodes). Two of the tests failed. (The number of tracers in the gfs_ctrl.nc file differ from the baseline). Can you run these tests on Jet? Just invoke ./driver.jet.sh.

@jordanschnell
Copy link
Author

We ask that developers run the consistency tests located in ./reg_tests/chgres_cube. I ran them on Hera (CentOS nodes). Two of the tests failed. (The number of tracers in the gfs_ctrl.nc file differ from the baseline). Can you run these tests on Jet? Just invoke ./driver.jet.sh.

Will do - and will look into these failures. Thank you for the information.

@jordanschnell
Copy link
Author

jordanschnell commented Mar 20, 2024

We ask that developers run the consistency tests located in ./reg_tests/chgres_cube. I ran them on Hera (CentOS nodes). Two of the tests failed. (The number of tracers in the gfs_ctrl.nc file differ from the baseline). Can you run these tests on Jet? Just invoke ./driver.jet.sh.

I ran the tests on Jet and also received the two failures (13-km CONUS RAP W/ GSD PHYSICS AND SFC FROM FILE GRIB2 and 3-km CONUS HRRR W/ GSD PHYSICS AND SFC FROM FILE GRIB2). This makes sense though, since smoke is being added to the files and so e.g., there is an additional tracer in the out files. How would you like this to be addressed?

@GeorgeGayno-NOAA
Copy link
Collaborator

We ask that developers run the consistency tests located in ./reg_tests/chgres_cube. I ran them on Hera (CentOS nodes). Two of the tests failed. (The number of tracers in the gfs_ctrl.nc file differ from the baseline). Can you run these tests on Jet? Just invoke ./driver.jet.sh.

I ran the tests on Jet and also received the two failures (13-km CONUS RAP W/ GSD PHYSICS AND SFC FROM FILE GRIB2 and 3-km CONUS HRRR W/ GSD PHYSICS AND SFC FROM FILE GRIB2). This makes sense though, since smoke is being added to the files and so e.g., there is an additional tracer in the out files. How would you like this to be addressed?

The number of tracers in gfs_ctrl.nc should match those the in the atmospheric 'out' file.

@GeorgeGayno-NOAA
Copy link
Collaborator

As a test, I ran the 13km.conus.rap.grib2 regression test with all the smoke records removed from the input GRIB2 file.

The test script was updated as follows:

--- a/reg_tests/chgres_cube/13km.conus.rap.grib2.sh
+++ b/reg_tests/chgres_cube/13km.conus.rap.grib2.sh
@@ -16,9 +16,9 @@ export CRES=778
 export KMRES=13km
 export FIXfv3=${HOMEreg}/fix/RRFS_CONUS_${KMRES}

-export COMIN=${HOMEreg}/input_data/rap.grib2
+export COMIN=/work2/noaa/da/ggayno/save/UFS_UTILS.schnell/data

-export GRIB2_FILE_INPUT=1921221000900
+export GRIB2_FILE_INPUT=rap.grb2
 export VCOORD_FILE=${HOMEufs}/fix/am/global_hyblev.l64.txt
 export VARMAP_FILE=${HOMEufs}/parm/varmap_tables/GSDphys_var_map.txt

The modified input data and the script used to create it is here: /work2/noaa/da/ggayno/save/UFS_UTILS.schnell/data

@jordanschnell
Copy link
Author

We ask that developers run the consistency tests located in ./reg_tests/chgres_cube. I ran them on Hera (CentOS nodes). Two of the tests failed. (The number of tracers in the gfs_ctrl.nc file differ from the baseline). Can you run these tests on Jet? Just invoke ./driver.jet.sh.

I ran the tests on Jet and also received the two failures (13-km CONUS RAP W/ GSD PHYSICS AND SFC FROM FILE GRIB2 and 3-km CONUS HRRR W/ GSD PHYSICS AND SFC FROM FILE GRIB2). This makes sense though, since smoke is being added to the files and so e.g., there is an additional tracer in the out files. How would you like this to be addressed?

The number of tracers in gfs_ctrl.nc should match those the in the atmospheric 'out' file.

But if the end result of my modifications is to add a new tracer to the out file, won't it automatically fail?

@GeorgeGayno-NOAA
Copy link
Collaborator

For the first test using the modified input data, I updated the varmap file as follows:

--- a/parm/varmap_tables/GSDphys_var_map.txt
+++ b/parm/varmap_tables/GSDphys_var_map.txt
@@ -25,4 +25,4 @@ icetk               icetk     set_to_fill   265.0     S
 weasd               weasd     set_to_fill   0.0       S
 snod                snod      set_to_fill   0.0       S
 tprcp               tprcp     set_to_fill   0.0       S
-massden             smoke     set_to_fill   1E-12     T
+massden             smoke     stop          1E-12     T

Since there are no smoke records, processing should stop. And that is what the log file shows:

- CALL FieldGather TEMPERATURE.
 - READ PRESSURE FOR SMOKE CONVERSION.
 - FATAL ERROR:
 READING massden at level      1 hybrid       . TO MAKE THIS NON-FATAL, CHANGE S
 TOP TO SKIP FOR THIS VARIABLE IN YOUR VARMAP FILE.
 - IOSTAT IS:            0
Abort(999) on node 0 (rank 0 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, 999) - process 0

@jordanschnell
Copy link
Author

As a test, I ran the 13km.conus.rap.grib2 regression test with all the smoke records removed from the input GRIB2 file.

The test script was updated as follows:

--- a/reg_tests/chgres_cube/13km.conus.rap.grib2.sh
+++ b/reg_tests/chgres_cube/13km.conus.rap.grib2.sh
@@ -16,9 +16,9 @@ export CRES=778
 export KMRES=13km
 export FIXfv3=${HOMEreg}/fix/RRFS_CONUS_${KMRES}

-export COMIN=${HOMEreg}/input_data/rap.grib2
+export COMIN=/work2/noaa/da/ggayno/save/UFS_UTILS.schnell/data

-export GRIB2_FILE_INPUT=1921221000900
+export GRIB2_FILE_INPUT=rap.grb2
 export VCOORD_FILE=${HOMEufs}/fix/am/global_hyblev.l64.txt
 export VARMAP_FILE=${HOMEufs}/parm/varmap_tables/GSDphys_var_map.txt

The modified input data and the script used to create it is here: /work2/noaa/da/ggayno/save/UFS_UTILS.schnell/data

I don't have access to this system. Are you suggesting I add something to the code? Or the reg test?

@jordanschnell
Copy link
Author

For the first test using the modified input data, I updated the varmap file as follows:

--- a/parm/varmap_tables/GSDphys_var_map.txt
+++ b/parm/varmap_tables/GSDphys_var_map.txt
@@ -25,4 +25,4 @@ icetk               icetk     set_to_fill   265.0     S
 weasd               weasd     set_to_fill   0.0       S
 snod                snod      set_to_fill   0.0       S
 tprcp               tprcp     set_to_fill   0.0       S
-massden             smoke     set_to_fill   1E-12     T
+massden             smoke     stop          1E-12     T

Since there are no smoke records, processing should stop. And that is what the log file shows:

- CALL FieldGather TEMPERATURE.
 - READ PRESSURE FOR SMOKE CONVERSION.
 - FATAL ERROR:
 READING massden at level      1 hybrid       . TO MAKE THIS NON-FATAL, CHANGE S
 TOP TO SKIP FOR THIS VARIABLE IN YOUR VARMAP FILE.
 - IOSTAT IS:            0
Abort(999) on node 0 (rank 0 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, 999) - process 0

Can you explain why you modified this?

@GeorgeGayno-NOAA
Copy link
Collaborator

For the first test using the modified input data, I updated the varmap file as follows:

--- a/parm/varmap_tables/GSDphys_var_map.txt
+++ b/parm/varmap_tables/GSDphys_var_map.txt
@@ -25,4 +25,4 @@ icetk               icetk     set_to_fill   265.0     S
 weasd               weasd     set_to_fill   0.0       S
 snod                snod      set_to_fill   0.0       S
 tprcp               tprcp     set_to_fill   0.0       S
-massden             smoke     set_to_fill   1E-12     T
+massden             smoke     stop          1E-12     T

Since there are no smoke records, processing should stop. And that is what the log file shows:

- CALL FieldGather TEMPERATURE.
 - READ PRESSURE FOR SMOKE CONVERSION.
 - FATAL ERROR:
 READING massden at level      1 hybrid       . TO MAKE THIS NON-FATAL, CHANGE S
 TOP TO SKIP FOR THIS VARIABLE IN YOUR VARMAP FILE.
 - IOSTAT IS:            0
Abort(999) on node 0 (rank 0 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, 999) - process 0

Can you explain why you modified this?

The varmap files have several choices with how to process fields:

For the first test using the modified input data, I updated the varmap file as follows:

--- a/parm/varmap_tables/GSDphys_var_map.txt
+++ b/parm/varmap_tables/GSDphys_var_map.txt
@@ -25,4 +25,4 @@ icetk               icetk     set_to_fill   265.0     S
 weasd               weasd     set_to_fill   0.0       S
 snod                snod      set_to_fill   0.0       S
 tprcp               tprcp     set_to_fill   0.0       S
-massden             smoke     set_to_fill   1E-12     T
+massden             smoke     stop          1E-12     T

Since there are no smoke records, processing should stop. And that is what the log file shows:

- CALL FieldGather TEMPERATURE.
 - READ PRESSURE FOR SMOKE CONVERSION.
 - FATAL ERROR:
 READING massden at level      1 hybrid       . TO MAKE THIS NON-FATAL, CHANGE S
 TOP TO SKIP FOR THIS VARIABLE IN YOUR VARMAP FILE.
 - IOSTAT IS:            0
Abort(999) on node 0 (rank 0 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, 999) - process 0

Can you explain why you modified this?

According to the README file, users can adjust how fields are processed using the varmap file. (See the instructions for column 3). Options include 'stop', 'skip' 'set_to_fill' etc. These different options need to be tested. So, I am temporarily modifying the varmap file.

https://github.com/ufs-community/UFS_UTILS/blob/develop/parm/varmap_tables/README

@GeorgeGayno-NOAA
Copy link
Collaborator

Next, test the 'skip' function. Modify the varmap table as follows:

--- a/parm/varmap_tables/GSDphys_var_map.txt
+++ b/parm/varmap_tables/GSDphys_var_map.txt
@@ -25,4 +25,4 @@ icetk               icetk     set_to_fill   265.0     S
 weasd               weasd     set_to_fill   0.0       S
 snod                snod      set_to_fill   0.0       S
 tprcp               tprcp     set_to_fill   0.0       S
-massden             smoke     set_to_fill   1E-12     T
+massden             smoke     skip          1E-12     T

The log file shows:

WARNING: SKIPPING massden IN FILE
WARNING: SKIPPING massden IN FILE
WARNING: SKIPPING massden IN FILE

And the out.atm.tile7.nc file contains a smoke record. Because the input GRIB2 file does not contain smoke, that was unexpected. According to the README, when 'skip' is used, there should not be a smoke record.

Herc /work2/noaa/stmp/ggayno/reg-tests/chgres-cube.skip/13km_conus_rap_grib2\ $ ncdump -h out.atm.tile7.nc
        float ice_aero(lev, lat, lon) ;
                ice_aero:coordinates = "geolon geolat" ;
        float sgs_tke(lev, lat, lon) ;
                sgs_tke:coordinates = "geolon geolat" ;
        float smoke(lev, lat, lon) ;
                smoke:coordinates = "geolon geolat" ;
        float u_w(lev, lat, lonp) ;
                u_w:coordinates = "geolon_w geolat_w" ;

@LarissaReames-NOAA and @JeffBeck-NOAA - you understand the GRIB2 option better I do. What is the expected result in this case?

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.

Add smoke density from RAP files as an optional output from chgres
2 participants