Skip to content

Commit

Permalink
Merge remote-tracking branch 'NorESM/noresm_develop' into UpdateNores…
Browse files Browse the repository at this point in the history
…mBranch
  • Loading branch information
Steve Goldhaber committed Nov 12, 2024
2 parents 892b338 + 9baa370 commit ddfde6f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/cpl/nuopc/atm_import_export.F90
Original file line number Diff line number Diff line change
Expand Up @@ -894,15 +894,22 @@ subroutine import_fields( gcomp, cam_in, restart_init, rc)
call state_getfldptr(importState, 'Faoo_fdms_ocn', fldptr=fldptr1d, exists=exists, rc=rc)
if (exists) then
call cnst_get_ind('DMS', pndx_fdms, abort=.true.)
! Ideally what should happen below is that
! cam_in%cflx(icol,pndx_fdms) should be set directly from
! fldptr1d. However, the code initializes the chemistry
! consituents surface fluxes (i.e.cam_in%cflx(:,:)) to zero in
! the routine in mozart/chemistry.F90 at the start of every
! time step. Introducing cam_in(c)%fdms below stores this
! information until it can be updated in aero_model.F90 when
! oslo-aero is used.
g = 1
do c = begchunk,endchunk
do i = 1,get_ncols_p(c)
cam_in(c)%fdms(i) = -fldptr1d(g) * med2mod_areacor(g)
cam_in(c)%cflx(i,pndx_fdms) = cam_in(c)%fdms(i)
g = g + 1
end do
ncols = get_ncols_p(c)
call outfld( sflxnam(pndx_fdms), cam_in(c)%cflx(:ncols,pndx_fdms), ncols, c)
call outfld( sflxnam(pndx_fdms), cam_in(c)%fdms, ncols, c)
end do
end if

Expand Down

0 comments on commit ddfde6f

Please sign in to comment.