-
Notifications
You must be signed in to change notification settings - Fork 354
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added orographic drag toolkit for topo generation. *********1*********2*********3*********4*********5*********6*********7** Longer commit message body describing the commit. Can contain lists as follows: * Item 1 * Item 2 * Item 3 A good commit message should be written like an email, a subject followed by a blank line, followed by a more descriptive body. Can also contain a tag at the bottom describing what type of commit this is. [BFB] - Bit-For-Bit [FCC] - Flag Climate Changing [Non-BFB] - Non Bit-For-Bit [CC] - Climate Changing [NML] - Namelist Changing See confluence for a more detailed description about these tags.
- Loading branch information
Showing
11 changed files
with
8,362 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
EXEDIR = . | ||
EXENAME = cube_to_target | ||
RM = rm | ||
|
||
.SUFFIXES: | ||
.SUFFIXES: .F90 .o | ||
|
||
FC = ifort | ||
DEBUG = FALSE | ||
|
||
|
||
# Check for the NetCDF library and include directories | ||
ifeq ($(LIB_NETCDF),$(null)) | ||
LIB_NETCDF := /gpfs/fs1/soft/chrysalis/spack/opt/spack/linux-centos8-x86_64/intel-20.0.4/netcdf-fortran-4.4.4-rdxohvp/lib | ||
#/global/common/software/nersc/pm-2023q1/spack-stacks-1/views/climate-utils/lib | ||
#/public/software/mathlib/netcdf/4.3.2/intel/lib | ||
endif | ||
|
||
ifeq ($(INC_NETCDF),$(null)) | ||
INC_NETCDF := /gpfs/fs1/soft/chrysalis/spack/opt/spack/linux-centos8-x86_64/intel-20.0.4/netcdf-fortran-4.4.4-rdxohvp/include | ||
#/global/common/software/nersc/pm-2023q1/spack-stacks-1/views/climate-utils/include | ||
#/public/software/mathlib/netcdf/4.3.2/intel/include | ||
endif | ||
|
||
# Determine platform | ||
UNAMES := $(shell uname -s) | ||
UNAMEM := $(findstring CRAY,$(shell uname -m)) | ||
|
||
#------------------------------------------------------------------------ | ||
# LF95 | ||
#------------------------------------------------------------------------ | ||
# | ||
# setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/usr/local/netcdf-4.1.3-gcc-4.4.4-13-lf9581/lib | ||
# | ||
ifeq ($(FC),lf95) | ||
# | ||
# Tramhill | ||
# | ||
INC_NETCDF :=/usr/local/netcdf-4.1.3-gcc-4.4.4-13-lf9581/include | ||
LIB_NETCDF :=/usr/local/netcdf-4.1.3-gcc-4.4.4-13-lf9581/lib | ||
|
||
LDFLAGS = -L$(LIB_NETCDF) -lnetcdf -lnetcdff -lcurl -lhdf5 -lhdf5_hl -mcmodel=medium | ||
FFLAGS := -c --trace --trap --wide -CcdRR8 -I$(INC_NETCDF) | ||
ifeq ($(DEBUG),TRUE) | ||
# FFLAGS += --chk aesu -Cpp --trace | ||
FFLAGS += -g --chk a,e,s,u --pca | ||
else | ||
FFLAGS += -O | ||
endif | ||
|
||
endif | ||
|
||
|
||
|
||
.F90.o: | ||
$(FC) $(FFLAGS) $< | ||
|
||
|
||
#------------------------------------------------------------------------ | ||
# AIX | ||
# #------------------------------------------------------------------------ | ||
# | ||
#ifeq ($(UNAMES),AIX) | ||
FC = ifort #xlf90 | ||
#FFLAGS = -c -I$(INC_NETCDF) -I/BIGDATA1/iapcas_mhzhang_xiejinbo/topo_tool/cube_to_target/functional/ -convert big_endian | ||
|
||
FFLAGS = -c -I$(INC_NETCDF) -convert big_endian -traceback | ||
#FFLAGS := -c -I$(INC_NETCDF) -no-prec-div -traceback -convert big_endian -fp-model source -assume byterecl -ftz -m64 -mcmodel=large -safe-cray-ptr | ||
LDFLAGS = -L$(LIB_NETCDF) -lnetcdff | ||
#LDFLAGS = -L$(LIB_NETCDF) -lnetcdf -lnetcdff -m64 -static-intel | ||
.F90.o: | ||
$(FC) $(FFLAGS) -qsuffix=f=F90 $< | ||
# #endif | ||
|
||
|
||
.F90.o: | ||
$(FC) $(FFLAGS) $< | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
#------------------------------------------------------------------------ | ||
# Default rules and macros | ||
#------------------------------------------------------------------------ | ||
|
||
#OBJS := reconstruct.o remap.o cube_to_target.o shr_kind_mod.o | ||
OBJS := reconstruct.o remap.o shr_kind_mod.o transform.o sub_xjb.o cube_to_target.o | ||
#OBJS := reconstruct.o remap.o cube_to_target.o sub.o shr_kind_mod.o | ||
#sub.o shr_kind_mod.o | ||
|
||
$(EXEDIR)/$(EXENAME): $(OBJS) | ||
$(FC) -o $@ $(OBJS) -I$(INC_NETCDF) $(LDFLAGS) | ||
|
||
clean: | ||
$(RM) -f $(OBJS) *.mod $(EXEDIR)/$(EXENAME) | ||
|
||
cube_to_target.o: shr_kind_mod.o remap.o reconstruct.o sub_xjb.o transform.o | ||
remap.o: | ||
reconstruct.o: remap.o | ||
#reconstruct.o : shr_kind_mod.o |
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,18 @@ | ||
cube_to_target performs rigourous remapping of topo variables from cubed-sphere grid to | ||
any target grid. In the process SGH is computed. | ||
|
||
Input files: | ||
|
||
1. USGS-topo-cube.nc (may be found here $CESMDATA/inputdata/atm/cam/hrtopo/USGS-topo-cube3000.nc) | ||
|
||
This is the topo data on a cubed-sphere (default is 3km cubed-sphere grid) | ||
|
||
2. target.nc (e.g., $CESMDATA/inputdata/atm/cam/grid-description/se/ne30np4_091226_pentagons.nc) | ||
|
||
This is a SCRIP/ESMF grid descriptor file for the target grid | ||
|
||
3. phis-smooth.nc | ||
|
||
(optional) The user may provide a smoothed PHIS field. The software then recomputes SGH to | ||
account for the smoothing in the sub-grid-scale. | ||
|
13 changes: 13 additions & 0 deletions
13
components/eam/tools/orographic_drag_toolkit/Tempest-remap_generation.sh
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,13 @@ | ||
|
||
|
||
source /lcrc/soft/climate/e3sm-unified/load_latest_e3sm_unified_chrysalis.sh | ||
tempest_root=~/.conda/envs/jinbo | ||
# Generate the element mesh. | ||
${tempest_root}/bin/GenerateCSMesh --alt --res 30 --file topo2/ne30.g | ||
# Generate the target physgrid mesh. | ||
${tempest_root}/bin/GenerateVolumetricMesh --in topo2/ne30.g --out topo2/ne30pg2.g --np 2 --uniform | ||
# Generate a high-res target physgrid mesh for cube_to_target. | ||
${tempest_root}/bin/GenerateVolumetricMesh --in topo2/ne30.g --out topo2/ne30pg4.g --np 4 --uniform | ||
# Generate SCRIP files for cube_to_target. | ||
${tempest_root}/bin/ConvertMeshToSCRIP --in topo2/ne30pg4.g --out topo2/ne30pg4_scrip.nc | ||
${tempest_root}/bin/ConvertMeshToSCRIP --in topo2/ne30pg2.g --out topo2/ne30pg2_scrip.nc |
Oops, something went wrong.