diff --git a/Externals.cfg b/Externals.cfg index da095e418..29371768a 100644 --- a/Externals.cfg +++ b/Externals.cfg @@ -17,7 +17,7 @@ protocol = git required = True repo_url = git@github.com:GEOS-ESM/MOM5.git local_path = ./GEOSogcm_GridComp/GEOSocean_GridComp/GuestOcean_GridComp/MOM_GEOS5PlugMod/@mom -tag = geos/v1.0.1 +tag = geos/v1.0.2 protocol = git [externals_description] diff --git a/GEOS_GcmGridComp.F90 b/GEOS_GcmGridComp.F90 index 86ff0865b..c31e9fe71 100644 --- a/GEOS_GcmGridComp.F90 +++ b/GEOS_GcmGridComp.F90 @@ -1131,6 +1131,11 @@ subroutine Initialize ( GC, IMPORT, EXPORT, CLOCK, RC ) call MAPL_AddRecord(CMAPL, ALARMS, (/MAPL_Write2Ram/), rc=status) VERIFY_(STATUS) + call MAPL_GetObjectFromGC ( GCS(OGCM), CMAPL, RC=STATUS) + VERIFY_(STATUS) + call MAPL_AddRecord(CMAPL, ALARMS, (/MAPL_Write2Ram/), rc=status) + VERIFY_(STATUS) + GCM_INTERNAL_STATE%replayStartAlarm = replayStartAlarm GCM_INTERNAL_STATE%replayStopAlarm = replayStopAlarm GCM_INTERNAL_STATE%replayCycleAlarm = replayCycleAlarm diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOS_SurfaceGridComp.F90 b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOS_SurfaceGridComp.F90 index 6e632bb1f..27abb18a8 100644 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOS_SurfaceGridComp.F90 +++ b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOS_SurfaceGridComp.F90 @@ -2475,6 +2475,15 @@ subroutine SetServices ( GC, RC ) RC=STATUS ) VERIFY_(STATUS) + call MAPL_AddExportSpec(GC, & + LONG_NAME = 'foundation_salinity_for_interface_layer', & + UNITS = 'PSU', & + SHORT_NAME = 'SS_FOUND', & + DIMS = MAPL_DimsHorzOnly, & + VLOCATION = MAPL_VLocationNone, & + RC=STATUS ) + VERIFY_(STATUS) + call MAPL_AddExportSpec(GC, & LONG_NAME = 'net_heating_in_warm_layer', & UNITS = 'W m-2', & @@ -4918,6 +4927,7 @@ subroutine RUN2 ( GC, IMPORT, EXPORT, CLOCK, RC ) real, pointer, dimension(:,:) :: BCOOL => NULL() real, pointer, dimension(:,:) :: TDEL => NULL() real, pointer, dimension(:,:) :: TS_FOUND => NULL() + real, pointer, dimension(:,:) :: SS_FOUND => NULL() real, pointer, dimension(:,:) :: QWARM => NULL() real, pointer, dimension(:,:) :: SWWARM => NULL() real, pointer, dimension(:,:) :: LANGM => NULL() @@ -5188,6 +5198,7 @@ subroutine RUN2 ( GC, IMPORT, EXPORT, CLOCK, RC ) real, pointer, dimension(:) :: BCOOL_TILE => NULL() real, pointer, dimension(:) :: TDEL_TILE => NULL() real, pointer, dimension(:) :: TS_FOUND_TILE => NULL() + real, pointer, dimension(:) :: SS_FOUND_TILE => NULL() real, pointer, dimension(:) :: QWARM_TILE => NULL() real, pointer, dimension(:) :: SWWARM_TILE => NULL() real, pointer, dimension(:) :: LANGM_TILE => NULL() @@ -5954,6 +5965,7 @@ subroutine RUN2 ( GC, IMPORT, EXPORT, CLOCK, RC ) call MAPL_GetPointer(EXPORT , BCOOL , 'BCOOL' , RC=STATUS); VERIFY_(STATUS) call MAPL_GetPointer(EXPORT , TDEL , 'TDEL' , RC=STATUS); VERIFY_(STATUS) call MAPL_GetPointer(EXPORT , TS_FOUND, 'TS_FOUND', RC=STATUS); VERIFY_(STATUS) + call MAPL_GetPointer(EXPORT , SS_FOUND, 'SS_FOUND', RC=STATUS); VERIFY_(STATUS) call MAPL_GetPointer(EXPORT , QWARM , 'QWARM' , RC=STATUS); VERIFY_(STATUS) call MAPL_GetPointer(EXPORT , SWWARM , 'SWWARM' , RC=STATUS); VERIFY_(STATUS) call MAPL_GetPointer(EXPORT , LANGM , 'LANGM' , RC=STATUS); VERIFY_(STATUS) @@ -6579,6 +6591,7 @@ subroutine RUN2 ( GC, IMPORT, EXPORT, CLOCK, RC ) call MKTILE(BCOOL, BCOOL_TILE , NT, RC=STATUS); VERIFY_(STATUS) call MKTILE(TDEL, TDEL_TILE , NT, RC=STATUS); VERIFY_(STATUS) call MKTILE(TS_FOUND,TS_FOUND_TILE , NT, RC=STATUS); VERIFY_(STATUS) + call MKTILE(SS_FOUND,SS_FOUND_TILE , NT, RC=STATUS); VERIFY_(STATUS) call MKTILE(QWARM, QWARM_TILE , NT, RC=STATUS); VERIFY_(STATUS) call MKTILE(SWWARM, SWWARM_TILE , NT, RC=STATUS); VERIFY_(STATUS) call MKTILE(LANGM, LANGM_TILE , NT, RC=STATUS); VERIFY_(STATUS) @@ -7116,6 +7129,11 @@ subroutine RUN2 ( GC, IMPORT, EXPORT, CLOCK, RC ) VERIFY_(STATUS) endif + if(associated( SS_FOUND)) then + call MAPL_LocStreamTransform( LOCSTREAM, SS_FOUND, SS_FOUND_TILE, RC=STATUS) + VERIFY_(STATUS) + endif + if(associated( QWARM)) then call MAPL_LocStreamTransform( LOCSTREAM, QWARM, QWARM_TILE, RC=STATUS) VERIFY_(STATUS) @@ -7912,6 +7930,7 @@ subroutine RUN2 ( GC, IMPORT, EXPORT, CLOCK, RC ) if(associated(BCOOL_TILE )) deallocate(BCOOL_TILE ) if(associated(TDEL_TILE )) deallocate(TDEL_TILE ) if(associated(TS_FOUND_TILE )) deallocate(TS_FOUND_TILE ) + if(associated(SS_FOUND_TILE )) deallocate(SS_FOUND_TILE ) if(associated(QWARM_TILE )) deallocate(QWARM_TILE ) if(associated(SWWARM_TILE )) deallocate(SWWARM_TILE ) if(associated(LANGM_TILE )) deallocate(LANGM_TILE ) @@ -9149,6 +9168,11 @@ subroutine DOTYPE(type,RC) VERIFY_(STATUS) end if + if(associated(SS_FOUND_TILE)) then + call FILLOUT_TILE(GEX(type), 'SS_FOUND', SS_FOUND_TILE, XFORM, RC=STATUS) + VERIFY_(STATUS) + end if + if(associated(QWARM_TILE)) then call FILLOUT_TILE(GEX(type), 'QWARM', QWARM_TILE, XFORM, RC=STATUS) VERIFY_(STATUS) diff --git a/GEOSogcm_GridComp/GEOS_OgcmGridComp.F90 b/GEOSogcm_GridComp/GEOS_OgcmGridComp.F90 index be894ad3d..a32faf806 100644 --- a/GEOSogcm_GridComp/GEOS_OgcmGridComp.F90 +++ b/GEOSogcm_GridComp/GEOS_OgcmGridComp.F90 @@ -983,6 +983,16 @@ subroutine SetServices ( GC, RC ) SRC_ID = SEAICE, & RC=STATUS ) VERIFY_(STATUS) + + if(DUAL_OCEAN) then + call MAPL_AddConnectivity ( GC, & + SRC_NAME = (/'FRACICE'/), & + DST_NAME = (/'FRACICEd'/), & + DST_ID = OCEAN, & + SRC_ID = SEAICEd, & + RC=STATUS ) + VERIFY_(STATUS) + endif if(DO_DATASEAONLY==0) then call MAPL_AddConnectivity ( GC, & diff --git a/GEOSogcm_GridComp/GEOSocean_GridComp/GuestOcean_GridComp/GuestOcean_GridComp.F90 b/GEOSogcm_GridComp/GEOSocean_GridComp/GuestOcean_GridComp/GuestOcean_GridComp.F90 index 95b464d4e..058da3f05 100644 --- a/GEOSogcm_GridComp/GEOSocean_GridComp/GuestOcean_GridComp/GuestOcean_GridComp.F90 +++ b/GEOSogcm_GridComp/GEOSocean_GridComp/GuestOcean_GridComp/GuestOcean_GridComp.F90 @@ -175,10 +175,10 @@ subroutine SetServices ( GC, RC ) SHORT_NAME = 'PENUVR', & LONG_NAME = 'net_downward_penetrating_direct_UV_flux', & UNITS = 'W m-2', & - DIMS = MAPL_DimsHorzOnly, & - VLOCATION = MAPL_VLocationNone, & - RC=status ) - VERIFY_(status) + DIMS = MAPL_DimsHorzOnly, & + VLOCATION = MAPL_VLocationNone, & + RC=STATUS ) + VERIFY_(STATUS) call MAPL_AddImportSpec(GC, & SHORT_NAME = 'PENPAR', & @@ -332,9 +332,20 @@ subroutine SetServices ( GC, RC ) UNITS = 'W m-2', & DIMS = MAPL_DimsHorzOnly, & VLOCATION = MAPL_VLocationNone, & - RC=STATUS ) + RC=STATUS ) VERIFY_(STATUS) + if (dual_ocean) then + call MAPL_AddImportSpec(GC, & + SHORT_NAME = 'FRACICEd', & + LONG_NAME = 'fractional_cover_of_seaice', & + UNITS = '1', & + DIMS = MAPL_DimsHorzOnly, & + VLOCATION = MAPL_VLocationNone, & + RC=STATUS ) + VERIFY_(STATUS) + endif + ! ! Need to have this internal state to fill in orphan points: call MAPL_AddInternalSpec(GC, & @@ -491,19 +502,19 @@ subroutine SetServices ( GC, RC ) SHORT_NAME = 'RAIN', & LONG_NAME = 'ocean_rainfall',& UNITS = 'kg m-2 s-1', & - DIMS = MAPL_DimsHorzOnly, & - VLOCATION = MAPL_VLocationNone, & - RC=status ) - VERIFY_(status) + DIMS = MAPL_DimsHorzOnly, & + VLOCATION = MAPL_VLocationNone, & + RC=STATUS ) + VERIFY_(STATUS) call MAPL_AddExportSpec(GC, & SHORT_NAME = 'SNOW', & LONG_NAME = 'ocean_snowfall',& UNITS = 'kg m-2 s-1', & - DIMS = MAPL_DimsHorzOnly, & - VLOCATION = MAPL_VLocationNone, & - RC=STATUS ) - VERIFY_(STATUS) + DIMS = MAPL_DimsHorzOnly, & + VLOCATION = MAPL_VLocationNone, & + RC=STATUS ) + VERIFY_(STATUS) ! Exports of child @@ -911,6 +922,7 @@ subroutine Run ( gc, import, export, clock, rc ) real, pointer :: SNOW(:,:) real, pointer :: SFLX(:,:) real, pointer :: FI(:,:) + real, pointer :: FId(:,:) ! Pointers to exports of child @@ -932,6 +944,7 @@ subroutine Run ( gc, import, export, clock, rc ) integer :: NUM real, allocatable :: WGHT(:,:) real :: DT, TAU_SST + real :: TAU_SST_UNDER_ICE real, pointer :: LONS (:,:) real, pointer :: LATS (:,:) real, parameter :: OrphanSalinity=34.0 @@ -1090,6 +1103,7 @@ subroutine Run ( gc, import, export, clock, rc ) if (dual_ocean) then call MAPL_GetPointer(GEX(OCNd), TWd, 'TW' , alloc=.true., RC=STATUS); VERIFY_(STATUS) + call MAPL_GetPointer(IMPORT, FId, 'FRACICEd' , RC=STATUS); VERIFY_(STATUS) end if if(DO_DATASEA==0) then @@ -1153,7 +1167,7 @@ subroutine Run ( gc, import, export, clock, rc ) SFLX = FSALT * WGHT ! This stress forces the ocean, combined with sea ice bottom stress later - +!------------------------------------------------------------------------ TAUX = TAUXi * WGHT TAUY = TAUYi * WGHT @@ -1232,7 +1246,10 @@ subroutine Run ( gc, import, export, clock, rc ) call MAPL_GetPointer(GIM(OCNd), FI , 'FRACICE' , RC=STATUS) VERIFY_(STATUS) - call MAPL_GetResource(STATE,TAU_SST, Label="TAU_SST:", default=86400.0 ,RC=STATUS) + call MAPL_GetResource(STATE,TAU_SST, Label="TAU_SST:", default=432000.0 ,RC=STATUS) + VERIFY_(status) + + call MAPL_GetResource(STATE,TAU_SST_UNDER_ICE, Label="TAU_SST_UNDER_ICE:", default=86400.0 ,RC=STATUS) VERIFY_(status) ! we should have valid pointers to TW and TWd by now @@ -1245,6 +1262,14 @@ subroutine Run ( gc, import, export, clock, rc ) end where + where(MASK > 0.0 .and. FI >= 0.05 .and. FId > FI) + ! 0.054 (C/psu) is the ratio between the freezing temperature and salinity of brine. + ! -0.054*SW gives salinity dependent freezing temperature + ! ideally this const should be from the ocean model, but doing so is difficult here + DEL_TEMP = ((-0.054*SW+MAPL_TICE) - TW)*DT/(DT+TAU_SST_UNDER_ICE) + + end where + ! put it back to MOM call ESMF_GridCompRun( GCS(OCN), importState=GIM(OCN), & exportState=GEX(OCN), clock=CLOCK, phase=2, userRC=STATUS ) diff --git a/GEOSogcm_GridComp/GEOSocean_GridComp/GuestOcean_GridComp/MOM_GEOS5PlugMod/MOM_GEOS5PlugMod.F90 b/GEOSogcm_GridComp/GEOSocean_GridComp/GuestOcean_GridComp/MOM_GEOS5PlugMod/MOM_GEOS5PlugMod.F90 index dc7d38162..3f8ef602b 100644 --- a/GEOSogcm_GridComp/GEOSocean_GridComp/GuestOcean_GridComp/MOM_GEOS5PlugMod/MOM_GEOS5PlugMod.F90 +++ b/GEOSogcm_GridComp/GEOSocean_GridComp/GuestOcean_GridComp/MOM_GEOS5PlugMod/MOM_GEOS5PlugMod.F90 @@ -58,13 +58,13 @@ module MOM_GEOS5PlugMod use ocean_model_mod, only: ocean_model_data_get use ocean_model_mod, only: mom4_get_latlon_UVsurf, mom4_get_UVsurfB use ocean_model_mod, only: mom4_get_thickness, mom4_get_tsurf, mom4_get_ssurf - use ocean_model_mod, only: mom4_get_pointers_to_variables, mom4_get_streamfunction + use ocean_model_mod, only: mom4_get_pointers_to_variables, mom4_get_streamfunction, mom4_get_mld use ocean_model_mod, only: mom4_get_prog_tracer_index, mom4_put_prog_tracer, mom4_get_prog_tracer use ocean_model_mod, only: mom4_get_diag_tracer_index, mom4_get_diag_tracer use ocean_model_mod, only: mom4_get_temperature_index, mom4_get_salinity_index, & mom4_get_uv, mom4_get_latlon_uv, mom4_get_density use ocean_model_mod, only: mom4_get_3D_tmask, mom4_set_swheat, mom4_set_swheat_fr - use ocean_vert_kpp_mom4p1_mod, only: mom4_get_hblt + ! This was added for a to b; Balaji was reluctant to expose ice_grid_mod. use mpp_parameter_mod, only: AGRID, SCALAR_PAIR @@ -1042,7 +1042,7 @@ subroutine Initialize ( GC, IMPORT, EXPORT, CLOCK, RC ) pbo = real(merge(tsource = 1.0e-04*tmp2, fsource = real(MAPL_UNDEF), mask = (mask(:, :, 1) > 0.0)),kind=G5KIND) end if - call mom4_get_hblt(Tmp2) + tmp2=mom4_get_mld() OMLDAMAX = real(merge(tsource = tmp2, fsource = real(MAPL_UNDEF), mask = (mask(:, :, 1) > 0.0)), kind=G5KIND) deallocate(Tmp2) @@ -1732,7 +1732,7 @@ subroutine Run ( gc, import, export, clock, rc ) end where end if - call mom4_get_hblt(U) + U=mom4_get_mld() if(HR==0 .and. MN==0 .and. SC==0) then OMLDAMAX = real(U, kind = G5KIND) else @@ -2109,7 +2109,7 @@ subroutine Record ( gc, import, export, clock, rc ) call MAPL_TimerOn(MAPL,"TOTAL") - doRecord = MAPL_RecordAlarmIsRinging(MAPL, RC=status) + doRecord = MAPL_RecordAlarmIsRinging(MAPL, MODE=MAPL_Write2Disk, RC=status) VERIFY_(STATUS) if (doRecord) then