diff --git a/GEOS_OceanGridComp.F90 b/GEOS_OceanGridComp.F90 index e244545..b76ecd9 100644 --- a/GEOS_OceanGridComp.F90 +++ b/GEOS_OceanGridComp.F90 @@ -43,6 +43,7 @@ module GEOS_OceanGridCompMod integer :: OCN integer :: OCNd logical :: DUAL_OCEAN + logical :: DO_DATA_ATM4OCN contains @@ -101,6 +102,8 @@ subroutine SetServices ( GC, RC ) call MAPL_GetResource (MAPL, DO_DATASEA, Label="USE_DATASEA:" , DEFAULT=1, _RC) call MAPL_GetResource (MAPL, OrphanDepth, Label="OGCM_TOP_LAYER:" , DEFAULT=10.0, _RC) + call MAPL_GetResource (MAPL, DO_DATA_ATM4OCN, Label="USE_DATA_ATM4OCN:", DEFAULT=.FALSE., _RC) + if(DO_DATASEA/=0) then OCEAN_NAME="DATASEA" OCN = MAPL_AddChild(GC, NAME=OCEAN_NAME, SS=DataSeaSetServices, _RC) @@ -188,11 +191,11 @@ subroutine SetServices ( GC, RC ) if(DO_DATASEA==0) then call MAPL_TerminateImport ( GC, SHORT_NAME= & - [character(len=9) :: 'TAUX ','TAUY ', & - 'PENUVR','PENPAR','PENUVF','PENPAF', 'DRNIR', 'DFNIR', & - 'DISCHARGE', 'LWFLX', 'SHFLX', 'QFLUX', 'RAIN', 'SNOW', & - 'SFLX','SWHEAT'], & ! do not terminate import of PEN_OCN since it is not used in the `plug' - CHILD=OCN, _RC) + [character(len=9) :: 'TAUX ','TAUY ', & + 'PENUVR','PENPAR','PENUVF','PENPAF', 'DRNIR', 'DFNIR', & + 'DISCHARGE','CALVING','LWFLX', 'SHFLX', 'QFLUX', 'RAIN', 'SNOW', & + 'SFLX','SWHEAT'], & ! do not terminate import of PEN_OCN since it is not used in the `plug' + CHILD=OCN, _RC) end if ! Set the Initialize, Run, Finalize entry points @@ -421,6 +424,7 @@ subroutine Run ( GC, IMPORT, EXPORT, CLOCK, RC ) real, pointer :: DFNIRi(:,:) real, pointer :: HEATi(:,:,:) real, pointer :: DISCHARGEi(:,:) + real, pointer :: CALVINGi(:,:) real, pointer :: LWFLXi(:,:) real, pointer :: SHFLXi(:,:) real, pointer :: QFLUXi(:,:) @@ -446,6 +450,7 @@ subroutine Run ( GC, IMPORT, EXPORT, CLOCK, RC ) real, pointer :: HEATe (:,:,:) real, pointer :: FROCEANe (:,:) real, pointer :: DISCHARGEe(:,:) + real, pointer :: CALVINGe(:,:) real, pointer :: LWFLXe(:,:) real, pointer :: SWFLXe(:,:) real, pointer :: SHFLXe(:,:) @@ -467,6 +472,7 @@ subroutine Run ( GC, IMPORT, EXPORT, CLOCK, RC ) real, pointer :: DFNIR(:,:) real, pointer :: HEAT(:,:,:) real, pointer :: DISCHARGE(:,:) + real, pointer :: CALVING(:,:) real, pointer :: LWFLX(:,:) real, pointer :: SHFLX(:,:) real, pointer :: QFLUX(:,:) @@ -620,6 +626,10 @@ subroutine Run ( GC, IMPORT, EXPORT, CLOCK, RC ) call MAPL_GetPointer(IMPORT, FRESH, 'FRESH' , _RC) call MAPL_GetPointer(IMPORT, FSALT, 'FSALT' , _RC) + if(DO_DATA_ATM4OCN) then + call MAPL_GetPointer(IMPORT, CALVINGi, 'CALVING', _RC) + endif + ! Get pointers from ImExState !---------------------------- if(DO_DATASEA==0) then @@ -633,6 +643,7 @@ subroutine Run ( GC, IMPORT, EXPORT, CLOCK, RC ) call MAPL_GetPointer(GIM(OCN), DFNIR, 'DFNIR' , _RC) call MAPL_GetPointer(GIM(OCN), HEAT, 'SWHEAT', _RC) call MAPL_GetPointer(GIM(OCN), DISCHARGE, 'DISCHARGE', _RC) + call MAPL_GetPointer(GIM(OCN), CALVING, 'CALVING', _RC) call MAPL_GetPointer(GIM(OCN), LWFLX, 'LWFLX' , _RC) call MAPL_GetPointer(GIM(OCN), SHFLX, 'SHFLX' , _RC) call MAPL_GetPointer(GIM(OCN), QFLUX, 'QFLUX' , _RC) @@ -681,6 +692,7 @@ subroutine Run ( GC, IMPORT, EXPORT, CLOCK, RC ) call MAPL_GetPointer(EXPORT, TAUYe, 'TAUY' , _RC) call MAPL_GetPointer(EXPORT, HEATe, 'SWHEAT' , _RC) call MAPL_GetPointer(EXPORT, DISCHARGEe, 'DISCHARGE', _RC) + call MAPL_GetPointer(EXPORT, CALVINGe, 'CALVING', _RC) call MAPL_GetPointer(EXPORT, LWFLXe, 'LWFLX' , _RC) call MAPL_GetPointer(EXPORT, SWFLXe, 'SWFLX' , _RC) call MAPL_GetPointer(EXPORT, SHFLXe, 'SHFLX' , _RC) @@ -690,6 +702,7 @@ subroutine Run ( GC, IMPORT, EXPORT, CLOCK, RC ) call MAPL_GetPointer(EXPORT, SFLXe, 'SFLX' , _RC) call MAPL_GetPointer(EXPORT, PEN_OCNe, 'PEN_OCN', _RC) + if(associated(FROCEANe)) FROCEANe = FROCEAN ! Allocate space for temporary arrays @@ -720,7 +733,20 @@ subroutine Run ( GC, IMPORT, EXPORT, CLOCK, RC ) PENPAF = PENPAFi * WGHT DRNIR = DRNIRi * WGHT DFNIR = DFNIRi * WGHT - DISCHARGE = DISCHARGEi * WGHT + if(DO_DATA_ATM4OCN) then + DISCHARGE = DISCHARGEi + CALVING = CALVINGi + ! may not be needed + where(DISCHARGE < 0.0) + DISCHARGE = 0.0 + endwhere + where(CALVING < 0.0) + CALVING = 0.0 + endwhere + else + DISCHARGE = DISCHARGEi * WGHT + CALVING = 0.0 + endif LWFLX = LWFLXi * WGHT QFLUX = QFLUXi * WGHT SHFLX = (SHFLXi-FHOCN) * WGHT @@ -753,6 +779,7 @@ subroutine Run ( GC, IMPORT, EXPORT, CLOCK, RC ) if (associated(TAUXe)) TAUXe = TAUX if (associated(TAUYe)) TAUYe = TAUY if (associated(DISCHARGEe)) DISCHARGEe = DISCHARGE + if (associated(CALVINGe)) CALVINGe = CALVING if (associated(LWFLXe)) LWFLXe = LWFLX if (associated(SWFLXe)) SWFLXe = PENUVR+PENPAR+PENUVF+PENPAF+DRNIR+DFNIR if (associated(SHFLXe)) SHFLXe = SHFLX diff --git a/GEOS_Ocean_StateSpecs.rc b/GEOS_Ocean_StateSpecs.rc index db27212..032b7c0 100644 --- a/GEOS_Ocean_StateSpecs.rc +++ b/GEOS_Ocean_StateSpecs.rc @@ -18,6 +18,7 @@ DRNIR | W m-2 | xy | N | DFNIR | W m-2 | xy | N | | | net_surface_downwelling_nir_diffuse_flux SWHEAT | W m-2 | xyz | C | | | solar_heating_rate DISCHARGE | kg m-2 s-1 | xy | N | | | river_discharge_at_ocean_points +CALVING | kg m-2 s-1 | xy | N | DO_DATA_ATM4OCN | | ice_calving_at_ocean_points_from_datm TR | 1 | xyz | C | trim(OCEAN_NAME) == 'MOM' | MAPL_BundleItem | tracer_mixing_ratios TRFLUX | X | xy | N | trim(OCEAN_NAME) == 'MOM' | MAPL_BundleItem | surface_fluxes_of_tracers LWFLX | W m-2 | xy | N | | | surface_net_downward_longwave_flux @@ -53,6 +54,7 @@ TAUY | N m-2 | xy | N | SWHEAT | W m-2 | xyz | C | | solar_heating_rate RFLUX | W m-2 | xy | N | | downward_radiative_heat_flux_at_ocean_bottom DISCHARGE | kg m-2 s-1 | xy | N | | river_discharge_at_ocean_points +CALVING | kg m-2 s-1 | xy | N | | ice_calving_at_ocean_points FROCEAN | 1 | xy | N | | fraction_of_gridbox_covered_by_ocean LWFLX | W m-2 | xy | N | | surface_net_downward_longwave_flux SWFLX | W m-2 | xy | N | | surface_net_downward_shortwave_flux diff --git a/MOM6_GEOSPlug/MOM6_GEOSPlug.F90 b/MOM6_GEOSPlug/MOM6_GEOSPlug.F90 index cc470c8..d5cffc5 100644 --- a/MOM6_GEOSPlug/MOM6_GEOSPlug.F90 +++ b/MOM6_GEOSPlug/MOM6_GEOSPlug.F90 @@ -582,6 +582,7 @@ subroutine Run ( GC, IMPORT, EXPORT, CLOCK, RC ) REAL_, pointer :: DRNIR(:,:) => null() REAL_, pointer :: DFNIR(:,:) => null() REAL_, pointer :: DISCHARGE(:,:) => null() + REAL_, pointer :: CALVING(:,:) => null() REAL_, pointer :: AICE(:,:) => null() REAL_, pointer :: TAUXBOT(:,:) => null() REAL_, pointer :: TAUYBOT(:,:) => null() @@ -692,6 +693,7 @@ subroutine Run ( GC, IMPORT, EXPORT, CLOCK, RC ) call MAPL_GetPointer(IMPORT, DRNIR, 'DRNIR' , _RC) call MAPL_GetPointer(IMPORT, DFNIR, 'DFNIR' , _RC) call MAPL_GetPointer(IMPORT, DISCHARGE,'DISCHARGE', _RC) + call MAPL_GetPointer(IMPORT, CALVING, 'CALVING', _RC) call MAPL_GetPointer(IMPORT, AICE, 'AICE', _RC) call MAPL_GetPointer(IMPORT, TAUXBOT, 'TAUXBOT', _RC) call MAPL_GetPointer(IMPORT, TAUYBOT, 'TAUYBOT', _RC) @@ -745,6 +747,7 @@ subroutine Run ( GC, IMPORT, EXPORT, CLOCK, RC ) Boundary%fprec (isc:iec,jsc:jec)= real(SNOW, kind=KIND(Boundary%p)) ! Frozen precipitation: both positive down Boundary%salt_flux (isc:iec,jsc:jec)=-real(SFLX, kind=KIND(Boundary%p)) ! Salt flux: MOM positive up, GEOS positive down Boundary%runoff (isc:iec,jsc:jec)= real(DISCHARGE, kind=KIND(Boundary%p)) ! mass flux of liquid runoff [kg m-2 s-1] + Boundary%calving (isc:iec,jsc:jec)= real(CALVING, kind=KIND(Boundary%p)) ! mass flux of solid runoff [kg m-2 s-1] ! All shortwave components are positive down in MOM and in GEOS !-------------------------------------------------------------- diff --git a/MOM6_GEOSPlug/MOM6_GEOSPlug_StateSpecs.rc b/MOM6_GEOSPlug/MOM6_GEOSPlug_StateSpecs.rc index 41e7a62..f59ff16 100644 --- a/MOM6_GEOSPlug/MOM6_GEOSPlug_StateSpecs.rc +++ b/MOM6_GEOSPlug/MOM6_GEOSPlug_StateSpecs.rc @@ -25,6 +25,7 @@ PENPAF | W m-2 | xy | N | net_downward_penetrating_diffuse_PAR_ DRNIR | W m-2 | xy | N | net_surface_downwelling_nir_beam_flux DFNIR | W m-2 | xy | N | net_surface_downwelling_nir_diffuse_flux DISCHARGE | kg m-2 s-1 | xy | N | river_discharge_at_ocean_points +CALVING | kg m-2 s-1 | xy | N | ice_calving_at_ocean_points AICE | 1 | xy | N | ice_concentration_of_grid_cell TAUXBOT | N m-2 | xy | N | eastward_stress_at_base_of_ice_Agrid TAUYBOT | N m-2 | xy | N | northward_stress_at_base_of_ice_Agrid