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

Include fortran files directly #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions Makefile_CT
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.SUFFIXES: .o .F .f .f90

F90 = ifort -g
LIBS = -L/usr/global/netcdf-fortran-4.4.2-intel/lib -lnetcdff -L/usr/global/hdf5-1.8.16/lib -L/usr/global/netcdf-4.4.0-intel/lib -lnetcdf -lnetcdf
INCLUDE_MODULES = -I/usr/global/netcdf-fortran-4.4.2-intel/include


#F90 = /usr/global/pgi-11.9/linux86-64/11.9/bin/pgf90 -g
#LIBS = -L/usr/global/netcdf-fortran-4.4.1-pgi/lib -lnetcdff -L/usr/global/hdf5-1.8.14/lib -L/usr/global/netcdf-4.3.3rc2-pgi/lib -lnetcdf -lnetcdf
#INCLUDE_MODULES = -I/usr/global/netcdf-fortran-4.4.1-pgi/include

FFLAGS =

EXEC = wrfchembc_CT


OBJS = module_CT_lib.o \
module_wrfchem_lib.o \
main_bc_wrfchem_CT.o

##dependencies
#$(OBJECTS) : makefile


${EXEC} : ${OBJS}
${F90} -o $@ ${FFLAGS} ${OBJS} ${LIBS}

.f.o:
${F90} ${FFLAGS} -c $<
.f90.o:
${F90} ${FFLAGS} -c ${INCLUDE_MODULES} $<

clean:
rm -f core ${EXEC} ${OBJS} *.mod
34 changes: 34 additions & 0 deletions Makefile_GEOS
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.SUFFIXES: .o .F .f .f90

F90 = ifort -g
LIBS = -L/usr/global/netcdf-fortran-4.4.2-intel/lib -lnetcdff -L/usr/global/hdf5-1.8.16/lib -L/usr/global/netcdf-4.4.0-intel/lib -lnetcdf -lnetcdf
INCLUDE_MODULES = -I/usr/global/netcdf-fortran-4.4.2-intel/include


#F90 = /usr/global/pgi-11.9/linux86-64/11.9/bin/pgf90 -g
#LIBS = -L/usr/global/netcdf-fortran-4.4.1-pgi/lib -lnetcdff -L/usr/global/hdf5-1.8.14/lib -L/usr/global/netcdf-4.3.3rc2-pgi/lib -lnetcdf -lnetcdf
#INCLUDE_MODULES = -I/usr/global/netcdf-fortran-4.4.1-pgi/include

FFLAGS =

EXEC = wrfchembc_GEOS


OBJS = module_GEOS_lib.o \
module_wrfchem_lib.o \
main_bc_wrfchem_GEOS.o

##dependencies
#$(OBJECTS) : makefile


${EXEC} : ${OBJS}
${F90} -o $@ ${FFLAGS} ${OBJS} ${LIBS}

.f.o:
${F90} ${FFLAGS} -c $<
.f90.o:
${F90} ${FFLAGS} -c ${INCLUDE_MODULES} $<

clean:
rm -f core ${EXEC} ${OBJS} *.mod
24 changes: 10 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,30 @@ This code has been liberally adapted at Penn State to support the 'nesting' of a



**Description of the global systems used as input fields for the WRF boundaries**
## Description of the global systems used as input fields for the WRF boundaries

The code has been developed to couple model outputs from two global models:

**1. GEOS-Chem global model**
### 1. GEOS-Chem global model
GEOS-Chem is a global 3-D chemical transport model (CTM) for atmospheric composition driven by meteorological input from the Goddard Earth Observing System (GEOS) of the NASA Global Modeling and Assimilation Office. It is applied by research groups around the world to a wide range of atmospheric composition problems. Scientific direction of the model is provided by the international GEOS-Chem Steering Committee and by User Working Groups. The model is managed by the GEOS-Chem Support Team, based at Harvard University and Dalhousie University with support from the US NASA Earth Science Division and the Canadian National and Engineering Research Council.

GEOS-Chem is a grass-roots community model owned by its users, and ownership implies some responsibilities as listed in our welcome page for new users. If you are interested in using GEOS-Chem, please contact the GEOS-Chem Support Team who will send you instructions for joining the user community and accessing the code.

