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

chgres_cube grib2 GFS data support #48

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
2396483
chgres_cube_grib2_atmos: This commit references #66221
LarissaReames-NOAA Jul 18, 2019
736b24f
chgres_cube_grib2_atmos: This commit references #66221
LarissaReames-NOAA Jul 19, 2019
9e437ee
chgres_cube_grib2_atmos: This commit references #66268
LarissaReames-NOAA Jul 18, 2019
94cc0fe
chgres_cube_grib2_atmos: This commit references #66268
LarissaReames-NOAA Jul 19, 2019
5b1dfa5
chgres_cube_grib2_atmos: This commit references #66268
LarissaReames-NOAA Jul 21, 2019
44ea443
Merge branch 'feature/chgres_cube_grib2_atmos' of gerrit:UFS_UTILS in…
LarissaReames-NOAA Jul 21, 2019
d414c42
chgres_cube_grib2_atmos: This commit references #66268
LarissaReames-NOAA Aug 7, 2019
3521075
chgres_cube_grib2_atmos: This commit references #66268
LarissaReames-NOAA Aug 7, 2019
ae22e22
feature/chgres_cube_grib2_atmos: This commit references #66268.
GeorgeGayno-NOAA Aug 16, 2019
c2adf96
feature/chgres_cube_grib2_atmos: This commit references #66268.
GeorgeGayno-NOAA Aug 16, 2019
ff603b9
chgres_cube_grib2_atmos: This commit references #66268
LarissaReames-NOAA Aug 19, 2019
427061d
Merge branch 'feature/chgres_cube_grib2_atmos' of gerrit:UFS_UTILS in…
LarissaReames-NOAA Aug 19, 2019
591ef88
chgres_cube_grib2_atmos: This commit references #66268
LarissaReames-NOAA Aug 20, 2019
8592b81
chgres_cube_grib2_atmos: This commit references #66268
LarissaReames-NOAA Aug 21, 2019
d6c9b31
chgres_cube_grib2_atmos: This commit references #66268 (#8)
LarissaReames-NOAA Aug 23, 2019
8aa3b63
feature/hera_port This commit references #1.
GeorgeGayno-NOAA Sep 4, 2019
a38b232
feature/hera_port This commit references #1.
GeorgeGayno-NOAA Sep 4, 2019
01c6f1d
feature/hera_port This commit references issue #1.
GeorgeGayno-NOAA Sep 4, 2019
5a0e912
feature/hera_port This commit references issue #1.
GeorgeGayno-NOAA Sep 4, 2019
ec327b8
feature/hera_port This commit references issue #1.
GeorgeGayno-NOAA Sep 5, 2019
e2a0aad
feature/hera_port This commit references #1.
GeorgeGayno-NOAA Sep 6, 2019
bae8fea
feature/hera_port This commit references #1.
GeorgeGayno-NOAA Sep 6, 2019
e44ff25
feature/hera_port This commit references #1.
GeorgeGayno-NOAA Sep 6, 2019
00de954
feature/hera_port This commit references #1.
GeorgeGayno-NOAA Sep 9, 2019
3241cfa
feature/hera_port This commit references #1.
GeorgeGayno-NOAA Sep 9, 2019
2044db3
feature/hera_port This commit references #1.
GeorgeGayno-NOAA Sep 9, 2019
e5c508d
feature/hera_port This commit references #1.
GeorgeGayno-NOAA Sep 10, 2019
b1951d1
feature/hera_port This commit references #1.
GeorgeGayno-NOAA Sep 11, 2019
ac49bb5
chgres_cube_grib2_atmos: This commit references #66268
LarissaReames-NOAA Sep 11, 2019
a5dd089
Merge branch 'feature/chgres_cube_grib2_atmos' into feature/chgres_cu…
LarissaReames-NOAA Sep 11, 2019
009496c
Feature/chgres cube grib2 atmos (#13)
LarissaReames-NOAA Sep 12, 2019
7dbe65c
feature/hera_port: This commit references #1.
GeorgeGayno-NOAA Sep 12, 2019
ba9d991
feature/hera_port: This commit references #1.
GeorgeGayno-NOAA Sep 13, 2019
d88bf1c
feature/hera_port: This commit references #1.
GeorgeGayno-NOAA Sep 13, 2019
9381aeb
feature/hera_port: This commit references #1.
GeorgeGayno-NOAA Sep 18, 2019
5d68083
feature/hera_port: This commit references #1.
GeorgeGayno-NOAA Sep 18, 2019
de48ad1
feature/hera_port: This commit references #1.
GeorgeGayno-NOAA Sep 19, 2019
829b1db
feature/hera_port: This commit references #1.
GeorgeGayno-NOAA Sep 23, 2019
573bd48
feature/hera_port: This commit references #1.
GeorgeGayno-NOAA Sep 26, 2019
5149a88
feature/hera_port: This commit references #1.
GeorgeGayno-NOAA Sep 30, 2019
63ee8bd
feature/hera_port: This commit references #1.
GeorgeGayno-NOAA Oct 2, 2019
b799955
Merge branch 'develop' into chgres_cube_grib2_atmos
BinLiu-NOAA Oct 7, 2019
6dd44b8
Merge branch 'hera_port' into chgres_cube_grib2_atmos
BinLiu-NOAA Oct 7, 2019
1c150e9
Merge branch 'develop' into feature/chgres_cube_grib2_atmos
BinLiu-NOAA Oct 12, 2019
f31a859
Merge branch 'develop' into feature/chgres_cube_grib2_atmos
BinLiu-NOAA Oct 16, 2019
f819e18
Merge pull request #1 from hafs-community/feature/chgres_cube_grib2_a…
LarissaReames-NOAA Oct 22, 2019
0160f6f
Merge branch 'develop' into feature/chgres_cube_grib2_atmos
BinLiu-NOAA Oct 30, 2019
930ff31
Merge branch 'feature/chgres_cube_grib2_atmos' of https://github.com/…
LarissaReames-NOAA Oct 30, 2019
76e9bdb
Merge remote-tracking branch 'LarissaFork/feature/chgres_cube_grib2_a…
JiliDong-NOAA Oct 31, 2019
ecec8ef
re-order grib2 isobaric levels
JiliDong-NOAA Oct 31, 2019
332c584
keep grib2 CLWMR name consistent with origional
JiliDong-NOAA Oct 31, 2019
1945269
Replaced namelist option "base_install_dir" with "varmap_file" and
LarissaReames-NOAA Oct 31, 2019
7940d8b
Merge pull request #3 from JiliDong-NOAA/feature/chgres_cube_grib2_atmos
LarissaReames-NOAA Oct 31, 2019
8a691d6
Merge branch 'feature/chgres_cube_grib2_atmos' of https://github.com/…
LarissaReames-NOAA Oct 31, 2019
91fb62e
Merge pull request #2 from hafs-community/feature/chgres_cube_grib2_a…
LarissaReames-NOAA Oct 31, 2019
73d23e8
Merge branch 'feature/chgres_cube_grib2_atmos' of https://github.com/…
LarissaReames-NOAA Oct 31, 2019
70a44e7
Merge pull request #2 from LarissaReames-NOAA/feature/chgres_cube_gri…
GeorgeGayno-NOAA Nov 1, 2019
b1a1cf3
feature/chgres_cube_grib2_atmos:
GeorgeGayno-NOAA Nov 1, 2019
41a3543
Merge pull request #4 from GeorgeGayno-NOAA/feature/chgres_cube_grib2…
LarissaReames-NOAA Nov 4, 2019
0c778e5
Merge branch 'feature/chgres_cube_grib2_atmos' of https://github.com/…
LarissaReames-NOAA Nov 4, 2019
200e0b8
feature/chgres_cube_grib2_atmos:
GeorgeGayno-NOAA Nov 4, 2019
46adf8a
grib2 inventory file for gfs data is now saved in the run directory i…
LarissaReames-NOAA Nov 4, 2019
6ad2789
Jet support for chgres_cube_grib2_atmos
JiliDong-NOAA Nov 5, 2019
4d8c9fb
Removed a few tabs in favor of spaces in model_grid.F90.
LarissaReames-NOAA Nov 6, 2019
0213e8c
Merge pull request #6 from JiliDong-NOAA/feature/chgres_cube_grib2_atmos
LarissaReames-NOAA Nov 6, 2019
5fc88c6
feature/chgres_cube_grib2_atmos:
GeorgeGayno-NOAA Nov 6, 2019
aa550f4
Merge remote-tracking branch 'Larissa/feature/chgres_cube_grib2_atmos…
GeorgeGayno-NOAA Nov 6, 2019
0f46d32
fix sorting to handle isobaric levels with decimal (mb)
JiliDong-NOAA Nov 7, 2019
e386583
fix sorting to handle isobaric levels with decimal (mb) cleaning up
JiliDong-NOAA Nov 7, 2019
021e855
All atmospheric variables are now read in from grib2 day based on grib2
LarissaReames-NOAA Nov 7, 2019
f60eb34
Merge pull request #7 from JiliDong-NOAA/feature/chgres_cube_grib2_atmos
LarissaReames-NOAA Nov 7, 2019
d8c2f72
Merge branch 'feature/chgres_cube_grib2_atmos' of https://github.com/…
LarissaReames-NOAA Nov 7, 2019
84c34d4
Merge branch 'feature/chgres_cube_grib2_atmos' into feature/chgres_cu…
LarissaReames-NOAA Nov 7, 2019
14c2644
Merge pull request #5 from GeorgeGayno-NOAA/feature/chgres_cube_grib2…
LarissaReames-NOAA Nov 7, 2019
df374ba
Bug fix for an extraneous line of code left over in last merge.
LarissaReames-NOAA Nov 7, 2019
da078d9
Initial commit with surface code
LarissaReames-NOAA Nov 18, 2019
4112354
Fixed a bug with staggered grid creation which resulted in nonsense i…
LarissaReames-NOAA Nov 20, 2019
be4bd0a
Fixed an indexing bug causing veg_type_input_grid to be 0 everywhere,…
LarissaReames-NOAA Dec 9, 2019
71df253
Ice depth is now filled with a default value of 1.5m if the field is …
LarissaReames-NOAA Dec 16, 2019
47e7da7
Fix to prevent erroneous very large snow depth values stemming from m…
LarissaReames-NOAA Dec 16, 2019
e331712
Look for LANDN for the landmask first, and look for LAND if LANDN isn't
LarissaReames-NOAA Dec 19, 2019
729c6b2
Merge pull request #8 from LarissaReames-NOAA/chgres_cube_grib2_release
LarissaReames-NOAA Dec 19, 2019
5f3f697
Merge branch 'develop' of https://github.com/NOAA-EMC/UFS_UTILS into …
LarissaReames-NOAA Jan 9, 2020
0a08a45
Merge pull request #9 from LarissaReames-NOAA/chgres_cube_grib2_release
LarissaReames-NOAA Jan 9, 2020
f4d814e
Added logic to turn off soil moisture rescaling for grib2 data while …
LarissaReames-NOAA Jan 9, 2020
ba884ab
Merge pull request #3 from LarissaReames-NOAA/feature/chgres_cube_gri…
GeorgeGayno-NOAA Jan 13, 2020
8a74a49
feature/chgres_cube_grib2_release: This commit references #7.
GeorgeGayno-NOAA Jan 13, 2020
26e2aa4
feature/chgres_cube_grib2_release: This commit references #7.
GeorgeGayno-NOAA Jan 13, 2020
85dcf9b
feature/chgres_cube_grib2_release: This commit references #7.
GeorgeGayno-NOAA Jan 13, 2020
7185834
feature/chgres_cube_grib2_release: This commit references #7.
GeorgeGayno-NOAA Jan 13, 2020
8905b63
feature/chgres_cube_grib2_release: This commit references #7.
GeorgeGayno-NOAA Jan 13, 2020
df4b273
Port chgres_cube to linux.gnu and linux.intel
DusanJovic-NOAA Jan 14, 2020
fc32eb0
Merge pull request #4 from DusanJovic-NOAA/george_chgres_cube_grib2_r…
GeorgeGayno-NOAA Jan 14, 2020
ec372ba
feature/chgres_cube_grib2_release: This commit references #7.
GeorgeGayno-NOAA Jan 14, 2020
999da97
feature/chgres_cube_grib2_release: This commit references #7.
GeorgeGayno-NOAA Jan 14, 2020
0c1ef8b
feature/chgres_cube_grib2_release: This commit references #7.
GeorgeGayno-NOAA Jan 14, 2020
c926a87
feature/chgres_cube_grib2_release: This commit references #7.
GeorgeGayno-NOAA Jan 14, 2020
b9f9ce8
feature/chgres_cube_grib2_release: This commit references #7.
GeorgeGayno-NOAA Jan 14, 2020
12b051b
feature/chgres_cube_grib2_release: This commit references #7.
GeorgeGayno-NOAA Jan 15, 2020
b1f4bf1
feature/chgres_cube_grib2_release: This commit references #7.
GeorgeGayno-NOAA Jan 15, 2020
7f07342
feature/chgres_cube_grib2_release: This commit references #7.
GeorgeGayno-NOAA Jan 15, 2020
0ed5f0c
feature/chgres_cube_grib2_release: This commit references #7.
GeorgeGayno-NOAA Jan 15, 2020
a40c5fc
feature/chgres_cube_grib2_release: This commit references #7.
GeorgeGayno-NOAA Jan 16, 2020
3388d34
feature/chgres_cube_grib2_release This commit references #7.
GeorgeGayno-NOAA Jan 16, 2020
1c2bc99
feature/chgres_cube_grib2_release This commit references #7.
GeorgeGayno-NOAA Jan 17, 2020
cbe8df5
feature/chgres_cube_grib2_release: This commit references #7.
GeorgeGayno-NOAA Jan 17, 2020
7974e17
feature/chgres_cube_grib2_release: This commit references #7.
GeorgeGayno-NOAA Jan 23, 2020
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
3 changes: 3 additions & 0 deletions modulefiles/chgres_cube.hera
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ export NCEPLIBS=/scratch1/NCEPDEV/global/gwv/l819/lib
module use -a $NCEPLIBS/modulefiles
module load esmflocal/8_0_48b.netcdf47

export WGRIB2API_INC="/apps/wgrib2/2.0.8/intel/18.0.3.222/lib"
export WGRIB2_LIB="/apps/wgrib2/2.0.8/intel/18.0.3.222/lib/libwgrib2.a"

export FCOMP=mpiifort
export FFLAGS="-O3 -fp-model precise -g -traceback -r8 -i4 -qopenmp -convert big_endian -assume byterecl"
# for debugging
Expand Down
7 changes: 5 additions & 2 deletions modulefiles/chgres_cube.jet
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

module load intel/18.0.5.274
module load impi/2018.4.274
module load szip
module load hdf5
module load szip/2.1
module load hdf5/1.8.9
module load netcdf/4.2.1.1

module load w3nco/v2.0.6
Expand All @@ -22,3 +22,6 @@ export FCOMP=mpiifort
export FFLAGS="-O3 -fp-model precise -g -traceback -r8 -i4 -qopenmp -convert big_endian -assume byterecl"
#debug
#export FFLAGS="-O0 -g -traceback -r8 -i4 -qopenmp -convert big_endian -check bounds -warn unused -assume byterecl"

export WGRIB2API_INC="/mnt/lfs3/projects/hwrfv3/Jili.Dong/wgrib2-2.0.8/grib2/lib"
export WGRIB2_LIB="/mnt/lfs3/projects/hwrfv3/Jili.Dong/wgrib2-2.0.8/grib2/lib/libwgrib2.a"
24 changes: 24 additions & 0 deletions modulefiles/chgres_cube.linux.gnu
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#############################################################
## chgres_cube component - linux.gnu
#############################################################

export IP_INCd=${NCEPLIBS}/ip/include_d
export NEMSIO_INC=${NCEPLIBS}/nemsio/include
export SFCIO_INC4=${NCEPLIBS}/sfcio/include_4
export SIGIO_INC4=${NCEPLIBS}/sigio/include_4

export BACIO_LIB4=${NCEPLIBS}/bacio/lib/libbacio_v2.1.0_4.a
export IP_LIBd=${NCEPLIBS}/ip/lib/libip_v3.0.0_d.a
export NEMSIO_LIB=${NCEPLIBS}/nemsio/lib/libnemsio_v2.2.3.a
export SFCIO_LIB4=${NCEPLIBS}/sfcio/lib/libsfcio_v1.1.0_4.a
export SIGIO_LIB4=${NCEPLIBS}/sigio/lib/libsigio_v2.1.0_4.a
export SP_LIBd=${NCEPLIBS}/sp/lib/libsp_v2.0.2_d.a
export W3NCO_LIBd=${NCEPLIBS}/w3nco/lib/libw3nco_v2.0.6_d.a

export WGRIB2API_INC=${WGRIB2_DIR}/include
export WGRIB2_LIB=${WGRIB2_DIR}/lib/libwgrib2.a

export FCOMP=mpif90
export FFLAGS="-O3 -g -fbacktrace -fdefault-real-8 -ffree-line-length-none -fopenmp -fconvert=big-endian"
# for debugging
#export FFLAGS="-O0 -g -fbacktrace -fdefault-real-8 -ffree-line-length-none -fopenmp -fconvert=big-endian"
24 changes: 24 additions & 0 deletions modulefiles/chgres_cube.linux.intel
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#############################################################
## chgres_cube component - linux.intel
#############################################################

export IP_INCd=${NCEPLIBS}/ip/include_d
export NEMSIO_INC=${NCEPLIBS}/nemsio/include
export SFCIO_INC4=${NCEPLIBS}/sfcio/include_4
export SIGIO_INC4=${NCEPLIBS}/sigio/include_4

export BACIO_LIB4=${NCEPLIBS}/bacio/lib/libbacio_v2.1.0_4.a
export IP_LIBd=${NCEPLIBS}/ip/lib/libip_v3.0.0_d.a
export NEMSIO_LIB=${NCEPLIBS}/nemsio/lib/libnemsio_v2.2.3.a
export SFCIO_LIB4=${NCEPLIBS}/sfcio/lib/libsfcio_v1.1.0_4.a
export SIGIO_LIB4=${NCEPLIBS}/sigio/lib/libsigio_v2.1.0_4.a
export SP_LIBd=${NCEPLIBS}/sp/lib/libsp_v2.0.2_d.a
export W3NCO_LIBd=${NCEPLIBS}/w3nco/lib/libw3nco_v2.0.6_d.a

export WGRIB2API_INC=${WGRIB2_DIR}/include
export WGRIB2_LIB=${WGRIB2_DIR}/lib/libwgrib2.a

export FCOMP=mpif90
export FFLAGS="-O3 -fp-model source -g -traceback -r8 -i4 -qopenmp -convert big_endian -assume byterecl"
# for debugging
#export FFLAGS="-O0 -g -traceback -r8 -i4 -qopenmp -convert big_endian -check bounds -warn unused -assume byterecl"
27 changes: 27 additions & 0 deletions modulefiles/chgres_cube.odin
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#%Module#####################################################
## chgres build module for Odin
#############################################################

module use /oldscratch/ywang/external/modulefiles
module load esmf/8.0.0bs30

module load cray-netcdf-hdf5parallel
module load cray-parallel-netcdf
module load cray-hdf5-parallel
module load w3nco/v2.0.6
module load nemsio/v2.2.2
module load bacio/v2.0.2
module load sp/v2.0.2
module load sfcio/v1.0.0
module load sigio/v2.0.1


export FCOMP=ftn
export FFLAGS="-O3 -fp-model precise -g -traceback -r8 -i4 -qopenmp -convert big_endian -assume byterecl"
export WGRIB2API_LIB="/home/larissa.reames/tmp/wgrib2-2/grib2/lib/libwgrib2_api.a"
export WGRIB2API_INC="/home/larissa.reames/tmp/wgrib2-2/grib2/lib"
export WGRIB2_LIB="/home/larissa.reames/tmp/wgrib2-2/grib2/lib/libwgrib2.a"


# for debugging
#export FFLAGS="-O0 -g -traceback -r8 -i4 -qopenmp -convert big_endian -check bounds -warn unused -assume byterecl"
3 changes: 3 additions & 0 deletions modulefiles/chgres_cube.wcoss_cray
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ module load sfcio-intel/1.0.0
# module load esmf/7.1.0r
export ESMFMKFILE=/gpfs/hps3/emc/global/noscrub/George.Gayno/esmf/8_0_0_bs20/lib/esmf.mk

export WGRIB2API_INC=/gpfs/hps3/emc/meso/save/Dusan.Jovic/wgrib2/include
export WGRIB2_LIB=/gpfs/hps3/emc/meso/save/Dusan.Jovic/wgrib2/lib/libwgrib2.a

export FCOMP=ftn
export FFLAGS="-O3 -fp-model precise -g -r8 -i4 -qopenmp -convert big_endian -assume byterecl"
# for debugging
Expand Down
3 changes: 3 additions & 0 deletions modulefiles/chgres_cube.wcoss_dell_p3
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ module load bacio/2.0.2
module load sfcio/1.0.0
module load sigio/2.1.0

export WGRIB2API_INC=/u/Wesley.Ebisuzaki/home/grib2.v2.0.8.intel/lib
export WGRIB2_LIB=/u/Wesley.Ebisuzaki/home/grib2.v2.0.8.intel/lib/libwgrib2.a

export FCOMP=mpif90
export FFLAGS="-O3 -fp-model precise -g -traceback -r8 -i4 -qopenmp -convert big_endian -assume byterecl"
# for debugging
Expand Down
Empty file modified modulefiles/fv3gfs/fre-nctools.wcoss_cray
100755 → 100644
Empty file.
Empty file modified modulefiles/fv3gfs/fre-nctools.wcoss_dell_p3
100755 → 100644
Empty file.
Empty file modified modulefiles/modulefile.global_emcsfc_ice_blend.wcoss
100755 → 100644
Empty file.
Empty file modified modulefiles/modulefile.global_emcsfc_ice_blend.wcoss_cray
100755 → 100644
Empty file.
Empty file.
Empty file modified modulefiles/modulefile.global_emcsfc_ice_blend.wcoss_dell_p3
100755 → 100644
Empty file.
Empty file modified modulefiles/modulefile.global_emcsfc_snow2mdl.wcoss
100755 → 100644
Empty file.
Empty file modified modulefiles/modulefile.global_emcsfc_snow2mdl.wcoss_cray
100755 → 100644
Empty file.
Empty file.
Empty file modified modulefiles/modulefile.global_emcsfc_snow2mdl.wcoss_dell_p3
100755 → 100644
Empty file.
23 changes: 23 additions & 0 deletions parm/varmap_tables/GFSphys_var_map.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
dzdt dzdt set_to_fill 0 D
sphum sphum set_to_fill 1E-7 T
liq_wat liq_wat set_to_fill 0 T
o3mr o3mr set_to_fill 1E-7 T
ice_wat ice_wat set_to_fill 0 T
rainwat rainwat set_to_fill 0 T
snowwat snowwat set_to_fill 0 T
graupel graupel set_to_fill 0 T
vtype vtype skip 0 S
sotype stype skip 0 S
vfrac vfrac skip 0 S
fricv uustar set_to_fill 0 S
sfcr zorl set_to_fill 0.01 S
tprcp tprcp set_to_fill 0.00 S
ffmm ffmm set_to_fill 0.00 S
f10m f10m set_to_fill 0.00 S
soilw smc stop 0 S
soill slc set_to_fill 0.0 S
soilt stc stop 0 S
cnwat cnwat set_to_fill 0.0 S
hice icetk set_to_fill 1.5 S
weasd weasd set_to_fill 0.0 S
snod snod set_to_fill 0.0 S
24 changes: 24 additions & 0 deletions parm/varmap_tables/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#######################################################
# Description of varmap_tables #
#######################################################

These files, each named for the phys_suite variable set in the chgres_cube namelist,
control how chgres_cube, when processing grib2 files, handles variables that might
be missing from the grib2 files. Since there are so many different version of grib2
files, it's often uncertain what fields are available even if you know what source
model the data is coming from. Each file contains :

Line 1: number of entries in the table
Column 1: Name the code searches for in the table. Do not change.
Column 2: Name the code will use to save the variable in the output file. Unimplemented.
Comumn 3: Behavior when the code can't find the variable in the input file. Options are:
"skip": Don't write to output file.
"set_to_fill": Set to user-specified field value (see column 4).
"stop": Force an exception and stop code execution. Use this if you absolutely
require a field to be present.
Column 4: If column 3 = "set_to_fill", then this value is used to fill in all points
in the input field. These values may be over-written by the code before
output depending on the variable (esp. for surface variables). Be careful
with these values for surface variables. If you set this value too low
(e.g., -100000), the code may run extremely slowly due to variable replacment
at "missing" points.
9 changes: 8 additions & 1 deletion sorc/build_chgres_cube.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
#! /usr/bin/env bash
set -eux

source ./machine-setup.sh > /dev/null 2>&1
target=${target:-"NULL"}

if [[ $target == "linux.gnu" || $target == "linux.intel" ]]; then
unset -f module
else
source ./machine-setup.sh > /dev/null 2>&1
fi

cwd=`pwd`

USE_PREINST_LIBS=${USE_PREINST_LIBS:-"true"}
Expand Down
36 changes: 19 additions & 17 deletions sorc/chgres_cube.fd/atmosphere.F90
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ module atmosphere
terrain_target_grid

use program_setup, only : vcoord_file_target_grid, &
regional, &
regional, &
tracers, num_tracers, &
atm_weight_file

Expand Down Expand Up @@ -218,6 +218,7 @@ subroutine atmosphere_driver(localpet)
termorderflag=ESMF_TERMORDER_SRCSEQ, rc=rc)
if(ESMF_logFoundError(rcToCheck=rc,msg=ESMF_LOGERR_PASSTHRU,line=__LINE__,file=__FILE__)) &
call error_handler("IN FieldRegrid", rc)

