-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added the red sea debug case for the wave model
- Loading branch information
Showing
75 changed files
with
17,728 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
First, download the test case from: | ||
|
||
wget ftp://sioftp.ucsd.edu/CW3E_DataShare/RSun_SKRIPS/L3.C3.coupled_SouthernOcean.zip | ||
wget ftp://sioftp.ucsd.edu/CW3E_DataShare/RSun_SKRIPS/share/L3.C3.coupled_SouthernOcean.zip |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
This is the debug case for coupled ocean-wave-atmosphere simulations | ||
|
||
To download the entire test case, use: | ||
wget ftp://sioftp.ucsd.edu/CW3E_DataShare/RSun_SKRIPS/share/L4.C1.coupled_RS2012_ring.zip | ||
|
||
To generate the case generator, use: | ||
wget ftp://sioftp.ucsd.edu/CW3E_DataShare/RSun_SKRIPS/share/generate_rs_wave.zip | ||
|
||
------------------------------------------- | ||
MITgcm-WRF coupled simulation test: Red Sea | ||
|
||
This folder contains an MITgcm-WRF coupled test case. The coupled simulation is | ||
driven by ESMF. The case aims to test the implementation of the coupled code. | ||
In this test, the ESMF driver drives both MITgcm and WRF. Both MITgcm and WRF | ||
are divided into "init", "run", "finalize" parts. This coupled code drives the | ||
realistic simulations in the Red Sea region. | ||
|
||
The WRF bulf formula is used in this case. | ||
This should be compiled using PGI compiler (run it on ring). | ||
|
||
simulation: | ||
Red Sea region | ||
|
||
Notes: | ||
To install and run this case:: | ||
|
||
./install.sh | ||
cd runCase.init | ||
./Allrun | ||
cd runCase | ||
./Allrun | ||
|
||
To clean this case:: | ||
|
||
./clean.sh | ||
|
||
How to check if the code is installed? | ||
|
||
MITGCM executable is: build/mitgcmuv | ||
MITGCM library is: build/mmout/libmitgcm_org_ocn.a | ||
MITGCM run time library is: build/mmout/libmitgcmrtl.a | ||
MITGCM mod file is: build/mitgcm_org_ocn.mod | ||
The coupled MITGCM-ESMF solver is: coupledCode/esmf_application | ||
|
||
############### | ||
DEBUGGING CASES | ||
############### | ||
MUST run the coupled case first: | ||
|
||
./allrun.sh | ||
|
||
runMITtest: Test if the MITgcm flux is added correctly. (To install stand-alone MITgcm code, run ./install_mit.sh) | ||
runWRFtest: Test if the WRF flux is added correctly | ||
latexSummary: Generate the report automatically. | ||
|
||
#################### | ||
WARNING!!!WARNING!!! | ||
#################### | ||
The MITgcm path is defined as '${HOME}/scripps_kaust_model_github/MITgcm_c67m' in install.sh | ||
The MPI_HOME path is defined as '/project_shared/Libraries/openmpi-2.1.1_pgi_fortran_17.5-0/include' in install.sh | ||
|
||
The ESMF should be installed to run this case. The variable ESMFMKFILE should | ||
be defined: | ||
|
||
export ESMFMKFILE=$ESMF_DIR/lib/libg/Linux.pgi.64.openmpi.default/esmf.mk | ||
|
||
where ESMF_DIR should be the location that ESMF is installed. | ||
|
||
Make sure MATLAB is installed. | ||
Make sure NCL is installed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/csh -f | ||
|
||
rm -rf build code | ||
rm -rf build_mit code_mit | ||
|
||
cd coupledCode | ||
make distclean | ||
cd .. | ||
|
||
# cd runCase | ||
# ./Allclean | ||
# cd .. | ||
|
||
# cd runCase.init | ||
# ./Allclean | ||
# cd .. | ||
|
||
# cd latexSummary | ||
# ./clean.sh | ||
# cd .. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/sh | ||
|
||
make distclean | ||
|
||
ln -s ../build/*.mod . | ||
ln -s ../build/mmout/*.a . | ||
ln -s ../build/setrlstk.o . | ||
ln -s ../build/sigreg.o . | ||
|
||
ln -s $WRF_DIR/main/wrf_ESMFMod.o . | ||
ln -s $WRF_DIR/main/module_wrf_top.o . | ||
ln -s $WRF_DIR/main/libwrflib.a . | ||
|
||
ln -sf $WW3_DIR/model/mod/ww3_esmf.mod . | ||
ln -sf $WW3_DIR/model/ftn/ww3_esmf.ftn . | ||
|
||
make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# GNU Makefile template for user ESMF application | ||
|
||
################################################################################ | ||
################################################################################ | ||
## This Makefile must be able to find the "esmf.mk" Makefile fragment in the ## | ||
## 'include' line below. Following the ESMF User's Guide, a complete ESMF ## | ||
## installation should ensure that a single environment variable "ESMFMKFILE" ## | ||
## is made available on the system. This variable should point to the ## | ||
## "esmf.mk" file. ## | ||
## ## | ||
## This example Makefile uses the "ESMFMKFILE" environment variable. ## | ||
## ## | ||
## If you notice that this Makefile cannot find variable ESMFMKFILE then ## | ||
## please contact the person responsible for the ESMF installation on your ## | ||
## system. ## | ||
## As a work-around you can simply hardcode the path to "esmf.mk" in the ## | ||
## include line below. However, doing so will render this Makefile a lot less ## | ||
## flexible and non-portable. ## | ||
################################################################################ | ||
|
||
ifneq ($(origin ESMFMKFILE), environment) | ||
$(error Environment variable ESMFMKFILE was not set.) | ||
endif | ||
|
||
include $(ESMFMKFILE) | ||
include ./wrflib.mk | ||
include ./ww3lib.mk | ||
|
||
################################################################################ | ||
################################################################################ | ||
|
||
.SUFFIXES: .f90 .F90 .c .C | ||
|
||
%.o : %.f90 | ||
$(ESMF_F90COMPILER) -byteswapio -r8 -Mnodclchk -Mextend -fast -fastsse -c $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(WRF_INC) $(WW3_INC) $(ESMF_F90COMPILEFREENOCPP) $< -I${PWD} -L${PWD} ${WW3_MOD} $(WRF_LIB) -lmitgcm_org_ocn -lmitgcmrtl | ||
|
||
%.o : %.F90 | ||
$(ESMF_F90COMPILER) -byteswapio -r8 -Mnodclchk -Mextend -fast -fastsse -c $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(WRF_INC) $(WW3_INC) $(ESMF_F90COMPILEFREECPP) $(ESMF_F90COMPILECPPFLAGS) $< -I${PWD} -L${PWD} ${WW3_MOD} $(WRF_LIB) -lmitgcm_org_ocn -lmitgcmrtl | ||
|
||
% : %.c | ||
$(ESMF_CXXCOMPILER) -byteswapio -r8 -Mnodclchk -Mextend -fast -fastsse -c $(ESMF_CXXCOMPILEOPTS) $(ESMF_CXXCOMPILEPATHSLOCAL) $(ESMF_CXXCOMPILEPATHS) $(ESMF_CXXCOMPILECPPFLAGS) $< | ||
|
||
% : %.C | ||
$(ESMF_CXXCOMPILER) -byteswapio -r8 -Mnodclchk -Mextend -fast -fastsse -c $(ESMF_CXXCOMPILEOPTS) $(ESMF_CXXCOMPILEPATHSLOCAL) $(ESMF_CXXCOMPILEPATHS) $(ESMF_CXXCOMPILECPPFLAGS) $< | ||
|
||
|
||
|
||
# ----------------------------------------------------------------------------- | ||
esmf_application: mod_config.o mod_types.o mod_esmf_ocn.o mod_esmf_atm.o mod_esmf_wav.o mod_esmf_cpl.o mod_esmf_esm.o mitgcm_wrf.o libmitgcm_org_ocn.a libmitgcmrtl.a | ||
$(ESMF_F90LINKER) $(ESMF_F90LINKOPTS) $(ESMF_F90LINKPATHS) $(ESMF_F90LINKRPATHS) $(WW3_INC) $(WRF_INC) -L${PWD} -o $@ $^ $(ESMF_F90ESMFLINKLIBS) $(WW3_LIB) $(WRF_LIB) setrlstk.o sigreg.o -lmitgcm_org_ocn -lmitgcmrtl | ||
|
||
# module dependencies: | ||
mod_esmf_esm.o: mod_esmf_ocn.o mod_esmf_atm.o mod_esmf_wav.o mod_types.o | ||
mod_esmf_cpl.o: | ||
mod_esmf_ocn.o: mod_types.o | ||
mod_esmf_atm.o: mod_types.o | ||
mod_esmf_wav.o: mod_types.o | ||
mod_config.o: mod_types.o | ||
mod_types.o: | ||
|
||
# ----------------------------------------------------------------------------- | ||
# ----------------------------------------------------------------------------- | ||
.PHONY: clean distclean | ||
clean: | ||
rm -f esmf_application *.o | ||
distclean: clean | ||
rm -f PET*.ESMF_LogFile mod*.mod *.a mit*.mod ww3_esmf* |
141 changes: 141 additions & 0 deletions
141
coupler/L4.C1.coupled_RS2012_ring/coupledCode/mitgcm_wrf.F90
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
! Earth System Modeling Framework | ||
! Copyright 2002-2017, University Corporation for Atmospheric Research, | ||
! Massachusetts Institute of Technology, Geophysical Fluid Dynamics | ||
! Laboratory, University of Michigan, National Centers for Environmental | ||
! Prediction, Los Alamos National Laboratory, Argonne National Laboratory, | ||
! NASA Goddard Space Flight Center. | ||
! Licensed under the University of Illinois-NCSA License. | ||
#define FILENAME "mitgcm_wrf.F90" | ||
! | ||
!----------------------------------------------------------------------- | ||
! Main function | ||
!----------------------------------------------------------------------- | ||
! | ||
program esmf_application | ||
|
||
! modules | ||
use ESMF | ||
use NUOPC | ||
use mod_esmf_esm, only : ESM_SetServices | ||
use mod_config, only : read_config | ||
! use mod_config, only : set_field_dir | ||
|
||
implicit none | ||
|
||
! local variables | ||
integer :: rc, urc | ||
type(ESMF_GridComp) :: esmComp | ||
type(ESMF_VM) :: vm | ||
! | ||
!----------------------------------------------------------------------- | ||
! Initialize ESMF framework | ||
!----------------------------------------------------------------------- | ||
! | ||
call ESMF_Initialize(logkindflag=ESMF_LOGKIND_MULTI, & | ||
defaultCalkind=ESMF_CALKIND_GREGORIAN, & | ||
vm=vm, rc=rc) | ||
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & | ||
line=__LINE__, file=__FILE__)) & | ||
call ESMF_Finalize(endflag=ESMF_END_ABORT) | ||
! | ||
!----------------------------------------------------------------------- | ||
! Create component | ||
!----------------------------------------------------------------------- | ||
! | ||
esmComp = ESMF_GridCompCreate(name="NEW_GRID", rc=rc) | ||
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & | ||
line=__LINE__, file=__FILE__)) & | ||
call ESMF_Finalize(endflag=ESMF_END_ABORT) | ||
! | ||
!----------------------------------------------------------------------- | ||
! Read main configuration file | ||
!----------------------------------------------------------------------- | ||
! | ||
call read_config(vm, rc) | ||
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & | ||
line=__LINE__, file=__FILE__)) & | ||
call ESMF_Finalize(endflag=ESMF_END_ABORT) | ||
! | ||
!----------------------------------------------------------------------- | ||
! Add additional fields to NUOPC field dictionary | ||
!----------------------------------------------------------------------- | ||
! | ||
!! call set_field_dir(vm, rc) | ||
!! if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & | ||
!! line=__LINE__, file=__FILE__)) & | ||
!! call ESMF_Finalize(endflag=ESMF_END_ABORT) | ||
! | ||
!----------------------------------------------------------------------- | ||
! Register component | ||
!----------------------------------------------------------------------- | ||
! | ||
call ESMF_GridCompSetServices(esmComp, ESM_SetServices, & | ||
userRc=urc, rc=rc) | ||
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & | ||
line=__LINE__, file=__FILE__)) & | ||
call ESMF_Finalize(endflag=ESMF_END_ABORT) | ||
if (ESMF_LogFoundError(rcToCheck=urc, msg=ESMF_LOGERR_PASSTHRU, & | ||
line=__LINE__, file=__FILE__)) & | ||
call ESMF_Finalize(endflag=ESMF_END_ABORT) | ||
! | ||
!----------------------------------------------------------------------- | ||
! Wait for finishing initialize phase | ||
!----------------------------------------------------------------------- | ||
! | ||
!! call ESMF_VMBarrier(vm, rc=rc) | ||
!! if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & | ||
!! line=__LINE__, file=__FILE__)) & | ||
!! call ESMF_Finalize(endflag=ESMF_END_ABORT) | ||
! | ||
!----------------------------------------------------------------------- | ||
! Initialize component | ||
!----------------------------------------------------------------------- | ||
! | ||
call ESMF_GridCompInitialize(esmComp, userRc=urc, rc=rc) | ||
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & | ||
line=__LINE__, file=__FILE__)) & | ||
call ESMF_Finalize(endflag=ESMF_END_ABORT) | ||
if (ESMF_LogFoundError(rcToCheck=urc, msg=ESMF_LOGERR_PASSTHRU, & | ||
line=__LINE__, file=__FILE__)) & | ||
call ESMF_Finalize(endflag=ESMF_END_ABORT) | ||
! | ||
!----------------------------------------------------------------------- | ||
! Run component | ||
!----------------------------------------------------------------------- | ||
! | ||
call ESMF_GridCompRun(esmComp, userRc=urc, rc=rc) | ||
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & | ||
line=__LINE__, file=__FILE__)) & | ||
call ESMF_Finalize(endflag=ESMF_END_ABORT) | ||
if (ESMF_LogFoundError(rcToCheck=urc, msg=ESMF_LOGERR_PASSTHRU, & | ||
line=__LINE__, file=__FILE__)) & | ||
call ESMF_Finalize(endflag=ESMF_END_ABORT) | ||
! | ||
!----------------------------------------------------------------------- | ||
! Finalize component | ||
!----------------------------------------------------------------------- | ||
! | ||
call ESMF_GridCompFinalize(esmComp, userRc=urc, rc=rc) | ||
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & | ||
line=__LINE__, file=__FILE__)) & | ||
call ESMF_Finalize(endflag=ESMF_END_ABORT) | ||
if (ESMF_LogFoundError(rcToCheck=urc, msg=ESMF_LOGERR_PASSTHRU, & | ||
line=__LINE__, file=__FILE__)) & | ||
call ESMF_Finalize(endflag=ESMF_END_ABORT) | ||
! | ||
!----------------------------------------------------------------------- | ||
! Destroy the earth system Component | ||
!----------------------------------------------------------------------- | ||
! | ||
call ESMF_GridCompDestroy(esmComp, rc=rc) | ||
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & | ||
line=__LINE__, file=__FILE__)) & | ||
call ESMF_Finalize(endflag=ESMF_END_ABORT) | ||
! | ||
!----------------------------------------------------------------------- | ||
! Finalize ESMF framework | ||
!----------------------------------------------------------------------- | ||
! | ||
call ESMF_Finalize(rc=rc) | ||
|
||
end program esmf_application |
Oops, something went wrong.