Skip to content

MYNN PBL clouds in photolysis option 4 (TUV)#1622

Merged
davegill merged 7 commits intowrf-model:developfrom
jordanschnell:BLcloudsinphot4
Jan 19, 2022
Merged

MYNN PBL clouds in photolysis option 4 (TUV)#1622
davegill merged 7 commits intowrf-model:developfrom
jordanschnell:BLcloudsinphot4

Conversation

@jordanschnell
Copy link
Contributor

@jordanschnell jordanschnell commented Jan 5, 2022

TYPE: enhancement

KEYWORDS: MYNN PBL, subgrid clouds, boundary layer clouds, photolysis, TUV

SOURCE: internal

DESCRIPTION OF CHANGES:
Adds capability to include sub-grid boundary layer clouds from the MYNN PBL schemes to photolysis option 4 (new TUV)

This update allows subgrid boundary layer clouds from the MYNN PBL scheme to be accounted for in photolysis using phot_opt =4. This feature is activated by setting the &chem namelist option phot_blcld = .true. The setting icloud_bl = 1 must also be set.

LIST OF MODIFIED FILES:

M Registry/registry.chem
M chem/chem_driver.F
M chem/module_phot_tuv.F
M chem/photolysis_driver.F
M share/module_check_a_mundo.F

TESTS CONDUCTED:

  1. Jenkins tests are all passing.

RELEASE NOTE: Add MYNN PBL clouds to WRF Chem photolysis option phot_opt = 4 (TUV).

…NN PBL schemes to photolysis option 4 (new TUV)
@davegill
Copy link
Contributor

davegill commented Jan 5, 2022

@jordanschnell

The setting icloud_bl = 1 must also be set.

Put in a piece in share/module_check_a_mundo.F to make sure that this is enforced.

@jordanschnell jordanschnell requested review from a team as code owners January 5, 2022 20:24
@jordanschnell
Copy link
Contributor Author

@davegill - In any case, I have added a check for TUV as well

@davegill
Copy link
Contributor

davegill commented Jan 6, 2022

@jordanschnell
Jordan,
I made the IF test a fatal in check_a_mundo. Feel free to dial that back it you want. The compiler error was due to a need for the WRF_CHEM ifdef, since the variable was only defined in the chemistry registry file.

@davegill
Copy link
Contributor

@weiwangncar @dudhia @jordanschnell
Folks,
Other than a quick test in check_a_mundo, these mods are all inside of the WRF Chem realm. This seems ready for a review.

@davegill
Copy link
Contributor

@weiwangncar @dudhia
... and the check_a_mundo test is inside of a WRF Chem ifdef

@weiwangncar
Copy link
Collaborator

@davegill This should be ok since it is really a chemistry option.

@davegill davegill merged commit 75bfe6d into wrf-model:develop Jan 19, 2022
davegill added a commit that referenced this pull request Jan 24, 2022
TYPE: bug fix

KEYWORDS: netcdfpar, Error

SOURCE: internal

