Skip to content

Commit

Permalink
More updates for reading IC file
Browse files Browse the repository at this point in the history
Switched CESM default to use IC file written on 1x1 grid (with WOA depths)
instead of using a file on the tx0.66v1 grid. Also changed some of the defaults
set in get_param() calls in MOM_initialize_tracer_from_Z() to match the
defaults elsewhere in the code.
  • Loading branch information
mnlevy1981 committed Mar 23, 2023
1 parent becd34f commit f3f75e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/initialization/MOM_tracer_initialization_from_Z.F90
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ subroutine MOM_initialize_tracer_from_Z(h, tr, G, GV, US, PF, src_file, src_var_
"initial conditions.", default=.false.)
call get_param(PF, mdl, "Z_INIT_ALE_REMAPPING", useALE, &
"If True, then remap straight to model coordinate from file.",&
default=.true.)
default=.false.)
call get_param(PF, mdl, "Z_INIT_REMAPPING_SCHEME", remapScheme, &
"The remapping scheme to use if using Z_INIT_ALE_REMAPPING is True.", &
default="PLM")
default="PPM_IH4")
call get_param(PF, mdl, "DEFAULT_ANSWER_DATE", default_answer_date, &
"This sets the default value for the various _ANSWER_DATE parameters.", &
default=99991231)
Expand Down
8 changes: 4 additions & 4 deletions src/tracer/MARBL_tracers.F90
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ function register_MARBL_tracers(HI, GV, US, param_file, CS, tr_Reg, restart_CS)
! ** Tracer initial conditions
call get_param(param_file, mdl, "MARBL_TRACERS_IC_FILE", CS%IC_file, &
"The file in which the MARBL tracers initial values can be found.", &
default="ecosys_jan_IC_omip_MOM_tx0.66v1_c221027.nc")
default="ecosys_jan_IC_omip_latlon_1x1_180W_c230317.nc")
if (scan(CS%IC_file,'/') == 0) then
! Add the directory if CS%IC_file is not already a complete path.
CS%IC_file = trim(slasher(inputdir))//trim(CS%IC_file)
Expand Down Expand Up @@ -637,8 +637,8 @@ subroutine initialize_MARBL_tracers(restart, day, G, GV, US, h, param_file, diag
if ((.not. restart) .or. &
(CS%tracers_may_reinit .and. &
.not. query_initialized(CS%tracer_data(m)%tr(:,:,:), name, CS%restart_CSp))) then
call MOM_initialize_tracer_from_Z(h, CS%tracer_data(m)%tr, G, GV, US, param_file, &
CS%IC_file, name, ongrid=.true.)
! TODO: added the ongrid optional argument, but is there a good way to detect if the file is on grid?
call MOM_initialize_tracer_from_Z(h, CS%tracer_data(m)%tr, G, GV, US, param_file, CS%IC_file, name)
do k=1,GV%ke
do j=G%jsc, G%jec
do i=G%isc, G%iec
Expand Down Expand Up @@ -1379,7 +1379,7 @@ subroutine MARBL_tracers_get_output_for_GCM(name, G, GV, array, CS)
MARBL_instances%tracers(m,:) = CS%tracer_data(m)%tr(i,j,:)
end do
if (G%mask2dT(i,j) /= 0) then
array(i,j,:) = MARBL_instances%get_output_for_GCM(output_for_GCM_iopt_total_Chl_3d)
call MARBL_instances%get_output_for_GCM(output_for_GCM_iopt_total_Chl_3d, array(i,j,:))
if (MARBL_instances%StatusLog%labort_marbl) &
call print_marbl_log(MARBL_instances%StatusLog, G, i, j)
end if
Expand Down

0 comments on commit f3f75e6

Please sign in to comment.