Skip to content

Commit

Permalink
flux wave to ocn prep_ocn_mod.F90
Browse files Browse the repository at this point in the history
  • Loading branch information
erinethomas committed Nov 5, 2024
1 parent 7d2f02d commit 1ed7ef6
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion driver-mct/main/prep_ocn_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ module prep_ocn_mod
public :: prep_ocn_get_mapper_Sg2o
public :: prep_ocn_get_mapper_Fg2o
public :: prep_ocn_get_mapper_Sw2o
public :: prep_ocn_get_mapper_Fw2o

!--------------------------------------------------------------------------
! Private interfaces
Expand All @@ -90,6 +91,7 @@ module prep_ocn_mod
type(seq_map), pointer :: mapper_Fg2o
type(seq_map), pointer :: mapper_Sg2o
type(seq_map), pointer :: mapper_Sw2o
type(seq_map), pointer :: mapper_Fw2o

! attribute vectors
type(mct_aVect), pointer :: a2x_ox(:) ! Atm export, ocn grid, cpl pes
Expand Down Expand Up @@ -190,6 +192,7 @@ subroutine prep_ocn_init(infodata, atm_c2_ocn, atm_c2_ice, ice_c2_ocn, rof_c2_oc
allocate(mapper_Sg2o)
allocate(mapper_Fg2o)
allocate(mapper_Sw2o)
allocate(mapper_Fw2o)

if (ocn_present) then

Expand Down Expand Up @@ -382,6 +385,13 @@ subroutine prep_ocn_init(infodata, atm_c2_ocn, atm_c2_ice, ice_c2_ocn, rof_c2_oc
call seq_map_init_rcfile(mapper_Sw2o, wav(1), ocn(1), &
'seq_maps.rc', 'wav2ocn_smapname:', 'wav2ocn_smaptype:',samegrid_ow, &
'mapper_Sw2o initialization')
if (iamroot_CPLID) then
write(logunit,*) ' '
write(logunit,F00) 'Initializing mapper_Fw2o'
end if
call seq_map_init_rcfile(mapper_Fw2o, wav(1), ocn(1), &
'seq_maps.rc', 'wav2ocn_fmapname:', 'wav2ocn_fmaptype:',samegrid_ow, &
'mapper_Fw2o initialization')
endif
call shr_sys_flush(logunit)

Expand Down Expand Up @@ -1446,7 +1456,8 @@ subroutine prep_ocn_calc_w2x_ox(timer)
call t_drvstartf (trim(timer),barrier=mpicom_CPLID)
do ewi = 1,num_inst_wav
w2x_wx => component_get_c2x_cx(wav(ewi))
call seq_map_map(mapper_Sw2o, w2x_wx, w2x_ox(ewi), norm=.true.)
call seq_map_map(mapper_Sw2o, w2x_wx, w2x_ox(ewi),fldlist=seq_flds_w2x_states, norm=.true.)
call seq_map_map(mapper_Fw2o, w2x_wx, w2x_ox(ewi),fldlist=seq_flds_w2x_fluxes, norm=.true.)
enddo
call t_drvstopf (trim(timer))
end subroutine prep_ocn_calc_w2x_ox
Expand Down Expand Up @@ -1548,4 +1559,9 @@ function prep_ocn_get_mapper_Sw2o()
prep_ocn_get_mapper_Sw2o => mapper_Sw2o
end function prep_ocn_get_mapper_Sw2o

function prep_ocn_get_mapper_Fw2o()
type(seq_map), pointer :: prep_ocn_get_mapper_Fw2o
prep_ocn_get_mapper_Fw2o => mapper_Fw2o
end function prep_ocn_get_mapper_Fw2o

end module prep_ocn_mod

0 comments on commit 1ed7ef6

Please sign in to comment.