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

New module firebrand_spotting for WRF-Fire #1540

Merged
merged 10 commits into from
Jan 19, 2022

Conversation

mefrediani
Copy link
Contributor

@mefrediani mefrediani commented Aug 5, 2021

TYPE: new feature

KEYWORDS: fire firebrand spotting Lagrangian transport passive advection burnout

SOURCE: Maria Frediani, Tim W. Juliano (NCAR-RAL)

DESCRIPTION OF CHANGES:
The new module firebrand_spotting for WRF-Fire is a passive Lagrangian transport parameterization to
advect firebrands. The Firebrand Spotting parameterization was developed for the WRF-Fire component of the
WRF model versions starting at 4.0.1. The parameterization couples to WRF-Fire and uses a Lagrangian
particle transport framework to advect firebrands in the innermost nest of the domain.

The parameterization runs in the atmospheric model inner domain and does not modify model variables (no
feedback to WRF or WRF-Fire). The code comprises two independent modules, one with the physical
processes and another with the necessary MPI wrapping routines that were not yet part of the WRF source
code. The motivation to separate the MPI routines in an independent module was to enable them to be used in
other model parameterizations through a USE statement without importing the firebrand spotting component.
The Firebrand Spotting variables are part of Registry.fire and the subroutine is called from start_em.F and
solve_em.F, after all the physics parameterizations and relevant halos are completed.

When fires are active, the parameterization identifies areas at risk of fire spotting by modeling transport
and physical processes of individual firebrands. Firebrands are released at multiple heights from grid points
along the fire front with high fire rate-of-spread and denser fuel loads. Particles are transported with the
atmospheric flow and consumed by combustion. Firebrands may burnout entirely or land, once they descend
below a given height threshold. Particles that land before complete burnout are accumulated in a 2-D field
during regular intervals.

The likelihood of new fire ignitions due to spotting is computed using the ratio of landed firebrands per grid
point to the total number of landed particles within the corresponding time interval between model outputs.
The ratios are then scaled by a function of fuel load and moisture content at the corresponding grid points.

LIST OF MODIFIED FILES:
M Registry/Registry.EM_COMMON
M Registry/registry.fire
M dyn_em/depend.dyn_em
M dyn_em/solve_em.F
M dyn_em/start_em.F
M main/depend.common
M phys/Makefile
A phys/module_firebrand_spotting.F
A phys/module_firebrand_spotting_mpi.F

TESTS CONDUCTED:

  1. The module was designed for high-resolution simulations and tested using large-eddy simulation (LES) in
    the inner nest. Simulations for various case studies in Colorado have been done.
  2. All tests have passed (latest commit: afc9142, after switching pbl from MYNN to YSU). There were no
    differences among the serial and MPI builds with 1 and 12 processors. The tests were all done from a restart
    file. The time step for these runs was 5s and the outputs were compared after 20s, 40s, and 1 min.
  3. Jenkins tests are all passing.

RELEASE NOTE: A new module to parameterize firebrand spotting for WRF-Fire is added. This is a passive Lagrangian transport scheme to transport and burnout firebrands generated at the fire front. The scheme is activated when ifire == 2 by setting the namelist option fs_firebrand_gen_lim to an integer greater than zero (default is 0, i.e. scheme is off). It runs with dmpar and serially compiled code and in the inner nest (grid_id == max_dom). It was designed and tested using a mesoscale to LES domain configuration.

@mefrediani mefrediani requested review from a team as code owners August 5, 2021 22:23
dyn_em/solve_em.F Outdated Show resolved Hide resolved
@dudhia
Copy link
Collaborator

dudhia commented Nov 17, 2021

@pedro-jm can you give your opinion on this PR too?
Why is there no fire module code in this PR? Do the firebrands not feed back to the fire?

@pedro-jm
Copy link
Contributor

@dudhia

The code releases and moves the firebrands with the atmospheric dynamics simulating their combustion too. If the firebrands end up in the ground the code tracks where do they land. So the user can identify locations that could be affected by fire spotting. In the future this could be extended to ignite fires at certain locations. But that is not currently done so that is why there is not feedback to the fire code.

The code is well organized in modules and the bulk of the development is in 2 new modules which is desirable for maintenance.

@dudhia
Copy link
Collaborator

dudhia commented Nov 17, 2021 via email

@davegill
Copy link
Contributor

davegill commented Dec 9, 2021

@mefrediani @twjuliano @pedro @dudhia
Folks,
Every serial and OpenMP build is getting a compile failure due to some MPI issues. The WRF model does not usually permit communications in the physics directory, but there are some precedents for it. There are bare MPI calls, and we have usually tried to hide those completely from the user (such as you have done with the fs_mpi_ functions). First, let's get the code to pass the regression tests, then look at what needs to be restructured.

  1. We need at least most of module_firebrand_spotting_mpi.F to be stubbed out if we are NOT building with MPI. You could use a couple ifdefs in the module_firebrand_spotting_mpi.F file to wipe out most of the code. Leave the "module" statements, the "contains" statement, and perhaps nothing else. The test in WRF for not doing an MPI build is this ifdef combination:
#if ( defined(DM_PARALLEL)  &&   ! defined(STUBMPI) )
   some mpi command, such as any of your fs_pi_ functions.
#endif
  1. Anywhere you have the function calls fs_mpi_ in the module_firebrand_spotting.F need to be enclosed in the MPI ifdef that is shown above. Not always, but usually, those parts of the code are not required when there is no communication.

To see if your modified code is working, try to build the code serially (for example, with GNU it would be option 32).

@mefrediani
Copy link
Contributor Author

Hi Dave,
Thanks for your input. I'm gonna start working on the serial compilation and let you know when it's done.

@davegill
Copy link
Contributor

@mefrediani

Thanks for your input. I'm gonna start working on the serial compilation and let you know when it's done.

Keep us in the loop as this is a bit of an infrastructure issue, we do not want you to fix this in the wrong way. Let me know if a google meet would help out (gill@ucar.edu), and we can set something up.

@mefrediani
Copy link
Contributor Author

Hi Dave,
The modified code is compiling with GNU and Intel (both serial and dmpar). I included a summary of the modifications I made below. Just let me know if you think they will not work for whatever reason. I'll wait for instructions on what to do next.
Thanks!

I enclosed the following statements within ifdef blocks:

  1. USE MPI and other USE statements associated with MPI routines
  2. IF or DO blocks exclusively containing calls to MPI functions. (I thought it didn't make sense to enclose only the line with the function call and leave the loop doing nothing)
  3. The code section that receives particles from an adjacent tile (this is irrelevant in a serial compilation so I used one ifdef on the entire section)
  4. I added one #else statement to initialize two variables:
#if ( defined(DM_PARALLEL)  &&   ! defined(STUBMPI) )                                                                                                                                                                                    
       ...
        IF ( wrf_dm_on_monitor() ) THEN
            IamMaster = .TRUE.
            MasterId = my_id
        ENDIF
#else
        IamMaster = .TRUE.  ! initialized with FALSE. It should be TRUE in serial compilation    
        ntiles = 1                                                                                                                                        
#endif
  1. And on module_firebrand_spotting_mpi.F I also had to enclose all MPI routines under CONTAINS (and their corresponding PUBLIC declarations) because of variables such as MPI_FLOAT. As you suggested, pretty much everything has been hidden.

@davegill
Copy link
Contributor

davegill commented Dec 15, 2021

@mefrediani
Maria,
This looks like a large amount of work so far!

Would you do a SHORT test to verify that you are getting the same answers with the serial build and with MPI.

  1. Build with a flag that removes optimization. Typically we do this with "configure -d"
  2. Only do about 10-12 time steps of simulation. Do you need a restart file to get everything spun-up? You can use the same restart file, if that is the case, for both MPI and serial.
  3. Compare model output that has files that would appear to be different. Usually, that is the standard wrfout* files.
  4. To compare two different wrfout* files (that we are assuming should be identical), use the utility WRF/external/io_netcdf/diffwrf. The syntax is diffwrf <wrf file serial> <wrf file mpi>
  5. If the files are the same, then you do not get any printout other than some headings of table. If you do have differences, then you will see a list of the fields that are different.

@davegill
Copy link
Contributor

@mefrediani @weiwangncar
Maria,

  1. We are mostly OK on this PR. Since this is brand new, we just need to hear about the ability to get bit-wise identical results. We would really like to have this completed by early January. Once we cut over the v4.4 branch from develop, any mods that are not yet on the develop branch do not make the next official release.
  2. If there is a publication associated with this PR, that can be listed in the the RELEASE NOTES section. We are pretty informal, so "in press", "accepted", "under review" - we take ANYTHING!

@weiwangncar
Copy link
Collaborator

@mefrediani It may also be helpful to add some information about how the capability is activated in the model in the release note section. Thanks.

@mefrediani
Copy link
Contributor Author

@weiwangncar I have a draft (attached) with a detailed description of the module, namelist parameters, and output variables. I will check with my colleagues if they have any reviewing to suggest and follow up with a final version in the coming days.

In the meantime, it would be helpful if you could send me instructions on how to prepare this document for you, for example, specific section names, tables, etc.

Thank you!

Firebrand Spotting Parameterization - Description.pdf

@weiwangncar
Copy link
Collaborator

@mefrediani There are several levels of documentation you can provide. For this PR, you can simply add something like 'this option is activated by namelist X'. If this option can be used with other fire options (or not), it may be useful to state. As for the full documentation, we have a WRF Fire chapter in our User's Guide: https://www2.mmm.ucar.edu/wrf/users/docs/user_guide_v4/v4.3/users_guide_chap-fire.html, and you can see if your new option can fit somewhere in that chapter. We also have a link to WRF Wildland Fire page: https://www2.mmm.ucar.edu/wrf/users/fire/wrf-fire.html, and at the bottom of the page, there is a link to RAL's Fire page: https://ral.ucar.edu/solutions/products/wrf-fire-wildland-fire-modeling. If your work is in someway related to the work with the RAL projects, feel free to add your document there. Let us know where you think the document fits the best.

@davegill
Copy link
Contributor

@weiwangncar @dudhia @mefrediani
Folks,

  1. This code is not set up to give bit-wise identical results with a restart.
  2. This code is not set up to give bit-wise identical results with differing core counts from MPI.

@weiwangncar
Copy link
Collaborator

@davegill Do you mean this code breaks bit-for-bit and restart checks even when the option is not used?

@davegill
Copy link
Contributor

@weiwangncar

Do you mean this code breaks bit-for-bit and restart checks even when the option is not used?

No. This code works fine with the existing regression tests. When using firebrands, THAT code does not give the same MPI values with different core counts, and it does not give the same restart values.

@mefrediani
Copy link
Contributor Author

mefrediani commented Dec 27, 2021 via email

@davegill
Copy link
Contributor

@mefrediani @weiwangncar
Maria,
Well if you are not just a bunch of great news! :)
Thanks for getting us a local dataset to try out, it really helps.
Usually these segfaults with the output are related to packaging of variables.
Dave

@mefrediani
Copy link
Contributor Author

@weiwangncar Here's the updated documentation for the PR, user's guide, and web pages. I can also share a google doc with you, if that's easier. Just let me know.

WRF documentation - Firebrand Spotting Parameterization - Google Docs.pdf

@mefrediani There are several levels of documentation you can provide. For this PR, you can simply add something like 'this option is activated by namelist X'. If this option can be used with other fire options (or not), it may be useful to state. As for the full documentation, we have a WRF Fire chapter in our User's Guide: https://www2.mmm.ucar.edu/wrf/users/docs/user_guide_v4/v4.3/users_guide_chap-fire.html, and you can see if your new option can fit somewhere in that chapter. We also have a link to WRF Wildland Fire page: https://www2.mmm.ucar.edu/wrf/users/fire/wrf-fire.html, and at the bottom of the page, there is a link to RAL's Fire page: https://ral.ucar.edu/solutions/products/wrf-fire-wildland-fire-modeling. If your work is in someway related to the work with the RAL projects, feel free to add your document there. Let us know where you think the document fits the best.

@weiwangncar
Copy link
Collaborator

@mefrediani Thanks for sharing the pdf file. We will add the content to the appropriate places on our end. It may be convenient to add some of this documentation to the RAL Wildfire page, so that you can maintain and update easily. I've added your PR description to your PR message (last section). Please check and see if it is ok with you. Remember this will be a permanent record in git-cloned code for everyone to see.

@davegill
Copy link
Contributor

@weiwangncar @mefrediani
Folks,
Once cheyenne is up next week, we can look a the segfault issue - again likely due to packaging.

@mefrediani
Copy link
Contributor Author

@davegill @weiwangncar
The issue with the release version is related to packaging of PBL variables while running MYNN in the outer domain and LES in the inner. Thanks for the tip ;)

It seems that the bug fix to this issue (#1596) is not on the develop branch yet. I was able to test it out by adding this line to Registry.EM_COMMON:
package nopblscheme bl_pbl_physics==0 - scalar:qke_adv;state:qke,tke_pbl,sh3d,tsq,qsq,cov,el_pbl
When I built the develop branch with the nopblscheme package, it worked.

I'll try to wrap up firebrand spotting tests using a different PBL scheme. I see that YSU (pbl=1) has no package variables, so it may work without the nopblscheme work around. I'll let you know how it goes.

@mefrediani
Copy link
Contributor Author

mefrediani commented Dec 31, 2021

@davegill @weiwangncar @dudhia

All tests have passed (latest commit: afc9142, after switching pbl from MYNN to YSU).

There were no differences among the serial and MPI builds with 1 and 12 processors. The tests were all done from a restart file.

The timestep for these runs was 5s and the outputs were compared after 20s, 40s, and 1 min.
The runs are here: /glade/scratch/frediani/WRF-Fire/bittest/runs/casper-test-firebrands-afc9142f-*
The log from diffwrf is here: /glade/scratch/frediani/WRF-Fire/bittest/runs/diffwrf.log

I hope you and your families are well. Stay safe.

@davegill
Copy link
Contributor

@mefrediani @weiwangncar @dudhia

  1. The jenkins tests are all passing (as before).
Please find result of the WRF regression test cases in the attachment. This build is for Commit ID: 6a4678fab1ceff64ed0f4bcee699f84036ed044d, requested by: mefrediani for PR: https://github.com/scala-computing/WRF/pull/1540. For any query please send e-mail to David Gill.

    Test Type              | Expected  | Received |  Failed
    = = = = = = = = = = = = = = = = = = = = = = = =  = = = =
    Number of Tests        : 23           24
    Number of Builds       : 60           58
    Number of Simulations  : 159           155        0
    Number of Comparisons  : 96           93        0

    Failed Simulations are: 
    None
    Which comparisons are not bit-for-bit: 
    None
  1. Maria is able to get bit-for-bit results with serial vs MPI (1 vs 12 cores) with her test case.

@davegill
Copy link
Contributor

@weiwangncar @dudhia
This PR is passing the regtests, and Maria has conducted the restart and parallel tests. This is ready for review.

@davegill davegill requested review from davegill and removed request for a team January 19, 2022 03:48
@davegill davegill merged commit 609c2fc 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.
@mefrediani mefrediani deleted the module_firebrand_spotting branch April 28, 2022 18:38
@mefrediani mefrediani restored the module_firebrand_spotting branch April 28, 2022 18:38
vlakshmanan-scala pushed a commit to scala-computing/WRF that referenced this pull request Apr 4, 2024
TYPE: new feature

KEYWORDS: fire firebrand spotting Lagrangian transport passive advection burnout 

SOURCE: Maria Frediani, Tim W. Juliano (NCAR-RAL)

DESCRIPTION OF CHANGES:
The new module firebrand_spotting for WRF-Fire is a passive Lagrangian transport parameterization to 
advect firebrands. The Firebrand Spotting parameterization was developed for the WRF-Fire component of the 
WRF model versions starting at 4.0.1. The parameterization couples to WRF-Fire and uses a Lagrangian 
particle transport framework to advect firebrands in the innermost nest of the domain. 

The parameterization runs in the atmospheric model inner domain and does not modify model variables (no 
feedback to WRF or WRF-Fire). The code comprises two independent modules, one with the physical 
processes and another with the necessary MPI wrapping routines that were not yet part of the WRF source 
code. The motivation to separate the MPI routines in an independent module was to enable them to be used in 
other model parameterizations through a USE statement without importing the firebrand spotting component. 
The Firebrand Spotting variables are part of Registry.fire and the subroutine is called from start_em.F and 
solve_em.F, after all the physics parameterizations and relevant halos are completed.

When fires are active, the parameterization identifies areas at risk of fire spotting by modeling transport 
and physical processes of individual firebrands. Firebrands are released at multiple heights from grid points 
along the fire front with high fire rate-of-spread and denser fuel loads. Particles are transported with the 
atmospheric flow and consumed by combustion. Firebrands may burnout entirely or land, once they descend 
below a given height threshold. Particles that land before complete burnout are accumulated in a 2-D field 
during regular intervals.

The likelihood of new fire ignitions due to spotting is computed using the ratio of landed firebrands per grid 
point to the total number of landed particles within the corresponding time interval between model outputs. 
The ratios are then scaled by a function of fuel load and moisture content at the corresponding grid points.

LIST OF MODIFIED FILES:
M       Registry/Registry.EM_COMMON
M       Registry/registry.fire
M       dyn_em/depend.dyn_em
M       dyn_em/solve_em.F
M       dyn_em/start_em.F
M       main/depend.common
M       phys/Makefile
A       phys/module_firebrand_spotting.F
A       phys/module_firebrand_spotting_mpi.F

TESTS CONDUCTED: 
1. The module was designed for high-resolution simulations and tested using large-eddy simulation (LES) in 
the inner nest. Simulations for various case studies in Colorado have been done.  
2. All tests have passed (latest commit: afc9142, after switching pbl from MYNN to YSU). There were no 
differences among the serial and MPI builds with 1 and 12 processors. The tests were all done from a restart 
file. The time step for these runs was 5s and the outputs were compared after 20s, 40s, and 1 min.
3. Jenkins tests are all passing.

RELEASE NOTE: A new module to parameterize firebrand spotting for WRF-Fire is added. This is a passive Lagrangian transport scheme to transport and burnout firebrands generated at the fire front. The scheme is activated when ifire == 2 by setting the namelist option fs_firebrand_gen_lim to an integer greater than zero (default is 0, i.e. scheme is off). It runs with dmpar and serially compiled code and in the inner nest (grid_id == max_dom). It was designed and tested using a mesoscale to LES domain configuration.
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.

5 participants