enddo

print*,"- CALL Field_Regrid FOR VERTICAL VELOCITY."
Expand Down Expand Up @@ -386,7 +387,7 @@ subroutine atmosphere_driver(localpet)
!-----------------------------------------------------------------------------------

call convert_winds

!-----------------------------------------------------------------------------------
! Write target data to file.
!-----------------------------------------------------------------------------------
Expand Down Expand Up @@ -492,7 +493,7 @@ subroutine create_atm_esmf_fields
allocate(tracers_target_grid(num_tracers))

do n = 1, num_tracers
print*,"- CALL FieldCreate FOR TARGET GRID TRACERS ", trim(tracers(n))
print*,"- CALL FieldCreate FOR TARGET GRID TRACERS ", trim(tracers(n))
tracers_target_grid(n) = ESMF_FieldCreate(target_grid, &
typekind=ESMF_TYPEKIND_R8, &
staggerloc=ESMF_STAGGERLOC_CENTER, &
Expand Down Expand Up @@ -816,7 +817,7 @@ subroutine newpr1(localpet)
call error_handler("IN FieldGet", rc)

allocate(pi(clb(1):cub(1),clb(2):cub(2),1:levp1_target))

if(idvc.eq.2) then
do k=1,levp1_target
ak = vcoord_target(k,1)
Expand Down Expand Up @@ -938,7 +939,7 @@ subroutine newps(localpet)
farrayPtr=tptr, rc=rc)
if(ESMF_logFoundError(rcToCheck=rc,msg=ESMF_LOGERR_PASSTHRU,line=__LINE__,file=__FILE__)) &
call error_handler("IN FieldGet", rc)