To download the code sources and users' guides, visit the webpage:
http://acmg.seas.harvard.edu/geos/

The version of the wrfchembc code for GEOS-Chem has been archived in:
The version of the wrfchembc code for GEOS-Chem has GEOS in the source file names:

**psu-inversion/WRF_boundary_coupling/wrfchem_GEOS_pkg.tar**
Main source code "[main_bc_wrfchem_GEOS.f90](main_bc_wrfchem_GEOS.f90)"

Main source code "main_bc_wrfchem_GEOS.f90"
Please refer to [README_GEOSChem.md](README_GEOSChem.md) for more instructions.

Please refer to README_GEOSChem.md for more instructions.

**2. CarbonTracker Inversion System (TM5 model)**
### 2. CarbonTracker Inversion System (TM5 model)
CarbonTracker is a CO2 measurement and modeling system developed by NOAA to keep track of sources (emissions to the atmosphere) and sinks (removal from the atmosphere) of carbon dioxide around the world. CarbonTracker uses atmospheric CO2 observations from a host of collaborators and simulated atmospheric transport to estimate these surface fluxes of CO2. The current release of CarbonTracker, CT2016, provides global estimates of surface-atmosphere fluxes of CO2 from January 2000 through December 2015.

To represent the atmospheric transport, we use the Transport Model 5 (TM5). This is a community-supported model whose development is shared among many scientific groups with different areas of expertise. The model is developed and maintained jointly by the Institute for Marine and Atmospheric Research Utrecht (IMAU, The Netherlands), the Joint Research Centre (JRC, Italy), the Royal Netherlands Meteorological Institute (KNMI), the Netherlands Institude for Space Research (SRON), and the NOAA Earth System Research Laboratory (ESRL).

For more information on the TM5 model, pleas visit:
For more information on the TM5 model, please visit:
http://tm5.sourceforge.net/

For more information on the CarbonTracker modeling system, please visit:
Expand All @@ -45,11 +43,9 @@ https://www.esrl.noaa.gov/gmd/ccgg/carbontracker/index.php
To access the original CarbonTracker model outputs, please visit:
https://www.esrl.noaa.gov/gmd/ccgg/carbontracker/molefractions.php

The version of the wrfchembc code for CarbonTracker has been archived in:

**psu-inversion/WRF_boundary_coupling/wrfchem_CT_pkg.tar**
The version of the wrfchembc code for CarbonTracker has CT in the source file names:

Main source code "main_bc_wrfchem_CT.f90"
Main source code "[main_bc_wrfchem_CT.f90](main_bc_wrfchem_CT.f90)"

Please refer to README_GEOSChem.md for more instructions.
Please refer to [README_CT.md](README_CT.md) for more instructions.

26 changes: 14 additions & 12 deletions README_CT.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<DESCRIPTION>

Program wrfchembc.
# Program wrfchembc.

For more information, contact Martha Butler or Thomas Lauvaux (tul5@psu.edu), The Pennsylvania State University.

Expand Down Expand Up @@ -32,12 +32,12 @@ Original source of unknown date. Authors: Rainer Schmitz (University of Chile -
to the beginning date of the wrfinput/wrfbdy files.
It is up to the user to specify the correct 2-month global source file
in the namelist control.
For the TM5 and GEOS-Chem based files, the global file time increment (dt_g) is 3 hours.
The wrfbdy time increment (dt_w) is 6 hours.
For the TM5 and GEOS-Chem based files, the global file time increment (`dt_g`) is 3 hours.
The wrfbdy time increment (`dt_w`) is 6 hours.
Appropriate global file time incrments will be averaged to the wrfbdy time step.
This code can accommodate either 00 UTC or 12 UTC start times.

The options for global models at this time are:
The options for global models at this time are:
CarbonTracker (other TM5 based global models, such as those from Sourish Basu,
will use this as a model, with some modifications)
GEOS-Chem (a CMS-Flux system version, which will also be used as a model for
Expand All @@ -46,14 +46,16 @@ Original source of unknown date. Authors: Rainer Schmitz (University of Chile -
to surface-top before use)

The wrfchembc package consists of this 'main' code plus:
module_CT_lib.f90: but, use the module specific to global model
currently either module_GEOS_lib.f90 or module_CT_lib.f90
`module_CT_lib.f90`: but, use the module specific to global model
currently either `module_GEOS_lib.f90` or `module_CT_lib.f90`
Most procedures in the global model module will be referred to as 'global'
module_wrfchem_lib.f90: This contains wrf specific procedures and should not need to be modified.
wrfchembc_namelist.input
Makefile
`module_wrfchem_lib.f90`: This contains wrf specific procedures and should not need to be modified.
`wrfchembc_namelist.input`
`Makefile`

The namelist input data file for the program is structured as follows with examples:

```fortran
&control

dir_wrf = '/data/wrfchem_data/' ! Directory containing the wrfinput and wrfbdy files
Expand All @@ -73,17 +75,17 @@ Original source of unknown date. Authors: Rainer Schmitz (University of Chile -

dir_global = '/data/global_data/' # Global model data directory example
fn_global = 'CT2016_2010-0607.nc' # Global model data file name example
```


To compile, type "make". The make file is set-up to compile the code for a
To compile, type `make`. The make file is set-up to compile the code for a
single processor using the Intel compiler (We assume you are using a
linux cluster). The Makefile will need to be modified to work with other
computer systems.
Makefile in this directory is specific to PSU Meteorology Linux cluster use

To execute the program, type

wrfchembc_CT < wrfchembc_namelist.input
`wrfchembc_CT < wrfchembc_namelist.input`



21 changes: 11 additions & 10 deletions README_GEOSChem.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DESCRIPTION

Program wrfchembc.
# Program wrfchembc.


For more information, contact Martha Butler or Thomas Lauvaux (tul5@psu.edu), The Pennsylvania State University.
Expand Down Expand Up @@ -33,8 +33,8 @@ Original source of unknown date. Authors: Rainer Schmitz (University of Chile -
to the beginning date of the wrfinput/wrfbdy files.
It is up to the user to specify the correct 2-month global source file
in the namelist control.
For the TM5 and GEOS-Chem based files, the global file time increment (dt_g) is 3 hours.
The wrfbdy time increment (dt_w) is 6 hours.
For the TM5 and GEOS-Chem based files, the global file time increment (`dt_g`) is 3 hours.
The wrfbdy time increment (`dt_w`) is 6 hours.
Appropriate global file time incrments will be averaged to the wrfbdy time step.
This code can accommodate either 00 UTC or 12 UTC start times.

Expand All @@ -47,14 +47,15 @@ Original source of unknown date. Authors: Rainer Schmitz (University of Chile -
to surface-top before use)

The wrfchembc package consists of this 'main' code plus:
module_GEOS_lib.f90: but, use the module specific to global model
currently either module_GEOS_lib.f90 or module_CT_lib.f90
`module_GEOS_lib.f90`: but, use the module specific to global model
DWesl marked this conversation as resolved.
Show resolved Hide resolved
currently either `module_GEOS_lib.f90` or `module_CT_lib.f90`
Most procedures in the global model module will be referred to as 'global'
module_wrfchem_lib.f90: This contains wrf specific procedures and should not need to be modified.
wrfchembc_namelist.input
Makefile
`module_wrfchem_lib.f90`: This contains wrf specific procedures and should not need to be modified.
`wrfchembc_namelist.input`
`Makefile`

The namelist input data file for the program is structured as follows with examples:
```fortran
&control

dir_wrf = '/data/wrfchem_data/' ! Directory containing the wrfinput and wrfbdy files
Expand All @@ -72,7 +73,7 @@ and may be omitted for options 2 and 3

dir_global = '/data/global_data/' ! Global model data directory example
fn_global = 'ts20100607.nc' ! Global model data file name example

```



Expand All @@ -84,6 +85,6 @@ and may be omitted for options 2 and 3

To execute the program, type

wrfchembc_GEOS < wrfchembc_namelist.input
`wrfchembc_GEOS < wrfchembc_namelist.input`


Loading