DESCRIPTION OF CHANGES:
IMPORTANT: Without these mods, every commit since the parallel netcdf4 IO mods will fail the DA
build test in the regression test. For example, at least these commits:
```
fed10f4 Adding the WRF-Solar EPS model (#1547)
0bda5e0 Fix 4dvar build failure after commit 8b5bfe5 (#1652)
8b5bfe5 Thompson AA enhancements: BC aerosol, biomass burning emissions, and … (#1616)
9dc68ca After testing with UFS/GFS/FV-3, some tuning knob changes to Thompson-MP and icloud3 (cloud fraction) scheme (#1626)
96fd889 Update HONO, TERP, and CO2 emissions (#1644)
64fb190 SFCLAY=1, add shallow water roughness calculation (#1543)
609c2fc New module firebrand_spotting for WRF-Fire (#1540)
75bfe6d MYNN PBL clouds in photolysis option 4 (TUV) (#1622)
f8c4b13 Fix runtime error when using sf_surface_mosaic = 1 with use_wudapt_lcz = 0 (#1638)
b511c70 Run-time option for climate GHG for radiation (#1625)
8194c66 Bug fix for configuration option INTEL:HSW/BDW (#1645)
16c9287  bug fixes for radar_rf_opt=2 (#1642)
a82ce24 Sync with NoahMP Github version with all NoahMP updates since v4.3 (#1641)
7b642cc Bug fix for TAMDAR T VarBC (#1632)
92fd706 fix WRFDA build for Parallel netcdf-4 IO (#1634)
```
Problem:
With PR #1552 "Parallel netcdf-4 IO option" (SHA1 3cd4713), when then code was built without
the new parallel NetCDF4 compression, the build log had an `Error`. 
```
> grep Error compile.log
Fatal Error: Cannot open module file ‘wrf_data_ncpar.mod’ for reading at (1): No such file or directory
make[2]: [diffwrf] Error 1 (ignored)
make[2]: [diffwrf] Error 1 (ignored)
wrf_io.f:117: Error: Can't open included file 'mpif.h'
make[2]: [wrf_io.o] Error 1 (ignored)
Fatal Error: Cannot open module file ‘wrf_data_ncpar.mod’ for reading at (1): No such file or directory
make[2]: [field_routines.o] Error 1 (ignored)
make[2]: [libwrfio_nfpar.a] Error 127 (ignored)
make[2]: [libwrfio_nfpar.a] Error 1 (ignored)
```
The problem was related to constructing the object files in the io_netcdfpar directory. When the 
option is not selected at compile time, then we do not care about errors in the directory that will 
never be used.

Solution:
If the NETCDFPAR option is not selected at compile time, then SKIP going into the io_netcdfpar
directory all together.

LIST OF MODIFIED FILES:
m Makefile
m arch/Config.pl
m arch/configure.defaults
m configure

TESTS CONDUCTED:
1. Without the NETCDFPAR parameter set, the build for the io_netcdfpar directory is bypassed:
```
          cd ../io_netcdfpar ; \
          echo SKIPPING make -i -r NETCDFPARPATH="/glade/u/apps/ch/opt/netcdf/4.7.3/gnu/9.1.0" \

          cd ../io_netcdfpar ; \
          echo SKIPPING make -i -r NETCDFPARPATH="/glade/u/apps/ch/opt/netcdf/4.7.3/gnu/9.1.0" \
```

2. When the NETCDFPAR env variable is set, the build includes the io_netcdfpar directory:
          cd ../io_netcdfpar ; \
           make -i -r NETCDFPARPATH="/glade/u/apps/ch/opt/netcdf/4.8.0/gnu/9.1.0" \

          cd ../io_netcdfpar ; \
           make -i -r NETCDFPARPATH="/glade/u/apps/ch/opt/netcdf/4.8.0/gnu/9.1.0" \