! Find specific humidity in the array of tracer fields.

do ii = 1, num_tracers
Expand All @@ -950,7 +951,7 @@ subroutine newps(localpet)
farrayPtr=qptr, rc=rc)
if(ESMF_logFoundError(rcToCheck=rc,msg=ESMF_LOGERR_PASSTHRU,line=__LINE__,file=__FILE__)) &
call error_handler("IN FieldGet", rc)

print*,"- CALL FieldGet FOR SURFACE PRESSURE BEFORE ADJUSTMENT"
call ESMF_FieldGet(ps_b4adj_target_grid, &
farrayPtr=psptr, rc=rc)
Expand Down Expand Up @@ -1046,6 +1047,7 @@ subroutine newps(localpet)
! Compute surface pressure over the top.
!-----------------------------------------------------------------------------------


if(ls.gt.0) then
k=cub(3)
gamma=0
Expand Down Expand Up @@ -1106,9 +1108,9 @@ subroutine read_vcoord_info

print*
do k = 1, levp1_target
print*,'VCOORD FOR LEV ', k, 'IS: ', vcoord_target(k,:)
print*,'VCOORD FOR LEV ', k, 'IS: ', vcoord_target(k,:)
enddo

close(14)

end subroutine read_vcoord_info
Expand Down Expand Up @@ -1255,7 +1257,6 @@ SUBROUTINE VINTG

