From 0d82d7ef3fa99edcf593d37be948e9dde978d866 Mon Sep 17 00:00:00 2001 From: Yury Vikhliaev Date: Fri, 29 May 2020 14:45:33 -0400 Subject: [PATCH 01/10] SS_FOUND export added --- .../GEOS_SurfaceGridComp.F90 | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) 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) From fe3e766639dca614262e659cc10446b47d72ad1a Mon Sep 17 00:00:00 2001 From: Yury Vikhliaev Date: Fri, 29 May 2020 15:12:24 -0400 Subject: [PATCH 02/10] SS units fixed --- .../GEOSsaltwater_GridComp/GEOS_OpenWaterGridComp.F90 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSsaltwater_GridComp/GEOS_OpenWaterGridComp.F90 b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSsaltwater_GridComp/GEOS_OpenWaterGridComp.F90 index 75336cfc9..1c7bcd175 100644 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSsaltwater_GridComp/GEOS_OpenWaterGridComp.F90 +++ b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSsaltwater_GridComp/GEOS_OpenWaterGridComp.F90 @@ -2864,12 +2864,10 @@ subroutine OPENWATERCORE(NT,RC) if (DO_SKIN_LAYER==0) then HH(:,WATER) = 1.e+15 ! infinite heat capacity with TS = SST (from data) TS(:,WATER) = TS_FOUNDi - SS(:,WATER) = SS_FOUNDi TWMTF = 0. DELTC = 0. else HH(:,WATER) = AOIL_depth*MAPL_RHO_SEAWATER - SS(:,WATER) = SS_FOUNDi*HH(:,WATER) call MAPL_GetPointer(INTERNAL,TWMTF, 'TWMTF', RC=STATUS); VERIFY_(STATUS) call MAPL_GetPointer(INTERNAL,DELTC, 'DELTC', RC=STATUS); VERIFY_(STATUS) @@ -2883,6 +2881,7 @@ subroutine OPENWATERCORE(NT,RC) endif endif ! if( trim(AOIL_COMP_SWITCH) == "ON") + SS(:,WATER) = SS_FOUNDi FR(:,WATER) = 1.0 FRWATER = max(1.0 - FI, 0.0) From 3b54301900de29c3c8d1aa4172148533e2775df8 Mon Sep 17 00:00:00 2001 From: Yury Vikhliaev Date: Fri, 29 May 2020 17:13:19 -0400 Subject: [PATCH 03/10] Fixed SST and sea ice relaxation in dual ocean mode. Added diagnostics of salt flux due to SSS relaxation to SSS_MIN, which prevents model from crashing due to low salinity. --- GEOSogcm_GridComp/GEOS_OgcmGridComp.F90 | 10 +++ .../GuestOcean_GridComp.F90 | 82 +++++++++++++++---- 2 files changed, 76 insertions(+), 16 deletions(-) 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..c9cfdf2a3 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,30 @@ 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) + +! The following export shows how much salt do we add due to restoring surface +! salinity to SSS_MIN + call MAPL_AddExportSpec(GC, & + SHORT_NAME = 'SRESTORE', & + LONG_NAME = 'salt_flux_due_to_sss_restoring', & + UNITS = 'kg m-2 s-1', & + DIMS = MAPL_DimsHorzOnly, & + VLOCATION = MAPL_VLocationNone, & + RC=STATUS ) + VERIFY_(STATUS) ! Exports of child @@ -890,7 +912,7 @@ subroutine Run ( gc, import, export, clock, rc ) real, pointer :: RAINe(:,:) real, pointer :: SNOWe(:,:) real, pointer :: SFLXe(:,:) - + real, pointer :: SRESTORE(:,:) ! Pointers to imports of child @@ -911,6 +933,8 @@ subroutine Run ( gc, import, export, clock, rc ) real, pointer :: SNOW(:,:) real, pointer :: SFLX(:,:) real, pointer :: FI(:,:) + real, pointer :: FId(:,:) + real, pointer :: DH(:,:,:) ! Pointers to exports of child @@ -932,10 +956,12 @@ 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 real :: Tfreeze + real :: SSS_MIN integer :: ID integer :: PHASE @@ -1041,6 +1067,8 @@ subroutine Run ( gc, import, export, clock, rc ) VERIFY_(status) call MAPL_GetResource(STATE,DT, Label="OCEAN_DT:", DEFAULT=DT, RC=STATUS) ! set Default OCEAN_DT to AGCM Heartbeat VERIFY_(status) + call MAPL_GetResource(STATE, SSS_MIN, Label="SSS_MIN:", default=-1.0, RC=STATUS) + VERIFY_(status) ! Get pointers to imports !-------------------------------------------------------------------------------- @@ -1090,10 +1118,12 @@ 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 call MAPL_GetPointer(GEX(OCN), FRAZIL, 'FRAZIL' , alloc=.true., RC=STATUS); VERIFY_(STATUS) + call MAPL_GetPointer(GEX(OCN), DH, 'DH', RC=STATUS); VERIFY_(STATUS) end if ! Get pointers to exports @@ -1118,8 +1148,10 @@ subroutine Run ( gc, import, export, clock, rc ) call MAPL_GetPointer(EXPORT, RAINe, 'RAIN' , RC=STATUS); VERIFY_(STATUS) call MAPL_GetPointer(EXPORT, SNOWe, 'SNOW' , RC=STATUS); VERIFY_(STATUS) call MAPL_GetPointer(EXPORT, SFLXe, 'SFLX' , RC=STATUS); VERIFY_(STATUS) + call MAPL_GetPointer(EXPORT, SRESTORE, 'SRESTORE' , RC=STATUS); VERIFY_(STATUS) if(associated(FROCEANe)) FROCEANe = FROCEAN + if(associated(SRESTORE)) SRESTORE = 0.0 ! Allocate space for temporary arrays !------------------------------------ @@ -1152,8 +1184,17 @@ subroutine Run ( gc, import, export, clock, rc ) SNOW = SNOWi * WGHT SFLX = FSALT * WGHT +! If salinity drops below threshold, restore it to SSS_MIN by adding SRESTORE to SFLX. +! Defalt is no restoring. + if(associated(SRESTORE)) then + where(SW < SSS_MIN) + SRESTORE = (SSS_MIN-SW)*DH(:,:,1)*MAPL_RHO_SEAWATER*1.e-3/DT + end where + SFLX = SFLX + SRESTORE + end if + ! This stress forces the ocean, combined with sea ice bottom stress later - +!------------------------------------------------------------------------ TAUX = TAUXi * WGHT TAUY = TAUYi * WGHT @@ -1232,7 +1273,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 +1289,12 @@ subroutine Run ( gc, import, export, clock, rc ) end where + where(MASK > 0.0 .and. FI >= 0.05 .and. FId > FI) + + 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 ) From 417527c4f16dccdbf02b019c192bfd934cb4df65 Mon Sep 17 00:00:00 2001 From: Yury Vikhliaev Date: Fri, 29 May 2020 17:16:31 -0400 Subject: [PATCH 04/10] Fixed MLD diagnostics (now it is MLD, not hblt). Fixed Record for dual ocean mode. --- .../MOM_GEOS5PlugMod/MOM_GEOS5PlugMod.F90 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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..9ef4e547f 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, MAPL_Write2Disk, RC=status) VERIFY_(STATUS) if (doRecord) then From a32297d743a7b9622ed6dff28a44134886c9ce87 Mon Sep 17 00:00:00 2001 From: Yury Vikhliaev Date: Thu, 4 Jun 2020 11:18:23 -0400 Subject: [PATCH 05/10] This is update from S2Sv3. According to Atanas, this update fixes a bug to set the proper mode to write to RAM in dual ocean mode for OGCM and children. --- GEOS_GcmGridComp.F90 | 5 +++++ 1 file changed, 5 insertions(+) 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 From 76771786e80ace74bc2041cfe28f719b4e9af131 Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Fri, 5 Jun 2020 14:21:17 -0400 Subject: [PATCH 06/10] Move to mom5 geos/v1.0.2 --- Externals.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Externals.cfg b/Externals.cfg index c0333288a..93d94bcd5 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] From 66e659387869f5f5b9cd67337339492d5fa1cf4b Mon Sep 17 00:00:00 2001 From: Yury Vikhliaev Date: Mon, 8 Jun 2020 15:38:09 -0400 Subject: [PATCH 07/10] Limiting salinity minimum is removed because this will not work with MOM6. --- .../GuestOcean_GridComp.F90 | 29 +------------------ 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/GEOSogcm_GridComp/GEOSocean_GridComp/GuestOcean_GridComp/GuestOcean_GridComp.F90 b/GEOSogcm_GridComp/GEOSocean_GridComp/GuestOcean_GridComp/GuestOcean_GridComp.F90 index c9cfdf2a3..76d240b4f 100644 --- a/GEOSogcm_GridComp/GEOSocean_GridComp/GuestOcean_GridComp/GuestOcean_GridComp.F90 +++ b/GEOSogcm_GridComp/GEOSocean_GridComp/GuestOcean_GridComp/GuestOcean_GridComp.F90 @@ -516,17 +516,6 @@ subroutine SetServices ( GC, RC ) RC=STATUS ) VERIFY_(STATUS) -! The following export shows how much salt do we add due to restoring surface -! salinity to SSS_MIN - call MAPL_AddExportSpec(GC, & - SHORT_NAME = 'SRESTORE', & - LONG_NAME = 'salt_flux_due_to_sss_restoring', & - UNITS = 'kg m-2 s-1', & - DIMS = MAPL_DimsHorzOnly, & - VLOCATION = MAPL_VLocationNone, & - RC=STATUS ) - VERIFY_(STATUS) - ! Exports of child call MAPL_AddExportSpec ( GC , & @@ -912,7 +901,7 @@ subroutine Run ( gc, import, export, clock, rc ) real, pointer :: RAINe(:,:) real, pointer :: SNOWe(:,:) real, pointer :: SFLXe(:,:) - real, pointer :: SRESTORE(:,:) + ! Pointers to imports of child @@ -934,7 +923,6 @@ subroutine Run ( gc, import, export, clock, rc ) real, pointer :: SFLX(:,:) real, pointer :: FI(:,:) real, pointer :: FId(:,:) - real, pointer :: DH(:,:,:) ! Pointers to exports of child @@ -961,7 +949,6 @@ subroutine Run ( gc, import, export, clock, rc ) real, pointer :: LATS (:,:) real, parameter :: OrphanSalinity=34.0 real :: Tfreeze - real :: SSS_MIN integer :: ID integer :: PHASE @@ -1067,8 +1054,6 @@ subroutine Run ( gc, import, export, clock, rc ) VERIFY_(status) call MAPL_GetResource(STATE,DT, Label="OCEAN_DT:", DEFAULT=DT, RC=STATUS) ! set Default OCEAN_DT to AGCM Heartbeat VERIFY_(status) - call MAPL_GetResource(STATE, SSS_MIN, Label="SSS_MIN:", default=-1.0, RC=STATUS) - VERIFY_(status) ! Get pointers to imports !-------------------------------------------------------------------------------- @@ -1123,7 +1108,6 @@ subroutine Run ( gc, import, export, clock, rc ) if(DO_DATASEA==0) then call MAPL_GetPointer(GEX(OCN), FRAZIL, 'FRAZIL' , alloc=.true., RC=STATUS); VERIFY_(STATUS) - call MAPL_GetPointer(GEX(OCN), DH, 'DH', RC=STATUS); VERIFY_(STATUS) end if ! Get pointers to exports @@ -1148,10 +1132,8 @@ subroutine Run ( gc, import, export, clock, rc ) call MAPL_GetPointer(EXPORT, RAINe, 'RAIN' , RC=STATUS); VERIFY_(STATUS) call MAPL_GetPointer(EXPORT, SNOWe, 'SNOW' , RC=STATUS); VERIFY_(STATUS) call MAPL_GetPointer(EXPORT, SFLXe, 'SFLX' , RC=STATUS); VERIFY_(STATUS) - call MAPL_GetPointer(EXPORT, SRESTORE, 'SRESTORE' , RC=STATUS); VERIFY_(STATUS) if(associated(FROCEANe)) FROCEANe = FROCEAN - if(associated(SRESTORE)) SRESTORE = 0.0 ! Allocate space for temporary arrays !------------------------------------ @@ -1184,15 +1166,6 @@ subroutine Run ( gc, import, export, clock, rc ) SNOW = SNOWi * WGHT SFLX = FSALT * WGHT -! If salinity drops below threshold, restore it to SSS_MIN by adding SRESTORE to SFLX. -! Defalt is no restoring. - if(associated(SRESTORE)) then - where(SW < SSS_MIN) - SRESTORE = (SSS_MIN-SW)*DH(:,:,1)*MAPL_RHO_SEAWATER*1.e-3/DT - end where - SFLX = SFLX + SRESTORE - end if - ! This stress forces the ocean, combined with sea ice bottom stress later !------------------------------------------------------------------------ TAUX = TAUXi * WGHT From a0df850d6cb5a77a2d469694bd8b48ba9882b748 Mon Sep 17 00:00:00 2001 From: Yury Vikhliaev Date: Mon, 8 Jun 2020 15:43:24 -0400 Subject: [PATCH 08/10] Comment on freezing temperature added. --- .../GuestOcean_GridComp/GuestOcean_GridComp.F90 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/GEOSogcm_GridComp/GEOSocean_GridComp/GuestOcean_GridComp/GuestOcean_GridComp.F90 b/GEOSogcm_GridComp/GEOSocean_GridComp/GuestOcean_GridComp/GuestOcean_GridComp.F90 index 76d240b4f..058da3f05 100644 --- a/GEOSogcm_GridComp/GEOSocean_GridComp/GuestOcean_GridComp/GuestOcean_GridComp.F90 +++ b/GEOSogcm_GridComp/GEOSocean_GridComp/GuestOcean_GridComp/GuestOcean_GridComp.F90 @@ -1263,7 +1263,9 @@ 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 From a9a2d0dc887c8c1aa297dd9a91dd52fdac43c6f7 Mon Sep 17 00:00:00 2001 From: Yury Vikhliaev Date: Thu, 11 Jun 2020 09:51:15 -0400 Subject: [PATCH 09/10] Wrtie2Disk is now keyword argumanet in MAPL_RecordAlarmsRinging. This is requested by Atanas. --- .../GuestOcean_GridComp/MOM_GEOS5PlugMod/MOM_GEOS5PlugMod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 9ef4e547f..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 @@ -2109,7 +2109,7 @@ subroutine Record ( gc, import, export, clock, rc ) call MAPL_TimerOn(MAPL,"TOTAL") - doRecord = MAPL_RecordAlarmIsRinging(MAPL, MAPL_Write2Disk, RC=status) + doRecord = MAPL_RecordAlarmIsRinging(MAPL, MODE=MAPL_Write2Disk, RC=status) VERIFY_(STATUS) if (doRecord) then From be34c36316677f1d60040c82f2a34ab5de3d1c84 Mon Sep 17 00:00:00 2001 From: Yury Vikhliaev Date: Thu, 11 Jun 2020 16:21:40 -0400 Subject: [PATCH 10/10] Changed back SS computation to develop version since it was non zero diff with use_skin_layer=1 and affected other computations in coupled mode. --- .../GEOSsaltwater_GridComp/GEOS_OpenWaterGridComp.F90 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSsaltwater_GridComp/GEOS_OpenWaterGridComp.F90 b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSsaltwater_GridComp/GEOS_OpenWaterGridComp.F90 index 1c7bcd175..75336cfc9 100644 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSsaltwater_GridComp/GEOS_OpenWaterGridComp.F90 +++ b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSsaltwater_GridComp/GEOS_OpenWaterGridComp.F90 @@ -2864,10 +2864,12 @@ subroutine OPENWATERCORE(NT,RC) if (DO_SKIN_LAYER==0) then HH(:,WATER) = 1.e+15 ! infinite heat capacity with TS = SST (from data) TS(:,WATER) = TS_FOUNDi + SS(:,WATER) = SS_FOUNDi TWMTF = 0. DELTC = 0. else HH(:,WATER) = AOIL_depth*MAPL_RHO_SEAWATER + SS(:,WATER) = SS_FOUNDi*HH(:,WATER) call MAPL_GetPointer(INTERNAL,TWMTF, 'TWMTF', RC=STATUS); VERIFY_(STATUS) call MAPL_GetPointer(INTERNAL,DELTC, 'DELTC', RC=STATUS); VERIFY_(STATUS) @@ -2881,7 +2883,6 @@ subroutine OPENWATERCORE(NT,RC) endif endif ! if( trim(AOIL_COMP_SWITCH) == "ON") - SS(:,WATER) = SS_FOUNDi FR(:,WATER) = 1.0 FRWATER = max(1.0 - FI, 0.0)