```

3. Jenkins tests are all PASS.
vlakshmanan-scala pushed a commit to scala-computing/WRF that referenced this pull request Apr 4, 2024
TYPE: enhancement

KEYWORDS: MYNN PBL, subgrid clouds, boundary layer clouds, photolysis, TUV

SOURCE: internal 

DESCRIPTION OF CHANGES:
Adds capability to include sub-grid boundary layer clouds from the MYNN PBL schemes to photolysis 
option 4 (new TUV)

This update allows subgrid boundary layer clouds from the MYNN PBL scheme to be accounted for in 
photolysis using `phot_opt =4`. This feature is activated by setting the &chem namelist option 
`phot_blcld = .true.` The setting `icloud_bl = 1` must also be set.

LIST OF MODIFIED FILES: 

M       Registry/registry.chem
M       chem/chem_driver.F
M       chem/module_phot_tuv.F
M       chem/photolysis_driver.F
M       share/module_check_a_mundo.F


TESTS CONDUCTED: 
1. Jenkins tests are all passing.

RELEASE NOTE: Add MYNN PBL clouds to WRF Chem photolysis option phot_opt = 4 (TUV).
vlakshmanan-scala pushed a commit to scala-computing/WRF that referenced this pull request Apr 4, 2024
TYPE: bug fix

KEYWORDS: netcdfpar, Error

SOURCE: internal

DESCRIPTION OF CHANGES:
IMPORTANT: Without these mods, every commit since the parallel netcdf4 IO mods will fail the DA
build test in the regression test. For example, at least these commits:
```
fed10f4 Adding the WRF-Solar EPS model (wrf-model#1547)
0bda5e0 Fix 4dvar build failure after commit 8b5bfe5 (wrf-model#1652)
8b5bfe5 Thompson AA enhancements: BC aerosol, biomass burning emissions, and … (wrf-model#1616)
9dc68ca After testing with UFS/GFS/FV-3, some tuning knob changes to Thompson-MP and icloud3 (cloud fraction) scheme (wrf-model#1626)
96fd889 Update HONO, TERP, and CO2 emissions (wrf-model#1644)
64fb190 SFCLAY=1, add shallow water roughness calculation (wrf-model#1543)
609c2fc New module firebrand_spotting for WRF-Fire (wrf-model#1540)
75bfe6d MYNN PBL clouds in photolysis option 4 (TUV) (wrf-model#1622)
f8c4b13 Fix runtime error when using sf_surface_mosaic = 1 with use_wudapt_lcz = 0 (wrf-model#1638)
b511c70 Run-time option for climate GHG for radiation (wrf-model#1625)
8194c66 Bug fix for configuration option INTEL:HSW/BDW (wrf-model#1645)
16c9287  bug fixes for radar_rf_opt=2 (wrf-model#1642)
a82ce24 Sync with NoahMP Github version with all NoahMP updates since v4.3 (wrf-model#1641)
7b642cc Bug fix for TAMDAR T VarBC (wrf-model#1632)
92fd706 fix WRFDA build for Parallel netcdf-4 IO (wrf-model#1634)
```
Problem:
With PR wrf-model#1552 "Parallel netcdf-4 IO option" (SHA1 3cd4713), when then code was built without
the new parallel NetCDF4 compression, the build log had an `Error`. 
```
> grep Error compile.log
Fatal Error: Cannot open module file ‘wrf_data_ncpar.mod’ for reading at (1): No such file or directory
make[2]: [diffwrf] Error 1 (ignored)
make[2]: [diffwrf] Error 1 (ignored)
wrf_io.f:117: Error: Can't open included file 'mpif.h'
make[2]: [wrf_io.o] Error 1 (ignored)
Fatal Error: Cannot open module file ‘wrf_data_ncpar.mod’ for reading at (1): No such file or directory
make[2]: [field_routines.o] Error 1 (ignored)
make[2]: [libwrfio_nfpar.a] Error 127 (ignored)
make[2]: [libwrfio_nfpar.a] Error 1 (ignored)
```
The problem was related to constructing the object files in the io_netcdfpar directory. When the 
option is not selected at compile time, then we do not care about errors in the directory that will 
never be used.

Solution:
If the NETCDFPAR option is not selected at compile time, then SKIP going into the io_netcdfpar
directory all together.

LIST OF MODIFIED FILES:
m Makefile
m arch/Config.pl
m arch/configure.defaults
m configure

TESTS CONDUCTED:
1. Without the NETCDFPAR parameter set, the build for the io_netcdfpar directory is bypassed:
```
          cd ../io_netcdfpar ; \
          echo SKIPPING make -i -r NETCDFPARPATH="/glade/u/apps/ch/opt/netcdf/4.7.3/gnu/9.1.0" \

          cd ../io_netcdfpar ; \
          echo SKIPPING make -i -r NETCDFPARPATH="/glade/u/apps/ch/opt/netcdf/4.7.3/gnu/9.1.0" \
```

2. When the NETCDFPAR env variable is set, the build includes the io_netcdfpar directory:
          cd ../io_netcdfpar ; \
           make -i -r NETCDFPARPATH="/glade/u/apps/ch/opt/netcdf/4.8.0/gnu/9.1.0" \

          cd ../io_netcdfpar ; \
           make -i -r NETCDFPARPATH="/glade/u/apps/ch/opt/netcdf/4.8.0/gnu/9.1.0" \
```

3. Jenkins tests are all PASS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants