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

Coupling CTSM with WRF #1275

Merged
merged 86 commits into from
Sep 24, 2020
Merged

Conversation

negin513
Copy link
Contributor

@negin513 negin513 commented Aug 18, 2020

TYPE: New Feature

KEYWORDS: WRF-CTSM coupling, Community Terrestrial Systems Model (CTSM), Community Land Model (CLM),
coupled land-atmosphere models

SOURCE: Negin Sobhani 1 , Dave Lawrence 1 , Bill Sacks 1,
Sam Levis 2, Mariana Vertenstein 1, Dave Gill 1, Mike Barlage 1,3,
and Fei Chen 1

1 National Center for Atmospheric Research (NCAR)
2 SLevis Consulting
3 National Centers for Environmental Prediction (NCEP)

DESCRIPTION OF CHANGES:
This PR includes the capability to couple WRF with Community Terrestrial Systems Model (CTSM) via LILAC (Lightweight
Infrastructure for Land-Atmosphere Coupling). CTSM can be used with WRF as one of WRF's land surface model
schemes by setting sf_surface_physics in the WRF namelist.input file:

&physics
sf_surface_physics = 6, 6, 6,
/

For instructions on how to run WRF with CTSM please check instructions on using CTSM with WRF.

LIST OF MODIFIED FILES:
M Registry/Registry.EM_COMMON
M arch/Config.pl
M arch/configure.defaults
M arch/postamble
M arch/preamble
A doc/README.CTSM
M dyn_em/module_first_rk_step_part1.F
M dyn_em/module_initialize_real.F
M dyn_em/solve_em.F
M main/depend.common
M phys/Makefile
M phys/module_physics_init.F
A phys/module_sf_ctsm.F
M phys/module_surface_driver.F
M share/input_wrf.F
M share/module_check_a_mundo.F
M wrftladj/solve_em_ad.F

TESTS CONDUCTED:

  1. The jenkins tests are all passing.
  2. Initial assessment of the performance of WRF-CTSM5(NWP) compared to WRF-Noah and WRF-NoahMP has been
    completed over the CONUS domain. Overall, we are finding that WRF-CTSM5(NWP) is performing reasonably well, in
    some cases even showing improved performance improvement. For example, the following plot shows the bias for
    maximum daily temperature from NOAH, NOAH-MP, and CTSM for June 2013 over METAR observation sites:

CTSM_PR_2013-04_Tmin_Tmax

RELEASE NOTE:
The capability to couple CTSM with WRF is added and activated by setting namelist option sf_surface_physics to 6. This is the initial beta release of WRF-CTSM coupling capability. For instructions on how to run WRF with CTSM please check instructions on using CTSM with WRF.

negin513 and others added 30 commits December 11, 2019 11:52
…d ESMF library by renaming wrf esmf modules. This will take care of that.
…ESMF_Initalize inside WRF. Plean NOTE that you should use the configure.wrf file here for compiling for now. Later we can make changes so it would be permanant in WRF configuration.
Key off of the environment variable WRF_CTSM_MKFILE. If that is set,
change / add settings needed for linking with CTSM.
This way, you don't need to have this variable set when you compile,
only when you configure.
This was put in for testing, but we don't want it in the final version
Three fixes:

(1) Pass XLONG into the subroutine: previously, this was an
    uninitialized local variable

(2) Fix reshape routine to know lower bounds of arrays

(3) Convert longitudes to 0..360: WRF has longitudes -180 to 180, but
    the mesh file has them 0..360. Convert WRF's longitudes to 0..360
    so that they match the longitudes on the mesh file.

Also, a bit of minor cleanup.
For now, move create_gindex there. Other things will be moved there
next.
Now named lilac_2d_to_1d
Especially, remove statement that end times may not be needed, based
on discussion in ESCOMP/CTSM#877
Rather than piggy-backing off of an existing option, we now have a
dedicated option for CTSM. In addition, CTSM calls are protected by
available.

To determine where CTSMSCHEME may need to be referenced, I searched for
clmscheme and noahmpscheme (case-insensitive) throughout the
repository. I have added a number of TODO notes where I would like
someone else to help determine if CTSMSCHEME should be referenced in
various places.

(This is not yet tested and likely has some problems.)
Since we don't read things off of the wrf input file, this
incompatibility shouldn't matter, I think.
@davegill
Copy link
Contributor

davegill commented Sep 9, 2020

@negin513
Negin,
The previous pieces are a last sweep through for clean-up purposes.

The PR commit message lists 18 files, and github says 16 files are changed.

@davegill
Copy link
Contributor

davegill commented Sep 9, 2020

@negin513
Negin,
Last thing: The PR commit message lists 17 files, and github says 16 files are changed.

@negin513
Copy link
Contributor Author

negin513 commented Sep 9, 2020

@negin513
Negin,
The previous pieces are a last sweep through for clean-up purposes.

The PR commit message lists 18 files, and github says 16 files are changed.

@davegill Thanks so much for reviewing this. :-)

The PR first message listed README and phys/module_ra_cam.F as changed files but the changes in those two files are reverted. I updated the PR message to show the 16 changed files:

M Registry/Registry.EM_COMMON
M arch/Config.pl
M arch/configure.defaults
M arch/postamble
M arch/preamble
A doc/README.CTSM
M dyn_em/module_first_rk_step_part1.F
M dyn_em/module_initialize_real.F
M dyn_em/solve_em.F
M main/depend.common
M phys/Makefile
M phys/module_physics_init.F
A phys/module_sf_ctsm.F
M phys/module_surface_driver.F
M share/input_wrf.F
M share/module_check_a_mundo.F

@davegill
Copy link
Contributor

davegill commented Sep 9, 2020

@weiwangncar @dudhia
Folks,
I am OK with this PR. I am approving it (from a software / PR conformity perspective). I would like one of the physics team to also approve from the perspective of the merits of the scheme.

@weiwangncar
Copy link
Collaborator

@davegill Should we inform the DA group so that they can conduct a compilation test?

@davegill
Copy link
Contributor

davegill commented Sep 9, 2020

@liujake
Jake,
Would you please conduct some simple tests to see if this brakes anything related to DA. The forward model group is happy.

This fixes the code to work with WRFPlus.
Kudos to Jamie Bresch - AS ALWAYS!

modified:   wrftladj/solve_em_ad.F
@negin513 negin513 requested a review from a team as a code owner September 13, 2020 22:26
@vikramjakhr
Copy link

reopen testing

@vikramjakhr vikramjakhr reopened this Sep 21, 2020
@vikramjakhr
Copy link

reopen

@vikramjakhr vikramjakhr reopened this Sep 21, 2020
@vikramjakhr
Copy link

reopen

@vikramjakhr vikramjakhr reopened this Sep 21, 2020
@davegill davegill merged commit 7df983d into wrf-model:develop Sep 24, 2020
@davegill
Copy link
Contributor

@negin513 @billsacks
Folks,
The CTSM capability is in the WRF develop branch.

@negin513
Copy link
Contributor Author

@negin513 @billsacks

Folks,

The CTSM capability is in the WRF develop branch.

Thanks so much for your help with this.

hsbadr added a commit to hsbadr/WRF that referenced this pull request Sep 25, 2020
vlakshmanan-scala pushed a commit to scala-computing/WRF that referenced this pull request Apr 4, 2024
TYPE: New Feature

KEYWORDS: WRF-CTSM coupling, Community Terrestrial Systems Model (CTSM), Community Land Model (CLM), 
coupled land-atmosphere models

SOURCE: Negin Sobhani <sup>1</sup> , Dave Lawrence <sup>1</sup> , Bill Sacks <sup>1</sup>, 
Sam Levis <sup>2</sup>, Mariana Vertenstein <sup>1</sup>, Dave Gill <sup>1</sup>, Mike Barlage  <sup>1,3</sup>, 
and Fei Chen <sup>1</sup> 

<sup>1</sup> National Center for Atmospheric Research (NCAR)
<sup>2</sup> SLevis Consulting 
<sup>3</sup> National Centers for Environmental Prediction (NCEP)

DESCRIPTION OF CHANGES:
This PR includes the capability to couple WRF with Community Terrestrial Systems Model (CTSM) via LILAC 
(Lightweight Infrastructure for Land-Atmosphere Coupling). CTSM can be used with WRF as one of WRF's land 
surface model schemes by setting `sf_surface_physics` in the WRF namelist.input file:

```
&physics
sf_surface_physics = 6, 6, 6,
/
```

For instructions on how to run WRF with CTSM please check [instructions on using CTSM with WRF.](https://escomp.github.io/ctsm-docs/versions/master/html/lilac/specific-atm-models/index.html)

LIST OF MODIFIED FILES: 
M       Registry/Registry.EM_COMMON
M       arch/Config.pl
M       arch/configure.defaults
M       arch/postamble
M       arch/preamble
A        doc/README.CTSM
M       dyn_em/module_first_rk_step_part1.F
M       dyn_em/module_initialize_real.F
M       dyn_em/solve_em.F
M       main/depend.common
M       phys/Makefile
M       phys/module_physics_init.F
A       phys/module_sf_ctsm.F
M       phys/module_surface_driver.F
M       share/input_wrf.F
M       share/module_check_a_mundo.F
M       wrftladj/solve_em_ad.F 

TESTS CONDUCTED:
1. The jenkins tests are all passing.
2. Initial assessment of the performance of WRF-CTSM5(NWP) compared to WRF-Noah and WRF-NoahMP has been 
completed over the CONUS domain.  Overall, we are finding that WRF-CTSM5(NWP) is performing reasonably well, in 
some cases even showing improved performance improvement. For example, the following plot shows the bias for 
maximum daily temperature from NOAH, NOAH-MP, and CTSM for June 2013 over METAR observation sites:

![CTSM_PR_2013-04_Tmin_Tmax](https://user-images.githubusercontent.com/17344536/90686072-05acc780-e228-11ea-91fa-4d239e548d1b.png)

RELEASE NOTE: 
The capability to couple CTSM with WRF is added and activated by setting namelist option `sf_surface_physics` to 6.
This is the initial beta release of WRF-CTSM coupling capability. For instructions on how to run WRF with CTSM please
check [instructions on using CTSM with WRF.](https://escomp.github.io/ctsm-docs/versions/master/html/lilac/specific-atm-models/index.html)
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.

None yet

6 participants