└── cime_config
├── tables
├── data_table_hafs
├── data_table_mrweather
├── data_table_s2s
├── field_table_s2s
├── field_table_hafs
├── field_table_mrweather
├── diag_table_s2s
├── diag_table_mrweather
└── diag_table_hafs
├── cpl
└── atm_comp_nuopc.F90
├── config_archive.xml
├── user_nl_ufsatm
├── config_component.xml
├── config_compsets.xml
├── configure_cime.cmake
├── config_pes.xml
├── testlist.xml
├── buildlib
└── buildnml
/cime_config/tables/data_table_hafs:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/cime_config/tables/data_table_mrweather:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/cime_config/tables/data_table_s2s:
--------------------------------------------------------------------------------
1 | "OCN", "runoff", "runoff", "./INPUT/runoff.daitren.clim.1440x1080.v20180328.nc", "none" , 1.0
2 |
--------------------------------------------------------------------------------
/cime_config/cpl/atm_comp_nuopc.F90:
--------------------------------------------------------------------------------
1 | module atm_comp_nuopc
2 | use fv3gfs_cap_mod, only : SetServices
3 | public :: SetServices
4 | end module atm_comp_nuopc
5 |
--------------------------------------------------------------------------------
/cime_config/tables/field_table_s2s:
--------------------------------------------------------------------------------
1 | # added by FRE: sphum must be present in atmos
2 | # specific humidity for moist runs
3 | "TRACER", "atmos_mod", "sphum"
4 | "longname", "specific humidity"
5 | "units", "kg/kg"
6 | "profile_type", "fixed", "surface_value=3.e-6" /
7 | # prognostic cloud water mixing ratio
8 | "TRACER", "atmos_mod", "liq_wat"
9 | "longname", "cloud water mixing ratio"
10 | "units", "kg/kg"
11 | "profile_type", "fixed", "surface_value=1.e30" /
12 | # prognostic ozone mixing ratio tracer
13 | "TRACER", "atmos_mod", "o3mr"
14 | "longname", "ozone mixing ratio"
15 | "units", "kg/kg"
16 | "profile_type", "fixed", "surface_value=1.e30" /
17 |
--------------------------------------------------------------------------------
/cime_config/config_archive.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | atm.f\d+.nc$
5 | sfc.f\d+.nc$
6 |
7 | nhfil
8 |
9 | casename.ufsatm.atm.f024.nc
10 | casename.ufsatm.sfc.f000.nc
11 | casename.ufsatm.atm.f999.nc
12 | othercase.ufsatm.sfc.f024.nc
13 | casename.ufsatm.sfc.f024.nc.base
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/cime_config/user_nl_ufsatm:
--------------------------------------------------------------------------------
1 | !----------------------------------------------------------------------------------
2 | ! This file can be used to change namelist options for:
3 | ! - Chgres
4 | ! - UFS MR-Weather Model
5 | ! - NCEP Post
6 | !
7 | ! Users should add all user-specific namelist changes below in the form of
8 | ! namelist_var = new_namelist_value
9 | !
10 | ! To change the namelist variables that are defined as multiple times under
11 | ! different namelist groups
12 | ! namelist_var@namelist_group = new_namelist_value
13 | !
14 | ! Following is the list of namelist variables that need to be accessed by
15 | ! specifying the namelist groups:
16 | !
17 | ! alpha@nam_physics_nml
18 | ! alpha@test_case_nml
19 | ! avg_max_length@atmos_model_nml
20 | ! avg_max_length@gfs_physics_nml
21 | ! debug@atmos_model_nml
22 | ! debug@gfs_physics_nml
23 | ! icliq_sw@gfs_physics_nml
24 | ! icliq_sw@nam_physics_nml
25 | ! iospec_ieee32@fms_nml
26 | ! iospec_ieee32@fms_io_nml
27 | ! ntiles@fv_core_nml
28 | ! ntiles@nest_nml
29 | ! read_all_pe@fms_io_nml
30 | ! read_all_pe@fms_nml
31 | ! regional@chgres
32 | ! regional@fv_core_nml
33 | !----------------------------------------------------------------------------------
34 |
35 |
--------------------------------------------------------------------------------
/cime_config/tables/field_table_hafs:
--------------------------------------------------------------------------------
1 | # added by FRE: sphum must be present in atmos
2 | # specific humidity for moist runs
3 | "TRACER", "atmos_mod", "sphum"
4 | "longname", "specific humidity"
5 | "units", "kg/kg"
6 | "profile_type", "fixed", "surface_value=1.e30" /
7 | # prognostic cloud water mixing ratio
8 | "TRACER", "atmos_mod", "liq_wat"
9 | "longname", "cloud water mixing ratio"
10 | "units", "kg/kg"
11 | "profile_type", "fixed", "surface_value=1.e30" /
12 | "TRACER", "atmos_mod", "rainwat"
13 | "longname", "rain mixing ratio"
14 | "units", "kg/kg"
15 | "profile_type", "fixed", "surface_value=1.e30" /
16 | "TRACER", "atmos_mod", "ice_wat"
17 | "longname", "cloud ice mixing ratio"
18 | "units", "kg/kg"
19 | "profile_type", "fixed", "surface_value=1.e30" /
20 | "TRACER", "atmos_mod", "snowwat"
21 | "longname", "snow mixing ratio"
22 | "units", "kg/kg"
23 | "profile_type", "fixed", "surface_value=1.e30" /
24 | "TRACER", "atmos_mod", "graupel"
25 | "longname", "graupel mixing ratio"
26 | "units", "kg/kg"
27 | "profile_type", "fixed", "surface_value=1.e30" /
28 | # prognostic ozone mixing ratio tracer
29 | "TRACER", "atmos_mod", "o3mr"
30 | "longname", "ozone mixing ratio"
31 | "units", "kg/kg"
32 | "profile_type", "fixed", "surface_value=1.e30" /
33 | # non-prognostic cloud amount
34 | "TRACER", "atmos_mod", "cld_amt"
35 | "longname", "cloud amount"
36 | "units", "1"
37 | "profile_type", "fixed", "surface_value=1.e30" /
38 |
--------------------------------------------------------------------------------
/cime_config/tables/field_table_mrweather:
--------------------------------------------------------------------------------
1 | # added by FRE: sphum must be present in atmos
2 | # specific humidity for moist runs
3 | "TRACER", "atmos_mod", "sphum"
4 | "longname", "specific humidity"
5 | "units", "kg/kg"
6 | "profile_type", "fixed", "surface_value=1.e30" /
7 | # prognostic cloud water mixing ratio
8 | "TRACER", "atmos_mod", "liq_wat"
9 | "longname", "cloud water mixing ratio"
10 | "units", "kg/kg"
11 | "profile_type", "fixed", "surface_value=1.e30" /
12 | "TRACER", "atmos_mod", "rainwat"
13 | "longname", "rain mixing ratio"
14 | "units", "kg/kg"
15 | "profile_type", "fixed", "surface_value=1.e30" /
16 | "TRACER", "atmos_mod", "ice_wat"
17 | "longname", "cloud ice mixing ratio"
18 | "units", "kg/kg"
19 | "profile_type", "fixed", "surface_value=1.e30" /
20 | "TRACER", "atmos_mod", "snowwat"
21 | "longname", "snow mixing ratio"
22 | "units", "kg/kg"
23 | "profile_type", "fixed", "surface_value=1.e30" /
24 | "TRACER", "atmos_mod", "graupel"
25 | "longname", "graupel mixing ratio"
26 | "units", "kg/kg"
27 | "profile_type", "fixed", "surface_value=1.e30" /
28 | # prognostic ozone mixing ratio tracer
29 | "TRACER", "atmos_mod", "o3mr"
30 | "longname", "ozone mixing ratio"
31 | "units", "kg/kg"
32 | "profile_type", "fixed", "surface_value=1.e30" /
33 | # non-prognostic cloud amount
34 | "TRACER", "atmos_mod", "cld_amt"
35 | "longname", "cloud amount"
36 | "units", "1"
37 | "profile_type", "fixed", "surface_value=1.e30" /
38 |
--------------------------------------------------------------------------------
/cime_config/config_component.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | UFSATM Atmosphere with:
9 | CCPP physics version 15p2
10 | CCPP physics version 16beta
11 | CCPP physics version for hafs
12 | CCPP physics version for S2S
13 |
14 |
15 |
16 | char
17 | ufsatm
18 | ufsatm
19 | case_comp
20 | env_case.xml
21 | ufsatm Atmosphere component
22 |
23 |
24 |
25 | logical
26 | TRUE
27 | case_comp
28 | env_build.xml
29 | Option for ufsatm CCPP feature
30 |
31 |
32 |
33 | char
34 | FV3_GFS_2017_coupled,FV3_GFS_v15p2,FV3_GFS_v16beta,HAFS_v0_gfdlmp_nocpugwd,HAFS_v0_gfdlmp_nocp,HAFS_v0_gfdlmp
35 | FV3_GFS_v15p2
36 |
37 | FV3_GFS_2017_coupled
38 | FV3_GFS_v15p2
39 | FV3_GFS_v16beta
40 | HAFS_v0_gfdlmp_nocp
41 |
42 | case_comp
43 | env_build.xml
44 | Suite option for CCPP physics package
45 |
46 |
47 |
48 | logical
49 | FALSE
50 |
51 | FALSE
52 | FALSE
53 | TRUE
54 |
55 | case_comp
56 | env_build.xml
57 | Option for building ufsatm dycore in 32 bit mode
58 |
59 |
60 |
61 | =========================================
62 | Say something
63 | =========================================
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/cime_config/config_compsets.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | =========================================
7 | compset naming convention
8 | =========================================
9 | The compset longname below has the specified order
10 | atm, lnd, ice, ocn, river, glc wave cesm-options
11 |
12 | The notation for the compset longname is
13 | TIME_ATM[%phys]_LND[%phys]_ICE[%phys]_OCN[%phys]_ROF[%phys]_GLC[%phys]_WAV[%phys][_BGC%phys]
14 | Where for the CAM specific compsets below the following is supported
15 | TIME = Time period (e.g. 2000, HIST, RCP8...)
16 | ATM = [CAM4, CAM5]
17 | LND = [CLM40, CLM45, CLM50, SLND]
18 | ICE = [CICE, DICE, SICE]
19 | OCN = [DOCN, ,AQUAP, SOCN]
20 | ROF = [RTM, SROF]
21 | GLC = [CISM1, CISM2, SGLC]
22 | WAV = [SWAV]
23 | BGC = optional BGC scenario
24 |
25 | The OPTIONAL %phys attributes specify submodes of the given system
26 | For example DOCN%DOM is the data ocean model for DOCN
27 | ALL the possible %phys choices for each component are listed
28 | with the -list command for create_newcase
29 | ALL data models must have a %phys option that corresponds to the data model mode
30 |
31 | Each compset node is associated with the following elements
32 | - lname
33 | - alias
34 | - support (optional description of the support level for this compset)
35 | Each compset node can also have the following attributes
36 | - grid (optional regular expression match for grid to work with the compset)
37 |
38 |
39 |
40 |
41 | GFSv15p2
42 | FCST_ufsatm%v15p2_SLND_SICE_SOCN_SROF_SGLC_SWAV
43 |
44 |
45 | GFSv16beta
46 | FCST_ufsatm%v16beta_SLND_SICE_SOCN_SROF_SGLC_SWAV
47 |
48 |
49 | HAFS
50 | FCST_ufsatm%v0nocp_SLND_SICE_SOCN_SROF_SGLC_SWAV
51 |
52 |
53 |
54 |
55 |
56 |
57 | 2019-08-29
58 | 2019-09-01
59 |
60 |
61 |
62 |
63 |
64 | 0
65 | 64800
66 |
67 |
68 |
69 |
70 |
71 | 0
72 |
73 |
74 |
75 |
76 |
77 | CPL,ATM
78 | CPL,ATM,OCN,ICE
79 | CPL,ATM,OCN,ICE
80 |
81 |
82 |
83 |
84 | FALSE
85 |
86 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/cime_config/configure_cime.cmake:
--------------------------------------------------------------------------------
1 | message("")
2 | message("Setting configuration for $ENV{CMAKE_Platform}")
3 | message("")
4 | include( $ENV{CASEROOT}/Macros.cmake )
5 |
6 | get_filename_component (C_COMPILER_NAME ${MPICC} NAME)
7 | get_filename_component (CXX_COMPILER_NAME ${MPICXX} NAME)
8 | get_filename_component (Fortran_COMPILER_NAME ${MPIFC} NAME)
9 | message("C compiler: ${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION} (${C_COMPILER_NAME})")
10 | message("CXX compiler: ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION} (${CXX_COMPILER_NAME})")
11 | message("Fortran compiler: ${CMAKE_Fortran_COMPILER_ID} ${CMAKE_Fortran_COMPILER_VERSION} (${Fortran_COMPILER_NAME})")
12 | message("")
13 |
14 | option(DEBUG "Enable DEBUG mode" OFF)
15 | option(REPRO "Enable REPRO mode" OFF)
16 | option(VERBOSE "Enable VERBOSE mode" OFF)
17 | option(32BIT "Enable 32BIT (single precision arithmetic in dycore)" OFF)
18 | option(OPENMP "Enable OpenMP threading" ON)
19 | option(AVX2 "Enable AVX2 instruction set" OFF)
20 |
21 | option(INLINE_POST "Enable inline post" OFF)
22 |
23 | message("1: CMAKE_Fortran_FLAGS ${CMAKE_Fortran_FLAGS}")
24 | set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${FFLAGS}")
25 | message("2: CMAKE_Fortran_FLAGS ${CMAKE_Fortran_FLAGS}")
26 |
27 | if(32BIT)
28 | set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${FC_32BIT}")
29 | add_definitions(-DOVERLOAD_R4)
30 | add_definitions(-DOVERLOAD_R8)
31 | else()
32 | set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${FC_64BIT}")
33 | if(REPRO)
34 | message("here NOT ${REPRO}")
35 | else()
36 | set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${FC_FAST}")
37 | endif()
38 | endif()
39 | message("3: CMAKE_Fortran_FLAGS ${CMAKE_Fortran_FLAGS}")
40 |
41 | if(REPRO)
42 | add_definitions(-DREPRO)
43 | set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${FC_REPRO}")
44 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CC_REPRO}")
45 | endif()
46 |
47 | message("4: CMAKE_Fortran_FLAGS ${CMAKE_Fortran_FLAGS}")
48 |
49 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__IFC ${CFLAGS}")
50 | set (CMAKE_EXE_LINKER_FLAGS "${LDFLAGS} ${SLIBS}")
51 | # print build options
52 | message("5: CMAKE_C_FLAGS ${CMAKE_C_FLAGS}")
53 |
54 | if(DEBUG)
55 | message("DEBUG is ENABLED")
56 | else()
57 | message("DEBUG is disabled")
58 | endif()
59 |
60 | if(REPRO)
61 | message("REPRO is ENABLED")
62 | else()
63 | message("REPRO is disabled")
64 | endif()
65 |
66 | if(32BIT)
67 | message("32BIT is ENABLED")
68 | else()
69 | message("32BIT is disabled")
70 | endif()
71 |
72 | if(OPENMP)
73 | message("OPENMP is ENABLED")
74 | else()
75 | message("OPENMP is disabled")
76 | endif()
77 |
78 | if(INLINE_POST)
79 | message("INLINE_POST is ENABLED")
80 | else()
81 | message("INLINE_POST is disabled")
82 | endif()
83 |
84 |
85 | set(NEMSIO_INC $ENV{NEMSIO_INC})
86 | set(POST_INC $ENV{POST_INC})
87 | set(NCEP_LIBS $ENV{POST_LIB} $ENV{NEMSIO_LIB} $ENV{G2_LIB4} $ENV{G2TMPL_LIB} $ENV{BACIO_LIB4} $ENV{SP_LIBd} $ENV{W3EMC_LIBd} $ENV{W3NCO_LIBd} $ENV{CRTM_LIB} $ENV{PNG_LIB} $ENV{JASPER_LIB} $ENV{Z_LIB})
88 |
89 | set(ESMF_MOD ${ESMF_F90COMPILEPATHS})
90 | set(ESMF_LIBS "${ESMF_F90ESMFLINKRPATHS} ${ESMF_F90ESMFLINKPATHS} ${ESMF_F90ESMFLINKLIBS}")
91 |
92 | set(NETCDF_INC_DIR $ENV{NETCDF}/include)
93 | set(NETCDF_LIBDIR $ENV{NETCDF}/lib)
94 | set(NETCDF_LIBS -L$ENV{NETCDF}/lib -lnetcdff -lnetcdf)
95 |
96 | message("")
97 |
--------------------------------------------------------------------------------
/cime_config/config_pes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | none
8 |
9 | 108
10 | 1
11 | 108
12 | 108
13 | 108
14 | 1
15 | 1
16 | 1
17 |
18 |
19 | 1
20 | 1
21 | 1
22 | 1
23 | 1
24 | 1
25 | 1
26 | 1
27 |
28 |
29 | 0
30 | 0
31 | 0
32 | 0
33 | 0
34 | 0
35 | 0
36 | 0
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | none
46 |
47 | 150
48 | 1
49 | 360
50 | 360
51 | 150
52 | 1
53 | 1
54 | 1
55 |
56 |
57 | 1
58 | 1
59 | 1
60 | 1
61 | 1
62 | 1
63 | 1
64 | 1
65 |
66 |
67 | 0
68 | 0
69 | 0
70 | 360
71 | 0
72 | 0
73 | 0
74 | 0
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 | none
84 |
85 | 336
86 | 1
87 | 360
88 | 360
89 | 336
90 | 1
91 | 1
92 | 1
93 |
94 |
95 | 1
96 | 1
97 | 1
98 | 1
99 | 1
100 | 1
101 | 1
102 | 1
103 |
104 |
105 | 0
106 | 0
107 | 696
108 | 336
109 | 0
110 | 0
111 | 0
112 | 0
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 | none
122 |
123 | 108
124 | 108
125 | 108
126 |
127 |
128 | 1
129 | 1
130 | 1
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 | none
140 |
141 | 8
142 |
143 |
144 | 1
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 | none
154 |
155 | 8
156 |
157 |
158 | 1
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 | none
168 |
169 | 108
170 |
171 |
172 | 1
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 | none
182 |
183 | 180
184 |
185 |
186 | 1
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 | none
196 |
197 | 252
198 |
199 |
200 | 1
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 | none
210 |
211 | 684
212 |
213 |
214 | 4
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 | none
224 |
225 | 1320
226 |
227 |
228 | 2
229 |
230 |
231 |
232 |
233 |
234 |
--------------------------------------------------------------------------------
/cime_config/testlist.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
--------------------------------------------------------------------------------
/cime_config/buildlib:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | """
4 | build ufsatm library
5 | """
6 | import sys, os
7 |
8 | _CIMEROOT = os.environ.get("CIMEROOT")
9 | if _CIMEROOT is None:
10 | raise SystemExit("ERROR: must set CIMEROOT environment variable")
11 |
12 | _LIBDIR = os.path.join(_CIMEROOT, "scripts", "Tools")
13 | sys.path.append(_LIBDIR)
14 |
15 | from standard_script_setup import *
16 | from CIME.buildlib import parse_input
17 | from CIME.case import Case
18 | from CIME.utils import run_cmd, expect, safe_copy, symlink_force
19 | from CIME.build import get_standard_makefile_args
20 | from CIME.XML.compilers import Compilers
21 | from CIME.XML.machines import Machines
22 | import six
23 |
24 | logger = logging.getLogger(__name__)
25 |
26 | def _build_ccpp_cmake_files(ccpp_blddir, ccpp_srcmods):
27 | """
28 | Set env variables CCPP_SCHEMES and CCPP_CAPS to the full path list of files to be compiled.
29 | Check the case SourceMods/src.ufsatm for files and update the env variables if required.
30 | """
31 | needs_update = False
32 | for ccppfile in ("SCHEMES","CAPS"):
33 | ccpp_srcfiles = []
34 | current_settings_fname = os.path.join(ccpp_blddir,"cime_cmake_{}.txt".format(ccppfile))
35 | current_settings = None
36 | if os.path.isfile(current_settings_fname):
37 | with open(current_settings_fname,"r") as fcs:
38 | current_settings = fcs.read()
39 |
40 | with open(os.path.join(ccpp_blddir,"physics","CCPP_{}.cmake").format(ccppfile)) as fd:
41 | env_var = "CCPP_{}".format(ccppfile)
42 | for line in fd:
43 | line = line.strip()
44 | if os.path.isfile(line):
45 | tfile = os.path.basename(line)
46 | if os.path.isfile(os.path.join(ccpp_srcmods,tfile)):
47 | line = os.path.join(ccpp_srcmods,tfile)
48 | ccpp_srcfiles.append(line)
49 | os.environ[env_var] = ";".join(ccpp_srcfiles)
50 | if not current_settings or current_settings != os.environ[env_var]:
51 | needs_update = True
52 | with open(current_settings_fname,"w") as fw:
53 | fw.write(os.environ[env_var])
54 |
55 | return needs_update
56 |
57 | def _create_dir_structure(srcdir,targetdir, sourcemods=None):
58 | """
59 | Reproduce the directory structure of srcdir in targetdir with
60 | links to the files of srcdir. If a sourcemods dir is provided and
61 | a file in the source tree matchs a file in the sourcemods directory
62 | link the sourcemods file instead
63 | """
64 | structure_updated = False
65 | for dirpath, _, filenames in os.walk(srcdir):
66 | structure = targetdir + dirpath[len(srcdir):]
67 | if not os.path.isdir(structure):
68 | os.mkdir(structure)
69 | for fname in filenames:
70 | # ignore some files
71 | if fname.startswith('.') or fname.startswith('#') or fname.startswith('~'):
72 | continue
73 | newfullpath = os.path.join(structure,fname)
74 | if sourcemods and os.path.isfile(os.path.join(sourcemods,fname)):
75 | # If file exists in case sourcemods use it
76 | linkto = os.path.join(sourcemods,fname)
77 | else:
78 | # otherwise link original file
79 | linkto = os.path.join(dirpath,fname)
80 |
81 | # Broken link or link to wrong path - remove it
82 | if (os.path.lexists(newfullpath) and not os.path.exists(newfullpath)) or \
83 | (os.path.exists(newfullpath) and not os.path.samefile(linkto,newfullpath)):
84 | os.unlink(newfullpath)
85 | # Create new link
86 | if not os.path.exists(newfullpath):
87 | os.symlink(linkto, newfullpath)
88 | structure_updated = True
89 | return structure_updated
90 |
91 | def get_compiler_names(case):
92 | machobj = Machines(machine=case.get_value("MACH"))
93 | compobj = Compilers(machobj)
94 | ccomp = compobj.get_value("MPICC")
95 | cxxcomp = compobj.get_value("MPICXX")
96 | fcomp = compobj.get_value("MPIFC")
97 |
98 | return ccomp, cxxcomp, fcomp
99 |
100 | ###############################################################################
101 | #pylint: disable=unused-argument
102 | def buildlib(caseroot, libroot, bldroot):
103 | ###############################################################################
104 |
105 | with Case(caseroot) as case:
106 | # retrieve variables
107 | srcroot = case.get_value("SRCROOT")
108 | compset = case.get_value("COMPSET")
109 | comp_root_dir_atm = case.get_value("COMP_ROOT_DIR_ATM")
110 | srcdir = os.path.join(srcroot,"src","model")
111 | os.environ["CASEROOT"] = caseroot
112 |
113 | structure_updated = _create_dir_structure(srcdir,bldroot,
114 | sourcemods=os.path.join(caseroot,"SourceMods","src.ufsatm"))
115 |
116 | #Now build ccpp if needed
117 | ccpp = case.get_value("BUILD_CCPP")
118 | mode32bit = case.get_value("BUILD_32BIT")
119 | gmake = case.get_value("GMAKE")
120 | gmake_j = case.get_value("GMAKE_J")
121 | debug = case.get_value("DEBUG")
122 | cmake_flags = " -DCOMPILER={} ".format(case.get_value("COMPILER"))
123 | cmake_flags += " -DMPILIB={} ".format(case.get_value("MPILIB"))
124 | if debug:
125 | cmake_flags += " -DDEBUG=TRUE "
126 | cmake_flags += " -DCMAKE_BUILD_TYPE=Debug "
127 | else:
128 | cmake_flags += " -DDEBUG=FALSE "
129 |
130 | if not debug and case.get_value("TEST"):
131 | if "PFS" not in case.get_value("TESTCASE"):
132 | cmake_flags += " -DREPRO=ON "
133 | cmake_flags += " -DCMAKE_BUILD_TYPE=Bitforbit "
134 | comp_classes = case.get_values("COMP_CLASSES")
135 | if ccpp:
136 | ccpp_srcroot = os.path.join(comp_root_dir_atm,"ccpp")
137 | ccpp_srcmods = os.path.join(caseroot,"SourceMods","src.ufsatm")
138 | ccpp_suites = case.get_value("CCPP_SUITES")
139 | # fix for UFS MR-Weather App
140 | components = compset.split("_")[1:]
141 | components = [ x for x in components if "S" not in x[0] ]
142 | if os.path.isfile(os.path.join(ccpp_srcroot,"suites","suite_{}_no_nsst.xml".format(ccpp_suites))) and len(components) < 2:
143 | ccpp_suites += ","+ccpp_suites+"_no_nsst"
144 | ccpp_blddir=os.path.join(bldroot,"FV3","ccpp")
145 | if not os.path.exists(os.path.join(ccpp_blddir,"cime_cmake_CAPS.txt")):
146 | ccpp_preconfig = os.path.join(ccpp_srcroot,"framework","scripts","ccpp_prebuild.py")
147 | ccpp_config = os.path.join(ccpp_srcroot,"config","ccpp_prebuild_config.py")
148 | ccpp_options = "--config {} --suites={} --builddir {}".format(ccpp_config, ccpp_suites, os.path.join(bldroot,"FV3"))
149 | print("HERE comp_classes {}".format(comp_classes))
150 | # TODO: do not compile HAFS app with --static, it is not supported yet
151 | # this needs to be removed once UFSATM under HAFS is updated
152 | if len(comp_classes) < 3 and "HAFS" not in ccpp_suites:
153 | ccpp_options += " --static"
154 | stat, _, err = run_cmd("{} {}".format(ccpp_preconfig, ccpp_options),
155 | verbose=True,
156 | from_dir=srcdir)
157 | expect(stat==0,"ccpp_preconfig error from fv3 {}".format(err))
158 | _build_ccpp_cmake_files(ccpp_blddir,ccpp_srcmods)
159 |
160 |
161 | cmake_flags += " -DCCPP=ON -DSUITES={} ".format(ccpp_suites)
162 |
163 | cmake_flags += " -DMPI=ON "
164 | cmake_flags += " -DSTATIC=ON "
165 | if mode32bit:
166 | cmake_flags += " -D32BIT=ON "
167 |
168 | if case.get_value("BUILD_THREADED") or case.get_value("FORCE_BUILD_SMP") or case.get_value("SMP_PRESENT"):
169 | cmake_flags += " -DOPENMP=ON -Dcompile_threaded=TRUE "
170 | else:
171 | cmake_flags += " -DOPENMP=OFF "
172 |
173 | mklroot = os.environ.get("MKLROOT")
174 | if mklroot:
175 | cmake_flags += " -DMKL_DIR={}".format(mklroot)
176 | for name in ("NETCDF", "NETCDF_DIR", "NETCDF_PATH", "TACC_NETCDF_DIR", "NETCDFROOT"):
177 | netcdf = os.environ.get(name)
178 | if netcdf:
179 | cmake_flags += " -DNETCDF_DIR={} ".format(netcdf)
180 | break
181 | if not netcdf:
182 | # one last try
183 | from distutils.spawn import find_executable
184 | netcdf = find_executable("ncdump")
185 | if netcdf:
186 | if six.PY3:
187 | netcdf = os.path.dirname(netcdf).parent
188 | else:
189 | netcdf = os.path.abspath(os.path.join(netcdf, os.pardir))
190 | cmake_flags += " -DNETCDF_DIR={} ".format(netcdf)
191 | # This is the variable expected in configure_cime.cmake
192 | os.environ["NETCDF"] = netcdf
193 | ccomp, cxxcomp, fcomp = get_compiler_names(case)
194 | os.environ["CMAKE_C_COMPILER"]=ccomp.strip()
195 | os.environ["CMAKE_CXX_COMPILER"]=cxxcomp.strip()
196 | os.environ["CMAKE_Fortran_COMPILER"]=fcomp.strip()
197 | if structure_updated or not os.path.exists(os.path.join(bldroot,"CMakeFiles")):
198 | cmake_flags += " -C {}".format(os.path.join(bldroot,"cmake","configure_cime.cmake"))
199 | print "HERE {} {} {}".format( os.environ["CMAKE_C_COMPILER"], os.environ["CMAKE_CXX_COMPILER"], os.environ["CMAKE_Fortran_COMPILER"])
200 | os.environ["CMAKE_Platform"]="cime"
201 | safe_copy(os.path.join(comp_root_dir_atm,"cime","cime_config","configure_cime.cmake"),
202 | os.path.join(bldroot,"cmake"))
203 |
204 | logger.info("Calling cmake {} {}".format(cmake_flags, bldroot))
205 | stat, _, err = run_cmd("cmake {} {} ".format(cmake_flags,bldroot),from_dir=bldroot,verbose=True)
206 | expect(stat==0,"CMAKE error from fv3 {}".format(err))
207 | gmake_args = "-j {} ".format(gmake_j)+get_standard_makefile_args(case)
208 | gmake_args += " VERBOSE=1 "
209 | stat, _, err = run_cmd("{} {}".format(gmake,gmake_args),from_dir=bldroot,verbose=True)
210 | expect(stat==0,"Build error from fv3 {}".format(err))
211 |
212 | if os.path.exists(os.path.join(bldroot,"FMS","libfms.a")):
213 | safe_copy(os.path.join(bldroot,"FMS","libfms.a"), libroot)
214 |
215 | # This step is needed for CIME build
216 | if "CPL" in comp_classes:
217 | nuopc_cap_src = os.path.join(bldroot,"FV3","cime","cime_config","cpl")
218 | filepath_file = os.path.join(nuopc_cap_src,"Filepath")
219 |
220 | if not os.path.exists(filepath_file):
221 | with open(filepath_file, "w") as fp:
222 | fp.write(os.path.join(caseroot,"SourceMods","src.ufsatm"))
223 | fp.write(os.path.join(nuopc_cap_src))
224 | complib = os.path.join(libroot,"libatm.a")
225 | makefile = os.path.join(case.get_value("CASETOOLS"),"Makefile")
226 |
227 | cmd = "{} complib -j {} MODEL=ufsatm COMPLIB={} -f {} {} USER_INCLDIR=-I{} " \
228 | .format(gmake, gmake_j, complib, makefile, get_standard_makefile_args(case), os.path.join(bldroot,"FV3","mod"))
229 |
230 | rc, out, err = run_cmd(cmd, from_dir=nuopc_cap_src )
231 | expect(rc == 0, "Command %s failed rc=%d\nout=%s\nerr=%s" % (cmd, rc, out, err))
232 | safe_copy(os.path.join(nuopc_cap_src,"atm_comp_nuopc.mod"),os.path.join(libroot,"include"))
233 |
234 | def _main_func():
235 | caseroot, libroot, bldroot = parse_input(sys.argv)
236 | buildlib(caseroot, libroot, bldroot)
237 |
238 | ###############################################################################
239 |
240 | if __name__ == "__main__":
241 | _main_func()
242 |
--------------------------------------------------------------------------------
/cime_config/tables/diag_table_s2s:
--------------------------------------------------------------------------------
1 | 20161003.00Z.C96.64bit.non-mono
2 | 2016 10 03 00 0 0
3 |
4 | "grid_spec", -1, "months", 1, "days", "time"
5 | "atmos_4xdaily", 6, "hours", 1, "days", "time"
6 | "atmos_static", -1, "hours", 1, "hours", "time"
7 | "fv3_history", 0, "hours", 1, "hours", "time"
8 | "fv3_history2d", 0, "hours", 1, "hours", "time"
9 |
10 | #
11 | #=======================
12 | # ATMOSPHERE DIAGNOSTICS
13 | #=======================
14 | ###
15 | # grid_spec
16 | ###
17 | "dynamics", "grid_lon", "grid_lon", "grid_spec", "all", .false., "none", 2,
18 | "dynamics", "grid_lat", "grid_lat", "grid_spec", "all", .false., "none", 2,
19 | "dynamics", "grid_lont", "grid_lont", "grid_spec", "all", .false., "none", 2,
20 | "dynamics", "grid_latt", "grid_latt", "grid_spec", "all", .false., "none", 2,
21 | "dynamics", "area", "area", "grid_spec", "all", .false., "none", 2,
22 | ###
23 | # 4x daily output
24 | ###
25 | "dynamics", "slp", "slp", "atmos_4xdaily", "all", .false., "none", 2
26 | "dynamics", "vort850", "vort850", "atmos_4xdaily", "all", .false., "none", 2
27 | "dynamics", "vort200", "vort200", "atmos_4xdaily", "all", .false., "none", 2
28 | "dynamics", "us", "us", "atmos_4xdaily", "all", .false., "none", 2
29 | "dynamics", "u1000", "u1000", "atmos_4xdaily", "all", .false., "none", 2
30 | "dynamics", "u850", "u850", "atmos_4xdaily", "all", .false., "none", 2
31 | "dynamics", "u700", "u700", "atmos_4xdaily", "all", .false., "none", 2
32 | "dynamics", "u500", "u500", "atmos_4xdaily", "all", .false., "none", 2
33 | "dynamics", "u200", "u200", "atmos_4xdaily", "all", .false., "none", 2
34 | "dynamics", "u100", "u100", "atmos_4xdaily", "all", .false., "none", 2
35 | "dynamics", "u50", "u50", "atmos_4xdaily", "all", .false., "none", 2
36 | "dynamics", "u10", "u10", "atmos_4xdaily", "all", .false., "none", 2
37 | "dynamics", "vs", "vs", "atmos_4xdaily", "all", .false., "none", 2
38 | "dynamics", "v1000", "v1000", "atmos_4xdaily", "all", .false., "none", 2
39 | "dynamics", "v850", "v850", "atmos_4xdaily", "all", .false., "none", 2
40 | "dynamics", "v700", "v700", "atmos_4xdaily", "all", .false., "none", 2
41 | "dynamics", "v500", "v500", "atmos_4xdaily", "all", .false., "none", 2
42 | "dynamics", "v200", "v200", "atmos_4xdaily", "all", .false., "none", 2
43 | "dynamics", "v100", "v100", "atmos_4xdaily", "all", .false., "none", 2
44 | "dynamics", "v50", "v50", "atmos_4xdaily", "all", .false., "none", 2
45 | "dynamics", "v10", "v10", "atmos_4xdaily", "all", .false., "none", 2
46 | ####
47 | "dynamics", "tm", "tm", "atmos_4xdaily", "all", .false., "none", 2
48 | "dynamics", "t1000", "t1000", "atmos_4xdaily", "all", .false., "none", 2
49 | "dynamics", "t850", "t850", "atmos_4xdaily", "all", .false., "none", 2
50 | "dynamics", "t700", "t700", "atmos_4xdaily", "all", .false., "none", 2
51 | "dynamics", "t500", "t500", "atmos_4xdaily", "all", .false., "none", 2
52 | "dynamics", "t200", "t200", "atmos_4xdaily", "all", .false., "none", 2
53 | "dynamics", "t100", "t100", "atmos_4xdaily", "all", .false., "none", 2
54 | "dynamics", "t50", "t50", "atmos_4xdaily", "all", .false., "none", 2
55 | "dynamics", "t10", "t10", "atmos_4xdaily", "all", .false., "none", 2
56 | ####
57 | "dynamics", "h1000", "h1000", "atmos_4xdaily", "all", .false., "none", 2
58 | "dynamics", "h850", "h850", "atmos_4xdaily", "all", .false., "none", 2
59 | "dynamics", "h700", "h700", "atmos_4xdaily", "all", .false., "none", 2
60 | "dynamics", "h500", "h500", "atmos_4xdaily", "all", .false., "none", 2
61 | "dynamics", "h200", "h200", "atmos_4xdaily", "all", .false., "none", 2
62 | "dynamics", "h100", "h100", "atmos_4xdaily", "all", .false., "none", 2
63 | "dynamics", "h50", "h50", "atmos_4xdaily", "all", .false., "none", 2
64 | "dynamics", "h10", "h10", "atmos_4xdaily", "all", .false., "none", 2
65 | ####
66 | #"dynamics", "w1000", "w1000", "atmos_4xdaily", "all", .false., "none", 2
67 | "dynamics", "w850", "w850", "atmos_4xdaily", "all", .false., "none", 2
68 | "dynamics", "w700", "w700", "atmos_4xdaily", "all", .false., "none", 2
69 | "dynamics", "w500", "w500", "atmos_4xdaily", "all", .false., "none", 2
70 | "dynamics", "w200", "w200", "atmos_4xdaily", "all", .false., "none", 2
71 | ####
72 | "dynamics", "q1000", "q1000", "atmos_4xdaily", "all", .false., "none", 2
73 | "dynamics", "q850", "q850", "atmos_4xdaily", "all", .false., "none", 2
74 | "dynamics", "q700", "q700", "atmos_4xdaily", "all", .false., "none", 2
75 | "dynamics", "q500", "q500", "atmos_4xdaily", "all", .false., "none", 2
76 | "dynamics", "q200", "q200", "atmos_4xdaily", "all", .false., "none", 2
77 | "dynamics", "q100", "q100", "atmos_4xdaily", "all", .false., "none", 2
78 | "dynamics", "q50", "q50", "atmos_4xdaily", "all", .false., "none", 2
79 | "dynamics", "q10", "q10", "atmos_4xdaily", "all", .false., "none", 2
80 | ####
81 | "dynamics", "rh1000", "rh1000", "atmos_4xdaily", "all", .false., "none", 2
82 | "dynamics", "rh850", "rh850", "atmos_4xdaily", "all", .false., "none", 2
83 | "dynamics", "rh700", "rh700", "atmos_4xdaily", "all", .false., "none", 2
84 | "dynamics", "rh500", "rh500", "atmos_4xdaily", "all", .false., "none", 2
85 | "dynamics", "rh200", "rh200", "atmos_4xdaily", "all", .false., "none", 2
86 | "dynamics", "omg1000", "omg1000", "atmos_4xdaily", "all", .false., "none", 2
87 | "dynamics", "omg850", "omg850", "atmos_4xdaily", "all", .false., "none", 2
88 | "dynamics", "omg700", "omg700", "atmos_4xdaily", "all", .false., "none", 2
89 | "dynamics", "omg500", "omg500", "atmos_4xdaily", "all", .false., "none", 2
90 | "dynamics", "omg200", "omg200", "atmos_4xdaily", "all", .false., "none", 2
91 | "dynamics", "omg100", "omg100", "atmos_4xdaily", "all", .false., "none", 2
92 | "dynamics", "omg50", "omg50", "atmos_4xdaily", "all", .false., "none", 2
93 | "dynamics", "omg10", "omg10", "atmos_4xdaily", "all", .false., "none", 2
94 | ###
95 | # gfs static data
96 | ###
97 | "dynamics", "pk", "pk", "atmos_static", "all", .false., "none", 2
98 | "dynamics", "bk", "bk", "atmos_static", "all", .false., "none", 2
99 | "dynamics", "hyam", "hyam", "atmos_static", "all", .false., "none", 2
100 | "dynamics", "hybm", "hybm", "atmos_static", "all", .false., "none", 2
101 | "dynamics", "zsurf", "zsurf", "atmos_static", "all", .false., "none", 2
102 | ###
103 | # FV3 variabls needed for NGGPS evaluation
104 | ###
105 | "gfs_dyn", "ucomp", "ugrd", "fv3_history", "all", .false., "none", 2
106 | "gfs_dyn", "vcomp", "vgrd", "fv3_history", "all", .false., "none", 2
107 | "gfs_dyn", "sphum", "spfh", "fv3_history", "all", .false., "none", 2
108 | "gfs_dyn", "temp", "tmp", "fv3_history", "all", .false., "none", 2
109 | "gfs_dyn", "liq_wat", "clwmr", "fv3_history", "all", .false., "none", 2
110 | "gfs_dyn", "o3mr", "o3mr", "fv3_history", "all", .false., "none", 2
111 | "gfs_dyn", "delp", "dpres", "fv3_history", "all", .false., "none", 2
112 | "gfs_dyn", "delz", "delz", "fv3_history", "all", .false., "none", 2
113 | "gfs_dyn", "w", "dzdt", "fv3_history", "all", .false., "none", 2
114 | "gfs_dyn", "ice_wat", "icmr", "fv3_history", "all", .false., "none", 2
115 | "gfs_dyn", "rainwat", "rwmr", "fv3_history", "all", .false., "none", 2
116 | "gfs_dyn", "snowwat", "snmr", "fv3_history", "all", .false., "none", 2
117 | "gfs_dyn", "graupel", "grle", "fv3_history", "all", .false., "none", 2
118 | "gfs_dyn", "ps", "pressfc", "fv3_history", "all", .false., "none", 2
119 | "gfs_dyn", "hs", "hgtsfc", "fv3_history", "all", .false., "none", 2
120 | #"gfs_dyn", "ice_nc", "nicp", "fv3_history", "all", .false., "none", 2
121 | #"gfs_dyn", "rain_nc", "ntrnc", "fv3_history", "all", .false., "none", 2
122 |
123 | "gfs_phys", "ALBDO_ave", "albdo_ave", "fv3_history2d", "all", .false., "none", 2
124 | "gfs_phys", "cnvprcp_ave", "cprat_ave", "fv3_history2d", "all", .false., "none", 2
125 | "gfs_phys", "cnvprcpb_ave", "cpratb_ave", "fv3_history2d", "all", .false., "none", 2
126 | "gfs_phys", "totprcp_ave", "prate_ave", "fv3_history2d", "all", .false., "none", 2
127 | "gfs_phys", "totprcpb_ave", "prateb_ave", "fv3_history2d", "all", .false., "none", 2
128 | "gfs_phys", "DLWRF", "dlwrf_ave", "fv3_history2d", "all", .false., "none", 2
129 | "gfs_phys", "DLWRFI", "dlwrf", "fv3_history2d", "all", .false., "none", 2
130 | "gfs_phys", "ULWRF", "ulwrf_ave", "fv3_history2d", "all", .false., "none", 2
131 | "gfs_phys", "ULWRFI", "ulwrf", "fv3_history2d", "all", .false., "none", 2
132 | "gfs_phys", "DSWRF", "dswrf_ave", "fv3_history2d", "all", .false., "none", 2
133 | "gfs_phys", "DSWRFI", "dswrf", "fv3_history2d", "all", .false., "none", 2
134 | "gfs_phys", "USWRF", "uswrf_ave", "fv3_history2d", "all", .false., "none", 2
135 | "gfs_phys", "USWRFI", "uswrf", "fv3_history2d", "all", .false., "none", 2
136 | "gfs_phys", "DSWRFtoa", "dswrf_avetoa","fv3_history2d", "all", .false., "none", 2
137 | "gfs_phys", "USWRFtoa", "uswrf_avetoa","fv3_history2d", "all", .false., "none", 2
138 | "gfs_phys", "ULWRFtoa", "ulwrf_avetoa","fv3_history2d", "all", .false., "none", 2
139 | "gfs_phys", "gflux_ave", "gflux_ave", "fv3_history2d", "all", .false., "none", 2
140 | "gfs_phys", "hpbl", "hpbl", "fv3_history2d", "all", .false., "none", 2
141 | "gfs_phys", "lhtfl_ave", "lhtfl_ave", "fv3_history2d", "all", .false., "none", 2
142 | "gfs_phys", "shtfl_ave", "shtfl_ave", "fv3_history2d", "all", .false., "none", 2
143 | "gfs_phys", "pwat", "pwatclm", "fv3_history2d", "all", .false., "none", 2
144 | "gfs_phys", "soilm", "soilm", "fv3_history2d", "all", .false., "none", 2
145 | "gfs_phys", "TCDC_aveclm", "tcdc_aveclm", "fv3_history2d", "all", .false., "none", 2
146 | "gfs_phys", "TCDC_avebndcl", "tcdc_avebndcl", "fv3_history2d", "all", .false., "none", 2
147 | "gfs_phys", "TCDC_avehcl", "tcdc_avehcl", "fv3_history2d", "all", .false., "none", 2
148 | "gfs_phys", "TCDC_avelcl", "tcdc_avelcl", "fv3_history2d", "all", .false., "none", 2
149 | "gfs_phys", "TCDC_avemcl", "tcdc_avemcl", "fv3_history2d", "all", .false., "none", 2
150 | "gfs_phys", "TCDCcnvcl", "tcdccnvcl", "fv3_history2d", "all", .false., "none", 2
151 | "gfs_phys", "PREScnvclt", "prescnvclt", "fv3_history2d", "all", .false., "none", 2
152 | "gfs_phys", "PREScnvclb", "prescnvclb", "fv3_history2d", "all", .false., "none", 2
153 | "gfs_phys", "PRES_avehct", "pres_avehct", "fv3_history2d", "all", .false., "none", 2
154 | "gfs_phys", "PRES_avehcb", "pres_avehcb", "fv3_history2d", "all", .false., "none", 2
155 | "gfs_phys", "TEMP_avehct", "tmp_avehct", "fv3_history2d", "all", .false., "none", 2
156 | "gfs_phys", "PRES_avemct", "pres_avemct", "fv3_history2d", "all", .false., "none", 2
157 | "gfs_phys", "PRES_avemcb", "pres_avemcb", "fv3_history2d", "all", .false., "none", 2
158 | "gfs_phys", "TEMP_avemct", "tmp_avemct", "fv3_history2d", "all", .false., "none", 2
159 | "gfs_phys", "PRES_avelct", "pres_avelct", "fv3_history2d", "all", .false., "none", 2
160 | "gfs_phys", "PRES_avelcb", "pres_avelcb", "fv3_history2d", "all", .false., "none", 2
161 | "gfs_phys", "TEMP_avelct", "tmp_avelct", "fv3_history2d", "all", .false., "none", 2
162 | "gfs_phys", "u-gwd_ave", "u-gwd_ave", "fv3_history2d", "all", .false., "none", 2
163 | "gfs_phys", "v-gwd_ave", "v-gwd_ave", "fv3_history2d", "all", .false., "none", 2
164 | "gfs_phys", "dusfc", "uflx_ave", "fv3_history2d", "all", .false., "none", 2
165 | "gfs_phys", "dvsfc", "vflx_ave", "fv3_history2d", "all", .false., "none", 2
166 | #"gfs_phys", "cnvw", "cnvcldwat", "fv3_history2d", "all", .false., "none", 2
167 |
168 | "gfs_phys", "psurf", "pressfc", "fv3_history2d", "all", .false., "none", 2
169 | "gfs_phys", "u10m", "ugrd10m", "fv3_history2d", "all", .false., "none", 2
170 | "gfs_phys", "v10m", "vgrd10m", "fv3_history2d", "all", .false., "none", 2
171 | "gfs_sfc", "crain", "crain", "fv3_history2d", "all", .false., "none", 2
172 | "gfs_sfc", "tprcp", "tprcp", "fv3_history2d", "all", .false., "none", 2
173 | "gfs_sfc", "hgtsfc", "orog", "fv3_history2d", "all", .false., "none", 2
174 | "gfs_sfc", "weasd", "weasd", "fv3_history2d", "all", .false., "none", 2
175 | "gfs_sfc", "f10m", "f10m", "fv3_history2d", "all", .false., "none", 2
176 | "gfs_sfc", "q2m", "spfh2m", "fv3_history2d", "all", .false., "none", 2
177 | "gfs_sfc", "t2m", "tmp2m", "fv3_history2d", "all", .false., "none", 2
178 | "gfs_sfc", "tsfc", "tmpsfc", "fv3_history2d", "all", .false., "none", 2
179 | "gfs_sfc", "vtype", "vtype", "fv3_history2d", "all", .false., "none", 2
180 | "gfs_sfc", "stype", "sotyp", "fv3_history2d", "all", .false., "none", 2
181 | "gfs_sfc", "slmsksfc", "land", "fv3_history2d", "all", .false., "none", 2
182 | "gfs_sfc", "vfracsfc", "veg", "fv3_history2d", "all", .false., "none", 2
183 | "gfs_sfc", "zorlsfc", "sfcr", "fv3_history2d", "all", .false., "none", 2
184 | "gfs_sfc", "uustar", "fricv", "fv3_history2d", "all", .false., "none", 2
185 | "gfs_sfc", "soilt1", "soilt1" "fv3_history2d", "all", .false., "none", 2
186 | "gfs_sfc", "soilt2", "soilt2" "fv3_history2d", "all", .false., "none", 2
187 | "gfs_sfc", "soilt3", "soilt3" "fv3_history2d", "all", .false., "none", 2
188 | "gfs_sfc", "soilt4", "soilt4" "fv3_history2d", "all", .false., "none", 2
189 | "gfs_sfc", "soilw1", "soilw1" "fv3_history2d", "all", .false., "none", 2
190 | "gfs_sfc", "soilw2", "soilw2" "fv3_history2d", "all", .false., "none", 2
191 | "gfs_sfc", "soilw3", "soilw3" "fv3_history2d", "all", .false., "none", 2
192 | "gfs_sfc", "soilw4", "soilw4" "fv3_history2d", "all", .false., "none", 2
193 | "gfs_sfc", "slc_1", "soill1", "fv3_history2d", "all", .false., "none", 2
194 | "gfs_sfc", "slc_2", "soill2", "fv3_history2d", "all", .false., "none", 2
195 | "gfs_sfc", "slc_3", "soill3", "fv3_history2d", "all", .false., "none", 2
196 | "gfs_sfc", "slc_4", "soill4", "fv3_history2d", "all", .false., "none", 2
197 | "gfs_sfc", "slope", "sltyp", "fv3_history2d", "all", .false., "none", 2
198 | "gfs_sfc", "alnsf", "alnsf", "fv3_history2d", "all", .false., "none", 2
199 | "gfs_sfc", "alnwf", "alnwf", "fv3_history2d", "all", .false., "none", 2
200 | "gfs_sfc", "alvsf", "alvsf", "fv3_history2d", "all", .false., "none", 2
201 | "gfs_sfc", "alvwf", "alvwf", "fv3_history2d", "all", .false., "none", 2
202 | "gfs_sfc", "canopy", "cnwat", "fv3_history2d", "all", .false., "none", 2
203 | "gfs_sfc", "facsf", "facsf", "fv3_history2d", "all", .false., "none", 2
204 | "gfs_sfc", "facwf", "facwf", "fv3_history2d", "all", .false., "none", 2
205 | "gfs_sfc", "ffhh", "ffhh", "fv3_history2d", "all", .false., "none", 2
206 | "gfs_sfc", "ffmm", "ffmm", "fv3_history2d", "all", .false., "none", 2
207 | "gfs_sfc", "fice", "icec", "fv3_history2d", "all", .false., "none", 2
208 | "gfs_sfc", "hice", "icetk", "fv3_history2d", "all", .false., "none", 2
209 | "gfs_sfc", "snoalb", "snoalb", "fv3_history2d", "all", .false., "none", 2
210 | "gfs_sfc", "shdmax", "shdmax", "fv3_history2d", "all", .false., "none", 2
211 | "gfs_sfc", "shdmin", "shdmin", "fv3_history2d", "all", .false., "none", 2
212 | "gfs_sfc", "snowd", "snod", "fv3_history2d", "all", .false., "none", 2
213 | "gfs_sfc", "tg3", "tg3", "fv3_history2d", "all", .false., "none", 2
214 | "gfs_sfc", "tisfc", "tisfc", "fv3_history2d", "all", .false., "none", 2
215 | "gfs_sfc", "tref", "tref", "fv3_history2d", "all", .false., "none", 2
216 | "gfs_sfc", "z_c", "zc", "fv3_history2d", "all", .false., "none", 2
217 | "gfs_sfc", "c_0", "c0", "fv3_history2d", "all", .false., "none", 2
218 | "gfs_sfc", "c_d", "cd", "fv3_history2d", "all", .false., "none", 2
219 | "gfs_sfc", "w_0", "w0", "fv3_history2d", "all", .false., "none", 2
220 | "gfs_sfc", "w_d", "wd", "fv3_history2d", "all", .false., "none", 2
221 | "gfs_sfc", "xt", "xt", "fv3_history2d", "all", .false., "none", 2
222 | "gfs_sfc", "xz", "xz", "fv3_history2d", "all", .false., "none", 2
223 | "gfs_sfc", "dt_cool", "dtcool", "fv3_history2d", "all", .false., "none", 2
224 | "gfs_sfc", "xs", "xs", "fv3_history2d", "all", .false., "none", 2
225 | "gfs_sfc", "xu", "xu", "fv3_history2d", "all", .false., "none", 2
226 | "gfs_sfc", "xv", "xv", "fv3_history2d", "all", .false., "none", 2
227 | "gfs_sfc", "xtts", "xtts", "fv3_history2d", "all", .false., "none", 2
228 | "gfs_sfc", "xzts", "xzts", "fv3_history2d", "all", .false., "none", 2
229 | "gfs_sfc", "d_conv", "dconv", "fv3_history2d", "all", .false., "none", 2
230 | "gfs_sfc", "qrain", "qrain", "fv3_history2d", "all", .false., "none", 2
231 |
232 | "gfs_phys", "acond", "acond", "fv3_history2d", "all", .false., "none", 2
233 | "gfs_phys", "cduvb_ave", "cduvb_ave", "fv3_history2d", "all", .false., "none", 2
234 | "gfs_phys", "cpofp", "cpofp", "fv3_history2d", "all", .false., "none", 2
235 | "gfs_phys", "duvb_ave", "duvb_ave", "fv3_history2d", "all", .false., "none", 2
236 | "gfs_phys", "csdlf_ave", "csdlf", "fv3_history2d", "all", .false., "none", 2
237 | "gfs_phys", "csusf_ave", "csusf", "fv3_history2d", "all", .false., "none", 2
238 | "gfs_phys", "csusf_avetoa", "csusftoa", "fv3_history2d", "all", .false., "none", 2
239 | "gfs_phys", "csdsf_ave", "csdsf", "fv3_history2d", "all", .false., "none", 2
240 | "gfs_phys", "csulf_ave", "csulf", "fv3_history2d", "all", .false., "none", 2
241 | "gfs_phys", "csulf_avetoa", "csulftoa", "fv3_history2d", "all", .false., "none", 2
242 | "gfs_phys", "cwork_ave", "cwork_aveclm", "fv3_history2d", "all", .false., "none", 2
243 | "gfs_phys", "evbs_ave", "evbs_ave", "fv3_history2d", "all", .false., "none", 2
244 | "gfs_phys", "evcw_ave", "evcw_ave", "fv3_history2d", "all", .false., "none", 2
245 | "gfs_phys", "fldcp", "fldcp", "fv3_history2d", "all", .false., "none", 2
246 | "gfs_phys", "hgt_hyblev1", "hgt_hyblev1", "fv3_history2d", "all", .false., "none", 2
247 | "gfs_phys", "spfh_hyblev1", "spfh_hyblev1", "fv3_history2d", "all", .false., "none", 2
248 | "gfs_phys", "ugrd_hyblev1", "ugrd_hyblev1", "fv3_history2d", "all", .false., "none", 2
249 | "gfs_phys", "vgrd_hyblev1", "vgrd_hyblev1", "fv3_history2d", "all", .false., "none", 2
250 | "gfs_phys", "tmp_hyblev1", "tmp_hyblev1", "fv3_history2d", "all", .false., "none", 2
251 | "gfs_phys", "gfluxi", "gflux", "fv3_history2d", "all", .false., "none", 2
252 | "gfs_phys", "lhtfl", "lhtfl", "fv3_history2d", "all", .false., "none", 2
253 | "gfs_phys", "shtfl", "shtfl", "fv3_history2d", "all", .false., "none", 2
254 | "gfs_phys", "pevpr", "pevpr", "fv3_history2d", "all", .false., "none", 2
255 | "gfs_phys", "pevpr_ave", "pevpr_ave", "fv3_history2d", "all", .false., "none", 2
256 | "gfs_phys", "sbsno_ave", "sbsno_ave", "fv3_history2d", "all", .false., "none", 2
257 | "gfs_phys", "sfexc", "sfexc", "fv3_history2d", "all", .false., "none", 2
258 | "gfs_phys", "snohf", "snohf", "fv3_history2d", "all", .false., "none", 2
259 | "gfs_phys", "snowc_ave", "snowc_ave", "fv3_history2d", "all", .false., "none", 2
260 | "gfs_phys", "spfhmax2m", "spfhmax_max2m", "fv3_history2d", "all", .false., "none", 2
261 | "gfs_phys", "spfhmin2m", "spfhmin_min2m", "fv3_history2d", "all", .false., "none", 2
262 | "gfs_phys", "tmpmax2m", "tmax_max2m", "fv3_history2d", "all", .false., "none", 2
263 | "gfs_phys", "tmpmin2m", "tmin_min2m", "fv3_history2d", "all", .false., "none", 2
264 | "gfs_phys", "ssrun_acc", "ssrun_acc", "fv3_history2d", "all", .false., "none", 2
265 | "gfs_phys", "sunsd_acc", "sunsd_acc", "fv3_history2d", "all", .false., "none", 2
266 | "gfs_phys", "watr_acc", "watr_acc", "fv3_history2d", "all", .false., "none", 2
267 | "gfs_phys", "wilt", "wilt", "fv3_history2d", "all", .false., "none", 2
268 | "gfs_phys", "vbdsf_ave", "vbdsf_ave", "fv3_history2d", "all", .false., "none", 2
269 | "gfs_phys", "vddsf_ave", "vddsf_ave", "fv3_history2d", "all", .false., "none", 2
270 | "gfs_phys", "nbdsf_ave", "nbdsf_ave", "fv3_history2d", "all", .false., "none", 2
271 | "gfs_phys", "nddsf_ave", "nddsf_ave", "fv3_history2d", "all", .false., "none", 2
272 | "gfs_phys", "trans_ave", "trans_ave", "fv3_history2d", "all", .false., "none", 2
273 |
274 | #=============================================================================================
275 | #
276 | #====> This file can be used with diag_manager/v2.0a (or higher) <====
277 | #
278 | #
279 | # FORMATS FOR FILE ENTRIES (not all input values are used)
280 | # ------------------------
281 | #
282 | #"file_name", output_freq, "output_units", format, "time_units", "long_name",
283 | #
284 | #
285 | #output_freq: > 0 output frequency in "output_units"
286 | # = 0 output frequency every time step
287 | # =-1 output frequency at end of run
288 | #
289 | #output_units = units used for output frequency
290 | # (years, months, days, minutes, hours, seconds)
291 | #
292 | #time_units = units used to label the time axis
293 | # (days, minutes, hours, seconds)
294 | #
295 | #
296 | # FORMAT FOR FIELD ENTRIES (not all input values are used)
297 | # ------------------------
298 | #
299 | #"module_name", "field_name", "output_name", "file_name" "time_sampling", time_avg, "other_opts", packing
300 | #
301 | #time_avg = .true. or .false.
302 | #
303 | #packing = 1 double precision
304 | # = 2 float
305 | # = 4 packed 16-bit integers
306 | # = 8 packed 1-byte (not tested?)
307 |
--------------------------------------------------------------------------------
/cime_config/tables/diag_table_mrweather:
--------------------------------------------------------------------------------
1 | 20161003.00Z.C96.64bit.non-mono
2 | 2016 10 03 00 0 0
3 |
4 | "grid_spec", -1, "months", 1, "days", "time"
5 | "atmos_4xdaily", 6, "hours", 1, "days", "time"
6 | "atmos_static", -1, "hours", 1, "hours", "time"
7 | "fv3_history", 0, "hours", 1, "hours", "time"
8 | "fv3_history2d", 0, "hours", 1, "hours", "time"
9 |
10 | #
11 | #=======================
12 | # ATMOSPHERE DIAGNOSTICS
13 | #=======================
14 | ###
15 | # grid_spec
16 | ###
17 | "dynamics", "grid_lon", "grid_lon", "grid_spec", "all", .false., "none", 2,
18 | "dynamics", "grid_lat", "grid_lat", "grid_spec", "all", .false., "none", 2,
19 | "dynamics", "grid_lont", "grid_lont", "grid_spec", "all", .false., "none", 2,
20 | "dynamics", "grid_latt", "grid_latt", "grid_spec", "all", .false., "none", 2,
21 | "dynamics", "area", "area", "grid_spec", "all", .false., "none", 2,
22 | ###
23 | # 4x daily output
24 | ###
25 | "dynamics", "slp", "slp", "atmos_4xdaily", "all", .false., "none", 2
26 | "dynamics", "vort850", "vort850", "atmos_4xdaily", "all", .false., "none", 2
27 | "dynamics", "vort200", "vort200", "atmos_4xdaily", "all", .false., "none", 2
28 | "dynamics", "us", "us", "atmos_4xdaily", "all", .false., "none", 2
29 | "dynamics", "u1000", "u1000", "atmos_4xdaily", "all", .false., "none", 2
30 | "dynamics", "u850", "u850", "atmos_4xdaily", "all", .false., "none", 2
31 | "dynamics", "u700", "u700", "atmos_4xdaily", "all", .false., "none", 2
32 | "dynamics", "u500", "u500", "atmos_4xdaily", "all", .false., "none", 2
33 | "dynamics", "u200", "u200", "atmos_4xdaily", "all", .false., "none", 2
34 | "dynamics", "u100", "u100", "atmos_4xdaily", "all", .false., "none", 2
35 | "dynamics", "u50", "u50", "atmos_4xdaily", "all", .false., "none", 2
36 | "dynamics", "u10", "u10", "atmos_4xdaily", "all", .false., "none", 2
37 | "dynamics", "vs", "vs", "atmos_4xdaily", "all", .false., "none", 2
38 | "dynamics", "v1000", "v1000", "atmos_4xdaily", "all", .false., "none", 2
39 | "dynamics", "v850", "v850", "atmos_4xdaily", "all", .false., "none", 2
40 | "dynamics", "v700", "v700", "atmos_4xdaily", "all", .false., "none", 2
41 | "dynamics", "v500", "v500", "atmos_4xdaily", "all", .false., "none", 2
42 | "dynamics", "v200", "v200", "atmos_4xdaily", "all", .false., "none", 2
43 | "dynamics", "v100", "v100", "atmos_4xdaily", "all", .false., "none", 2
44 | "dynamics", "v50", "v50", "atmos_4xdaily", "all", .false., "none", 2
45 | "dynamics", "v10", "v10", "atmos_4xdaily", "all", .false., "none", 2
46 | ####
47 | "dynamics", "tm", "tm", "atmos_4xdaily", "all", .false., "none", 2
48 | "dynamics", "t1000", "t1000", "atmos_4xdaily", "all", .false., "none", 2
49 | "dynamics", "t850", "t850", "atmos_4xdaily", "all", .false., "none", 2
50 | "dynamics", "t700", "t700", "atmos_4xdaily", "all", .false., "none", 2
51 | "dynamics", "t500", "t500", "atmos_4xdaily", "all", .false., "none", 2
52 | "dynamics", "t200", "t200", "atmos_4xdaily", "all", .false., "none", 2
53 | "dynamics", "t100", "t100", "atmos_4xdaily", "all", .false., "none", 2
54 | "dynamics", "t50", "t50", "atmos_4xdaily", "all", .false., "none", 2
55 | "dynamics", "t10", "t10", "atmos_4xdaily", "all", .false., "none", 2
56 | ####
57 | "dynamics", "h1000", "h1000", "atmos_4xdaily", "all", .false., "none", 2
58 | "dynamics", "h850", "h850", "atmos_4xdaily", "all", .false., "none", 2
59 | "dynamics", "h700", "h700", "atmos_4xdaily", "all", .false., "none", 2
60 | "dynamics", "h500", "h500", "atmos_4xdaily", "all", .false., "none", 2
61 | "dynamics", "h200", "h200", "atmos_4xdaily", "all", .false., "none", 2
62 | "dynamics", "h100", "h100", "atmos_4xdaily", "all", .false., "none", 2
63 | "dynamics", "h50", "h50", "atmos_4xdaily", "all", .false., "none", 2
64 | "dynamics", "h10", "h10", "atmos_4xdaily", "all", .false., "none", 2
65 | ####
66 | #"dynamics", "w1000", "w1000", "atmos_4xdaily", "all", .false., "none", 2
67 | "dynamics", "w850", "w850", "atmos_4xdaily", "all", .false., "none", 2
68 | "dynamics", "w700", "w700", "atmos_4xdaily", "all", .false., "none", 2
69 | "dynamics", "w500", "w500", "atmos_4xdaily", "all", .false., "none", 2
70 | "dynamics", "w200", "w200", "atmos_4xdaily", "all", .false., "none", 2
71 | ####
72 | "dynamics", "q1000", "q1000", "atmos_4xdaily", "all", .false., "none", 2
73 | "dynamics", "q850", "q850", "atmos_4xdaily", "all", .false., "none", 2
74 | "dynamics", "q700", "q700", "atmos_4xdaily", "all", .false., "none", 2
75 | "dynamics", "q500", "q500", "atmos_4xdaily", "all", .false., "none", 2
76 | "dynamics", "q200", "q200", "atmos_4xdaily", "all", .false., "none", 2
77 | "dynamics", "q100", "q100", "atmos_4xdaily", "all", .false., "none", 2
78 | "dynamics", "q50", "q50", "atmos_4xdaily", "all", .false., "none", 2
79 | "dynamics", "q10", "q10", "atmos_4xdaily", "all", .false., "none", 2
80 | ####
81 | "dynamics", "rh1000", "rh1000", "atmos_4xdaily", "all", .false., "none", 2
82 | "dynamics", "rh850", "rh850", "atmos_4xdaily", "all", .false., "none", 2
83 | "dynamics", "rh700", "rh700", "atmos_4xdaily", "all", .false., "none", 2
84 | "dynamics", "rh500", "rh500", "atmos_4xdaily", "all", .false., "none", 2
85 | "dynamics", "rh200", "rh200", "atmos_4xdaily", "all", .false., "none", 2
86 | "dynamics", "omg1000", "omg1000", "atmos_4xdaily", "all", .false., "none", 2
87 | "dynamics", "omg850", "omg850", "atmos_4xdaily", "all", .false., "none", 2
88 | "dynamics", "omg700", "omg700", "atmos_4xdaily", "all", .false., "none", 2
89 | "dynamics", "omg500", "omg500", "atmos_4xdaily", "all", .false., "none", 2
90 | "dynamics", "omg200", "omg200", "atmos_4xdaily", "all", .false., "none", 2
91 | "dynamics", "omg100", "omg100", "atmos_4xdaily", "all", .false., "none", 2
92 | "dynamics", "omg50", "omg50", "atmos_4xdaily", "all", .false., "none", 2
93 | "dynamics", "omg10", "omg10", "atmos_4xdaily", "all", .false., "none", 2
94 | ###
95 | # gfs static data
96 | ###
97 | "dynamics", "pk", "pk", "atmos_static", "all", .false., "none", 2
98 | "dynamics", "bk", "bk", "atmos_static", "all", .false., "none", 2
99 | "dynamics", "hyam", "hyam", "atmos_static", "all", .false., "none", 2
100 | "dynamics", "hybm", "hybm", "atmos_static", "all", .false., "none", 2
101 | "dynamics", "zsurf", "zsurf", "atmos_static", "all", .false., "none", 2
102 | ###
103 | # FV3 variabls needed for NGGPS evaluation
104 | ###
105 | "gfs_dyn", "ucomp", "ugrd", "fv3_history", "all", .false., "none", 2
106 | "gfs_dyn", "vcomp", "vgrd", "fv3_history", "all", .false., "none", 2
107 | "gfs_dyn", "sphum", "spfh", "fv3_history", "all", .false., "none", 2
108 | "gfs_dyn", "temp", "tmp", "fv3_history", "all", .false., "none", 2
109 | "gfs_dyn", "liq_wat", "clwmr", "fv3_history", "all", .false., "none", 2
110 | "gfs_dyn", "o3mr", "o3mr", "fv3_history", "all", .false., "none", 2
111 | "gfs_dyn", "delp", "dpres", "fv3_history", "all", .false., "none", 2
112 | "gfs_dyn", "delz", "delz", "fv3_history", "all", .false., "none", 2
113 | "gfs_dyn", "w", "dzdt", "fv3_history", "all", .false., "none", 2
114 | "gfs_dyn", "ice_wat", "icmr", "fv3_history", "all", .false., "none", 2
115 | "gfs_dyn", "rainwat", "rwmr", "fv3_history", "all", .false., "none", 2
116 | "gfs_dyn", "snowwat", "snmr", "fv3_history", "all", .false., "none", 2
117 | "gfs_dyn", "graupel", "grle", "fv3_history", "all", .false., "none", 2
118 | "gfs_dyn", "ps", "pressfc", "fv3_history", "all", .false., "none", 2
119 | "gfs_dyn", "hs", "hgtsfc", "fv3_history", "all", .false., "none", 2
120 | #"gfs_dyn", "ice_nc", "nicp", "fv3_history", "all", .false., "none", 2
121 | #"gfs_dyn", "rain_nc", "ntrnc", "fv3_history", "all", .false., "none", 2
122 |
123 | "gfs_phys", "ALBDO_ave", "albdo_ave", "fv3_history2d", "all", .false., "none", 2
124 | "gfs_phys", "cnvprcp_ave", "cprat_ave", "fv3_history2d", "all", .false., "none", 2
125 | "gfs_phys", "cnvprcpb_ave", "cpratb_ave", "fv3_history2d", "all", .false., "none", 2
126 | "gfs_phys", "totprcp_ave", "prate_ave", "fv3_history2d", "all", .false., "none", 2
127 | "gfs_phys", "totprcpb_ave", "prateb_ave", "fv3_history2d", "all", .false., "none", 2
128 | "gfs_phys", "DLWRF", "dlwrf_ave", "fv3_history2d", "all", .false., "none", 2
129 | "gfs_phys", "DLWRFI", "dlwrf", "fv3_history2d", "all", .false., "none", 2
130 | "gfs_phys", "ULWRF", "ulwrf_ave", "fv3_history2d", "all", .false., "none", 2
131 | "gfs_phys", "ULWRFI", "ulwrf", "fv3_history2d", "all", .false., "none", 2
132 | "gfs_phys", "DSWRF", "dswrf_ave", "fv3_history2d", "all", .false., "none", 2
133 | "gfs_phys", "DSWRFI", "dswrf", "fv3_history2d", "all", .false., "none", 2
134 | "gfs_phys", "USWRF", "uswrf_ave", "fv3_history2d", "all", .false., "none", 2
135 | "gfs_phys", "USWRFI", "uswrf", "fv3_history2d", "all", .false., "none", 2
136 | "gfs_phys", "DSWRFtoa", "dswrf_avetoa","fv3_history2d", "all", .false., "none", 2
137 | "gfs_phys", "USWRFtoa", "uswrf_avetoa","fv3_history2d", "all", .false., "none", 2
138 | "gfs_phys", "ULWRFtoa", "ulwrf_avetoa","fv3_history2d", "all", .false., "none", 2
139 | "gfs_phys", "gflux_ave", "gflux_ave", "fv3_history2d", "all", .false., "none", 2
140 | "gfs_phys", "hpbl", "hpbl", "fv3_history2d", "all", .false., "none", 2
141 | "gfs_phys", "lhtfl_ave", "lhtfl_ave", "fv3_history2d", "all", .false., "none", 2
142 | "gfs_phys", "shtfl_ave", "shtfl_ave", "fv3_history2d", "all", .false., "none", 2
143 | "gfs_phys", "pwat", "pwatclm", "fv3_history2d", "all", .false., "none", 2
144 | "gfs_phys", "soilm", "soilm", "fv3_history2d", "all", .false., "none", 2
145 | "gfs_phys", "TCDC_aveclm", "tcdc_aveclm", "fv3_history2d", "all", .false., "none", 2
146 | "gfs_phys", "TCDC_avebndcl", "tcdc_avebndcl", "fv3_history2d", "all", .false., "none", 2
147 | "gfs_phys", "TCDC_avehcl", "tcdc_avehcl", "fv3_history2d", "all", .false., "none", 2
148 | "gfs_phys", "TCDC_avelcl", "tcdc_avelcl", "fv3_history2d", "all", .false., "none", 2
149 | "gfs_phys", "TCDC_avemcl", "tcdc_avemcl", "fv3_history2d", "all", .false., "none", 2
150 | "gfs_phys", "TCDCcnvcl", "tcdccnvcl", "fv3_history2d", "all", .false., "none", 2
151 | "gfs_phys", "PREScnvclt", "prescnvclt", "fv3_history2d", "all", .false., "none", 2
152 | "gfs_phys", "PREScnvclb", "prescnvclb", "fv3_history2d", "all", .false., "none", 2
153 | "gfs_phys", "PRES_avehct", "pres_avehct", "fv3_history2d", "all", .false., "none", 2
154 | "gfs_phys", "PRES_avehcb", "pres_avehcb", "fv3_history2d", "all", .false., "none", 2
155 | "gfs_phys", "TEMP_avehct", "tmp_avehct", "fv3_history2d", "all", .false., "none", 2
156 | "gfs_phys", "PRES_avemct", "pres_avemct", "fv3_history2d", "all", .false., "none", 2
157 | "gfs_phys", "PRES_avemcb", "pres_avemcb", "fv3_history2d", "all", .false., "none", 2
158 | "gfs_phys", "TEMP_avemct", "tmp_avemct", "fv3_history2d", "all", .false., "none", 2
159 | "gfs_phys", "PRES_avelct", "pres_avelct", "fv3_history2d", "all", .false., "none", 2
160 | "gfs_phys", "PRES_avelcb", "pres_avelcb", "fv3_history2d", "all", .false., "none", 2
161 | "gfs_phys", "TEMP_avelct", "tmp_avelct", "fv3_history2d", "all", .false., "none", 2
162 | "gfs_phys", "u-gwd_ave", "u-gwd_ave", "fv3_history2d", "all", .false., "none", 2
163 | "gfs_phys", "v-gwd_ave", "v-gwd_ave", "fv3_history2d", "all", .false., "none", 2
164 | "gfs_phys", "dusfc", "uflx_ave", "fv3_history2d", "all", .false., "none", 2
165 | "gfs_phys", "dvsfc", "vflx_ave", "fv3_history2d", "all", .false., "none", 2
166 | #"gfs_phys", "cnvw", "cnvcldwat", "fv3_history2d", "all", .false., "none", 2
167 |
168 | "gfs_phys", "psurf", "pressfc", "fv3_history2d", "all", .false., "none", 2
169 | "gfs_phys", "u10m", "ugrd10m", "fv3_history2d", "all", .false., "none", 2
170 | "gfs_phys", "v10m", "vgrd10m", "fv3_history2d", "all", .false., "none", 2
171 | "gfs_sfc", "crain", "crain", "fv3_history2d", "all", .false., "none", 2
172 | "gfs_sfc", "tprcp", "tprcp", "fv3_history2d", "all", .false., "none", 2
173 | "gfs_sfc", "hgtsfc", "orog", "fv3_history2d", "all", .false., "none", 2
174 | "gfs_sfc", "weasd", "weasd", "fv3_history2d", "all", .false., "none", 2
175 | "gfs_sfc", "f10m", "f10m", "fv3_history2d", "all", .false., "none", 2
176 | "gfs_sfc", "q2m", "spfh2m", "fv3_history2d", "all", .false., "none", 2
177 | "gfs_sfc", "t2m", "tmp2m", "fv3_history2d", "all", .false., "none", 2
178 | "gfs_sfc", "tsfc", "tmpsfc", "fv3_history2d", "all", .false., "none", 2
179 | "gfs_sfc", "vtype", "vtype", "fv3_history2d", "all", .false., "none", 2
180 | "gfs_sfc", "stype", "sotyp", "fv3_history2d", "all", .false., "none", 2
181 | "gfs_sfc", "slmsksfc", "land", "fv3_history2d", "all", .false., "none", 2
182 | "gfs_sfc", "vfracsfc", "veg", "fv3_history2d", "all", .false., "none", 2
183 | "gfs_sfc", "zorlsfc", "sfcr", "fv3_history2d", "all", .false., "none", 2
184 | "gfs_sfc", "uustar", "fricv", "fv3_history2d", "all", .false., "none", 2
185 | "gfs_sfc", "soilt1", "soilt1" "fv3_history2d", "all", .false., "none", 2
186 | "gfs_sfc", "soilt2", "soilt2" "fv3_history2d", "all", .false., "none", 2
187 | "gfs_sfc", "soilt3", "soilt3" "fv3_history2d", "all", .false., "none", 2
188 | "gfs_sfc", "soilt4", "soilt4" "fv3_history2d", "all", .false., "none", 2
189 | "gfs_sfc", "soilw1", "soilw1" "fv3_history2d", "all", .false., "none", 2
190 | "gfs_sfc", "soilw2", "soilw2" "fv3_history2d", "all", .false., "none", 2
191 | "gfs_sfc", "soilw3", "soilw3" "fv3_history2d", "all", .false., "none", 2
192 | "gfs_sfc", "soilw4", "soilw4" "fv3_history2d", "all", .false., "none", 2
193 | "gfs_sfc", "slc_1", "soill1", "fv3_history2d", "all", .false., "none", 2
194 | "gfs_sfc", "slc_2", "soill2", "fv3_history2d", "all", .false., "none", 2
195 | "gfs_sfc", "slc_3", "soill3", "fv3_history2d", "all", .false., "none", 2
196 | "gfs_sfc", "slc_4", "soill4", "fv3_history2d", "all", .false., "none", 2
197 | "gfs_sfc", "slope", "sltyp", "fv3_history2d", "all", .false., "none", 2
198 | "gfs_sfc", "alnsf", "alnsf", "fv3_history2d", "all", .false., "none", 2
199 | "gfs_sfc", "alnwf", "alnwf", "fv3_history2d", "all", .false., "none", 2
200 | "gfs_sfc", "alvsf", "alvsf", "fv3_history2d", "all", .false., "none", 2
201 | "gfs_sfc", "alvwf", "alvwf", "fv3_history2d", "all", .false., "none", 2
202 | "gfs_sfc", "canopy", "cnwat", "fv3_history2d", "all", .false., "none", 2
203 | "gfs_sfc", "facsf", "facsf", "fv3_history2d", "all", .false., "none", 2
204 | "gfs_sfc", "facwf", "facwf", "fv3_history2d", "all", .false., "none", 2
205 | "gfs_sfc", "ffhh", "ffhh", "fv3_history2d", "all", .false., "none", 2
206 | "gfs_sfc", "ffmm", "ffmm", "fv3_history2d", "all", .false., "none", 2
207 | "gfs_sfc", "fice", "icec", "fv3_history2d", "all", .false., "none", 2
208 | "gfs_sfc", "hice", "icetk", "fv3_history2d", "all", .false., "none", 2
209 | "gfs_sfc", "snoalb", "snoalb", "fv3_history2d", "all", .false., "none", 2
210 | "gfs_sfc", "shdmax", "shdmax", "fv3_history2d", "all", .false., "none", 2
211 | "gfs_sfc", "shdmin", "shdmin", "fv3_history2d", "all", .false., "none", 2
212 | "gfs_sfc", "snowd", "snod", "fv3_history2d", "all", .false., "none", 2
213 | "gfs_sfc", "tg3", "tg3", "fv3_history2d", "all", .false., "none", 2
214 | "gfs_sfc", "tisfc", "tisfc", "fv3_history2d", "all", .false., "none", 2
215 | "gfs_sfc", "tref", "tref", "fv3_history2d", "all", .false., "none", 2
216 | "gfs_sfc", "z_c", "zc", "fv3_history2d", "all", .false., "none", 2
217 | "gfs_sfc", "c_0", "c0", "fv3_history2d", "all", .false., "none", 2
218 | "gfs_sfc", "c_d", "cd", "fv3_history2d", "all", .false., "none", 2
219 | "gfs_sfc", "w_0", "w0", "fv3_history2d", "all", .false., "none", 2
220 | "gfs_sfc", "w_d", "wd", "fv3_history2d", "all", .false., "none", 2
221 | "gfs_sfc", "xt", "xt", "fv3_history2d", "all", .false., "none", 2
222 | "gfs_sfc", "xz", "xz", "fv3_history2d", "all", .false., "none", 2
223 | "gfs_sfc", "dt_cool", "dtcool", "fv3_history2d", "all", .false., "none", 2
224 | "gfs_sfc", "xs", "xs", "fv3_history2d", "all", .false., "none", 2
225 | "gfs_sfc", "xu", "xu", "fv3_history2d", "all", .false., "none", 2
226 | "gfs_sfc", "xv", "xv", "fv3_history2d", "all", .false., "none", 2
227 | "gfs_sfc", "xtts", "xtts", "fv3_history2d", "all", .false., "none", 2
228 | "gfs_sfc", "xzts", "xzts", "fv3_history2d", "all", .false., "none", 2
229 | "gfs_sfc", "d_conv", "dconv", "fv3_history2d", "all", .false., "none", 2
230 | "gfs_sfc", "qrain", "qrain", "fv3_history2d", "all", .false., "none", 2
231 |
232 | "gfs_phys", "acond", "acond", "fv3_history2d", "all", .false., "none", 2
233 | "gfs_phys", "cduvb_ave", "cduvb_ave", "fv3_history2d", "all", .false., "none", 2
234 | "gfs_phys", "cpofp", "cpofp", "fv3_history2d", "all", .false., "none", 2
235 | "gfs_phys", "duvb_ave", "duvb_ave", "fv3_history2d", "all", .false., "none", 2
236 | "gfs_phys", "csdlf_ave", "csdlf", "fv3_history2d", "all", .false., "none", 2
237 | "gfs_phys", "csusf_ave", "csusf", "fv3_history2d", "all", .false., "none", 2
238 | "gfs_phys", "csusf_avetoa", "csusftoa", "fv3_history2d", "all", .false., "none", 2
239 | "gfs_phys", "csdsf_ave", "csdsf", "fv3_history2d", "all", .false., "none", 2
240 | "gfs_phys", "csulf_ave", "csulf", "fv3_history2d", "all", .false., "none", 2
241 | "gfs_phys", "csulf_avetoa", "csulftoa", "fv3_history2d", "all", .false., "none", 2
242 | "gfs_phys", "cwork_ave", "cwork_aveclm", "fv3_history2d", "all", .false., "none", 2
243 | "gfs_phys", "evbs_ave", "evbs_ave", "fv3_history2d", "all", .false., "none", 2
244 | "gfs_phys", "evcw_ave", "evcw_ave", "fv3_history2d", "all", .false., "none", 2
245 | "gfs_phys", "fldcp", "fldcp", "fv3_history2d", "all", .false., "none", 2
246 | "gfs_phys", "hgt_hyblev1", "hgt_hyblev1", "fv3_history2d", "all", .false., "none", 2
247 | "gfs_phys", "spfh_hyblev1", "spfh_hyblev1", "fv3_history2d", "all", .false., "none", 2
248 | "gfs_phys", "ugrd_hyblev1", "ugrd_hyblev1", "fv3_history2d", "all", .false., "none", 2
249 | "gfs_phys", "vgrd_hyblev1", "vgrd_hyblev1", "fv3_history2d", "all", .false., "none", 2
250 | "gfs_phys", "tmp_hyblev1", "tmp_hyblev1", "fv3_history2d", "all", .false., "none", 2
251 | "gfs_phys", "gfluxi", "gflux", "fv3_history2d", "all", .false., "none", 2
252 | "gfs_phys", "lhtfl", "lhtfl", "fv3_history2d", "all", .false., "none", 2
253 | "gfs_phys", "shtfl", "shtfl", "fv3_history2d", "all", .false., "none", 2
254 | "gfs_phys", "pevpr", "pevpr", "fv3_history2d", "all", .false., "none", 2
255 | "gfs_phys", "pevpr_ave", "pevpr_ave", "fv3_history2d", "all", .false., "none", 2
256 | "gfs_phys", "sbsno_ave", "sbsno_ave", "fv3_history2d", "all", .false., "none", 2
257 | "gfs_phys", "sfexc", "sfexc", "fv3_history2d", "all", .false., "none", 2
258 | "gfs_phys", "snohf", "snohf", "fv3_history2d", "all", .false., "none", 2
259 | "gfs_phys", "snowc_ave", "snowc_ave", "fv3_history2d", "all", .false., "none", 2
260 | "gfs_phys", "spfhmax2m", "spfhmax_max2m", "fv3_history2d", "all", .false., "none", 2
261 | "gfs_phys", "spfhmin2m", "spfhmin_min2m", "fv3_history2d", "all", .false., "none", 2
262 | "gfs_phys", "tmpmax2m", "tmax_max2m", "fv3_history2d", "all", .false., "none", 2
263 | "gfs_phys", "tmpmin2m", "tmin_min2m", "fv3_history2d", "all", .false., "none", 2
264 | "gfs_phys", "ssrun_acc", "ssrun_acc", "fv3_history2d", "all", .false., "none", 2
265 | "gfs_phys", "sunsd_acc", "sunsd_acc", "fv3_history2d", "all", .false., "none", 2
266 | "gfs_phys", "watr_acc", "watr_acc", "fv3_history2d", "all", .false., "none", 2
267 | "gfs_phys", "wilt", "wilt", "fv3_history2d", "all", .false., "none", 2
268 | "gfs_phys", "vbdsf_ave", "vbdsf_ave", "fv3_history2d", "all", .false., "none", 2
269 | "gfs_phys", "vddsf_ave", "vddsf_ave", "fv3_history2d", "all", .false., "none", 2
270 | "gfs_phys", "nbdsf_ave", "nbdsf_ave", "fv3_history2d", "all", .false., "none", 2
271 | "gfs_phys", "nddsf_ave", "nddsf_ave", "fv3_history2d", "all", .false., "none", 2
272 | "gfs_phys", "trans_ave", "trans_ave", "fv3_history2d", "all", .false., "none", 2
273 |
274 | #=============================================================================================
275 | #
276 | #====> This file can be used with diag_manager/v2.0a (or higher) <====
277 | #
278 | #
279 | # FORMATS FOR FILE ENTRIES (not all input values are used)
280 | # ------------------------
281 | #
282 | #"file_name", output_freq, "output_units", format, "time_units", "long_name",
283 | #
284 | #
285 | #output_freq: > 0 output frequency in "output_units"
286 | # = 0 output frequency every time step
287 | # =-1 output frequency at end of run
288 | #
289 | #output_units = units used for output frequency
290 | # (years, months, days, minutes, hours, seconds)
291 | #
292 | #time_units = units used to label the time axis
293 | # (days, minutes, hours, seconds)
294 | #
295 | #
296 | # FORMAT FOR FIELD ENTRIES (not all input values are used)
297 | # ------------------------
298 | #
299 | #"module_name", "field_name", "output_name", "file_name" "time_sampling", time_avg, "other_opts", packing
300 | #
301 | #time_avg = .true. or .false.
302 | #
303 | #packing = 1 double precision
304 | # = 2 float
305 | # = 4 packed 16-bit integers
306 | # = 8 packed 1-byte (not tested?)
307 |
--------------------------------------------------------------------------------
/cime_config/tables/diag_table_hafs:
--------------------------------------------------------------------------------
1 | 20190901.18Z.C768.32bit.non-hydro
2 | 2019 09 01 18 0 0
3 | #output files
4 | "grid_spec", -1, "months", 1, "days", "time"
5 | #"atmos_4xdaily", 1, "hours", 1, "days", "time"
6 | "atmos_static", -1, "hours", 1, "hours", "time"
7 | "fv3_history", 0, "hours", 1, "hours", "time"
8 | "fv3_history2d", 0, "hours", 1, "hours", "time"
9 | #"ref3D", 0, "hours", 1, "hours", "time"
10 | #"maxmin2D", 1, "hours", 1, "hours", "time"
11 |
12 | #
13 | #=======================
14 | # ATMOSPHERE DIAGNOSTICS
15 | #=======================
16 | ###
17 | # grid_spec
18 | ###
19 | "dynamics", "grid_lon", "grid_lon", "grid_spec", "all", .false., "none", 2,
20 | "dynamics", "grid_lat", "grid_lat", "grid_spec", "all", .false., "none", 2,
21 | "dynamics", "grid_lont", "grid_lont", "grid_spec", "all", .false., "none", 2,
22 | "dynamics", "grid_latt", "grid_latt", "grid_spec", "all", .false., "none", 2,
23 | "dynamics", "area", "area", "grid_spec", "all", .false., "none", 2,
24 | ###
25 | # 4x daily output
26 | ###
27 | # "dynamics", "slp", "slp", "atmos_4xdaily", "all", .false., "none", 2
28 | # "dynamics", "vort850", "vort850", "atmos_4xdaily", "all", .false., "none", 2
29 | # "dynamics", "vort500", "vort500", "atmos_4xdaily", "all", .false., "none", 2
30 | # "dynamics", "vort200", "vort200", "atmos_4xdaily", "all", .false., "none", 2
31 | # "dynamics", "us", "us", "atmos_4xdaily", "all", .false., "none", 2
32 | # "dynamics", "u1000", "u1000", "atmos_4xdaily", "all", .false., "none", 2
33 | # "dynamics", "u850", "u850", "atmos_4xdaily", "all", .false., "none", 2
34 | # "dynamics", "u700", "u700", "atmos_4xdaily", "all", .false., "none", 2
35 | # "dynamics", "u500", "u500", "atmos_4xdaily", "all", .false., "none", 2
36 | # "dynamics", "u200", "u200", "atmos_4xdaily", "all", .false., "none", 2
37 | # "dynamics", "u100", "u100", "atmos_4xdaily", "all", .false., "none", 2
38 | # "dynamics", "u50", "u50", "atmos_4xdaily", "all", .false., "none", 2
39 | # "dynamics", "u10", "u10", "atmos_4xdaily", "all", .false., "none", 2
40 | # "dynamics", "vs", "vs", "atmos_4xdaily", "all", .false., "none", 2
41 | # "dynamics", "v1000", "v1000", "atmos_4xdaily", "all", .false., "none", 2
42 | # "dynamics", "v850", "v850", "atmos_4xdaily", "all", .false., "none", 2
43 | # "dynamics", "v700", "v700", "atmos_4xdaily", "all", .false., "none", 2
44 | # "dynamics", "v500", "v500", "atmos_4xdaily", "all", .false., "none", 2
45 | # "dynamics", "v200", "v200", "atmos_4xdaily", "all", .false., "none", 2
46 | # "dynamics", "v100", "v100", "atmos_4xdaily", "all", .false., "none", 2
47 | # "dynamics", "v50", "v50", "atmos_4xdaily", "all", .false., "none", 2
48 | # "dynamics", "v10", "v10", "atmos_4xdaily", "all", .false., "none", 2
49 | ####
50 | # "dynamics", "tm", "tm", "atmos_4xdaily", "all", .false., "none", 2
51 | # "dynamics", "t1000", "t1000", "atmos_4xdaily", "all", .false., "none", 2
52 | # "dynamics", "t850", "t850", "atmos_4xdaily", "all", .false., "none", 2
53 | # "dynamics", "t700", "t700", "atmos_4xdaily", "all", .false., "none", 2
54 | # "dynamics", "t500", "t500", "atmos_4xdaily", "all", .false., "none", 2
55 | # "dynamics", "t200", "t200", "atmos_4xdaily", "all", .false., "none", 2
56 | # "dynamics", "t100", "t100", "atmos_4xdaily", "all", .false., "none", 2
57 | # "dynamics", "t50", "t50", "atmos_4xdaily", "all", .false., "none", 2
58 | # "dynamics", "t10", "t10", "atmos_4xdaily", "all", .false., "none", 2
59 | ####
60 | # "dynamics", "z1000", "z1000", "atmos_4xdaily", "all", .false., "none", 2
61 | # "dynamics", "z850", "z850", "atmos_4xdaily", "all", .false., "none", 2
62 | # "dynamics", "z700", "z700", "atmos_4xdaily", "all", .false., "none", 2
63 | # "dynamics", "z500", "z500", "atmos_4xdaily", "all", .false., "none", 2
64 | # "dynamics", "z200", "z200", "atmos_4xdaily", "all", .false., "none", 2
65 | # "dynamics", "z100", "z100", "atmos_4xdaily", "all", .false., "none", 2
66 | # "dynamics", "z50", "z50", "atmos_4xdaily", "all", .false., "none", 2
67 | # "dynamics", "z10", "z10", "atmos_4xdaily", "all", .false., "none", 2
68 | ####
69 | #"dynamics", "w1000", "w1000", "atmos_4xdaily", "all", .false., "none", 2
70 | # "dynamics", "w850", "w850", "atmos_4xdaily", "all", .false., "none", 2
71 | # "dynamics", "w700", "w700", "atmos_4xdaily", "all", .false., "none", 2
72 | # "dynamics", "w500", "w500", "atmos_4xdaily", "all", .false., "none", 2
73 | # "dynamics", "w200", "w200", "atmos_4xdaily", "all", .false., "none", 2
74 | ####
75 | # "dynamics", "q1000", "q1000", "atmos_4xdaily", "all", .false., "none", 2
76 | # "dynamics", "q850", "q850", "atmos_4xdaily", "all", .false., "none", 2
77 | # "dynamics", "q700", "q700", "atmos_4xdaily", "all", .false., "none", 2
78 | # "dynamics", "q500", "q500", "atmos_4xdaily", "all", .false., "none", 2
79 | # "dynamics", "q200", "q200", "atmos_4xdaily", "all", .false., "none", 2
80 | # "dynamics", "q100", "q100", "atmos_4xdaily", "all", .false., "none", 2
81 | # "dynamics", "q50", "q50", "atmos_4xdaily", "all", .false., "none", 2
82 | # "dynamics", "q10", "q10", "atmos_4xdaily", "all", .false., "none", 2
83 | ####
84 | # "dynamics", "rh1000", "rh1000", "atmos_4xdaily", "all", .false., "none", 2
85 | # "dynamics", "rh850", "rh850", "atmos_4xdaily", "all", .false., "none", 2
86 | # "dynamics", "rh700", "rh700", "atmos_4xdaily", "all", .false., "none", 2
87 | # "dynamics", "rh500", "rh500", "atmos_4xdaily", "all", .false., "none", 2
88 | # "dynamics", "rh200", "rh200", "atmos_4xdaily", "all", .false., "none", 2
89 | # "dynamics", "omg1000", "omg1000", "atmos_4xdaily", "all", .false., "none", 2
90 | # "dynamics", "omg850", "omg850", "atmos_4xdaily", "all", .false., "none", 2
91 | # "dynamics", "omg700", "omg700", "atmos_4xdaily", "all", .false., "none", 2
92 | # "dynamics", "omg500", "omg500", "atmos_4xdaily", "all", .false., "none", 2
93 | # "dynamics", "omg200", "omg200", "atmos_4xdaily", "all", .false., "none", 2
94 | # "dynamics", "omg100", "omg100", "atmos_4xdaily", "all", .false., "none", 2
95 | # "dynamics", "omg50", "omg50", "atmos_4xdaily", "all", .false., "none", 2
96 | # "dynamics", "omg10", "omg10", "atmos_4xdaily", "all", .false., "none", 2
97 | ####
98 | # "dynamics", "cape", "sbcape", "atmos_4xdaily", "all", .false., "none", 2
99 | # "dynamics", "cin", "sbcin", "atmos_4xdaily", "all", .false., "none", 2
100 | ###
101 | # gfs static data
102 | ###
103 | "dynamics", "pk", "pk", "atmos_static", "all", .false., "none", 2
104 | "dynamics", "bk", "bk", "atmos_static", "all", .false., "none", 2
105 | "dynamics", "hyam", "hyam", "atmos_static", "all", .false., "none", 2
106 | "dynamics", "hybm", "hybm", "atmos_static", "all", .false., "none", 2
107 | "dynamics", "zsurf", "zsurf", "atmos_static", "all", .false., "none", 2
108 | ###
109 | # FV3 variabls needed for NGGPS evaluation
110 | ###
111 | "gfs_dyn", "ucomp", "ugrd", "fv3_history", "all", .false., "none", 2
112 | "gfs_dyn", "vcomp", "vgrd", "fv3_history", "all", .false., "none", 2
113 | "gfs_dyn", "sphum", "spfh", "fv3_history", "all", .false., "none", 2
114 | "gfs_dyn", "temp", "tmp", "fv3_history", "all", .false., "none", 2
115 | "gfs_dyn", "liq_wat", "clwmr", "fv3_history", "all", .false., "none", 2
116 | "gfs_dyn", "o3mr", "o3mr", "fv3_history", "all", .false., "none", 2
117 | "gfs_dyn", "delp", "dpres", "fv3_history", "all", .false., "none", 2
118 | "gfs_dyn", "delz", "delz", "fv3_history", "all", .false., "none", 2
119 | "gfs_dyn", "w", "dzdt", "fv3_history", "all", .false., "none", 2
120 | "gfs_dyn", "ice_wat", "icmr", "fv3_history", "all", .false., "none", 2
121 | "gfs_dyn", "rainwat", "rwmr", "fv3_history", "all", .false., "none", 2
122 | "gfs_dyn", "snowwat", "snmr", "fv3_history", "all", .false., "none", 2
123 | "gfs_dyn", "graupel", "grle", "fv3_history", "all", .false., "none", 2
124 | "gfs_dyn", "ps", "pressfc", "fv3_history", "all", .false., "none", 2
125 | "gfs_dyn", "hs", "hgtsfc", "fv3_history", "all", .false., "none", 2
126 | "gfs_dyn", "cld_amt", "cld_amt", "fv3_history", "all", .false., "none", 2
127 | #"gfs_dyn", "ice_nc", "nicp", "fv3_history", "all", .false., "none", 2
128 | #"gfs_dyn", "rain_nc", "ntrnc", "fv3_history", "all", .false., "none", 2
129 |
130 | ###
131 | # Max hourly fields
132 | ###
133 | "gfs_dyn", "wmaxup", "upvvelmax", "fv3_history", "all", .false., "none", 2
134 | "gfs_dyn", "wmaxdn", "dnvvelmax", "fv3_history", "all", .false., "none", 2
135 | "gfs_dyn", "uhmax03", "uhmax03", "fv3_history", "all", .false., "none", 2
136 | "gfs_dyn", "uhmax25", "uhmax25", "fv3_history", "all", .false., "none", 2
137 | "gfs_dyn", "uhmin03", "uhmin03", "fv3_history", "all", .false., "none", 2
138 | "gfs_dyn", "uhmin25", "uhmin25", "fv3_history", "all", .false., "none", 2
139 | "gfs_dyn", "maxvort01", "maxvort01", "fv3_history", "all", .false., "none", 2
140 | "gfs_dyn", "maxvort02", "maxvort02", "fv3_history", "all", .false., "none", 2
141 | "gfs_dyn", "maxvorthy1", "maxvorthy1", "fv3_history", "all", .false., "none", 2
142 | "gfs_dyn", "ustm", "ustm", "fv3_history", "all", .false., "none", 2
143 | "gfs_dyn", "vstm", "vstm", "fv3_history", "all", .false., "none", 2
144 | "gfs_dyn", "srh01", "srh01", "fv3_history", "all", .false., "none", 2
145 | "gfs_dyn", "srh03", "srh03", "fv3_history", "all", .false., "none", 2
146 |
147 | "gfs_phys", "u10max", "u10max", "fv3_history2d", "all", .false., "none", 2
148 | "gfs_phys", "v10max", "v10max", "fv3_history2d", "all", .false., "none", 2
149 | "gfs_phys", "spd10max", "spd10max", "fv3_history2d", "all", .false., "none", 2
150 | "gfs_phys", "refdmax", "refdmax", "fv3_history2d", "all", .false., "none", 2
151 | "gfs_phys", "refdmax263k", "refdmax263k", "fv3_history2d", "all", .false., "none", 2
152 | "gfs_phys", "t02max", "t02max", "fv3_history2d", "all", .false., "none", 2
153 | "gfs_phys", "t02min", "t02min", "fv3_history2d", "all", .false., "none", 2
154 | "gfs_phys", "rh02max", "rh02max", "fv3_history2d", "all", .false., "none", 2
155 | "gfs_phys", "rh02min", "rh02min", "fv3_history2d", "all", .false., "none", 2
156 |
157 |
158 | "gfs_phys", "ALBDO_ave", "albdo_ave", "fv3_history2d", "all", .false., "none", 2
159 | "gfs_phys", "cnvprcp_ave", "cprat_ave", "fv3_history2d", "all", .false., "none", 2
160 | "gfs_phys", "cnvprcpb_ave", "cpratb_ave", "fv3_history2d", "all", .false., "none", 2
161 | "gfs_phys", "totprcp_ave", "prate_ave", "fv3_history2d", "all", .false., "none", 2
162 | "gfs_phys", "totprcpb_ave", "prateb_ave", "fv3_history2d", "all", .false., "none", 2
163 | "gfs_phys", "DLWRF", "dlwrf_ave", "fv3_history2d", "all", .false., "none", 2
164 | "gfs_phys", "DLWRFI", "dlwrf", "fv3_history2d", "all", .false., "none", 2
165 | "gfs_phys", "ULWRF", "ulwrf_ave", "fv3_history2d", "all", .false., "none", 2
166 | "gfs_phys", "ULWRFI", "ulwrf", "fv3_history2d", "all", .false., "none", 2
167 | "gfs_phys", "DSWRF", "dswrf_ave", "fv3_history2d", "all", .false., "none", 2
168 | "gfs_phys", "DSWRFI", "dswrf", "fv3_history2d", "all", .false., "none", 2
169 | "gfs_phys", "USWRF", "uswrf_ave", "fv3_history2d", "all", .false., "none", 2
170 | "gfs_phys", "USWRFI", "uswrf", "fv3_history2d", "all", .false., "none", 2
171 | "gfs_phys", "DSWRFtoa", "dswrf_avetoa","fv3_history2d", "all", .false., "none", 2
172 | "gfs_phys", "USWRFtoa", "uswrf_avetoa","fv3_history2d", "all", .false., "none", 2
173 | "gfs_phys", "ULWRFtoa", "ulwrf_avetoa","fv3_history2d", "all", .false., "none", 2
174 | "gfs_phys", "gflux_ave", "gflux_ave", "fv3_history2d", "all", .false., "none", 2
175 | "gfs_phys", "hpbl", "hpbl", "fv3_history2d", "all", .false., "none", 2
176 | "gfs_phys", "lhtfl_ave", "lhtfl_ave", "fv3_history2d", "all", .false., "none", 2
177 | "gfs_phys", "shtfl_ave", "shtfl_ave", "fv3_history2d", "all", .false., "none", 2
178 | "gfs_phys", "pwat", "pwatclm", "fv3_history2d", "all", .false., "none", 2
179 | "gfs_phys", "soilm", "soilm", "fv3_history2d", "all", .false., "none", 2
180 | "gfs_phys", "TCDC_aveclm", "tcdc_aveclm", "fv3_history2d", "all", .false., "none", 2
181 | "gfs_phys", "TCDC_avebndcl", "tcdc_avebndcl", "fv3_history2d", "all", .false., "none", 2
182 | "gfs_phys", "TCDC_avehcl", "tcdc_avehcl", "fv3_history2d", "all", .false., "none", 2
183 | "gfs_phys", "TCDC_avelcl", "tcdc_avelcl", "fv3_history2d", "all", .false., "none", 2
184 | "gfs_phys", "TCDC_avemcl", "tcdc_avemcl", "fv3_history2d", "all", .false., "none", 2
185 | "gfs_phys", "TCDCcnvcl", "tcdccnvcl", "fv3_history2d", "all", .false., "none", 2
186 | "gfs_phys", "PREScnvclt", "prescnvclt", "fv3_history2d", "all", .false., "none", 2
187 | "gfs_phys", "PREScnvclb", "prescnvclb", "fv3_history2d", "all", .false., "none", 2
188 | "gfs_phys", "PRES_avehct", "pres_avehct", "fv3_history2d", "all", .false., "none", 2
189 | "gfs_phys", "PRES_avehcb", "pres_avehcb", "fv3_history2d", "all", .false., "none", 2
190 | "gfs_phys", "TEMP_avehct", "tmp_avehct", "fv3_history2d", "all", .false., "none", 2
191 | "gfs_phys", "PRES_avemct", "pres_avemct", "fv3_history2d", "all", .false., "none", 2
192 | "gfs_phys", "PRES_avemcb", "pres_avemcb", "fv3_history2d", "all", .false., "none", 2
193 | "gfs_phys", "TEMP_avemct", "tmp_avemct", "fv3_history2d", "all", .false., "none", 2
194 | "gfs_phys", "PRES_avelct", "pres_avelct", "fv3_history2d", "all", .false., "none", 2
195 | "gfs_phys", "PRES_avelcb", "pres_avelcb", "fv3_history2d", "all", .false., "none", 2
196 | "gfs_phys", "TEMP_avelct", "tmp_avelct", "fv3_history2d", "all", .false., "none", 2
197 | "gfs_phys", "u-gwd_ave", "u-gwd_ave", "fv3_history2d", "all", .false., "none", 2
198 | "gfs_phys", "v-gwd_ave", "v-gwd_ave", "fv3_history2d", "all", .false., "none", 2
199 | "gfs_phys", "dusfc", "uflx_ave", "fv3_history2d", "all", .false., "none", 2
200 | "gfs_phys", "dvsfc", "vflx_ave", "fv3_history2d", "all", .false., "none", 2
201 |
202 | "gfs_phys", "psurf", "pressfc", "fv3_history2d", "all", .false., "none", 2
203 | "gfs_phys", "u10m", "ugrd10m", "fv3_history2d", "all", .false., "none", 2
204 | "gfs_phys", "v10m", "vgrd10m", "fv3_history2d", "all", .false., "none", 2
205 | "gfs_phys", "crain", "crain", "fv3_history2d", "all", .false., "none", 2
206 | "gfs_sfc", "tprcp", "tprcp", "fv3_history2d", "all", .false., "none", 2
207 | "gfs_sfc", "hgtsfc", "orog", "fv3_history2d", "all", .false., "none", 2
208 | "gfs_sfc", "weasd", "weasd", "fv3_history2d", "all", .false., "none", 2
209 | "gfs_sfc", "f10m", "f10m", "fv3_history2d", "all", .false., "none", 2
210 | "gfs_sfc", "q2m", "spfh2m", "fv3_history2d", "all", .false., "none", 2
211 | "gfs_sfc", "t2m", "tmp2m", "fv3_history2d", "all", .false., "none", 2
212 | "gfs_sfc", "tsfc", "tmpsfc", "fv3_history2d", "all", .false., "none", 2
213 | "gfs_sfc", "vtype", "vtype", "fv3_history2d", "all", .false., "none", 2
214 | "gfs_sfc", "stype", "sotyp", "fv3_history2d", "all", .false., "none", 2
215 | "gfs_sfc", "slmsksfc", "land", "fv3_history2d", "all", .false., "none", 2
216 | "gfs_sfc", "vfracsfc", "veg", "fv3_history2d", "all", .false., "none", 2
217 | "gfs_sfc", "zorlsfc", "sfcr", "fv3_history2d", "all", .false., "none", 2
218 | "gfs_sfc", "uustar", "fricv", "fv3_history2d", "all", .false., "none", 2
219 | "gfs_sfc", "soilt1", "soilt1" "fv3_history2d", "all", .false., "none", 2
220 | "gfs_sfc", "soilt2", "soilt2" "fv3_history2d", "all", .false., "none", 2
221 | "gfs_sfc", "soilt3", "soilt3" "fv3_history2d", "all", .false., "none", 2
222 | "gfs_sfc", "soilt4", "soilt4" "fv3_history2d", "all", .false., "none", 2
223 | "gfs_sfc", "soilw1", "soilw1" "fv3_history2d", "all", .false., "none", 2
224 | "gfs_sfc", "soilw2", "soilw2" "fv3_history2d", "all", .false., "none", 2
225 | "gfs_sfc", "soilw3", "soilw3" "fv3_history2d", "all", .false., "none", 2
226 | "gfs_sfc", "soilw4", "soilw4" "fv3_history2d", "all", .false., "none", 2
227 | "gfs_sfc", "slc_1", "soill1", "fv3_history2d", "all", .false., "none", 2
228 | "gfs_sfc", "slc_2", "soill2", "fv3_history2d", "all", .false., "none", 2
229 | "gfs_sfc", "slc_3", "soill3", "fv3_history2d", "all", .false., "none", 2
230 | "gfs_sfc", "slc_4", "soill4", "fv3_history2d", "all", .false., "none", 2
231 | "gfs_sfc", "slope", "sltyp", "fv3_history2d", "all", .false., "none", 2
232 | "gfs_sfc", "alnsf", "alnsf", "fv3_history2d", "all", .false., "none", 2
233 | "gfs_sfc", "alnwf", "alnwf", "fv3_history2d", "all", .false., "none", 2
234 | "gfs_sfc", "alvsf", "alvsf", "fv3_history2d", "all", .false., "none", 2
235 | "gfs_sfc", "alvwf", "alvwf", "fv3_history2d", "all", .false., "none", 2
236 | "gfs_sfc", "canopy", "cnwat", "fv3_history2d", "all", .false., "none", 2
237 | "gfs_sfc", "facsf", "facsf", "fv3_history2d", "all", .false., "none", 2
238 | "gfs_sfc", "facwf", "facwf", "fv3_history2d", "all", .false., "none", 2
239 | "gfs_sfc", "ffhh", "ffhh", "fv3_history2d", "all", .false., "none", 2
240 | "gfs_sfc", "ffmm", "ffmm", "fv3_history2d", "all", .false., "none", 2
241 | "gfs_sfc", "fice", "icec", "fv3_history2d", "all", .false., "none", 2
242 | "gfs_sfc", "hice", "icetk", "fv3_history2d", "all", .false., "none", 2
243 | "gfs_sfc", "snoalb", "snoalb", "fv3_history2d", "all", .false., "none", 2
244 | "gfs_sfc", "shdmax", "shdmax", "fv3_history2d", "all", .false., "none", 2
245 | "gfs_sfc", "shdmin", "shdmin", "fv3_history2d", "all", .false., "none", 2
246 | "gfs_sfc", "snowd", "snod", "fv3_history2d", "all", .false., "none", 2
247 | "gfs_sfc", "tg3", "tg3", "fv3_history2d", "all", .false., "none", 2
248 | "gfs_sfc", "tisfc", "tisfc", "fv3_history2d", "all", .false., "none", 2
249 | "gfs_sfc", "tref", "tref", "fv3_history2d", "all", .false., "none", 2
250 | "gfs_sfc", "z_c", "zc", "fv3_history2d", "all", .false., "none", 2
251 | "gfs_sfc", "c_0", "c0", "fv3_history2d", "all", .false., "none", 2
252 | "gfs_sfc", "c_d", "cd", "fv3_history2d", "all", .false., "none", 2
253 | "gfs_sfc", "w_0", "w0", "fv3_history2d", "all", .false., "none", 2
254 | "gfs_sfc", "w_d", "wd", "fv3_history2d", "all", .false., "none", 2
255 | "gfs_sfc", "xt", "xt", "fv3_history2d", "all", .false., "none", 2
256 | "gfs_sfc", "xz", "xz", "fv3_history2d", "all", .false., "none", 2
257 | "gfs_sfc", "dt_cool", "dtcool", "fv3_history2d", "all", .false., "none", 2
258 | "gfs_sfc", "xs", "xs", "fv3_history2d", "all", .false., "none", 2
259 | "gfs_sfc", "xu", "xu", "fv3_history2d", "all", .false., "none", 2
260 | "gfs_sfc", "xv", "xv", "fv3_history2d", "all", .false., "none", 2
261 | "gfs_sfc", "xtts", "xtts", "fv3_history2d", "all", .false., "none", 2
262 | "gfs_sfc", "xzts", "xzts", "fv3_history2d", "all", .false., "none", 2
263 | "gfs_sfc", "d_conv", "dconv", "fv3_history2d", "all", .false., "none", 2
264 | "gfs_sfc", "qrain", "qrain", "fv3_history2d", "all", .false., "none", 2
265 |
266 | "gfs_phys", "acond", "acond", "fv3_history2d", "all", .false., "none", 2
267 | "gfs_phys", "cduvb_ave", "cduvb_ave", "fv3_history2d", "all", .false., "none", 2
268 | "gfs_phys", "cpofp", "cpofp", "fv3_history2d", "all", .false., "none", 2
269 | "gfs_phys", "duvb_ave", "duvb_ave", "fv3_history2d", "all", .false., "none", 2
270 | "gfs_phys", "csdlf_ave", "csdlf", "fv3_history2d", "all", .false., "none", 2
271 | "gfs_phys", "csusf_ave", "csusf", "fv3_history2d", "all", .false., "none", 2
272 | "gfs_phys", "csusf_avetoa", "csusftoa", "fv3_history2d", "all", .false., "none", 2
273 | "gfs_phys", "csdsf_ave", "csdsf", "fv3_history2d", "all", .false., "none", 2
274 | "gfs_phys", "csulf_ave", "csulf", "fv3_history2d", "all", .false., "none", 2
275 | "gfs_phys", "csulf_avetoa", "csulftoa", "fv3_history2d", "all", .false., "none", 2
276 | "gfs_phys", "cwork_ave", "cwork_aveclm", "fv3_history2d", "all", .false., "none", 2
277 | "gfs_phys", "evbs_ave", "evbs_ave", "fv3_history2d", "all", .false., "none", 2
278 | "gfs_phys", "evcw_ave", "evcw_ave", "fv3_history2d", "all", .false., "none", 2
279 | "gfs_phys", "fldcp", "fldcp", "fv3_history2d", "all", .false., "none", 2
280 | "gfs_phys", "hgt_hyblev1", "hgt_hyblev1", "fv3_history2d", "all", .false., "none", 2
281 | "gfs_phys", "spfh_hyblev1", "spfh_hyblev1", "fv3_history2d", "all", .false., "none", 2
282 | "gfs_phys", "ugrd_hyblev1", "ugrd_hyblev1", "fv3_history2d", "all", .false., "none", 2
283 | "gfs_phys", "vgrd_hyblev1", "vgrd_hyblev1", "fv3_history2d", "all", .false., "none", 2
284 | "gfs_phys", "tmp_hyblev1", "tmp_hyblev1", "fv3_history2d", "all", .false., "none", 2
285 | "gfs_phys", "gfluxi", "gflux", "fv3_history2d", "all", .false., "none", 2
286 | "gfs_phys", "lhtfl", "lhtfl", "fv3_history2d", "all", .false., "none", 2
287 | "gfs_phys", "shtfl", "shtfl", "fv3_history2d", "all", .false., "none", 2
288 | "gfs_phys", "pevpr", "pevpr", "fv3_history2d", "all", .false., "none", 2
289 | "gfs_phys", "pevpr_ave", "pevpr_ave", "fv3_history2d", "all", .false., "none", 2
290 | "gfs_phys", "sbsno_ave", "sbsno_ave", "fv3_history2d", "all", .false., "none", 2
291 | "gfs_phys", "sfexc", "sfexc", "fv3_history2d", "all", .false., "none", 2
292 | "gfs_phys", "snohf", "snohf", "fv3_history2d", "all", .false., "none", 2
293 | "gfs_phys", "snowc_ave", "snowc_ave", "fv3_history2d", "all", .false., "none", 2
294 | "gfs_phys", "spfhmax2m", "spfhmax_max2m", "fv3_history2d", "all", .false., "none", 2
295 | "gfs_phys", "spfhmin2m", "spfhmin_min2m", "fv3_history2d", "all", .false., "none", 2
296 | "gfs_phys", "tmpmax2m", "tmax_max2m", "fv3_history2d", "all", .false., "none", 2
297 | "gfs_phys", "tmpmin2m", "tmin_min2m", "fv3_history2d", "all", .false., "none", 2
298 | "gfs_phys", "ssrun_acc", "ssrun_acc", "fv3_history2d", "all", .false., "none", 2
299 | "gfs_phys", "sunsd_acc", "sunsd_acc", "fv3_history2d", "all", .false., "none", 2
300 | "gfs_phys", "watr_acc", "watr_acc", "fv3_history2d", "all", .false., "none", 2
301 | "gfs_phys", "wilt", "wilt", "fv3_history2d", "all", .false., "none", 2
302 | "gfs_phys", "vbdsf_ave", "vbdsf_ave", "fv3_history2d", "all", .false., "none", 2
303 | "gfs_phys", "vddsf_ave", "vddsf_ave", "fv3_history2d", "all", .false., "none", 2
304 | "gfs_phys", "nbdsf_ave", "nbdsf_ave", "fv3_history2d", "all", .false., "none", 2
305 | "gfs_phys", "nddsf_ave", "nddsf_ave", "fv3_history2d", "all", .false., "none", 2
306 | "gfs_phys", "trans_ave", "trans_ave", "fv3_history2d", "all", .false., "none", 2
307 |
308 | # Reflectivity from GFDL microphysics
309 | "gfs_phys", "refl_10cm", "refl_10cm", "fv3_history2d", "all", .false., "none", 2
310 |
311 | #Max/Min must be kept in separate files. Time is controlled by diag_table
312 | # "dynamics", "uh25", "MXUPHL2_5km", "maxmin2D", "all", max, "none", 2
313 | # "dynamics", "uh25", "MNUPHL2_5km", "maxmin2D", "all", min, "none", 2
314 | # "dynamics", "max_reflectivity", "MAXREFC", "maxmin2D", "all", max, "none", 2
315 | # "dynamics", "base_reflectivity", "MAXREF_1km", "maxmin2D", "all", max, "none", 2
316 | #
317 | #=============================================================================================
318 | #
319 | #====> This file can be used with diag_manager/v2.0a (or higher) <====
320 | #
321 | #
322 | # FORMATS FOR FILE ENTRIES (not all input values are used)
323 | # ------------------------
324 | #
325 | #"file_name", output_freq, "output_units", format, "time_units", "long_name",
326 | #
327 | #
328 | #output_freq: > 0 output frequency in "output_units"
329 | # = 0 output frequency every time step
330 | # =-1 output frequency at end of run
331 | #
332 | #output_units = units used for output frequency
333 | # (years, months, days, minutes, hours, seconds)
334 | #
335 | #time_units = units used to label the time axis
336 | # (days, minutes, hours, seconds)
337 | #
338 | #
339 | # FORMAT FOR FIELD ENTRIES (not all input values are used)
340 | # ------------------------
341 | #
342 | #"module_name", "field_name", "output_name", "file_name" "time_sampling", time_avg, "other_opts", packing
343 | #
344 | #time_avg = .true. or .false.
345 | #
346 | #packing = 1 double precision
347 | # = 2 float
348 | # = 4 packed 16-bit integers
349 | # = 8 packed 1-byte (not tested?)
350 |
--------------------------------------------------------------------------------
/cime_config/buildnml:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | """ufsatm namelist creator
4 | """
5 |
6 | # Typically ignore this.
7 | # pylint: disable=invalid-name
8 |
9 | # Disable these because this is our standard setup
10 | # pylint: disable=wildcard-import,unused-wildcard-import,wrong-import-position
11 |
12 | import os, sys, copy, time
13 | from datetime import datetime
14 |
15 | CIMEROOT = os.environ.get("CIMEROOT")
16 | if CIMEROOT is None:
17 | raise SystemExit("ERROR: must set CIMEROOT environment variable")
18 | sys.path.append(os.path.join(CIMEROOT, "scripts", "Tools"))
19 |
20 | from standard_script_setup import *
21 | from CIME.case import Case
22 | from CIME.nmlgen import NamelistGenerator
23 | from CIME.namelist import parse
24 | from CIME.buildnml import create_namelist_infile, parse_input
25 | from CIME.utils import expect, safe_copy, symlink_force, ls_sorted_by_mtime
26 |
27 | logger = logging.getLogger(__name__)
28 |
29 | def date_yyyymmddhh(case):
30 | run_start_date = case.get_value('RUN_STARTDATE').split('-')
31 | yyyy = int(run_start_date[0])
32 | mm = int(run_start_date[1])
33 | dd = int(run_start_date[2])
34 | run_start_tod = case.get_value('START_TOD')
35 | hh = int(run_start_tod)//3600
36 | return yyyy, mm, dd, hh
37 |
38 | # find factors of a number
39 | def factors(n):
40 | return set(x for tup in ([i, n//i] for i in range(1, int(n**0.5)+1) if n % i == 0) for x in tup)
41 |
42 | # check if all elements in a list are same
43 | def checkList(lst):
44 | ele = lst[0]
45 | chk = True
46 | # Comparing each element with first item
47 | for item in lst:
48 | if ele != item:
49 | chk = False
50 | break
51 | return chk
52 |
53 | # returns active components
54 | def active_components(case):
55 | # query compset
56 | compset = case.get_value("COMPSET")
57 | # parse compset
58 | components = compset.split("_")[1:]
59 | # remove stub components
60 | components = [ x for x in components if "S" not in x[0] ]
61 |
62 | return components
63 |
64 | # converts one item list to value, if list has more than one item then do nothing
65 | def list_to_value(val):
66 | if isinstance(val, list):
67 | if len(val) == 1:
68 | return val[0]
69 | else:
70 | return val
71 | else:
72 | return val
73 |
74 | # keep only changed namelist options
75 | def nmlKeepChangedOnly(nmlgen_ini, nmlgen_cur, namelist_user):
76 |
77 | nmlgen_ret = copy.copy(nmlgen_cur)
78 | #pylint: disable=protected-access
79 | for nml in nmlgen_cur._namelist.get_group_names():
80 | for var in nmlgen_cur.get_group_variables(nml):
81 | matched = False
82 |
83 | # if it is an user modified parameter, add it to namelist in any case
84 | lst = namelist_user.get_value(var)
85 | if any(len(item) > 0 for item in lst):
86 | continue
87 |
88 | # list of namelist options that will always appear in the namelist file
89 | lst = ['ccpp_suite', 'nstf_name']
90 | if var in lst:
91 | continue
92 |
93 | # get type and size of namelist variable
94 | var_type, _, var_size, = nmlgen_cur._definition.split_type_string(var)
95 |
96 | # retrieve the initial (default) and current values of the namelist variable
97 | ini = nmlgen_ini.get_value(var)
98 | cur = nmlgen_cur.get_value(var)
99 |
100 | # if it is list and size is different from var_size
101 | if var_size > 1:
102 | # create empty list
103 | var_act = [None]*var_size
104 | var_def = [None]*var_size
105 |
106 | # force to have same length
107 | var_act_len = len(cur)
108 | var_act[0:var_act_len] = [x for x in cur]
109 | var_def_len = len(ini)
110 | var_def[0:var_def_len] = [x for x in ini]
111 |
112 | # compare
113 | if var_type == 'character' or var_type == 'logical':
114 | var_act = ['xyz' if x is None else x.lower() for x in var_act]
115 | var_def = ['xyz' if x is None else x.lower() for x in var_def]
116 | matched = all(y.startswith(x) for x,y in zip(var_act,var_def))
117 | elif var_type == 'integer':
118 | var_act = [-99 if x is None else int(x) for x in var_act]
119 | var_def = [-99 if x is None else int(x) for x in var_def]
120 | matched = all(x == y for x,y in zip(var_act,var_def))
121 | elif var_type == 'real':
122 | var_act = [-99.9 if x is None else float(eval(x.lower().replace('d','e'))) for x in var_act]
123 | var_def = [-99.9 if x is None else float(eval(x.lower().replace('d','e'))) for x in var_def]
124 | matched = all(x == y for x,y in zip(var_act,var_def))
125 | else:
126 | if var_type == 'character' or var_type == 'logical':
127 | if not ini.strip() == "":
128 | if cur.startswith(ini):
129 | matched = True
130 | else:
131 | if ini.strip() == "" and cur.strip() == "":
132 | matched = True
133 | elif var_type == 'integer':
134 | if ini:
135 | if int(cur) == int(ini):
136 | matched = True
137 | else:
138 | if not (ini and cur):
139 | matched = True
140 | elif var_type == 'real' and ini and cur:
141 | if float(eval(ini.lower().replace('d','e'))) == \
142 | float(eval(cur.lower().replace('d','e'))):
143 | matched = True
144 |
145 | # if there is a match, remove it from the list
146 | if matched:
147 | nmlgen_ret._namelist.delete_variable(nml, var)
148 |
149 | return nmlgen_ret
150 |
151 | # copy namelist options from one namelist to other
152 | def nmlOverwrite(nmlgen_src, nmlgen_dst):
153 |
154 | nmlgen_ret = copy.copy(nmlgen_dst)
155 | #pylint: disable=protected-access
156 | for nml in nmlgen_src.get_group_names():
157 | for var in nmlgen_src.get_group_variables(nml):
158 | nmlgen_ret.set_value(var, nmlgen_src.get_value(var))
159 |
160 | return nmlgen_ret
161 |
162 | # prepares the input files of a case and places in rundir:
163 | def prep_input(case, casedocsdir, datestamp, nmlgen_input, prefix, input_type):
164 | casename = case.get_value("CASE")
165 | Buildconf = case.get_value("CASEBUILD")
166 | rundir = case.get_value("RUNDIR")
167 | atm_grid = case.get_value("ATM_GRID").replace('r', '')
168 | testcase = case.get_value("TEST")
169 | din_loc_root = case.get_value("DIN_LOC_ROOT")
170 | din_loc_ic = case.get_value("DIN_LOC_IC")
171 | is_restart = case.get_value("CONTINUE_RUN")
172 | srcroot = case.get_value("SRCROOT")
173 | caseroot = case.get_value("CASEROOT")
174 |
175 | #----------------------------------------------------
176 | # Query jobs
177 | #----------------------------------------------------
178 |
179 | env_workflow = case.get_env("workflow")
180 | jobs = env_workflow.get_jobs()
181 |
182 | #----------------------------------------------------
183 | # Create list of input files
184 | #----------------------------------------------------
185 |
186 | # TODO: make it xmlchnage variable
187 | new_o3forc = True
188 | if "s2s" in app:
189 | new_o3forc = False
190 |
191 | # Query date and time
192 | yyyy, mm, dd, hh = date_yyyymmddhh(case)
193 |
194 | # Define base directories
195 | icdir = os.path.join(din_loc_ic,"{:04d}{:02d}".format(yyyy,mm),"{:04d}{:02d}{:02d}".format(yyyy,mm,dd))
196 | if "hafs" in app:
197 | dir_fix_am = os.path.join(din_loc_root,"regional","fix_am")
198 | dir_fix_ufsatm = os.path.join(din_loc_root,"regional","fix",atm_grid)
199 | dir_fix_parm = os.path.join(din_loc_root,"parm")
200 | dir_fix_lib = os.path.join(din_loc_root,"lib")
201 | dir_bdy = os.path.join(din_loc_root,"regional","bcond","{:04d}{:02d}{:02d}{:02d}".format(int(yyyy),int(mm),int(dd),hh))
202 | else:
203 | dir_fix_am = os.path.join(din_loc_root,"global","fix","fix_am.v{}".format(datestamp))
204 | if "s2s" in app:
205 | dir_fix_ufsatm = os.path.join(din_loc_root,"global","fix","fix_fv3_gmted2010.v{}".format(datestamp),"{}_s2s".format(atm_grid))
206 | else:
207 | dir_fix_ufsatm = os.path.join(din_loc_root,"global","fix","fix_fv3_gmted2010.v{}".format(datestamp),atm_grid)
208 | dir_fix_parm = os.path.join(din_loc_root,"parm")
209 | dir_fix_lib = os.path.join(din_loc_root,"lib")
210 |
211 | # Create generic dictionary to hold input files: [source_file, "ln" | "cp", target_file]
212 | input_files = dict()
213 |
214 | # Grid and orography data
215 | if "hafs" in app:
216 | halo_lst = ["halo0", "halo3", "halo4"]
217 | for halo in halo_lst:
218 | input_files["grid_tile7_{}".format(halo)] = [os.path.join(dir_fix_ufsatm,atm_grid+"_grid.tile7.{}.nc".format(halo)), "ln", os.path.join("INPUT",atm_grid+"_grid.tile7.{}.nc".format(halo))]
219 | input_files["orog_tile7_{}".format(halo)] = [os.path.join(dir_fix_ufsatm,atm_grid+"_oro_data.tile7.{}.nc".format(halo)), "ln", os.path.join("INPUT",atm_grid+"_oro_data.tile7.{}.nc".format(halo))]
220 | input_files["oro_data_tile7h0"] = [os.path.join(dir_fix_ufsatm,atm_grid+"_oro_data.tile7.halo0.nc"), "ln", os.path.join("INPUT","oro_data.nc")]
221 | input_files["oro_data_tile7h4"] = [os.path.join(dir_fix_ufsatm,atm_grid+"_oro_data.tile7.halo4.nc"), "ln", os.path.join("INPUT","oro_data.tile7.halo4.nc")]
222 | input_files["grid_tile7h3"] = [os.path.join(dir_fix_ufsatm,atm_grid+"_grid.tile7.halo3.nc"), "ln", os.path.join("INPUT",atm_grid+"_grid.tile7.nc")]
223 | input_files["grid_tile7h0"] = [os.path.join(dir_fix_ufsatm,atm_grid+"_grid.tile7.halo0.nc"), "ln", os.path.join("INPUT","grid.tile7.halo0.nc")]
224 | input_files["grid_tile7h4"] = [os.path.join(dir_fix_ufsatm,atm_grid+"_grid.tile7.halo4.nc"), "ln", os.path.join("INPUT","grid.tile7.halo4.nc")]
225 | else:
226 | for tile in range(1,7):
227 | input_files["grid_tile{}".format(tile)] = [os.path.join(dir_fix_ufsatm,atm_grid+"_grid.tile{}.nc".format(tile)), "ln", os.path.join("INPUT",atm_grid+"_grid.tile{}.nc".format(tile))]
228 | input_files["orog_data{}".format(tile)] = [os.path.join(dir_fix_ufsatm,atm_grid+"_oro_data.tile{}.nc".format(tile)), "ln", os.path.join("INPUT","oro_data.tile{}.nc".format(tile))]
229 |
230 | if "s2s" in app:
231 | input_files["grid_spec"] = [os.path.join(icdir,"grid_spec.nc"), "ln", os.path.join("INPUT","grid_spec.nc")]
232 | else:
233 | input_files["grid_spec"] = [os.path.join(dir_fix_ufsatm,atm_grid+"_mosaic.nc"), "ln", os.path.join("INPUT","grid_spec.nc")]
234 | input_files["grid_mosaic"] = [os.path.join(dir_fix_ufsatm,atm_grid+"_mosaic.nc"), "ln", os.path.join("INPUT",atm_grid+"_mosaic.nc")]
235 |
236 | # GFS standard input files
237 | iaer = nmlgen_input.get_value('iaer')
238 | ico2 = nmlgen_input.get_value('ico2')
239 |
240 | if new_o3forc:
241 | input_files["o3forc"] = [os.path.join(dir_fix_am,"ozprdlos_2015_new_sbuvO3_tclm15_nuchem.f77"), "ln", "global_o3prdlos.f77"]
242 | else:
243 | input_files["o3forc"] = [os.path.join(dir_fix_am,"global_o3prdlos.f77"), "ln", "global_o3prdlos.f77"]
244 |
245 | input_files["h2oforc"] = [os.path.join(dir_fix_am,"global_h2o_pltc.f77"), "ln", "global_h2oprdlos.f77"]
246 | input_files["solcnst"] = [os.path.join(dir_fix_am,"global_solarconstant_noaa_an.txt"), "ln", "solarconstant_noaa_an.txt"]
247 | input_files["sfcemis"] = [os.path.join(dir_fix_am,"global_sfc_emissivity_idx.txt"), "ln", "sfc_emissivity_idx.txt"]
248 | input_files["co2hist"] = [os.path.join(dir_fix_am,"global_co2historicaldata_glob.txt"), "ln", "co2historicaldata_glob.txt"]
249 | input_files["co2mont"] = [os.path.join(dir_fix_am,"co2monthlycyc.txt"), "ln", "co2monthlycyc.txt"]
250 |
251 | # NOTE: CIME.namelist.parse returns single values as one element list
252 | ico2 = list_to_value(ico2)
253 | if ico2 and int(ico2) > 0:
254 | # TODO: make it automatic
255 | yy = int(time.strftime("%Y,%m,%d,%H,%M,%S").split(',')[0])
256 | for year in range(2009,yy+1):
257 | input_files["co2his_{}".format(year)] = [os.path.join(dir_fix_am,"fix_co2_proj","global_co2historicaldata_{}.txt".format(year)), "ln", "co2historicaldata_{}.txt".format(year)]
258 |
259 | input_files["clmaero"] = [os.path.join(dir_fix_am,"global_climaeropac_global.txt"), "ln", "aerosol.dat"]
260 |
261 | # NOTE: CIME.namelist.parse returns single values as one element list
262 | iaer = list_to_value(iaer)
263 | if iaer and int(iaer) > 0 and "hafs" not in app:
264 | for year in range(1850,2000,10):
265 | input_files["volaer_{}".format(year)] = [os.path.join(dir_fix_am,"global_volcanic_aerosols_{}-{}.txt".format(year,year+9)), "ln", "volcanic_aerosols_{}-{}.txt".format(year,year+9)]
266 |
267 | # Fixed files
268 | for var in nmlgen_input.get_group_variables('namsfc'):
269 | #pylint: disable=protected-access
270 | var_str = str(nmlgen_input.get_value(var)).replace("'", "").strip()
271 | if not var_str.startswith('igbp') and var_str.endswith('.grb'):
272 | input_files[var] = [var_str, "ln", os.path.basename(var_str)]
273 |
274 | # Look for NCEPLIBS_DIR
275 | nceplibs_dir = os.environ.get("NCEPLIBS_DIR")
276 | if "case.chgres" in jobs:
277 | expect(nceplibs_dir, "NCEPLIBS_DIR environment variable need to be set to process raw input data!")
278 | expect(os.path.exists(nceplibs_dir),"NCEPLIBS_DIR {} not found".format(nceplibs_dir))
279 |
280 | # Pre-processing specific files (chgres)
281 | if "case.chgres" in jobs:
282 | # Fixed files for chgres
283 | for tile in range(1,7):
284 | for f in ["facsf", "maximum_snow_albedo", "slope_type", "snowfree_albedo", "soil_type", "substrate_temperature", "vegetation_greenness", "vegetation_type"]:
285 | input_files["{}{}".format(f,tile)] = [os.path.join(dir_fix_ufsatm,"fix_sfc",atm_grid+".{}.tile{}.nc".format(f,tile)), "ln", os.path.join("INPUT",atm_grid+".{}.tile{}.nc".format(f,tile))]
286 |
287 | # Vertical layer file for chgres
288 | levp = nmlgen_input.get_value("levp")
289 | input_files["global_hyblev"] = [os.path.join(dir_fix_am,"global_hyblev.l{}.txt".format(levp)), "ln", os.path.join("INPUT","global_hyblev.l{}.txt".format(levp))]
290 |
291 | # Grib2 specific file
292 | input_files["var_map"] = [os.path.join(nceplibs_dir,"share","GFSphys_var_map.txt"), "ln", "GFSphys_var_map.txt"]
293 |
294 | # Post-processing specific files (gfs_post, copy from source directory)
295 | if "case.gfs_post" in jobs:
296 | src_file = os.path.join(caseroot,"SourceMods","src.ufsatm","postxconfig-NT-GFS.txt")
297 | dst_file = os.path.join(rundir, "postxconfig-NT-GFS.txt")
298 | if os.path.isfile(dst_file):
299 | os.remove(dst_file)
300 |
301 | if os.path.isfile(src_file):
302 | safe_copy(src_file, dst_file)
303 | logger.info("Using {} for post-processing".format(src_file))
304 | else:
305 | logger.info("Using {} for post-processing".format(os.path.join(nceplibs_dir,"share","postxconfig-NT-GFS.txt")))
306 | input_files["postxconfig1"] = [os.path.join(nceplibs_dir,"share","postxconfig-NT-GFS.txt"), "ln", "postxconfig-NT-GFS.txt"]
307 |
308 | src_file = os.path.join(caseroot,"SourceMods","src.ufsatm","postxconfig-NT-GFS-F00.txt")
309 | dst_file = os.path.join(rundir, "postxconfig-NT-GFS-F00.txt")
310 | if os.path.isfile(dst_file):
311 | os.remove(dst_file)
312 |
313 | if os.path.isfile(src_file):
314 | safe_copy(src_file, dst_file)
315 | logger.info("Using {} for post-processing".format(src_file))
316 | else:
317 | logger.info("Using {} for post-processing".format(os.path.join(nceplibs_dir,"share","postxconfig-NT-GFS-F00.txt")))
318 | input_files["postxconfig2"] = [os.path.join(nceplibs_dir,"share","postxconfig-NT-GFS-F00.txt"), "ln", "postxconfig-NT-GFS-F00.txt"]
319 |
320 | input_files["params_grib2_tbl"] = [os.path.join(nceplibs_dir,"share","params_grib2_tbl_new"), "ln", "params_grib2_tbl_new"]
321 |
322 | # Make sure that rundir exists. If not, make it:
323 | if not os.path.exists(rundir):
324 | os.makedirs(rundir)
325 |
326 | # Create INPUT and RESTART directories
327 | logger.info("\tCreating INPUT and RESTART directory")
328 | for _dir in ("INPUT","RESTART"):
329 | fulldir = os.path.join(rundir, _dir)
330 | if not os.path.exists(fulldir):
331 | os.makedirs(fulldir)
332 |
333 | # For cime tests that use two test directories
334 | rundirdst = rundir
335 | if rundir.endswith("case2run"):
336 | rundirsrc = os.path.abspath(os.path.join(rundir, os.pardir))
337 | else:
338 | rundirsrc = rundir
339 |
340 | # Initial conditions
341 | if is_restart: # Warm start
342 | # Tiled files
343 | tile_max = 7
344 | if "hafs" in app:
345 | # Regional case has only one tile (1)
346 | tile_max = 2
347 |
348 | lst = ["fv_core.res", "fv_srf_wnd.res", "fv_tracer.res", "phy_data", "sfc_data"]
349 | lst = [prefix + f for f in lst]
350 | for f in lst:
351 | for tile in range(1,tile_max):
352 | if "_data" in f and "hafs" in app:
353 | src_file = os.path.join(rundir,"RESTART","{}.nc".format(f))
354 | tgt_file = os.path.join(rundir,"INPUT","{}.nc".format(f.replace(prefix,"")))
355 | else:
356 | src_file = os.path.join(rundir,"RESTART","{}.tile{}.nc".format(f,tile))
357 | tgt_file = os.path.join(rundir,"INPUT","{}.tile{}.nc".format(f.replace(prefix,""),tile))
358 | if not os.path.isfile(src_file):
359 | expect(False, "{} is missing.".format(src_file))
360 | else:
361 | safe_copy(src_file, tgt_file)
362 |
363 | # Others
364 | lst = ["fv_core.res.nc", "coupler.res"]
365 | lst = [prefix + f for f in lst]
366 | for f in lst:
367 | src_file = os.path.join(rundir,"RESTART",f)
368 | tgt_file = os.path.join(rundir,"INPUT",f.replace(prefix,""))
369 | if not os.path.isfile(src_file):
370 | expect(False, "{} is missing.".format(src_file))
371 | else:
372 | safe_copy(src_file, tgt_file)
373 |
374 | # Reorder boundary files
375 | if "hafs" in app:
376 | # Boundary conditions
377 | lst = ls_sorted_by_mtime(dir_bdy)
378 | lst.remove("gfs_ctrl.nc")
379 | lst.remove("gfs_data.tile7.nc")
380 | lst.remove("sfc_data.tile7.nc")
381 | for f in lst:
382 | # Remove old links
383 | src_file = os.path.join(rundirdst,"INPUT",f)
384 | if os.path.isfile(src_file):
385 | os.remove(src_file)
386 |
387 | # Link files again
388 | time_step = int(f.split(".")[2])
389 | #logger.warning("time_step = {}".format(time_step))
390 | if time_step < nhours_fcst_pre:
391 | continue
392 | else:
393 | src_file = os.path.join(dir_bdy,f)
394 | dst_file = os.path.join(rundir,"INPUT","gfs_bndy.tile7.{:03d}.nc".format(time_step-nhours_fcst_pre))
395 | #logger.warning("{} --> {}".format(src_file, dst_file))
396 | symlink_force(src_file, dst_file)
397 |
398 | else: # Cold start
399 | if "hafs" in app:
400 | # Boundary conditions
401 | lst = ls_sorted_by_mtime(dir_bdy)
402 | for f in lst:
403 | # Link files
404 | symlink_force(os.path.join(dir_bdy,f), os.path.join(rundirdst,"INPUT",f))
405 |
406 | symlink_force(os.path.join(dir_bdy,"sfc_data.tile7.nc"), os.path.join(rundirdst,"INPUT","sfc_data.nc"))
407 | symlink_force(os.path.join(dir_bdy,"gfs_data.tile7.nc"), os.path.join(rundirdst,"INPUT","gfs_data.nc"))
408 | else:
409 | # Remove restart files form INPUT/ directory, if there are
410 | # Tiled files
411 | lst = ["fv_core.res", "fv_srf_wnd.res", "fv_tracer.res", "phy_data", "sfc_data"]
412 | for f in lst:
413 | for tile in range(1,7):
414 | src_file = os.path.join(rundir,"INPUT","{}.tile{}.nc".format(f,tile))
415 | if os.path.isfile(src_file):
416 | logger.warning("removing file {}".format(src_file))
417 | os.remove(src_file)
418 |
419 | # Others
420 | lst = ["fv_core.res.nc", "coupler.res"]
421 | for f in lst:
422 | src_file = os.path.join(rundir,"INPUT",f)
423 | if os.path.isfile(src_file):
424 | logger.warning("removing file {}".format(src_file))
425 | os.remove(src_file)
426 |
427 | # Check chgres processes initial condition exists or not?
428 | src_file = os.path.join(rundirsrc,"INPUT","{}.".format(atm_grid)+"{:04d}-{:02d}-{:02d}".format(yyyy,mm,dd)+"_{:02d}.gfs_ctrl.nc".format(hh))
429 | if os.path.isfile(src_file):
430 | # Link existing initial condition
431 | symlink_force(src_file, os.path.join(rundirdst,"INPUT","gfs_ctrl.nc"))
432 |
433 | lst = ["gfs_data", "sfc_data"]
434 | for f in lst:
435 | for tile in range(1,7):
436 | src_file = os.path.join(rundirsrc,"INPUT","{}.".format(atm_grid)+"{:04d}-{:02d}-{:02d}".format(yyyy,mm,dd)+"_{:02d}.".format(hh)+f+".tile{}.nc".format(tile))
437 | tgt_file = os.path.join(rundirdst,"INPUT","{}.tile{}.nc".format(f,tile))
438 | if os.path.isfile(src_file):
439 | symlink_force(src_file, tgt_file)
440 | logger.info("chgres source file {} linked to {}".format(src_file, tgt_file))
441 | else:
442 | logger.debug("chgres source file {} not found".format(src_file))
443 | else:
444 | # Link pre-staged initial condition, not processed by workflow with chgres
445 | src_file = os.path.join(icdir,"gfs_ctrl.nc")
446 | if os.path.isfile(src_file):
447 | symlink_force(src_file, os.path.join(rundirdst,"INPUT","gfs_ctrl.nc"))
448 | else:
449 | logger.warning("initial condition file {} is required! Exiting ...".format(src_file))
450 |
451 | lst = ["gfs_data", "sfc_data"]
452 | for f in lst:
453 | for tile in range(1,7):
454 | src_file = os.path.join(icdir,f+".tile{}.nc".format(tile))
455 | tgt_file = os.path.join(rundirdst,"INPUT","{}.tile{}.nc".format(f,tile))
456 | if os.path.isfile(src_file):
457 | symlink_force(src_file, tgt_file)
458 | logger.info("initial condition file {} linked to {}".format(src_file, tgt_file))
459 | else:
460 | logger.warning("initial condition file {} is required! Exiting ...".format(src_file))
461 |
462 | # Write input file list
463 | with open(os.path.join(Buildconf,"ufsatm.input_data_list"), 'w') as input_data_list:
464 | for k,v in input_files.items():
465 | input_data_list.write(k+" = "+v[0]+"\n")
466 |
467 | # Copy/Link files
468 | for k,v in input_files.items():
469 | if not os.path.isfile(v[0]):
470 | logger.warning("WARNING: data file {} not found, will attempt to download.".format(v[0]))
471 | elif "ln" in v[1]:
472 | symlink_force(v[0], os.path.join(rundir,v[2]))
473 | elif "cp":
474 | safe_copy(v[0], os.path.join(rundir,v[2]))
475 |
476 | # Copy *_table files
477 | cimeroot_ufsatm = os.path.join(srcroot, "src", "model", "FV3", "cime", "cime_config")
478 | for f in ["data_table_{}".format(app), "diag_table_{}".format(app), "field_table_{}".format(app)]:
479 | if not os.path.isfile(os.path.join(rundir,f)):
480 | safe_copy(os.path.join(cimeroot_ufsatm,"tables",f),os.path.join(rundir,f.replace("_{}".format(app),"")))
481 |
482 | # pylint: disable=too-many-arguments,too-many-locals,too-many-branches,too-many-statements
483 | ####################################################################################
484 | def _create_namelist_input(case, confdir, config, infile, nmlgen_model, nmlgen_input, nmlgen_input_def, namelist_user, datestamp, input_type):
485 | ####################################################################################
486 | """Write out the namelist for this component.
487 |
488 | Most arguments are the same as those for `NamelistGenerator`.
489 | The `confdir` argument is used to specify the directory in which output files will be placed.
490 | """
491 | #----------------------------------------------------
492 | # Clear out old data.
493 | #----------------------------------------------------
494 | data_list_path = os.path.join(case.get_case_root(), "Buildconf", "ufsatm.input_data_list")
495 |
496 | #----------------------------------------------------
497 | # Initialize namelist defaults
498 | #----------------------------------------------------
499 |
500 | nmlgen_input.init_defaults(infile, config)
501 | nmlgen_input_def.init_defaults(infile, {})
502 |
503 | #----------------------------------------------------
504 | # Modify namelist defaults
505 | #----------------------------------------------------
506 |
507 | # Define base directory
508 | din_loc_root = case.get_value("DIN_LOC_ROOT")
509 | if "hafs" in app:
510 | dir_fix_am = os.path.join(din_loc_root,"regional","fix_am")
511 | else:
512 | dir_fix_am = os.path.join(din_loc_root,"global","fix","fix_am.v{}".format(datestamp))
513 |
514 | # Spectral truncation and regular grid resolution based on FV3 resolution
515 | atm_grid = case.get_value("ATM_GRID").replace('r', '')
516 | res = int(atm_grid.replace('C',''))
517 | jcap = 2*res-2
518 | lonb = 4*res
519 | latb = 2*res
520 |
521 | # Customization for S2S, just for C96
522 | if "s2s" in app:
523 | if res == 96:
524 | jcap = 126
525 | lonb = 384
526 | latb = 190
527 |
528 | # Fix files, changes based on the selected resolution
529 | nmlgen_input.set_value('fnglac', value=os.path.join(dir_fix_am,"global_glacier.2x2.grb"))
530 | nmlgen_input.set_value('fnmxic', value=os.path.join(dir_fix_am,"global_maxice.2x2.grb"))
531 | nmlgen_input.set_value('fntsfc', value=os.path.join(dir_fix_am,"RTGSST.1982.2012.monthly.clim.grb"))
532 | nmlgen_input.set_value('fnsnoc', value=os.path.join(dir_fix_am,"global_snoclim.1.875.grb"))
533 | nmlgen_input.set_value('fnzorc', value="igbp")
534 | nmlgen_input.set_value('fnalbc2', value=os.path.join(dir_fix_am,"global_albedo4.1x1.grb"))
535 | nmlgen_input.set_value('fnaisc', value=os.path.join(dir_fix_am,"CFSR.SEAICE.1982.2012.monthly.clim.grb"))
536 | nmlgen_input.set_value('fntg3c', value=os.path.join(dir_fix_am,"global_tg3clim.2.6x1.5.grb"))
537 | nmlgen_input.set_value('fnvegc', value=os.path.join(dir_fix_am,"global_vegfrac.0.144.decpercent.grb"))
538 | if "mrweather" in app:
539 | nmlgen_input.set_value('fnmskh', value=os.path.join(dir_fix_am,"global_slmask.t1534.3072.1536.grb"))
540 | else:
541 | nmlgen_input.set_value('fnmskh', value=os.path.join(dir_fix_am,"seaice_newland.grb"))
542 | nmlgen_input.set_value('fnvmnc', value=os.path.join(dir_fix_am,"global_shdmin.0.144x0.144.grb"))
543 | nmlgen_input.set_value('fnvmxc', value=os.path.join(dir_fix_am,"global_shdmax.0.144x0.144.grb"))
544 | nmlgen_input.set_value('fnslpc', value=os.path.join(dir_fix_am,"global_slope.1x1.grb"))
545 | nmlgen_input.set_value('fnalbc', value=os.path.join(dir_fix_am,"global_snowfree_albedo.bosu.t{}.{}.{}.rg.grb".format(jcap,lonb,latb)))
546 | nmlgen_input.set_value('fnvetc', value=os.path.join(dir_fix_am,"global_vegtype.igbp.t{}.{}.{}.rg.grb".format(jcap,lonb,latb)))
547 | nmlgen_input.set_value('fnsotc', value=os.path.join(dir_fix_am,"global_soiltype.statsgo.t{}.{}.{}.rg.grb".format(jcap,lonb,latb)))
548 | nmlgen_input.set_value('fnabsc', value=os.path.join(dir_fix_am,"global_mxsnoalb.uariz.t{}.{}.{}.rg.grb".format(jcap,lonb,latb)))
549 |
550 | # If the appropriate resolution fix file is not present, use the highest resolution available (T1534)
551 | if "mrweather" in app:
552 | if res == 96 or res == 192:
553 | jcap = 1534
554 | lonb = 3072
555 | latb = 1536
556 | nmlgen_input.set_value('fnsmcc', value=os.path.join(dir_fix_am,"global_soilmgldas.statsgo.t{}.{}.{}.grb".format(jcap,lonb,latb)))
557 | else:
558 | nmlgen_input.set_value('fnsmcc', value=os.path.join(dir_fix_am,"global_soilmgldas.statsgo.t{}.{}.{}.grb".format(jcap,lonb,latb)))
559 | else:
560 | nmlgen_input.set_value('fnsmcc', value=os.path.join(dir_fix_am,"global_soilmgldas.t{}.{}.{}.grb".format(jcap,lonb,latb)))
561 |
562 | # Stochastic physics
563 | testcase = case.get_value("TEST")
564 | if testcase:
565 | nmlgen_input.set_value('iseed_skeb', 0)
566 | nmlgen_input.set_value('iseed_shum', 0)
567 | nmlgen_input.set_value('iseed_sppt', 0)
568 | else:
569 | # TODO: member option (-1: control, 0: ensemble mean, >0: ensemble member) need to be handled, for now it is assumed as 1
570 | member = 1
571 | cdate = int(datetime.now().strftime("%Y%m%d%H"))
572 | nmlgen_input.set_value('iseed_skeb', cdate*1000+member*10+1)
573 | nmlgen_input.set_value('iseed_shum', cdate*1000+member*10+2)
574 | nmlgen_input.set_value('iseed_sppt', cdate*1000+member*10+3)
575 |
576 | # Save namelist before making restart changes
577 | nmlgen_input_sav = copy.copy(nmlgen_input)
578 |
579 | # Restart
580 | is_restart = case.get_value("CONTINUE_RUN")
581 |
582 | if is_restart: # Warm start
583 | nmlgen_input.set_value('warm_start', True)
584 | nmlgen_input.set_value('nggps_ic', False)
585 | nmlgen_input.set_value('external_ic', False)
586 | nmlgen_input.set_value('mountain', True)
587 | nmlgen_input.set_value('make_nh', False)
588 | nmlgen_input.set_value('na_init', 0)
589 |
590 | # Turn off nst spin up
591 | nstf_name = nmlgen_input.get_value('nstf_name')
592 | nstf_name[1] = '0'
593 |
594 | # Enable adding increment on the fly to the restarts
595 | read_increment = nmlgen_input.get_value('read_increment')
596 | if read_increment:
597 | nmlgen_input.set_value('res_latlon_dynamics', "INPUT/fv_rst.res.nc")
598 |
599 | # Set the forecast hour 'off-set'
600 | #if "s2s" in app:
601 | # nmlgen_input.set_value('fhrot', 0)
602 |
603 | else: # Cold start
604 | # Set back to their defaults
605 | nmlgen_input.set_value('warm_start', nmlgen_input_sav.get_value('warm_start'))
606 | nmlgen_input.set_value('nggps_ic', nmlgen_input_sav.get_value('nggps_ic'))
607 | nmlgen_input.set_value('external_ic', nmlgen_input_sav.get_value('external_ic'))
608 | nmlgen_input.set_value('mountain', nmlgen_input_sav.get_value('mountain'))
609 | nmlgen_input.set_value('make_nh', nmlgen_input_sav.get_value('make_nh'))
610 | nmlgen_input.set_value('na_init', nmlgen_input_sav.get_value('na_init'))
611 |
612 | # Turn on nst spinup for grib
613 | if 'hafs' not in app:
614 | nstf_name = nmlgen_input_sav.get_value('nstf_name')
615 | if input_type == 'grib2':
616 | nstf_name[1] = '1'
617 | else:
618 | nstf_name[1] = '0'
619 |
620 | nmlgen_input.set_value('read_increment', nmlgen_input_sav.get_value('read_increment'))
621 | nmlgen_input.set_value('res_latlon_dynamics', nmlgen_input_sav.get_value('res_latlon_dynamics'))
622 |
623 | if input_type == 'grib2' and 'hafs' not in app:
624 | # Turn off nstf for grib input
625 | nstf_name[0] = '0'
626 | logger.info("input_type {} nstf_name {}".format(input_type, nstf_name))
627 | nmlgen_input.set_value('nstf_name', nstf_name)
628 | #----------------------------------------------------
629 | # Write out namelist groups
630 | #----------------------------------------------------
631 |
632 | # Path for namelist files
633 | srcroot = case.get_value("SRCROOT")
634 | namelist_xml_dir = os.path.join(srcroot, "src", "model", "FV3", "cime", "cime_config")
635 |
636 | # Create list of groups by querying xml file
637 | groups = []
638 | with open(os.path.join(namelist_xml_dir, "namelist_definition_ufsatm.xml"), 'r') as fin:
639 | for s in fin:
640 | if "" in s:
641 | groups.append(s.replace('', '').replace('', '').strip())
642 |
643 | # Remove duplicates
644 | groups = list(set(groups))
645 |
646 | # Keep only ufsatm related ones
647 | groups.remove('config') # chgres
648 | groups.remove('_no_group_var') # model_configure
649 | groups.remove('freeform') # ncep_post
650 | groups.remove('nampgb') # ncep_post
651 |
652 | # Sort group
653 | groups.sort()
654 |
655 | # Remove duplicates
656 | nmlgen = nmlKeepChangedOnly(nmlgen_input_def, nmlgen_input, namelist_user)
657 |
658 | ntask_atm = int(case.get_value('NTASKS_ATM'))
659 | if ntask_atm == 8:
660 | nmlgen.set_value('layout',value=[1,1])
661 |
662 | # Overwrite user_nl_ufsatm changes
663 | nmlgen = nmlOverwrite(namelist_user, nmlgen)
664 |
665 | # if nstf_name is None here then a default of 0,0,0,0,0 is assumed
666 | nstf_name = nmlgen.get_value('nstf_name')
667 | if "mrweather" in app:
668 | if not nstf_name[0] or nstf_name[0] == '0':
669 | ccpp = nmlgen.get_value('ccpp_suite')
670 | nmlgen.set_value('ccpp_suite',ccpp+'_no_nsst')
671 |
672 | # Consistency check for layout
673 | layout = nmlgen_input.get_value('layout')
674 | layout_x = int(layout[0])
675 | layout_y = int(layout[1])
676 | ntiles = int(nmlgen_input.get_value('ntiles@fv_core_nml'))
677 | write_tasks_per_group = int(nmlgen_model.get_value('write_tasks_per_group'))
678 | write_groups = int(nmlgen_model.get_value('write_groups'))
679 |
680 | ntask_atm_config = layout_x*layout_y*ntiles+write_tasks_per_group*write_groups
681 | if ntask_atm_config != ntask_atm:
682 | expect(False, ("Total number of PE need to be consistent with the model namelist options:\n"+
683 | "\tTotal number of PE (ntask_atm) = {}\n"+
684 | "\tDecomposition in x and y direction (layout) = {}x{}\n"+
685 | "\tNumber of tile (ntiles) = {}\n"+
686 | "\tNumber of I/O group (write_groups) = {}\n"+
687 | "\tNumber of tasks in each I/O group (write_tasks_per_group) = {}\n").
688 | format(ntask_atm,layout_x,layout_y,ntiles,write_groups,write_tasks_per_group))
689 |
690 | # Create namelist
691 | namelist_file = os.path.join(confdir, "atm_in")
692 | nmlgen.write_output_file(namelist_file, data_list_path, groups=groups, sorted_groups=False)
693 |
694 | # pylint: disable=too-many-arguments,too-many-locals,too-many-branches,too-many-statements
695 | ####################################################################################
696 | def _create_namelist_model_configure(case, confdir, config, infile, nmlgen, namelist_user, prefix):
697 | ####################################################################################
698 | """Write out the namelist for this component.
699 |
700 | Most arguments are the same as those for `NamelistGenerator`.
701 | The `confdir` argument is used to specify the directory in which output files will be placed.
702 | """
703 | #----------------------------------------------------
704 | # Clear out old data.
705 | #----------------------------------------------------
706 | data_list_path = os.path.join(case.get_case_root(), "Buildconf", "ufsatm.input_data_list")
707 | if os.path.exists(data_list_path):
708 | logger.warning("removing file {}".format(data_list_path))
709 | os.remove(data_list_path)
710 |
711 | #----------------------------------------------------
712 | # Initialize namelist defaults
713 | #----------------------------------------------------
714 | nmlgen.init_defaults(infile, config)
715 |
716 | #----------------------------------------------------
717 | # Modify namelist defaults
718 | #----------------------------------------------------
719 |
720 | # Query previous run length, if it is warm start
721 | is_restart = case.get_value("CONTINUE_RUN")
722 |
723 | global nhours_fcst_pre
724 | if is_restart: # Warm start
725 | # Set previous forecast length based on restart file
726 | rundir = case.get_value("RUNDIR")
727 | rst_file = os.path.join(rundir, "RESTART", "{}coupler.res".format(prefix))
728 | if not os.path.isfile(rst_file):
729 | expect(False, "Couldn't find '"+rst_file+"'!")
730 | else:
731 | # TODO: it supports only gregorian and need to support others (no_calendar=0, thirty_day_months=1, julian=2, gregorian=3, noleap=4)
732 | # Parse coupler.res
733 | logger.debug("Using {} to determine previous forecast length ...".format(rst_file))
734 | with open(rst_file, 'r') as f:
735 | lines = f.readlines()
736 | #calendar = lines[0].split()[0]
737 | date1 = datetime(*[int(i) for i in lines[1].split()[0:6]])
738 | date2 = datetime(*[int(i) for i in lines[2].split()[0:6]])
739 | nhours_fcst_pre = int((date2-date1).total_seconds()//3600)
740 | else: # Cold start
741 | # Set previous forecast length as zero
742 | nhours_fcst_pre = 0
743 |
744 | # Change start date
745 | run_start_date = case.get_value('RUN_STARTDATE').split('-')
746 | yyyy = int(run_start_date[0])
747 | mm = int(run_start_date[1])
748 | dd = int(run_start_date[2])
749 | nmlgen.set_value('start_year', value=yyyy)
750 | nmlgen.set_value('start_month', value=mm)
751 | nmlgen.set_value('start_day', value=dd)
752 |
753 | run_start_tod = case.get_value('START_TOD')
754 | hh = int(run_start_tod//3600)
755 | mi = int((run_start_tod-hh*3600)//60)
756 | ss = int(run_start_tod-hh*3600-mi*60)
757 | nmlgen.set_value('start_hour', value=hh)
758 | nmlgen.set_value('start_minute', value=mi)
759 | nmlgen.set_value('start_second', value=ss)
760 |
761 | # Change forecast length
762 | stop_option = case.get_value('STOP_OPTION')
763 | stop_n = int(case.get_value('STOP_N'))
764 |
765 | if 'nyears' in stop_option:
766 | expect(False, "Option >nyears< is not supported!")
767 | elif 'nmonths' in stop_option:
768 | expect(False, "Option >nmonths< is not supported!")
769 | elif 'ndays' in stop_option:
770 | nmlgen.set_value('nhours_fcst', stop_n*24 + nhours_fcst_pre)
771 | elif 'nhours' in stop_option:
772 | nmlgen.set_value('nhours_fcst', stop_n + nhours_fcst_pre)
773 | elif 'nseconds' in stop_option:
774 | nmlgen.set_value('nhours_fcst', stop_n/3600 + nhours_fcst_pre)
775 | elif 'nsteps' in stop_option:
776 | expect(False, "Option >nsteps< is not supported!")
777 |
778 | # Change restart interval
779 | rest_option = case.get_value('REST_OPTION')
780 | rest_n = int(case.get_value('REST_N'))
781 |
782 | if 'nyears' in rest_option:
783 | expect(False, "Option >nyears< is not supported!")
784 | elif 'nmonths' in rest_option:
785 | expect(False, "Option >nmonths< is not supported!")
786 | elif 'ndays' in rest_option:
787 | nmlgen.set_value('restart_interval', rest_n*24)
788 | elif 'nhours' in rest_option:
789 | nmlgen.set_value('restart_interval', rest_n)
790 | elif 'nseconds' in rest_option:
791 | nmlgen.set_value('restart_interval', rest_n/60)
792 | elif 'nsteps' in rest_option:
793 | expect(False, "Option >nsteps< is not supported!")
794 |
795 | # Query total number of PEs
796 | components = active_components(case)
797 | ntask = int(case.get_value('NTASKS_ATM'))
798 | if len(components) > 1:
799 | ntask = int(case.get_value('TOTALPES'))
800 |
801 | # Change number of used PEs if there is a mismatch
802 | pe_member = int(nmlgen.get_value('PE_MEMBER01'))
803 | if pe_member != ntask:
804 | nmlgen.set_value('PE_MEMBER01', ntask)
805 |
806 | # Change number of write group for 8 PEs
807 | if ntask == 8:
808 | nmlgen.set_value("write_tasks_per_group",2)
809 |
810 | # Test run specific modifications
811 | testcase = case.get_value("TEST")
812 | if testcase:
813 | # Change output format
814 | nmlgen.set_value('output_file', 'netcdf')
815 |
816 | # Change file prefixes
817 | nmlgen.set_value('filename_base', "{} {}".format(case.get_value('CASE')+'.ufsatm.atm.', case.get_value('CASE')+'.ufsatm.sfc.'))
818 |
819 | # Modify machine specific namelist options
820 | nmlgen.set_value('atmos_nthreads', case.thread_count)
821 | nmlgen.set_value('ncores_per_node', case.tasks_per_node)
822 |
823 | # Activate ESMF logs if it is a debug run
824 | debug = case.get_value("DEBUG")
825 | if debug:
826 | nmlgen.set_value('print_esmf', True)
827 | else:
828 | nmlgen.set_value('print_esmf', False)
829 |
830 | # overwrite user_nl_ufsatm changes
831 | nmlgen = nmlOverwrite(namelist_user, nmlgen)
832 |
833 | # remove parameters from the namelist based on the selected app
834 | remove_lst = []
835 | if "hafs" in app:
836 | remove_lst.extend(["imo", "jmo", "iau_offset", "ideflate", "nbits", "output_history", "write_dopost", "atm_coupling_interval_sec", "fhrot"])
837 | else:
838 | remove_lst.extend(["cen_lat", "cen_lon", "dlat", "dlon", "lat1", "lat2", "lon1", "lon2"])
839 | if "mrweather" in app:
840 | remove_lst.append("atm_coupling_interval_sec")
841 | remove_lst.append("fhrot")
842 |
843 | for var in remove_lst:
844 | nmlgen._namelist.delete_variable("_no_group_var", var)
845 |
846 | #----------------------------------------------------
847 | # Write out model.configure namelist
848 | #----------------------------------------------------
849 | model_config_file = os.path.join(confdir, "model_configure")
850 | nmlgen.write_nuopc_config_file(model_config_file, data_list_path)
851 |
852 | # pylint: disable=too-many-arguments,too-many-locals,too-many-branches,too-many-statements
853 | ####################################################################################
854 | def _create_namelist_chgres(case, confdir, config, infile, nmlgen, nmlgen_def, nmlgen_input, namelist_user, input_type):
855 | ####################################################################################
856 | """Write out the namelist for this component.
857 |
858 | Most arguments are the same as those for `NamelistGenerator`.
859 | The `confdir` argument is used to specify the directory in which output files will be placed.
860 | """
861 | #----------------------------------------------------
862 | # Clear out old data.
863 | #----------------------------------------------------
864 | data_list_path = os.path.join(case.get_case_root(), "Buildconf", "ufsatm.input_data_list")
865 |
866 | #----------------------------------------------------
867 | # Initialize namelist defaults
868 | #----------------------------------------------------
869 | nmlgen.init_defaults(infile, config)
870 | nmlgen_def.init_defaults(infile, {})
871 |
872 | #----------------------------------------------------
873 | # Modify namelist defaults
874 | #----------------------------------------------------
875 | rundir = case.get_value("RUNDIR")
876 | atm_grid = case.get_value("ATM_GRID").replace('r', '')
877 |
878 | # Set grid
879 | nmlgen.set_value('mosaic_file_target_grid', os.path.join("INPUT",atm_grid+"_mosaic.nc"))
880 |
881 | # Set vertical layers
882 | levp = nmlgen_input.get_value("levp")
883 | if levp is None:
884 | expect(False, "Number of vertical layer 'levp' must be a valid number! levp = {}".format(levp))
885 | else:
886 | hyblev_file = os.path.join(rundir,"INPUT","global_hyblev.l{}.txt".format(levp))
887 | if not os.path.exists(hyblev_file):
888 | logger.warning("WARNING: {} does not exist, will attempt to download.".format(hyblev_file))
889 | else:
890 | nmlgen.set_value('vcoord_file_target_grid', os.path.join("INPUT","global_hyblev.l{}.txt".format(levp)))
891 |
892 | # Set location of fixed surface files
893 | nmlgen.set_value('fix_dir_target_grid', os.path.join("INPUT"))
894 |
895 | # Set cycle
896 | run_start_date = case.get_value('RUN_STARTDATE').split('-')
897 | yyyy = int(run_start_date[0])
898 | mm = int(run_start_date[1])
899 | dd = int(run_start_date[2])
900 | run_start_tod = case.get_value('START_TOD')
901 | hh = int(run_start_tod//3600)
902 |
903 | nmlgen.set_value('cycle_mon', int(mm))
904 | nmlgen.set_value('cycle_day', int(dd))
905 | nmlgen.set_value('cycle_hour', int(hh))
906 |
907 | # Input directory
908 | icdir = os.path.join(case.get_value("DIN_LOC_IC"),"{:04d}{:02d}".format(yyyy,mm),"{:04d}{:02d}{:02d}".format(yyyy,mm,dd))
909 | nmlgen.set_value('data_dir_input_grid', icdir)
910 |
911 | # Set input_type specific options
912 | nmlgen.set_value('input_type', input_type)
913 | if input_type == 'gaussian_nemsio':
914 | nmlgen.set_value('atm_files_input_grid', ['atm.input.ic.nemsio'])
915 | nmlgen.set_value('sfc_files_input_grid', ['sfc.input.ic.nemsio'])
916 | tracers = ['sphum','liq_wat','o3mr','ice_wat','rainwat','snowwat','graupel']
917 | nmlgen.set_value('tracers', tracers)
918 | tracers_input = ['spfh','clwmr','o3mr','icmr','rwmr','snmr','grle']
919 | nmlgen.set_value('tracers_input', tracers_input)
920 | nmlgen.set_value('convert_nst', True)
921 | elif input_type == 'grib2':
922 | nmlgen.set_value('grib2_file_input_grid','atm.input.ic.grb2')
923 | nmlgen.set_value('varmap_file', 'GFSphys_var_map.txt')
924 | elif input_type == 'gaussian_netcdf':
925 | nmlgen.set_value('orog_dir_target_grid', os.path.join("INPUT"))
926 | oro_files = []
927 | for tile in range(1,7):
928 | oro_files.append("oro_data.tile{}.nc".format(tile))
929 | nmlgen.set_value('orog_files_target_grid', oro_files)
930 | nmlgen.set_value('atm_files_input_grid', ['atm.input.ic.nc'])
931 | nmlgen.set_value('sfc_files_input_grid', ['sfc.input.ic.nc'])
932 | nmlgen.set_value('convert_atm', True)
933 | nmlgen.set_value('convert_sfc', True)
934 | nmlgen.set_value('convert_nst', True)
935 | tracers = ['sphum','liq_wat','o3mr','ice_wat','rainwat','snowwat','graupel']
936 | nmlgen.set_value('tracers', tracers)
937 | tracers_input = ['spfh','clwmr','o3mr','icmr','rwmr','snmr','grle']
938 | nmlgen.set_value('tracers_input', tracers_input)
939 |
940 | # Check/correct task count used for pre-processing
941 | mach = case.get_value("MACH")
942 | atm_grid = case.get_value("ATM_GRID").replace('r', '')
943 | tasks_per_node = 12
944 | task_count = {"C96" : 1*tasks_per_node, # 1 nodes
945 | "C192" : 1*tasks_per_node, # 1 nodes
946 | "C384" : 2*tasks_per_node, # 2 nodes
947 | "C768" : 3*tasks_per_node} # 3 nodes
948 |
949 | if atm_grid in task_count.keys():
950 | case.set_value("tasks_per_node", str(tasks_per_node), subgroup="case.chgres")
951 | case.set_value("task_count", str(task_count[atm_grid]), subgroup="case.chgres")
952 | logger.info("CHGRES task count and tasks per node are modified! task_count = {} tasks_per_node = {}".format(task_count[atm_grid], tasks_per_node))
953 | case.flush()
954 |
955 | # remove namelist options that has no specialization
956 | nmlgen_mod = nmlKeepChangedOnly(nmlgen_def, nmlgen, namelist_user)
957 |
958 | # overwrite user_nl_ufsatm changes
959 | nmlgen_mod = nmlOverwrite(namelist_user, nmlgen_mod)
960 |
961 | #----------------------------------------------------
962 | # Write out namelist groups
963 | #----------------------------------------------------
964 | groups=['config']
965 |
966 | namelist_file = os.path.join(confdir, "config.nml")
967 | nmlgen_mod.write_output_file(namelist_file, data_list_path, groups=groups, sorted_groups=False)
968 |
969 | # pylint: disable=too-many-arguments,too-many-locals,too-many-branches,too-many-statements
970 | ####################################################################################
971 | def _create_namelist_ncep_post(case, confdir, config, infile, nmlgen, nmlgen_model_configure, namelist_user):
972 | ####################################################################################
973 | """Write out the namelist for this component.
974 |
975 | Most arguments are the same as those for `NamelistGenerator`.
976 | The `confdir` argument is used to specify the directory in which output files will be placed.
977 | """
978 | #----------------------------------------------------
979 | # Clear out old data.
980 | #----------------------------------------------------
981 | data_list_path = os.path.join(case.get_case_root(), "Buildconf", "ufsatm.input_data_list")
982 |
983 | #----------------------------------------------------
984 | # Initialize namelist defaults
985 | #----------------------------------------------------
986 | nmlgen.init_defaults(infile, config)
987 |
988 | #----------------------------------------------------
989 | # Write out namelist groups
990 | #----------------------------------------------------
991 | groups=['nampgb']
992 |
993 | # Make input format for post-processing consistent with model output
994 | output_file = nmlgen_model_configure.get_value('output_file')
995 | if 'netcdf' in output_file:
996 | nmlgen.set_value('ioform', 'netcdf')
997 | elif 'nemsio' in output_file:
998 | nmlgen.set_value('ioform', 'binarynemsiompiio')
999 |
1000 | # Query start date and time
1001 | run_start_date = case.get_value('RUN_STARTDATE').split('-')
1002 | yy = run_start_date[0]
1003 | mm = run_start_date[1]
1004 | dd = run_start_date[2]
1005 | run_start_tod = int(case.get_value('START_TOD'))
1006 | hh = run_start_tod//3600
1007 | mi = (run_start_tod-hh*3600)//60
1008 | ss = run_start_tod-hh*3600-mi*60
1009 |
1010 | # Overwrite user_nl_ufsatm changes
1011 | nmlgen = nmlOverwrite(namelist_user, nmlgen)
1012 |
1013 | # Create namelist file for first time step / template script will update it for specific date
1014 | namelist_file = os.path.join(confdir, "itag.tmp")
1015 | nmlgen.write_output_file(namelist_file, data_list_path, groups=groups, sorted_groups=False)
1016 |
1017 | # Add header section to namelist
1018 | with open(namelist_file, 'r+') as f:
1019 | content = f.read()
1020 | f.seek(0,0)
1021 | f.write(nmlgen.get_value('filename')+"\n")
1022 | f.write(nmlgen.get_value('ioform')+"\n")
1023 | f.write(nmlgen.get_value('outform')+"\n")
1024 | f.write("{}-{}-{}".format(yy,mm,dd)+"_"+"{hh:02d}:{mm:02d}:{ss:02d}".format(hh=hh,mm=mi,ss=ss)+"\n")
1025 | f.write(nmlgen.get_value('modelname')+"\n")
1026 | f.write(nmlgen.get_value('filenameflux')+"\n")
1027 | f.write(content)
1028 |
1029 | # Check/correct task count used for post-processing
1030 | atm_grid = case.get_value("ATM_GRID").replace('r', '')
1031 | mach = case.get_value("MACH")
1032 |
1033 | # Specific fix for Stampede2
1034 | tasks_per_node = int(case.get_value("MAX_TASKS_PER_NODE"))
1035 | if ("C384" in atm_grid or "C768" in atm_grid) and "stampede2" in mach:
1036 | tasks_per_node = 24
1037 | case.set_value("tasks_per_node", str(tasks_per_node), subgroup="case.gfs_post")
1038 | case.flush()
1039 | logger.info("NCEP Post tasks per node is changed to {}!".format(tasks_per_node))
1040 |
1041 | task_count = {"C96": tasks_per_node, "C192": tasks_per_node, "C384": tasks_per_node*2, "C768": tasks_per_node*4}
1042 | if atm_grid in task_count.keys():
1043 | case.set_value("task_count", str(task_count[atm_grid]), subgroup="case.gfs_post")
1044 | case.flush()
1045 | logger.info("NCEP Post task count is changed to {}!".format(task_count[atm_grid]))
1046 |
1047 | ###############################################################################
1048 | def buildnml(case, caseroot, compname):
1049 | ###############################################################################
1050 |
1051 | # Date stamp for input directory
1052 | # TODO: might be a xmlchange option
1053 | datestamp="20191213"
1054 |
1055 | # Build the component namelist
1056 | if compname != "ufsatm":
1057 | raise AttributeError
1058 | srcroot = case.get_value("SRCROOT")
1059 | rundir = case.get_value("RUNDIR")
1060 |
1061 | # determine the confdir directory
1062 | confdir = os.path.join(caseroot,"Buildconf","ufsatmconf")
1063 | if not os.path.isdir(confdir):
1064 | os.makedirs(confdir)
1065 |
1066 | # determine CaseDocs
1067 | casedocsdir = os.path.join(caseroot,"CaseDocs")
1068 |
1069 | # query compset
1070 | compset = case.get_value("COMPSET")
1071 |
1072 | # dictionary for app, compset/s pairs
1073 | compset_dict = {"mrweather": ["FCST_ufsatm%v15p2_SLND_SICE_SOCN_SROF_SGLC_SWAV", \
1074 | "FCST_ufsatm%v16beta_SLND_SICE_SOCN_SROF_SGLC_SWAV"], \
1075 | "hafs" : ["FCST_ufsatm%v0nocp_SLND_SICE_SOCN_SROF_SGLC_SWAV"]
1076 | }
1077 |
1078 | # determine app using compset, the default value is s2s
1079 | global app
1080 | app = "s2s"
1081 | for key, value in compset_dict.items():
1082 | for item in value:
1083 | if item in compset:
1084 | app = key
1085 |
1086 | # query used CCPP suite
1087 | ccpp_suite = case.get_value("CCPP_SUITES")
1088 |
1089 | config = {}
1090 | config['app'] = app
1091 | config['ccpp'] = ccpp_suite
1092 | config['hgrid'] = case.get_value("ATM_GRID")
1093 | config['ntasks'] = str(case.get_value("ATM_NTASKS"))
1094 |
1095 | # path for namelist files
1096 | namelist_xml_dir = os.path.join(srcroot, "src", "model", "FV3", "cime", "cime_config")
1097 |
1098 | # set namelist definition file
1099 | definition_file = [os.path.join(namelist_xml_dir, "namelist_definition_ufsatm.xml")]
1100 |
1101 | # create namelist_infile using user_nl_file as input
1102 | user_nl_file = os.path.join(caseroot, "user_nl_ufsatm")
1103 | expect(os.path.isfile(user_nl_file),
1104 | "Missing required user_nl_file %s " %(user_nl_file))
1105 | infile = os.path.join(confdir, "namelist_infile")
1106 | create_namelist_infile(case, user_nl_file, infile)
1107 | namelist_infile = [infile]
1108 |
1109 | # read user modified namelist values
1110 | namelist_user = parse(infile)
1111 |
1112 | #----------------------------------------------------
1113 | # Set case start date
1114 | #----------------------------------------------------
1115 | is_restart = case.get_value("CONTINUE_RUN")
1116 |
1117 | if is_restart: # Warm start
1118 | # List coupler.res files
1119 | res_files = []
1120 | for _, _, files in os.walk(os.path.join(rundir,"RESTART")):
1121 | for filename in files:
1122 | if "coupler.res" in filename:
1123 | res_files.append(filename)
1124 | res_files.sort()
1125 |
1126 | # If we have multiple, get time stamp
1127 | nres = len(res_files)
1128 | if nres > 1:
1129 | prefix = res_files[nres-2].replace("coupler.res", "")
1130 | else:
1131 | # Query restart file
1132 | rst_file = os.path.join(rundir, "RESTART", "coupler.res")
1133 | if not os.path.isfile(rst_file):
1134 | expect(False, "{} is missing. It is required to restart the model!".format(os.path.join(rundir,"RESTART","coupler.res")))
1135 | else:
1136 | with open(rst_file, 'r') as f:
1137 | lines = f.readlines()
1138 | line = [int(x) for x in lines[2].split()[0:6]]
1139 | prefix = "{:04d}".format(line[0])
1140 | prefix = prefix + "".join("{:02d}".format(x) for x in line[1:3])
1141 | prefix = prefix + "." + "".join("{:02d}".format(x) for x in line[3:7])
1142 | prefix = prefix + "."
1143 |
1144 | # Copy files by adding prefix
1145 | # Tiled files
1146 | tile_max = 7
1147 | if "hafs" in app:
1148 | # Regional case has only one tile (1)
1149 | tile_max = 2
1150 |
1151 | lst = ["fv_core.res", "fv_srf_wnd.res", "fv_tracer.res", "phy_data", "sfc_data"]
1152 | for f in lst:
1153 | for tile in range(1,tile_max):
1154 | if "_data" in f and "hafs" in app:
1155 | src_file = os.path.join(rundir,"RESTART","{}.nc".format(f))
1156 | tgt_file = os.path.join(rundir,"RESTART","{}.nc".format(prefix + f))
1157 | else:
1158 | src_file = os.path.join(rundir,"RESTART","{}.tile{}.nc".format(f,tile))
1159 | tgt_file = os.path.join(rundir,"RESTART","{}.tile{}.nc".format(prefix + f,tile))
1160 | if not os.path.isfile(src_file):
1161 | expect(False, "{} is missing.".format(src_file))
1162 | else:
1163 | safe_copy(src_file, tgt_file)
1164 |
1165 | # Others
1166 | lst = ["fv_core.res.nc", "coupler.res"]
1167 | for f in lst:
1168 | src_file = os.path.join(rundir,"RESTART",f)
1169 | tgt_file = os.path.join(rundir,"RESTART",prefix + f)
1170 | if not os.path.isfile(src_file):
1171 | expect(False, "{} is missing.".format(src_file))
1172 | else:
1173 | safe_copy(src_file, tgt_file)
1174 | else:
1175 | prefix = ""
1176 |
1177 | #----------------------------------------------------
1178 | # Query jobs
1179 | #----------------------------------------------------
1180 |
1181 | env_workflow = case.get_env("workflow")
1182 | jobs = env_workflow.get_jobs()
1183 |
1184 | #----------------------------------------------------
1185 | # Set input type
1186 | #----------------------------------------------------
1187 |
1188 | # Query date and time
1189 | yyyy, mm, dd, hh = date_yyyymmddhh(case)
1190 |
1191 | # Check input directory to find input_file format (same folder could have both .nemsio and .grb2)
1192 | if "case.chgres" in jobs:
1193 | # Query input directory
1194 | if "hafs" in app:
1195 | din_loc_root = case.get_value("DIN_LOC_ROOT")
1196 | icdir = os.path.join(din_loc_root,"regional","bcond","{:04d}{:02d}{:02d}{:02d}".format(yyyy,mm,dd,hh))
1197 | else:
1198 | icdir = os.path.join(case.get_value("DIN_LOC_IC"),"{:04d}{:02d}".format(yyyy,mm),"{:04d}{:02d}{:02d}".format(yyyy,mm,dd))
1199 |
1200 | logger.info("Checking {} directory to find raw input files ...".format(icdir))
1201 | input_dict = {}
1202 | if os.path.exists(icdir):
1203 | for f in os.listdir(icdir):
1204 | if "atm.input.ic.nemsio" in f or "sfc.input.ic.nemsio" in f:
1205 | if 'gaussian_nemsio' in input_dict.keys():
1206 | input_dict['gaussian_nemsio'].append(f)
1207 | else:
1208 | input_dict.update({'gaussian_nemsio':[f]})
1209 | logger.info("Found '{}' in input directory".format(f))
1210 | elif "atm.input.ic.grb2" in f:
1211 | if 'grib2' in input_dict.keys():
1212 | input_dict['grib2'].append(f)
1213 | else:
1214 | input_dict.update({'grib2':[f]})
1215 | logger.info("Found '{}' in input directory".format(f))
1216 | elif "atm.input.ic.nc" in f or "sfc.input.ic.nc" in f:
1217 | if 'gaussian_netcdf' in input_dict.keys():
1218 | input_dict['gaussian_netcdf'].append(f)
1219 | else:
1220 | input_dict.update({'gaussian_netcdf':[f]})
1221 | logger.info("Found '{}' in input directory".format(f))
1222 |
1223 | # Remove duplicates
1224 | input_type_lst = list(set(input_dict.keys()))
1225 |
1226 | # Check user_nl_ufsatm for input_type and force buildnml to use it
1227 | input_type_user = namelist_user.get_value('input_type')[0]
1228 | if input_type_user:
1229 | input_type_lst = list([input_type_user.strip('\"').strip('\'')])
1230 |
1231 | # If input_type is empty throw error
1232 | if not input_type_lst:
1233 | logger.info("No input file/s found locally! {}".format(icdir))
1234 | logger.info("Please download raw initial condition and rename the file/s using following convention:")
1235 | logger.info("\t NEMSIO: atm.input.ic.nemsio and sfc.input.ic.nemsio")
1236 | logger.info("\t GRIB2 : atm.input.ic.grb2")
1237 | logger.info("\t NetCDF: atm.input.ic.nc and sfc.input.ic.nc")
1238 | expect(False, "Exiting ...")
1239 | else:
1240 | # Set grib2 as default, if we have multiple data formats such as both .grb2 and .nc
1241 | if len(input_type_lst) > 1:
1242 | input_type = "grib2"
1243 | else:
1244 | input_type = input_type_lst[0]
1245 |
1246 | logger.info("CHGRES namelist option 'input_type' is set to {}".format(input_type))
1247 |
1248 | # Check defined input_type exists in the dictionary
1249 | if input_type in input_dict.keys():
1250 | # Check the input file matched with the input_type
1251 | for f in input_dict[input_type]:
1252 | if not os.path.exists(os.path.join(icdir,f)):
1253 | expect(False, "{} not found!".format(os.path.join(icdir,f)))
1254 | else:
1255 | logger.info("CHGRES will use {}".format(os.path.join(icdir,f)))
1256 | else:
1257 | # If there is no file with given input_type, print information and exit
1258 | if "gaussian_nemsio" == input_type:
1259 | logger.info("Please download raw initial condition in NEMSIO format rename it as atm.input.ic.nemsio and sfc.input.ic.nemsio")
1260 | elif "grib2" == input_type:
1261 | logger.info("Please download raw initial condition in GRIB2 format and rename it as atm.input.ic.grb2")
1262 | elif "gaussian_netcdf" == input_type:
1263 | logger.info("Please download raw initial condition in NETCDF format and rename it as atm.input.ic.nc and sfc.input.ic.nc")
1264 | else:
1265 | logger.info("Namelist option input_type can be 'gaussian_nemsio', 'grib2' or 'gaussian_netcdf'.")
1266 | expect(False, "Exiting ...")
1267 | else:
1268 | input_type = None
1269 | logger.info("CHGRES is not the part of the workflow. There is no need to set 'input_type'!")
1270 |
1271 | #----------------------------------------------------
1272 | # Namelist generator for atmosphere model (model_configure)
1273 | #----------------------------------------------------
1274 |
1275 | # allow using user provided model_configure
1276 | auto_namelist_file = os.path.join(confdir,"model_configure")
1277 | user_namelist_file = os.path.join(caseroot,"SourceMods","src.ufsatm","model_configure")
1278 | if os.path.isfile(user_namelist_file):
1279 | logger.info("Using user provided model_configure file {}".format(user_namelist_file))
1280 | if os.path.isfile(auto_namelist_file):
1281 | os.remove(auto_namelist_file)
1282 | safe_copy(user_namelist_file,auto_namelist_file)
1283 | # TODO: need to implement nuopc parser to create nmlgen_model_configure from existing model_configure
1284 | # CIME issue: https://github.com/ESMCI/cime/issues/3705
1285 | # nmlgen_model_configure = parse_nuopc(auto_namelist_file)
1286 | else:
1287 | logger.info("Using auto-generated model_configure file {}".format(auto_namelist_file))
1288 |
1289 | # create the namelist generator object
1290 | nmlgen_model_configure = NamelistGenerator(case, definition_file)
1291 |
1292 | # create namelist model_configure
1293 | _create_namelist_model_configure(case, confdir, config, namelist_infile, nmlgen_model_configure, namelist_user, prefix)
1294 |
1295 | # copy namelist files to rundir
1296 | if os.path.isdir(rundir):
1297 | file1 = os.path.join(confdir, "model_configure")
1298 | file2 = os.path.join(rundir, "model_configure")
1299 | logger.debug("ufsatm configuration copy: file1 %s file2 %s " %(file1, file2))
1300 | safe_copy(file1, file2)
1301 |
1302 | #----------------------------------------------------
1303 | # Namelist generator for atmosphere model (input.nml.fv3)
1304 | #----------------------------------------------------
1305 |
1306 | # allow using user provided atm_in aka input.nml
1307 | auto_namelist_file = os.path.join(confdir,"atm_in")
1308 | user_namelist_file = os.path.join(caseroot,"SourceMods","src.ufsatm","atm_in")
1309 | if os.path.isfile(user_namelist_file):
1310 | logger.info("Using user provided atm_in file {}".format(user_namelist_file))
1311 | if os.path.isfile(auto_namelist_file):
1312 | os.remove(auto_namelist_file)
1313 | safe_copy(user_namelist_file,auto_namelist_file)
1314 | nmlgen_input = parse(auto_namelist_file)
1315 | else:
1316 | logger.info("Using auto-generated atm_in file {}".format(auto_namelist_file))
1317 |
1318 | # create the namelist generator object
1319 | nmlgen_input = NamelistGenerator(case, definition_file)
1320 |
1321 | # create copy of nmlgen_input to modify
1322 | nmlgen_input_def = NamelistGenerator(case, definition_file)
1323 |
1324 | # create namelist input.nml.fv3
1325 | _create_namelist_input(case, confdir, config, namelist_infile, nmlgen_model_configure, nmlgen_input, nmlgen_input_def, namelist_user, datestamp, input_type)
1326 |
1327 | # copy namelist files to rundir
1328 | if os.path.isdir(rundir):
1329 | file1 = os.path.join(confdir, "atm_in")
1330 | file2 = os.path.join(rundir, "atm_in")
1331 | logger.debug("ufsatm namelist copy: file1 %s file2 %s " %(file1, file2))
1332 | safe_copy(file1, file2)
1333 |
1334 | # link file
1335 | logger.info("\tLinking input namelist for ufsatm")
1336 | if not os.path.exists(rundir):
1337 | expect(False, "Couldn't find run direcory " + rundir)
1338 | if "MOM6" not in compset:
1339 | # there is no need to merge with MOM6 namelist, just link it
1340 | symlink_force(file2, os.path.join(rundir, "input.nml"))
1341 | else:
1342 | symlink_force(file2, os.path.join(rundir, "input.nml.fv3"))
1343 |
1344 | #----------------------------------------------------
1345 | # Copy module_configure and input.nml to CaseDocs
1346 | #----------------------------------------------------
1347 |
1348 | if os.path.isdir(casedocsdir):
1349 | file1 = os.path.join(confdir, "model_configure")
1350 | file2 = os.path.join(casedocsdir, "model_configure")
1351 | safe_copy(file1, file2)
1352 |
1353 | file1 = os.path.join(confdir, "atm_in")
1354 | file2 = os.path.join(casedocsdir, "input.nml.fv3")
1355 | safe_copy(file1, file2)
1356 |
1357 | #----------------------------------------------------
1358 | # Copy/link input files
1359 | #----------------------------------------------------
1360 |
1361 | prep_input(case, casedocsdir, datestamp, nmlgen_input, prefix, input_type)
1362 |
1363 | #----------------------------------------------------
1364 | # Namelist generator for chgres
1365 | #----------------------------------------------------
1366 |
1367 | if "case.chgres" in jobs and not is_restart:
1368 | # create the namelist generator object
1369 | nmlgen_chgres = NamelistGenerator(case, definition_file)
1370 |
1371 | # create copy of nmlgen_chgres to modify
1372 | nmlgen_chgres_def = NamelistGenerator(case, definition_file)
1373 |
1374 | # create namelist config.nml
1375 | _create_namelist_chgres(case, confdir, config, namelist_infile, nmlgen_chgres, nmlgen_chgres_def, nmlgen_input, namelist_user, input_type)
1376 |
1377 | # copy namelist to rundir
1378 | if os.path.isdir(rundir):
1379 | file1 = os.path.join(confdir, "config.nml")
1380 | file2 = os.path.join(rundir, "config.nml")
1381 | logger.debug("CHGRES configuration copy: file1 %s file2 %s " %(file1, file2))
1382 | safe_copy(file1, file2)
1383 |
1384 | # copy namelist to CaseDocs
1385 | if os.path.isdir(casedocsdir):
1386 | file1 = os.path.join(confdir, "config.nml")
1387 | file2 = os.path.join(casedocsdir, "config.nml")
1388 | safe_copy(file1, file2)
1389 |
1390 | #----------------------------------------------------
1391 | # Namelist generator for ncep_post
1392 | #----------------------------------------------------
1393 |
1394 | if "case.gfs_post" in jobs:
1395 | # create the namelist generator object
1396 | nmlgen_ncep_post = NamelistGenerator(case, definition_file)
1397 |
1398 | # remove old configuration files
1399 | for f in os.listdir(rundir):
1400 | if "itag" in f:
1401 | logger.warning("removing file {}".format(f))
1402 | os.remove(os.path.join(rundir,f))
1403 |
1404 | # create namelist model_configure
1405 | _create_namelist_ncep_post(case, confdir, config, namelist_infile, nmlgen_ncep_post, nmlgen_model_configure, namelist_user)
1406 |
1407 | # copy namelist to rundir
1408 | if os.path.isdir(rundir):
1409 | file1 = os.path.join(confdir, "itag.tmp")
1410 | file2 = os.path.join(rundir, "itag.tmp")
1411 | logger.debug("NCEP_POST configuration copy: file1 %s file2 %s " %(file1, file2))
1412 | safe_copy(file1, file2)
1413 |
1414 | # copy namelist to CaseDocs
1415 | if os.path.isdir(casedocsdir):
1416 | file1 = os.path.join(confdir, "itag.tmp")
1417 | file2 = os.path.join(casedocsdir, "itag.tmp")
1418 | safe_copy(file1, file2)
1419 |
1420 | return
1421 |
1422 | ###############################################################################
1423 | def _main_func():
1424 |
1425 | caseroot = parse_input(sys.argv)
1426 | with Case(caseroot) as case:
1427 | buildnml(case, caseroot, "ufsatm")
1428 |
1429 | if __name__ == "__main__":
1430 | _main_func()
1431 |
--------------------------------------------------------------------------------