Skip to content

Commit fa86163

Browse files
Merge pull request #3 from NCAR/dev/gfdl
committing pull request NCAR#2 to dev/ncar branch
2 parents 54f7976 + e8f2999 commit fa86163

1 file changed

Lines changed: 19 additions & 6 deletions

File tree

src/initialization/MOM_state_initialization.F90

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1648,6 +1648,10 @@ subroutine MOM_temp_salt_initialize_from_Z(h, tv, G, GV, PF, dirs)
16481648

16491649
character(len=200) :: filename ! The name of an input file containing temperature
16501650
! and salinity in z-space; also used for ice shelf area.
1651+
character(len=200) :: tfilename ! The name of an input file containing only temperature
1652+
! in z-space.
1653+
character(len=200) :: sfilename ! The name of an input file containing only salinity
1654+
! in z-space.
16511655
character(len=200) :: inputdir ! The directory where NetCDF input files are.
16521656
character(len=200) :: mesg, area_varname, ice_shelf_file
16531657

@@ -1745,15 +1749,24 @@ subroutine MOM_temp_salt_initialize_from_Z(h, tv, G, GV, PF, dirs)
17451749

17461750
call get_param(PF, mod, "TEMP_SALT_Z_INIT_FILE",filename, &
17471751
"The name of the z-space input file used to initialize \n"//&
1748-
"the layer thicknesses, temperatures and salinities.", &
1749-
default="temp_salt_z.nc")
1752+
"temperatures (T) and salinities (S). If T and S are not \n" //&
1753+
"in the same file, TEMP_Z_INIT_FILE and SALT_Z_INIT_FILE \n" //&
1754+
"must be set.",default="temp_salt_z.nc")
1755+
call get_param(PF, mod, "TEMP_Z_INIT_FILE",tfilename, &
1756+
"The name of the z-space input file used to initialize \n"//&
1757+
"temperatures, only.", default=trim(filename))
1758+
call get_param(PF, mod, "SALT_Z_INIT_FILE",sfilename, &
1759+
"The name of the z-space input file used to initialize \n"//&
1760+
"temperatures, only.", default=trim(filename))
17501761
filename = trim(inputdir)//trim(filename)
1762+
tfilename = trim(inputdir)//trim(tfilename)
1763+
sfilename = trim(inputdir)//trim(sfilename)
17511764
call get_param(PF, mod, "Z_INIT_FILE_PTEMP_VAR", potemp_var, &
17521765
"The name of the potential temperature variable in \n"//&
1753-
"TEMP_SALT_Z_INIT_FILE.", default="ptemp")
1766+
"TEMP_Z_INIT_FILE.", default="ptemp")
17541767
call get_param(PF, mod, "Z_INIT_FILE_SALT_VAR", salin_var, &
17551768
"The name of the salinity variable in \n"//&
1756-
"TEMP_SALT_Z_INIT_FILE.", default="salt")
1769+
"SALT_Z_INIT_FILE.", default="salt")
17571770
call get_param(PF, mod, "Z_INIT_HOMOGENIZE", homogenize, &
17581771
"If True, then horizontally homogenize the interpolated \n"//&
17591772
"initial conditions.", default=.false.)
@@ -1792,10 +1805,10 @@ subroutine MOM_temp_salt_initialize_from_Z(h, tv, G, GV, PF, dirs)
17921805
! value at the northernmost/southernmost latitude.
17931806

17941807

1795-
call horiz_interp_and_extrap_tracer(filename, potemp_var,1.0,1, &
1808+
call horiz_interp_and_extrap_tracer(tfilename, potemp_var,1.0,1, &
17961809
G, temp_z, mask_z, z_in, z_edges_in, missing_value_temp, reentrant_x, tripolar_n, homogenize)
17971810

1798-
call horiz_interp_and_extrap_tracer(filename, salin_var,1.0,1, &
1811+
call horiz_interp_and_extrap_tracer(sfilename, salin_var,1.0,1, &
17991812
G, salt_z, mask_z, z_in, z_edges_in, missing_value_salt, reentrant_x, tripolar_n, homogenize)
18001813

18011814
kd = size(z_in,1)

0 commit comments

Comments
 (0)