CALL TERP3(IM,1,1,1,1,4+NT,(IM*KM1),(IM*KM2), &
KM1,IM,IM,Z1,C1,KM2,IM,IM,Z2,C2)

! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
! COPY OUTPUT WIND, TEMPERATURE, HUMIDITY AND OTHER TRACERS
! EXCEPT BELOW THE INPUT DOMAIN, LET TEMPERATURE INCREASE WITH A FIXED
Expand Down Expand Up @@ -1410,7 +1411,7 @@ SUBROUTINE TERP3(IM,IXZ1,IXQ1,IXZ2,IXQ2,NM,NXQ1,NXQ2, &
! REAL(ESMF_KIND_R8) :: J2S

! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
! FIND THE SURROUNDING INPUT INTERVAL FOR EACH OUTPUT POINT.
! FIND THE SURROUNDING INPUT INTERVAL FOR EACH OUTPUT POINT.
CALL RSEARCH(IM,KM1,IXZ1,KXZ1,Z1,KM2,IXZ2,KXZ2,Z2,1,IM,K1S)

! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Expand All @@ -1422,7 +1423,6 @@ SUBROUTINE TERP3(IM,IXZ1,IXQ1,IXZ2,IXQ2,NM,NXQ1,NXQ2, &
!$OMP PARALLEL DO DEFAULT(PRIVATE) SHARED(IM,IXZ1,IXQ1,IXZ2), &
!$OMP& SHARED(IXQ2,NM,NXQ1,NXQ2,KM1,KXZ1,KXQ1,Z1,Q1,KM2,KXZ2), &
!$OMP& SHARED(KXQ2,Z2,Q2,K1S)

DO K2=1,KM2
DO I=1,IM
K1=K1S(I,K2)
Expand Down Expand Up @@ -1490,6 +1490,7 @@ SUBROUTINE TERP3(IM,IXZ1,IXQ1,IXZ2,IXQ2,NM,NXQ1,NXQ2, &
ONE/(Z1D-Z1C)
ENDIF
ENDDO

! INTERPOLATE.
DO N=1,NM
DO I=1,IM
Expand Down Expand Up @@ -1608,23 +1609,24 @@ SUBROUTINE RSEARCH(IM,KM1,IXZ1,KXZ1,Z1,KM2,IXZ2,KXZ2,Z2,IXL2,KXL2,L2)
REAL(ESMF_KIND_R8),INTENT(IN) :: Z1(1+(IM-1)*IXZ1+(KM1-1)*KXZ1)
REAL(ESMF_KIND_R8),INTENT(IN) :: Z2(1+(IM-1)*IXZ2+(KM2-1)*KXZ2)

INTEGER :: I,K2,L
INTEGER :: I,K2,L

REAL(ESMF_KIND_R8) :: Z


! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
! FIND THE SURROUNDING INPUT INTERVAL FOR EACH OUTPUT POINT.
DO I=1,IM
IF (Z1(1+(I-1)*IXZ1).LE.Z1(1+(I-1)*IXZ1+(KM1-1)*KXZ1)) THEN
! INPUT COORDINATE IS MONOTONICALLY ASCENDING.
DO K2=1,KM2
Z=Z2(1+(I-1)*IXZ2+(K2-1)*KXZ2)
DO K2=1,KM2
Z=Z2(1+(I-1)*IXZ2+(K2-1)*KXZ2)
L=0
DO
IF(Z.LT.Z1(1+(I-1)*IXZ1+L*KXZ1)) EXIT
L=L+1
IF(L.EQ.KM1) EXIT
ENDDO
ENDDO
L2(1+(I-1)*IXL2+(K2-1)*KXL2)=L
ENDDO
ELSE
Expand All @@ -1636,7 +1638,7 @@ SUBROUTINE RSEARCH(IM,KM1,IXZ1,KXZ1,Z1,KM2,IXZ2,KXZ2,Z2,IXL2,KXL2,L2)
IF(Z.GT.Z1(1+(I-1)*IXZ1+L*KXZ1)) EXIT
L=L+1
IF(L.EQ.KM1) EXIT
ENDDO
ENDDO
L2(1+(I-1)*IXL2+(K2-1)*KXL2)=L
ENDDO
ENDIF
Expand Down Expand Up @@ -1730,7 +1732,7 @@ subroutine compute_zh
deallocate(pe0, pn0)

end subroutine compute_zh

subroutine cleanup_target_atm_b4adj_data

implicit none
Expand Down
13 changes: 10 additions & 3 deletions sorc/chgres_cube.fd/chgres.F90
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ program chgres
use atmosphere, only : atmosphere_driver

use program_setup, only : read_setup_namelist, &
read_varmap, &
convert_atm, &
convert_sfc
convert_sfc

use model_grid, only : define_target_grid, &
define_input_grid, &
Expand Down Expand Up @@ -60,14 +61,20 @@ program chgres
!-------------------------------------------------------------------------

call read_setup_namelist

!-------------------------------------------------------------------------
! Read variable mapping file (used for grib2 input data only).
!-------------------------------------------------------------------------

call read_varmap

!-------------------------------------------------------------------------
! Create esmf grid objects for input and target grids.
!-------------------------------------------------------------------------

call define_input_grid(localpet, npets)

call define_target_grid(localpet, npets)

call define_input_grid(localpet, npets)

!-------------------------------------------------------------------------
! Convert atmospheric fields
Expand Down
Loading