Skip to content

Commit

Permalink
fixes for aquaplanet SOM
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariana Vertenstein committed May 9, 2017
1 parent 008752a commit f6a257a
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/components/data_comps/docn/docn_comp_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ subroutine docn_comp_init( EClock, cdata, x2o, o2x, NLFilename )
ocnrof_prognostic = .true.
endif

if (trim(ocn_mode) == 'SOM') then
if (trim(ocn_mode) == 'SOM' .or. trim(ocn_mode) == 'SOM_AQUAP') then
ocn_prognostic = .true.
endif

Expand Down Expand Up @@ -507,7 +507,7 @@ subroutine docn_comp_init( EClock, cdata, x2o, o2x, NLFilename )
endif
endif
call shr_mpi_bcast(exists,mpicom,'exists')
if (trim(ocn_mode) == 'SOM') then
if (trim(ocn_mode) == 'SOM' .or. trim(ocn_mode) == 'SOM_AQUAP') then
if (my_task == master_task) write(logunit,F00) ' reading ',trim(rest_file)
call shr_pcdf_readwrite('read',iosystem,SDOCN%io_type,trim(rest_file),mpicom,gsmap,rf1=somtp,rf1n='somtp')
endif
Expand Down Expand Up @@ -758,7 +758,6 @@ subroutine docn_comp_run( EClock, cdata, x2o, o2x)
else ! firstcall
tfreeze = shr_frz_freezetemp(o2x%rAttr(ks,:)) + TkFrz
do n = 1,lsize
if (imask(n) /= 0) then
!--- pull out h from av for resuse below ---
hn = avstrm%rAttr(kh,n)
!--- compute new temp ---
Expand All @@ -775,7 +774,6 @@ subroutine docn_comp_run( EClock, cdata, x2o, o2x)
!--- compute ice formed or melt potential ---
o2x%rAttr(kq,n) = (tfreeze(n) - o2x%rAttr(kt,n))*(cpsw*rhosw*hn)/dt ! ice formed q>0
somtp(n) = o2x%rAttr(kt,n) ! save temp
endif
enddo
endif ! firstcall

Expand All @@ -800,7 +798,7 @@ subroutine docn_comp_run( EClock, cdata, x2o, o2x)
close(nu)
call shr_file_freeUnit(nu)
endif
if (trim(ocn_mode) == 'SOM') then
if (trim(ocn_mode) == 'SOM' .or. trim(ocn_mode) == 'SOM_AQUAP') then
if (my_task == master_task) write(logunit,F04) ' writing ',trim(rest_file),currentYMD,currentTOD
call shr_pcdf_readwrite('write',iosystem,SDOCN%io_type,trim(rest_file),mpicom,gsmap,clobber=.true., &
rf1=somtp,rf1n='somtp')
Expand Down Expand Up @@ -915,8 +913,6 @@ subroutine prescribed_sst(xc, yc, lsize, sst_option, sst)
rlon(:) = xc(:) * pio180
rlat(:) = yc(:) * pio180

write(6,*)"DEBUG: sst_option is ",sst_option

! Control

if (sst_option < 1 .or. sst_option > 10) then
Expand Down

0 comments on commit f6a257a

Please sign in to comment.