diff --git a/.circleci/config.yml b/.circleci/config.yml index 922e973d4..8796d13a1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,7 +42,9 @@ commands: compiler: type: string steps: - - run: mpirun --version && << parameters.compiler >> --version && echo $BASEDIR && pwd && ls && echo "$(nproc)" + - run: + name: "Versions, etc." + command: mpirun --version && << parameters.compiler >> --version && echo $BASEDIR && pwd && ls && echo "$(nproc)" checkout_fixture: description: "Checkout fixture" @@ -50,9 +52,11 @@ commands: repo: type: string steps: - - run: | - cd ${CIRCLE_WORKING_DIRECTORY} - git clone https://github.com/GEOS-ESM/<< parameters.repo >>.git + - run: + name: "Checkout fixture" + command: | + cd ${CIRCLE_WORKING_DIRECTORY} + git clone https://github.com/GEOS-ESM/<< parameters.repo >>.git mepoclone: description: "Mepo clone external repos" @@ -60,10 +64,12 @@ commands: repo: type: string steps: - - run: | - cd ${CIRCLE_WORKING_DIRECTORY}/<< parameters.repo >> - mepo clone - mepo status + - run: + name: "Mepo clone external repos" + command: | + cd ${CIRCLE_WORKING_DIRECTORY}/<< parameters.repo >> + mepo clone + mepo status mepodevelop: description: "Mepo develop GEOSgcm_GridComp GEOSgcm_App GMAO_Shared" @@ -71,10 +77,12 @@ commands: repo: type: string steps: - - run: | - cd ${CIRCLE_WORKING_DIRECTORY}/<< parameters.repo >> - mepo develop GEOSgcm_GridComp GEOSgcm_App GMAO_Shared - mepo status + - run: + name: "Mepo develop GEOSgcm_GridComp GEOSgcm_App GMAO_Shared" + command: | + cd ${CIRCLE_WORKING_DIRECTORY}/<< parameters.repo >> + mepo develop GEOSgcm_GridComp GEOSgcm_App GMAO_Shared + mepo status checkout_feature_branch: description: "Mepo checkout-if-exists feature branch" @@ -82,14 +90,16 @@ commands: repo: type: string steps: - - run: | - cd ${CIRCLE_WORKING_DIRECTORY}/<< parameters.repo >> - echo "${CIRCLE_BRANCH}" - if [ "${CIRCLE_BRANCH}" != "develop" ] && [ "${CIRCLE_BRANCH}" != "main" ] - then - mepo checkout-if-exists ${CIRCLE_BRANCH} - fi - mepo status + - run: + name: "Mepo checkout-if-exists feature branch" + command: | + cd ${CIRCLE_WORKING_DIRECTORY}/<< parameters.repo >> + echo "${CIRCLE_BRANCH}" + if [ "${CIRCLE_BRANCH}" != "develop" ] && [ "${CIRCLE_BRANCH}" != "main" ] + then + mepo checkout-if-exists ${CIRCLE_BRANCH} + fi + mepo status cmake: description: "Run CMake" @@ -99,12 +109,14 @@ commands: compiler: type: string steps: - - run: | - mkdir -p /logfiles - cd ${CIRCLE_WORKING_DIRECTORY}/<< parameters.repo >> - mkdir -p ${CIRCLE_WORKING_DIRECTORY}/workspace/build-<< parameters.repo >> - cd ${CIRCLE_WORKING_DIRECTORY}/workspace/build-<< parameters.repo >> - cmake ${CIRCLE_WORKING_DIRECTORY}/<< parameters.repo >> -DBASEDIR=$BASEDIR/Linux -DCMAKE_Fortran_COMPILER=<< parameters.compiler >> -DCMAKE_BUILD_TYPE=Debug -DUSE_F2PY=OFF -DMPIEXEC_PREFLAGS=${MPIEXEC_PREFLAGS} -DCMAKE_INSTALL_PREFIX=${CIRCLE_WORKING_DIRECTORY}/workspace/install-<< parameters.repo >> |& tee /logfiles/cmake.log + - run: + name: "Build and install" + command: | + mkdir -p /logfiles + cd ${CIRCLE_WORKING_DIRECTORY}/<< parameters.repo >> + mkdir -p ${CIRCLE_WORKING_DIRECTORY}/workspace/build-<< parameters.repo >> + cd ${CIRCLE_WORKING_DIRECTORY}/workspace/build-<< parameters.repo >> + cmake ${CIRCLE_WORKING_DIRECTORY}/<< parameters.repo >> -DBASEDIR=$BASEDIR/Linux -DCMAKE_Fortran_COMPILER=<< parameters.compiler >> -DCMAKE_BUILD_TYPE=Debug -DUSE_F2PY=OFF -DMPIEXEC_PREFLAGS=${MPIEXEC_PREFLAGS} -DCMAKE_INSTALL_PREFIX=${CIRCLE_WORKING_DIRECTORY}/workspace/install-<< parameters.repo >> |& tee /logfiles/cmake.log buildinstall: description: "Build and install" @@ -112,10 +124,12 @@ commands: repo: type: string steps: - - run: | - cd ${CIRCLE_WORKING_DIRECTORY}/workspace/build-<< parameters.repo >> - make -j"$(nproc)" install |& tee /logfiles/make.log - #MEDIUM# make -j4 install |& tee /logfiles/make.log + - run: + name: "Build and install" + command: | + cd ${CIRCLE_WORKING_DIRECTORY}/workspace/build-<< parameters.repo >> + make -j"$(nproc)" install |& tee /logfiles/make.log + #MEDIUM# make -j4 install |& tee /logfiles/make.log jobs: build-GEOSgcm: diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOS_PhysicsGridComp.F90 b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOS_PhysicsGridComp.F90 index 336ff0896..6ca4dfb7f 100644 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOS_PhysicsGridComp.F90 +++ b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOS_PhysicsGridComp.F90 @@ -1203,11 +1203,11 @@ subroutine SetServices ( GC, RC ) 'FCLD ', 'LS_PRCP ', 'CNV_MFC ', & 'CNV_MFD ', 'QL ', 'PFL_CN ', & 'PFL_LSAN', 'PFI_CN ', 'PFI_LSAN', & - 'QCTOT ', 'CNV_QC ', 'LFR ', & + 'QCTOT ', 'CNV_QC ', & 'QLTOT ', 'QLCN ', 'QICN ', & 'DQLDT ', 'QITOT ', 'REV_CN ', & 'REV_LS ', 'REV_AN ', 'LFR_GCC ', & - 'BYNCY ', 'DQIDT ', 'QI ', & + 'DQIDT ', 'QI ', & 'DQRC ', 'CNV_CVW ', 'QLLS ', & 'QILS ', 'DQRL ', 'CNV_FRC ', & 'RI ', 'RL ' /), & diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/GEOS_MoistGridComp.F90 b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/GEOS_MoistGridComp.F90 index e31dcf4fd..b33b3fc94 100644 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/GEOS_MoistGridComp.F90 +++ b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/GEOS_MoistGridComp.F90 @@ -115,7 +115,7 @@ module GEOS_MoistGridCompMod ! use m_zeit ! External lightning module - USE Lightning_mod, ONLY : hemcoFlashrate + USE Lightning_mod, only: HEMCO_FlashRate implicit none @@ -672,17 +672,6 @@ subroutine SetServices ( GC, RC ) RC=STATUS ) VERIFY_(STATUS) - call MAPL_AddImportSpec(GC, & - SHORT_NAME = 'FROCEAN', & - LONG_NAME = 'areal_ocean_fraction', & - UNITS = '1', & - DIMS = MAPL_DimsHorzOnly, & - VLOCATION = MAPL_VLocationNone, & - AVERAGING_INTERVAL = AVRGNINT, & - REFRESH_INTERVAL = RFRSHINT, & - RC=STATUS ) - VERIFY_(STATUS) - call MAPL_AddImportSpec(GC, & SHORT_NAME = 'FRACI', & LONG_NAME = 'ice_covered_fraction_of_tile', & @@ -3648,61 +3637,6 @@ subroutine SetServices ( GC, RC ) RC=STATUS ) VERIFY_(STATUS) - - call MAPL_AddExportSpec(GC, & - SHORT_NAME='LFR', & - LONG_NAME ='lightning_flash_rate', & - UNITS ='km-2 s-1', & - DIMS = MAPL_DimsHorzOnly, & - VLOCATION = MAPL_VLocationNone, & - RC=STATUS ) - VERIFY_(STATUS) - - call MAPL_AddExportSpec(GC, & - SHORT_NAME='A1X1', & - LONG_NAME ='LFR_Term_number_1', & - UNITS ='km-2 s-1', & - DIMS = MAPL_DimsHorzOnly, & - VLOCATION = MAPL_VLocationNone, & - RC=STATUS ) - VERIFY_(STATUS) - - call MAPL_AddExportSpec(GC, & - SHORT_NAME='A2X2', & - LONG_NAME ='LFR_Term_number_2', & - UNITS ='km-2 s-1', & - DIMS = MAPL_DimsHorzOnly, & - VLOCATION = MAPL_VLocationNone, & - RC=STATUS ) - VERIFY_(STATUS) - - call MAPL_AddExportSpec(GC, & - SHORT_NAME='A3X3', & - LONG_NAME ='LFR_Term_number_3', & - UNITS ='km-2 s-1', & - DIMS = MAPL_DimsHorzOnly, & - VLOCATION = MAPL_VLocationNone, & - RC=STATUS ) - VERIFY_(STATUS) - - call MAPL_AddExportSpec(GC, & - SHORT_NAME='A4X4', & - LONG_NAME ='LFR_Term_number_4', & - UNITS ='km-2 s-1', & - DIMS = MAPL_DimsHorzOnly, & - VLOCATION = MAPL_VLocationNone, & - RC=STATUS ) - VERIFY_(STATUS) - - call MAPL_AddExportSpec(GC, & - SHORT_NAME='A5X5', & - LONG_NAME ='LFR_Term_number_5', & - UNITS ='km-2 s-1', & - DIMS = MAPL_DimsHorzOnly, & - VLOCATION = MAPL_VLocationNone, & - RC=STATUS ) - VERIFY_(STATUS) - call MAPL_AddExportSpec(GC, & SHORT_NAME='LFR_GCC', & LONG_NAME ='lightning_flash_rate_for_GEOSCHEMchem', & @@ -5270,7 +5204,7 @@ subroutine MOIST_DRIVER(IM,JM,LM, RC) integer :: YEAR, MONTH, DAY, HR, SE, MN type (ESMF_Time) :: CurrentTime real, pointer, dimension(:,: ) :: LS_ARF, CN_ARF, AN_ARF, SC_ARF - real, pointer, dimension(:,: ) :: PTYPE,FRZR,ICE,SNR,PRECU,PRELS,TS,SNOMAS,FRLANDICE,FRLAND,FROCEAN + real, pointer, dimension(:,: ) :: PTYPE,FRZR,ICE,SNR,PRECU,PRELS,TS,SNOMAS,FRLANDICE,FRLAND real, pointer, dimension(:,: ) :: IWP,LWP,CWP,TPW,CAPE,ZPBLCN,INHB,ZLCL,ZLFC,ZCBL,CCWP , KPBLIN, KPBLSC real, pointer, dimension(:,: ) :: TVQ0,TVQ1,TVE0,TVE1,TVEX,DCPTE, TVQX2, TVQX1, CCNCOLUMN, NDCOLUMN, NCCOLUMN !DONIF real, pointer, dimension(:,:,:,:) :: XHO @@ -5351,7 +5285,6 @@ subroutine MOIST_DRIVER(IM,JM,LM, RC) real, pointer, dimension(:,:,:) :: VFALLRN_AN,VFALLRN_LS,VFALLRN_CN,VFALLRN_SC real, pointer, dimension(:,:,:) :: FRZ_TT, DCNVL, DCNVi,QSATi,QSATl,RCCODE,TRIEDLV,QVRAS - real, pointer, dimension(:,: ) :: LFR,A1X1,A2X2,A3X3,A4X4,A5X5 real, pointer, dimension(:,: ) :: LFR_GCC !Whether to guard against negatives @@ -5681,7 +5614,8 @@ subroutine MOIST_DRIVER(IM,JM,LM, RC) logical :: isPresent - real, dimension(:,:,:,:,:), allocatable :: buffer + real, dimension(:,:,:,:,:), allocatable :: buffer + logical :: USE_MOIST_BUFFER !!real, dimension(IM,JM, LM) :: QILS, QICN ! Soon to be moved into internal state @@ -6306,7 +6240,6 @@ subroutine MOIST_DRIVER(IM,JM,LM, RC) call MAPL_GetPointer(IMPORT, FRLANDICE, 'FRLANDICE' , RC=STATUS); VERIFY_(STATUS) call MAPL_GetPointer(IMPORT, FRLAND, 'FRLAND' , RC=STATUS); VERIFY_(STATUS) ! frland =0.0 - call MAPL_GetPointer(IMPORT, FROCEAN, 'FROCEAN' , RC=STATUS); VERIFY_(STATUS) call MAPL_GetPointer(IMPORT, TS, 'TS' , RC=STATUS); VERIFY_(STATUS) call MAPL_GetPointer(IMPORT, TROPP, 'TROPP' , RC=STATUS); VERIFY_(STATUS) call MAPL_GetPointer(IMPORT, KPBLIN, 'KPBL' , RC=STATUS); VERIFY_(STATUS) @@ -7406,7 +7339,7 @@ subroutine MOIST_DRIVER(IM,JM,LM, RC) if(associated(CNV_DQLDT)) CNV_DQLDT = 0.0 ZLE(:,:,LM) = 0. do L=LM,1,-1 - ZLE(:,:,L-1) = TH (:,:,L) * (1.+MAPL_VIREPS*Q(:,:,L)) + ZLE(:,:,L-1) = TH (:,:,L) * (1.+MAPL_VIREPS*Q(:,:,L)) ! This term is really THV ZLO(:,:,L ) = ZLE(:,:,L) + (MAPL_CP/MAPL_GRAV)*( PKE(:,:,L)-PK (:,:,L ) ) * ZLE(:,:,L-1) ZLE(:,:,L-1) = ZLO(:,:,L) + (MAPL_CP/MAPL_GRAV)*( PK (:,:,L)-PKE(:,:,L-1) ) * ZLE(:,:,L-1) DZET(:,:,L ) = ZLE(:,:,L-1) - ZLE(:,:,L) @@ -7637,7 +7570,11 @@ subroutine MOIST_DRIVER(IM,JM,LM, RC) aci_ptr_2d = FRLAND end if - allocate(buffer(im,jm,lm,n_modes,8), __STAT__) + + call MAPL_GetResource(STATE,USE_MOIST_BUFFER, 'USE_MOIST_BUFFER:', DEFAULT=.TRUE., RC=STATUS) + if (USE_MOIST_BUFFER) then + allocate(buffer(im,jm,lm,n_modes,8), __STAT__) + end if ACTIVATION_PROPERTIES: do n = 1, n_modes call ESMF_AttributeSet(aero_aci, name='aerosol_mode', value=trim(aero_aci_modes(n)), __RC__) @@ -7689,36 +7626,50 @@ subroutine MOIST_DRIVER(IM,JM,LM, RC) END IF #endif - buffer(:,:,:,n,1) = aci_num - buffer(:,:,:,n,2) = aci_dgn - buffer(:,:,:,n,3) = aci_sigma - buffer(:,:,:,n,4) = aci_hygroscopicity - buffer(:,:,:,n,5) = aci_density - buffer(:,:,:,n,6) = aci_f_dust - buffer(:,:,:,n,7) = aci_f_soot - buffer(:,:,:,n,8) = aci_f_organic + if (USE_MOIST_BUFFER) then + buffer(:,:,:,n,1) = aci_num + buffer(:,:,:,n,2) = aci_dgn + buffer(:,:,:,n,3) = aci_sigma + buffer(:,:,:,n,4) = aci_hygroscopicity + buffer(:,:,:,n,5) = aci_density + buffer(:,:,:,n,6) = aci_f_dust + buffer(:,:,:,n,7) = aci_f_soot + buffer(:,:,:,n,8) = aci_f_organic + else + AeroProps(:,:,:)%num(n) = aci_num + AeroProps(:,:,:)%dpg(n) = aci_dgn + AeroProps(:,:,:)%sig(n) = aci_sigma + AeroProps(:,:,:)%kap(n) = aci_hygroscopicity + AeroProps(:,:,:)%den(n) = aci_density + AeroProps(:,:,:)%fdust(n) = aci_f_dust + AeroProps(:,:,:)%fsoot(n) = aci_f_soot + AeroProps(:,:,:)%forg(n) = aci_f_organic + AeroProps(:,:,:)%nmods = n_modes ! no need of a 3D field: aero provider specific + end if end do ACTIVATION_PROPERTIES - do k = 1, LM - do j = 1, JM - do i = 1, IM - do n = 1, n_modes - AeroProps(i,j,k)%num(n) = buffer(i,j,k,n,1) - AeroProps(i,j,k)%dpg(n) = buffer(i,j,k,n,2) - AeroProps(i,j,k)%sig(n) = buffer(i,j,k,n,3) - AeroProps(i,j,k)%kap(n) = buffer(i,j,k,n,4) - AeroProps(i,j,k)%den(n) = buffer(i,j,k,n,5) - AeroProps(i,j,k)%fdust(n) = buffer(i,j,k,n,6) - AeroProps(i,j,k)%fsoot(n) = buffer(i,j,k,n,7) - AeroProps(i,j,k)%forg(n) = buffer(i,j,k,n,8) + if (USE_MOIST_BUFFER) then + do k = 1, LM + do j = 1, JM + do i = 1, IM + do n = 1, n_modes + AeroProps(i,j,k)%num(n) = buffer(i,j,k,n,1) + AeroProps(i,j,k)%dpg(n) = buffer(i,j,k,n,2) + AeroProps(i,j,k)%sig(n) = buffer(i,j,k,n,3) + AeroProps(i,j,k)%kap(n) = buffer(i,j,k,n,4) + AeroProps(i,j,k)%den(n) = buffer(i,j,k,n,5) + AeroProps(i,j,k)%fdust(n) = buffer(i,j,k,n,6) + AeroProps(i,j,k)%fsoot(n) = buffer(i,j,k,n,7) + AeroProps(i,j,k)%forg(n) = buffer(i,j,k,n,8) + end do + AeroProps(i,j,k)%nmods = n_modes ! no need of a 3D field: aero provider specific end do - AeroProps(i,j,k)%nmods = n_modes ! no need of a 3D field: aero provider specific end do end do - end do - deallocate(buffer, __STAT__) + deallocate(buffer, __STAT__) + end if deallocate(aero_aci_modes, __STAT__) end if @@ -12555,46 +12506,6 @@ subroutine MOIST_DRIVER(IM,JM,LM, RC) !! if(associated(SMOIST)) SMOIST = mapl_cp*th1*pk + (0.5*( geopenew(:,:,0:lm-1)+geopenew(:,:,1:lm) )) if(associated(SMOIST)) SMOIST = mapl_cp*th1*pk + gzlo - ! Parameterized lightning flash rates [km^{-2} s^{-1}] - !----------------------------------------------------- - CALL MAPL_GetPointer(EXPORT, LFR, 'LFR', RC=STATUS) - VERIFY_(STATUS) - if (associated( LFR)) then - call MAPL_TimerOn (STATE,"--FLASH",RC=STATUS) - VERIFY_(STATUS) - CALL MAPL_GetPointer(EXPORT, A1X1, 'A1X1', ALLOC=.TRUE., RC=STATUS) - VERIFY_(STATUS) - CALL MAPL_GetPointer(EXPORT, A2X2, 'A2X2', ALLOC=.TRUE., RC=STATUS) - VERIFY_(STATUS) - CALL MAPL_GetPointer(EXPORT, A3X3, 'A3X3', ALLOC=.TRUE., RC=STATUS) - VERIFY_(STATUS) - CALL MAPL_GetPointer(EXPORT, A4X4, 'A4X4', ALLOC=.TRUE., RC=STATUS) - VERIFY_(STATUS) - CALL MAPL_GetPointer(EXPORT, A5X5, 'A5X5', ALLOC=.TRUE., RC=STATUS) - VERIFY_(STATUS) - CALL flash_rate(STATE, & - IM*JM, & - LM, & - TS, & - CNV_TOPP, & - FROCEAN, & - CN_PRCP, & - CAPE, & - CNV_MFC, & - TH, & - PLE, & - ZLE, & - LFR, & - A1X1, & - A2X2, & - A3X3, & - A4X4, & - A5X5, & - RC=STATUS ) - VERIFY_(STATUS) - call MAPL_TimerOff(STATE,"--FLASH",RC=STATUS) - VERIFY_(STATUS) - end if ! Calculate flash rate following Murray et al. (2012), as used by GEOS-Chem !------------------------------------------------------------------------------------- @@ -13261,360 +13172,6 @@ function FINDLCL( THM, QM, PL, PK, IM, JM, LM ) result( KLCL ) end do end function FINDLCL -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - - - SUBROUTINE flash_rate( STATE, nc, lm, TS, CCTP, FROCEAN, CN_PRCP, & - CAPE, CNV_MFC, TH, PLE, ZLE, strokeRate, & - A1X1, A2X2, A3X3, A4X4, A5X5, RC) - - !===================================================================================== - !BOP - ! !DESCRIPTION: - ! Generate lightning flash rates [km$^{-2}$ s$^{-1}$] using a six-variable polynomial fit.\\ - ! - ! - ! ORIGIN AND CONTACT\\ - ! Dr. Dale Allen, Associate Research Scientist\\ - ! Dept. of Atmospheric and Oceanic Science\\ - ! University of Maryland\\ - ! College Park, MD 20742\\ - ! 301-405-7629 (ph); 301-314-9482 (fax)\\ - ! http://www.meto.umd.edu/~allen\\ - ! - ! - ! FORMULATION NOTES\\ - ! Predictor variables are set to zero where CN\_PRCP is zero or where the - ! optical depth cloud top height is less than 5.5 km. - ! The fit returns flash rates in units km$^{-2}$ day$^{-1}$. Convert to - ! km$^{-2}$ s$^{-1}$ for the export state.\\ - ! - ! - ! OTHER NOTES OF INTEREST\\ - ! MOIST sets CNV\_TOPP to zero if there is an absence of convection. - !EOP - ! !REVISION HISTORY - ! 30 Nov 2011 Nielsen First crack - ! 29 Feb 2012 Nielsen Accomodate CNV\_TOPP MAPL\_UNDEF for and after Fortuna-2\_5\_p4 - !===================================================================================== - - TYPE(MAPL_MetaComp), POINTER :: STATE ! Internal MAPL_Generic state - - INTEGER, INTENT(IN) :: nc ! Number of cells - INTEGER, INTENT(IN) :: lm ! Number of layers - - REAL, INTENT(IN), DIMENSION(nc) :: TS ! Surface temperature [K] - REAL, INTENT(IN), DIMENSION(nc) :: CCTP ! Convective cloud top pressure [Pa] with MAPL_UNDEFs - REAL, INTENT(IN), DIMENSION(nc) :: FROCEAN ! Areal ocean fraction - REAL, INTENT(IN), DIMENSION(nc) :: CN_PRCP ! Convective precipitation [kg m^{-2} s^{-1}] - REAL, INTENT(IN), DIMENSION(nc) :: CAPE ! Convective available potential energy [J m^{-2}] - - REAL, INTENT(IN), DIMENSION(nc,lm) :: TH ! Potential temperature [K] - REAL, INTENT(IN), DIMENSION(nc,0:lm) :: CNV_MFC ! Convective mass flux [kg m^{-2} s^{-1}] - REAL, INTENT(IN), DIMENSION(nc,0:lm) :: PLE ! Layer interface pressures [Pa] - REAL, INTENT(IN), DIMENSION(nc,0:lm) :: ZLE ! Layer depths [m] - - REAL, INTENT(OUT), DIMENSION(nc) :: strokeRate ! Flashes per second - REAL, INTENT(OUT), DIMENSION(nc) :: A1X1 - REAL, INTENT(OUT), DIMENSION(nc) :: A2X2 - REAL, INTENT(OUT), DIMENSION(nc) :: A3X3 - REAL, INTENT(OUT), DIMENSION(nc) :: A4X4 - REAL, INTENT(OUT), DIMENSION(nc) :: A5X5 - - ! Error log variables - ! ------------------- - INTEGER :: STATUS - INTEGER, OPTIONAL, INTENT(OUT) :: RC - CHARACTER(LEN=ESMF_MAXSTR) :: IAm - - ! Local variables - ! --------------- - INTEGER :: i ! General-purpose integers - INTEGER :: k - INTEGER :: n - - REAL :: a0c,a0m ! Coefficients at continental and marine locations - REAL :: a1c,a1m - REAL :: a2c,a2m - REAL :: a3c,a3m - REAL :: a4c,a4m - REAL :: a5c,a5m - - REAL :: x1Divisor ! Divisors for x1-x5. - REAL :: x2Divisor - REAL :: x3Divisor - REAL :: x4Divisor - REAL :: x5Divisor - - REAL :: x5Power ! Exponent for the surface temperature deviation predictor - - REAL :: sfcTLimit ! Temperature thresholds - REAL :: airTLimit - - REAL :: hPaCldTop ! Cloud top limiter for weak/no convection - - REAL, ALLOCATABLE, DIMENSION(:) :: x1 ! Five independent variables - REAL, ALLOCATABLE, DIMENSION(:) :: x2 - REAL, ALLOCATABLE, DIMENSION(:) :: x3 - REAL, ALLOCATABLE, DIMENSION(:) :: x4 - REAL, ALLOCATABLE, DIMENSION(:) :: x5 - - REAL, ALLOCATABLE, DIMENSION(:) :: cloudTopAG ! Cloud top height above ground - REAL, ALLOCATABLE, DIMENSION(:) :: cnv_topp ! Convective cloud top pressure with MAPL_UNDEFs - ! changed to zero - - REAL, ALLOCATABLE, DIMENSION(:,:) :: dZ ! Layer depths [m] - REAL, ALLOCATABLE, DIMENSION(:,:) :: p ! Pressure at middle of layer [Pa] - REAL, ALLOCATABLE, DIMENSION(:,:) :: T ! Air temperature at middle of layer [K] - - INTEGER, ALLOCATABLE, DIMENSION(:) :: weakCnvMask ! Weak or no convection mask - INTEGER, ALLOCATABLE, DIMENSION(:,:) :: mask ! Working mask - INTEGER, ALLOCATABLE, DIMENSION(:,:) :: cloudTopMask ! Mask is 1 below cloud top - - ! Preliminaries - ! ------------- - RC = 0 - strokeRate = 0 - Iam = "flash_rate" - - ! Coefficients of the predictors, marine locations - ! ------------------------------------------------ - CALL MAPL_GetResource(STATE,a0m,'MARINE_A0:',DEFAULT= 0.0139868,RC=STATUS) - VERIFY_(STATUS) - CALL MAPL_GetResource(STATE,a1m,'MARINE_A1:',DEFAULT= 0.0358764,RC=STATUS) - VERIFY_(STATUS) - CALL MAPL_GetResource(STATE,a2m,'MARINE_A2:',DEFAULT=-0.0610214,RC=STATUS) - VERIFY_(STATUS) - CALL MAPL_GetResource(STATE,a3m,'MARINE_A3:',DEFAULT=-0.0102320,RC=STATUS) - VERIFY_(STATUS) - CALL MAPL_GetResource(STATE,a4m,'MARINE_A4:',DEFAULT= 0.0031352,RC=STATUS) - VERIFY_(STATUS) - CALL MAPL_GetResource(STATE,a5m,'MARINE_A5:',DEFAULT= 0.0346241,RC=STATUS) - VERIFY_(STATUS) - - ! Coefficients of the predictors, continental locations - ! ----------------------------------------------------- - CALL MAPL_GetResource(STATE,a0c,'CONTINENT_A0:',DEFAULT=-0.0183172,RC=STATUS) - VERIFY_(STATUS) - CALL MAPL_GetResource(STATE,a1c,'CONTINENT_A1:',DEFAULT=-0.0562338,RC=STATUS) - VERIFY_(STATUS) - CALL MAPL_GetResource(STATE,a2c,'CONTINENT_A2:',DEFAULT= 0.1862740,RC=STATUS) - VERIFY_(STATUS) - CALL MAPL_GetResource(STATE,a3c,'CONTINENT_A3:',DEFAULT=-0.0023363,RC=STATUS) - VERIFY_(STATUS) - CALL MAPL_GetResource(STATE,a4c,'CONTINENT_A4:',DEFAULT=-0.0013838,RC=STATUS) - VERIFY_(STATUS) - CALL MAPL_GetResource(STATE,a5c,'CONTINENT_A5:',DEFAULT= 0.0114759,RC=STATUS) - VERIFY_(STATUS) - - ! Divisors for nondimensionalization of the predictors - ! ---------------------------------------------------- - CALL MAPL_GetResource(STATE,x1Divisor,'X1_DIVISOR:',DEFAULT=4.36,RC=STATUS) - VERIFY_(STATUS) - CALL MAPL_GetResource(STATE,x2Divisor,'X2_DIVISOR:',DEFAULT=9.27,RC=STATUS) - VERIFY_(STATUS) - CALL MAPL_GetResource(STATE,x3Divisor,'X3_DIVISOR:',DEFAULT=34.4,RC=STATUS) - VERIFY_(STATUS) - CALL MAPL_GetResource(STATE,x4Divisor,'X4_DIVISOR:',DEFAULT=21.4,RC=STATUS) - VERIFY_(STATUS) - CALL MAPL_GetResource(STATE,x5Divisor,'X5_DIVISOR:',DEFAULT=14600.,RC=STATUS) - VERIFY_(STATUS) - - ! Exponent for the surface temperature deviation predictor - ! -------------------------------------------------------- - CALL MAPL_GetResource(STATE,x5Power,'X5_EXPONENT:',DEFAULT=3.00,RC=STATUS) - VERIFY_(STATUS) - - ! Threshold temperatures - ! ---------------------- - CALL MAPL_GetResource(STATE,sfcTLimit,'SFC_T_LIMIT:',DEFAULT=273.0,RC=STATUS) - VERIFY_(STATUS) - CALL MAPL_GetResource(STATE,airTLimit,'AIR_T_LIMIT:',DEFAULT=263.0,RC=STATUS) - VERIFY_(STATUS) - - ! Cloud-top pressure limiter - ! -------------------------- - CALL MAPL_GetResource(STATE,hPaCldTop,'CLOUD_TOP_LIMIT:',DEFAULT=500.,RC=STATUS) - VERIFY_(STATUS) - - ! Layer depths [m] - ! ---------------- - ALLOCATE(dZ(nc,lm),STAT=STATUS) - VERIFY_(STATUS) - dZ = zle(:,0:lm-1)-zle(:,1:lm) - - ! Pressure at mid-layer [Pa] - ! -------------------------- - ALLOCATE(p(nc,lm),STAT=STATUS) - VERIFY_(STATUS) - p = (ple(:,1:lm)+ple(:,0:lm-1))*0.50 - - ! Temperature at mid-layer [K] - ! ---------------------------- - ALLOCATE(T(nc,lm),STAT=STATUS) - VERIFY_(STATUS) - T = TH*((p*1.00E-05)**(MAPL_RGAS/MAPL_CP)) - - ! Reset CNV_TOPPs MAPL_UNDEFs to zeroes - ! -------------------------------------- - ALLOCATE(cnv_topp(nc),STAT=STATUS) - WHERE(CCTP == MAPL_UNDEF) - cnv_topp = 0.00 - ELSEWHERE - cnv_topp = CCTP - END WHERE - - ! Set weak/no convection mask - ! --------------------------- - ALLOCATE(weakCnvMask(nc),STAT=STATUS) - VERIFY_(STATUS) - weakCnvMask = 0 - WHERE(cn_prcp == 0.00 .OR. cnv_topp >= hPaCldTop*100.00 .OR. cape >= MAPL_UNDEF) weakCnvMask = 1 - - ! Convective cloud top mask - ! ------------------------- - ALLOCATE(cloudTopMask(nc,lm),STAT=STATUS) - VERIFY_(STATUS) - cloudTopMask = 0 - DO k = 1,lm - WHERE(ple(1:nc,k) > cnv_topp(1:nc) .AND. cnv_topp(1:nc) > 0.00) cloudTopMask(1:nc,k) = 1 - END DO - - ! Cloud top distance above ground [m] - ! ----------------------------------- - ALLOCATE(cloudTopAG(nc),STAT=STATUS) - VERIFY_(STATUS) - cloudTopAG = 0.00 - DO i = 1,nc - n = SUM(cloudTopMask(i,1:lm)) - IF(n > 0) cloudTopAG(i) = SUM(dZ(i,lm-n+1:lm)) - END DO - - ! X1: Cold cloud depth: Vertical extent [km] where T < airTLimit and p > cnv_topp - ! ------------------------------------------------------------------------------- - ALLOCATE(x1(nc),STAT=STATUS) - VERIFY_(STATUS) - ALLOCATE(mask(nc,lm),STAT=STATUS) - VERIFY_(STATUS) - - mask = 0 - WHERE(T < airTLimit .AND. cloudTopMask == 1) mask = 1 - - x1 = 0.00 - DO i = 1,nc - DO k = 1,lm - IF(mask(i,k) == 1) x1(i) = x1(i)+dZ(i,k)*0.001 - END DO - END DO - WHERE(weakCnvMask == 1) x1 = 0.00 - x1 = x1/x1Divisor - - ! X4: Integrated convective mass flux - ! ----------------------------------- - ALLOCATE(x4(nc),STAT=STATUS) - VERIFY_(STATUS) - x4 = 0.00 - DO i = 1,nc - DO k = 1,lm - IF(mask(i,k) == 1) x4(i) = x4(i)+cnv_mfc(i,k)*dZ(i,k) - END DO - END DO - WHERE(weakCnvMask == 1) x4 = 0.00 - x4 = x4/x4Divisor - - ! X5: Surface temperature deviation from sfcTLimit, positive only. - ! Note: UNDEF TS test retains the ability to boot-strap moist_import_rst. - ! ----------------------------------------------------------------------- - ALLOCATE(x5(nc),STAT=STATUS) - VERIFY_(STATUS) - WHERE(TS == MAPL_UNDEF) - x5 = 0.00 - ELSEWHERE - x5 = TS-sfcTLimit - END WHERE - WHERE(weakCnvMask == 1) x5 = 0.00 - WHERE(x5 < 0.00) x5 = 0.00 - x5 = x5**x5Power/x5Divisor - - ! X2: Total cloud depth [km] - ! -------------------------- - ALLOCATE(x2(nc),STAT=STATUS) - VERIFY_(STATUS) - x2 = cloudTopAG*0.001 - WHERE(weakCnvMask == 1) x2 = 0.00 - x2 = x2/x2Divisor - - ! X3: CAPE - ! -------- - ALLOCATE(x3(nc),STAT=STATUS) - VERIFY_(STATUS) - x3 = cape - WHERE(weakCnvMask == 1) x3 = 0.00 - x3 = x3/x3Divisor - - ! Polynomial fit [units: km^{-2} s^{-1}] and individual - ! terms including marine and continental discrimination - ! ----------------------------------------------------- - WHERE(frOcean >= 0.01) - strokeRate = (a0m + a1m*x1 + a2m*x2 + a3m*x3 + a4m*x4 + a5m*x5)/86400.00 - A1X1 = a1m*x1/86400.00 - A2X2 = a2m*x2/86400.00 - A3X3 = a3m*x3/86400.00 - A4X4 = a4m*x4/86400.00 - A5X5 = a5m*x5/86400.00 - ELSEWHERE - strokeRate = (a0c + a1c*x1 + a2c*x2 + a3c*x3 + a4c*x4 + a5c*x5)/86400.00 - A1X1 = a1c*x1/86400.00 - A2X2 = a2c*x2/86400.00 - A3X3 = a3c*x3/86400.00 - A4X4 = a4c*x4/86400.00 - A5X5 = a5c*x5/86400.00 - END WHERE - - ! Eliminate negatives - ! ------------------- - WHERE(strokeRate < 0.00) strokeRate = 0.00 - - ! Set rate to zero where any of x1 through x5 are zero - ! ---------------------------------------------------- - WHERE(x1 == 0.00) strokeRate = 0.00 - WHERE(x2 == 0.00) strokeRate = 0.00 - WHERE(x3 == 0.00) strokeRate = 0.00 - WHERE(x4 == 0.00) strokeRate = 0.00 - WHERE(x5 == 0.00) strokeRate = 0.00 - - ! Clean up - ! -------- - DEALLOCATE(x1,STAT=STATUS) - VERIFY_(STATUS) - DEALLOCATE(x2,STAT=STATUS) - VERIFY_(STATUS) - DEALLOCATE(x3,STAT=STATUS) - VERIFY_(STATUS) - DEALLOCATE(x4,STAT=STATUS) - VERIFY_(STATUS) - DEALLOCATE(x5,STAT=STATUS) - VERIFY_(STATUS) - DEALLOCATE(cnv_topp,STAT=STATUS) - VERIFY_(STATUS) - DEALLOCATE(dZ,STAT=STATUS) - VERIFY_(STATUS) - DEALLOCATE(p,STAT=STATUS) - VERIFY_(STATUS) - DEALLOCATE(T,STAT=STATUS) - VERIFY_(STATUS) - DEALLOCATE(cloudTopAG,STAT=STATUS) - VERIFY_(STATUS) - DEALLOCATE(mask,STAT=STATUS) - VERIFY_(STATUS) - DEALLOCATE(cloudTopMask,STAT=STATUS) - VERIFY_(STATUS) - DEALLOCATE(weakCnvMask,STAT=STATUS) - VERIFY_(STATUS) - - END SUBROUTINE flash_rate - - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! SUBROUTINE Get_hemcoFlashrate ( STATE, IMPORT, IM, JM, LM, T, PLE, ZLE, CNV_MFC, & @@ -13651,7 +13208,6 @@ SUBROUTINE Get_hemcoFlashrate ( STATE, IMPORT, IM, JM, LM, T, PLE, ZLE, CNV_MFC, REAL, ALLOCATABLE :: LWI(:,:) real, pointer, dimension(:,:) :: LONS_RAD real, pointer, dimension(:,:) :: LATS_RAD - real, pointer, dimension(:,:) :: FROCEAN real, pointer, dimension(:,:) :: FRLAND real, pointer, dimension(:,:) :: FRACI REAL, SAVE :: OTDLISSCAL = -1.0 @@ -13661,7 +13217,6 @@ SUBROUTINE Get_hemcoFlashrate ( STATE, IMPORT, IM, JM, LM, T, PLE, ZLE, CNV_MFC, LFR = 0.0 !---Calculate LWI, make water default value - CALL MAPL_GetPointer(IMPORT, FROCEAN, 'FROCEAN' , __RC__ ) CALL MAPL_GetPointer(IMPORT, FRLAND, 'FRLAND' , __RC__ ) CALL MAPL_GetPointer(IMPORT, FRACI, 'FRACI' , __RC__ ) ALLOCATE(LWI(IM,JM),STAT=RC) @@ -13712,7 +13267,7 @@ SUBROUTINE Get_hemcoFlashrate ( STATE, IMPORT, IM, JM, LM, T, PLE, ZLE, CNV_MFC, ENDIF !---Get flashrate - CALL hemcoFlashrate (cellArea=AREA, & + CALL HEMCO_FlashRate(cellArea=AREA, & lwi=LWI, & lonslocal=LONS, & latslocal=LATS, & diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSradiation_GridComp/GEOSsatsim_GridComp/GEOS_SatsimGridComp.F90 b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSradiation_GridComp/GEOSsatsim_GridComp/GEOS_SatsimGridComp.F90 index a8b6ba8c6..81ed54cca 100644 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSradiation_GridComp/GEOSsatsim_GridComp/GEOS_SatsimGridComp.F90 +++ b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSradiation_GridComp/GEOSsatsim_GridComp/GEOS_SatsimGridComp.F90 @@ -3011,6 +3011,11 @@ subroutine SIM_DRIVER(IM,JM,LM, RC) integer :: use_satsim, use_satsim_isccp, use_satsim_modis, use_satsim_lidar, use_satsim_radar, use_satsim_misr integer :: ncolumns + character(len=ESMF_MAXSTR) :: GRIDNAME + character(len=5) :: imchar + character(len=2) :: dateline + integer :: imsize,nn + ! Begin... !---------- Iam = trim(COMP_NAME) // 'Sim_Driver' @@ -3042,8 +3047,18 @@ subroutine SIM_DRIVER(IM,JM,LM, RC) call MAPL_GetResource(MAPL,USE_SATSIM_MISR,LABEL="USE_SATSIM_MISR:",default=0, RC=STATUS) VERIFY_(STATUS) - call MAPL_GetResource(MAPL,Ncolumns,LABEL="SATSIM_NCOLUMNS:",default=30, RC=STATUS) + call MAPL_GetResource(MAPL,GRIDNAME,'AGCM_GRIDNAME:', RC=STATUS) VERIFY_(STATUS) + GRIDNAME = AdjustL(GRIDNAME) + nn = len_trim(GRIDNAME) + dateline = GRIDNAME(nn-1:nn) + imchar = GRIDNAME(3:index(GRIDNAME,'x')-1) + read(imchar,*) imsize + if(dateline.eq.'CF') imsize = imsize*4 + associate (default_Ncolumns => MIN(30,MAX(1,INT(4*5760*4/imsize))) ) + call MAPL_GetResource(MAPL,Ncolumns,LABEL="SATSIM_NCOLUMNS:",default=default_Ncolumns, RC=STATUS) + VERIFY_(STATUS) + end associate call MAPL_GetResource(MAPL,Npoints_it,LABEL="SATSIM_POINTS_PER_ITERATION:",default=-999, RC=STATUS) VERIFY_(STATUS) diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSland_GridComp/GEOScatchCN_GridComp/GEOScatchCNCLM40_GridComp/GEOS_CatchCNCLM40GridComp.F90 b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSland_GridComp/GEOScatchCN_GridComp/GEOScatchCNCLM40_GridComp/GEOS_CatchCNCLM40GridComp.F90 index 8f82e3061..c2e190653 100644 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSland_GridComp/GEOScatchCN_GridComp/GEOScatchCNCLM40_GridComp/GEOS_CatchCNCLM40GridComp.F90 +++ b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSland_GridComp/GEOScatchCN_GridComp/GEOScatchCNCLM40_GridComp/GEOS_CatchCNCLM40GridComp.F90 @@ -1,6 +1,7 @@ ! $Id$ #include "MAPL_Generic.h" +#define DEALLOC_(A) if(associated(A))then;A=0;if(MAPL_ShmInitialized)then; call MAPL_DeAllocNodeArray(A,rc=STATUS);else; deallocate(A,stat=STATUS);endif;_VERIFY(STATUS);NULLIFY(A);endif !============================================================================= module GEOS_CatchCNCLM40GridCompMod @@ -3745,7 +3746,7 @@ subroutine SetServices ( GC, RC ) VERIFY_(STATUS) call MAPL_TimerAdd(GC, name="RUN2" ,RC=STATUS) VERIFY_(STATUS) - call MAPL_TimerAdd(GC, name="-CATCH" ,RC=STATUS) + call MAPL_TimerAdd(GC, name="-CATCHCNCLM40" ,RC=STATUS) VERIFY_(STATUS) call MAPL_TimerAdd(GC, name="-ALBEDO" ,RC=STATUS) VERIFY_(STATUS) @@ -5019,7 +5020,7 @@ subroutine Driver ( RC ) integer, save :: unit_i=0 logical, save :: firsttime=.true. integer :: unit - integer :: NT_GLOBAL + integer :: NT_GLOBAL #endif @@ -6288,7 +6289,7 @@ subroutine Driver ( RC ) TILEZERO = 0.0 - call MAPL_TimerOn ( MAPL, "-CATCH" ) + call MAPL_TimerOn ( MAPL, "-CATCHCNCLM40" ) ! ---------------------------------------------------------------------------------------- @@ -7315,7 +7316,7 @@ subroutine Driver ( RC ) #ifdef DBG_CNLSM_INPUTS call MAPL_Get(MAPL, LocStream=LOCSTREAM, RC=STATUS) VERIFY_(STATUS) - call MAPL_LocStreamGet(LOCSTREAM, TILEGRID=TILEGRID, RC=STATUS) + call MAPL_LocStreamGet(LOCSTREAM, NT_GLOBAL=NT_GLOBAL, TILEGRID=TILEGRID, RC=STATUS) VERIFY_(STATUS) call MAPL_TileMaskGet(tilegrid, mask, rc=status) @@ -7408,8 +7409,6 @@ subroutine Driver ( RC ) unit = GETFILE( "catchcnclm40_params.data", form="unformatted", RC=STATUS ) VERIFY_(STATUS) - NT_GLOBAL = size(mask) - call WRITE_PARALLEL(NT_GLOBAL, UNIT) call WRITE_PARALLEL(DT, UNIT) call WRITE_PARALLEL(USE_FWET_FOR_RUNOFF, UNIT) @@ -7490,7 +7489,7 @@ subroutine Driver ( RC ) VERIFY_(STATUS) end if - deallocate(mask) + DEALLOC_(mask) #endif ! call unified land model @@ -7878,168 +7877,169 @@ subroutine Driver ( RC ) if (allocated (SNOVF_tmp)) deallocate ( SNOVF_tmp ) if (allocated (SNONF_tmp)) deallocate ( SNONF_tmp ) - deallocate(GHTCNT ) - deallocate(WESNN ) - deallocate(HTSNNN ) - deallocate(SNDZN ) - deallocate(TILEZERO ) - deallocate(DZSF ) - deallocate(SWNETFREE) - deallocate(SWNETSNOW) - deallocate(VEG1 ) - deallocate(VEG2 ) - deallocate(RCSAT ) - deallocate(DRCSDT ) - deallocate(DRCSDQ ) - deallocate(RCUNS ) - deallocate(DRCUDT ) - deallocate(DRCUDQ ) - deallocate(ZTH ) - deallocate(SLR ) - deallocate(RSL1 ) - deallocate(RSL2 ) - deallocate(SQSCAT ) - deallocate(RDC ) - deallocate(RDC_TMP_1) - deallocate(RDC_TMP_2) - deallocate(UUU ) - deallocate(RHO ) - deallocate(ZVG ) - deallocate(LAI0 ) - deallocate(GRN0 ) - deallocate(Z0 ) - deallocate(D0 ) - deallocate(SFMC ) - deallocate(RZMC ) - deallocate(PRMC ) - deallocate(ENTOT ) - deallocate(WTOT ) - deallocate(GHFLXSNO ) - deallocate(SHSNOW1 ) - deallocate(AVETSNOW1) - deallocate(WAT10CM1 ) - deallocate(WATSOI1 ) - deallocate(ICESOI1 ) - deallocate(LHSNOW1 ) - deallocate(LWUPSNOW1) - deallocate(LWDNSNOW1) - deallocate(NETSWSNOW) - deallocate(TCSORIG1 ) - deallocate(LHACC ) - deallocate(SUMEV ) - deallocate(TPSN1IN1 ) - deallocate(TPSN1OUT1) - deallocate(GHFLXTSKIN) - deallocate(WCHANGE ) - deallocate(ECHANGE ) - deallocate(HSNACC ) - deallocate(EVACC ) - deallocate(SHACC ) - deallocate(VSUVR ) - deallocate(VSUVF ) - deallocate(SNOVR ) - deallocate(SNOVF ) - deallocate(SNONR ) - deallocate(SNONF ) - deallocate(SHSBT ) - deallocate(DSHSBT ) - deallocate(EVSBT ) - deallocate(DEVSBT ) - deallocate(DEDTC ) - deallocate(DHSDQA ) - deallocate(CFT ) - deallocate(CFQ ) - deallocate(TCO ) - deallocate(QCO ) - deallocate(DQS ) - deallocate(QSAT ) - deallocate(RA ) - deallocate(CAT_ID ) - deallocate(ALWX ) - deallocate(BLWX ) - deallocate(ALWN ) - deallocate(BLWN ) - deallocate(TC1_0 ) - deallocate(TC2_0 ) - deallocate(TC4_0 ) - deallocate(QA1_0 ) - deallocate(QA2_0 ) - deallocate(QA4_0 ) - deallocate(fveg1 ) - deallocate(fveg2 ) - deallocate(RCONSTIT ) - deallocate(TOTDEPOS ) - deallocate(RMELT ) - deallocate(FICE1 ) - deallocate(SLDTOT ) - deallocate( btran ) - deallocate( wgt ) - deallocate( bt1 ) - deallocate( bt2 ) - deallocate( bt4 ) - deallocate( wpp ) - deallocate( fwet ) - deallocate( sm1 ) - deallocate( sm2 ) - deallocate( sm4 ) - deallocate( btran1 ) - deallocate( btran2 ) - deallocate( btran3 ) - deallocate( tcx ) - deallocate( qax ) - deallocate( rcx ) - deallocate( rcxdt ) - deallocate( rcxdq ) - deallocate( tx1 ) - deallocate( tx2 ) - deallocate( tx3 ) - deallocate( qx1 ) - deallocate( qx2 ) - deallocate( qx3 ) - deallocate( car1 ) - deallocate( car2 ) - deallocate( car4 ) - deallocate( parzone ) - deallocate( para ) - deallocate( parav ) - deallocate(scaled_fpar) - deallocate(UNscaled_fpar) - deallocate( totwat ) - deallocate( dayl ) - deallocate(dayl_fac ) - deallocate( tgw ) - deallocate( rzm ) - deallocate( rc00 ) - deallocate( rcdt ) - deallocate( rcdq ) - deallocate( totcolc ) - deallocate( wtzone ) - - deallocate( psnsunx ) - deallocate( psnshax ) - deallocate( sifsunx ) - deallocate( sifshax ) - deallocate( laisunx ) - deallocate( laishax ) - deallocate( elaz ) - deallocate( esaz ) - deallocate( fvez ) - deallocate( ityz ) - - deallocate( elai ) - deallocate( esai ) - deallocate( fveg ) - deallocate( tlai ) - deallocate( psnsun ) - deallocate( psnsha ) - deallocate( laisun ) - deallocate( laisha ) - deallocate( ityp ) - - deallocate( ht ) - deallocate( tp ) - deallocate( soilice ) + deallocate(GHTCNT ) + deallocate(WESNN ) + deallocate(HTSNNN ) + deallocate(SNDZN ) + deallocate(TILEZERO ) + deallocate(DZSF ) + deallocate(SWNETFREE) + deallocate(SWNETSNOW) + deallocate(VEG1 ) + deallocate(VEG2 ) + deallocate(RCSAT ) + deallocate(DRCSDT ) + deallocate(DRCSDQ ) + deallocate(RCUNS ) + deallocate(DRCUDT ) + deallocate(DRCUDQ ) + deallocate(ZTH ) + deallocate(SLR ) + deallocate(RSL1 ) + deallocate(RSL2 ) + deallocate(SQSCAT ) + deallocate(RDC ) + deallocate(RDC_TMP_1) + deallocate(RDC_TMP_2) + deallocate(UUU ) + deallocate(RHO ) + deallocate(ZVG ) + deallocate(LAI0 ) + deallocate(GRN0 ) + deallocate(Z0 ) + deallocate(D0 ) + deallocate(SFMC ) + deallocate(RZMC ) + deallocate(PRMC ) + deallocate(ENTOT ) + deallocate(WTOT ) + deallocate(GHFLXSNO ) + deallocate(SHSNOW1 ) + deallocate(AVETSNOW1) + deallocate(WAT10CM1 ) + deallocate(WATSOI1 ) + deallocate(ICESOI1 ) + deallocate(LHSNOW1 ) + deallocate(LWUPSNOW1) + deallocate(LWDNSNOW1) + deallocate(NETSWSNOW) + deallocate(TCSORIG1 ) + deallocate(LHACC ) + deallocate(SUMEV ) + deallocate(TPSN1IN1 ) + deallocate(TPSN1OUT1) + deallocate(GHFLXTSKIN) + deallocate(WCHANGE ) + deallocate(ECHANGE ) + deallocate(HSNACC ) + deallocate(EVACC ) + deallocate(SHACC ) + deallocate(VSUVR ) + deallocate(VSUVF ) + deallocate(SNOVR ) + deallocate(SNOVF ) + deallocate(SNONR ) + deallocate(SNONF ) + deallocate(SHSBT ) + deallocate(DSHSBT ) + deallocate(EVSBT ) + deallocate(DEVSBT ) + deallocate(DEDTC ) + deallocate(DHSDQA ) + deallocate(CFT ) + deallocate(CFQ ) + deallocate(TCO ) + deallocate(QCO ) + deallocate(DQS ) + deallocate(QSAT ) + deallocate(RA ) + deallocate(CAT_ID ) + deallocate(ALWX ) + deallocate(BLWX ) + deallocate(ALWN ) + deallocate(BLWN ) + deallocate(TC1_0 ) + deallocate(TC2_0 ) + deallocate(TC4_0 ) + deallocate(QA1_0 ) + deallocate(QA2_0 ) + deallocate(QA4_0 ) + deallocate(fveg1 ) + deallocate(fveg2 ) + deallocate(RCONSTIT ) + deallocate(TOTDEPOS ) + deallocate(RMELT ) + deallocate(FICE1 ) + deallocate(SLDTOT ) + deallocate( btran ) + deallocate( wgt ) + deallocate( bt1 ) + deallocate( bt2 ) + deallocate( bt4 ) + deallocate( wpp ) + deallocate( fwet ) + deallocate( sm1 ) + deallocate( sm2 ) + deallocate( sm4 ) + deallocate( btran1 ) + deallocate( btran2 ) + deallocate( btran3 ) + deallocate( tcx ) + deallocate( qax ) + deallocate( rcx ) + deallocate( rcxdt ) + deallocate( rcxdq ) + deallocate( tx1 ) + deallocate( tx2 ) + deallocate( tx3 ) + deallocate( qx1 ) + deallocate( qx2 ) + deallocate( qx3 ) + deallocate( car1 ) + deallocate( car2 ) + deallocate( car4 ) + deallocate( parzone ) + deallocate( para ) + deallocate( parav ) + deallocate(scaled_fpar) + deallocate(UNscaled_fpar) + deallocate( totwat ) + deallocate( dayl ) + deallocate(dayl_fac ) + deallocate( tgw ) + deallocate( rzm ) + deallocate( rc00 ) + deallocate( rcdt ) + deallocate( rcdq ) + deallocate( totcolc ) + deallocate( wtzone ) + + deallocate( psnsunx ) + deallocate( psnshax ) + deallocate( sifsunx ) + deallocate( sifshax ) + deallocate( laisunx ) + deallocate( laishax ) + deallocate( elaz ) + deallocate( esaz ) + deallocate( fvez ) + deallocate( ityz ) + + deallocate( elai ) + deallocate( esai ) + deallocate( fveg ) + deallocate( tlai ) + deallocate( psnsun ) + deallocate( psnsha ) + deallocate( laisun ) + deallocate( laisha ) + deallocate( ityp ) + + deallocate( ht ) + deallocate( tp ) + deallocate( soilice ) deallocate (PLSIN) + call MAPL_TimerOff ( MAPL, "-CATCHCNCLM40" ) RETURN_(ESMF_SUCCESS) diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSland_GridComp/GEOScatchCN_GridComp/GEOScatchCNCLM45_GridComp/GEOS_CatchCNCLM45GridComp.F90 b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSland_GridComp/GEOScatchCN_GridComp/GEOScatchCNCLM45_GridComp/GEOS_CatchCNCLM45GridComp.F90 index 9712ae4d0..82d783104 100644 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSland_GridComp/GEOScatchCN_GridComp/GEOScatchCNCLM45_GridComp/GEOS_CatchCNCLM45GridComp.F90 +++ b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSland_GridComp/GEOScatchCN_GridComp/GEOScatchCNCLM45_GridComp/GEOS_CatchCNCLM45GridComp.F90 @@ -1,6 +1,7 @@ ! $Id$ #include "MAPL_Generic.h" +#define DEALLOC_(A) if(associated(A))then;A=0;if(MAPL_ShmInitialized)then; call MAPL_DeAllocNodeArray(A,rc=STATUS);else; deallocate(A,stat=STATUS);endif;_VERIFY(STATUS);NULLIFY(A);endif !============================================================================= module GEOS_CatchCNCLM45GridCompMod @@ -3682,7 +3683,7 @@ subroutine SetServices ( GC, RC ) VERIFY_(STATUS) call MAPL_TimerAdd(GC, name="RUN2" ,RC=STATUS) VERIFY_(STATUS) - call MAPL_TimerAdd(GC, name="-CATCH" ,RC=STATUS) + call MAPL_TimerAdd(GC, name="-CATCHCNCLM45" ,RC=STATUS) VERIFY_(STATUS) call MAPL_TimerAdd(GC, name="-ALBEDO" ,RC=STATUS) VERIFY_(STATUS) @@ -4964,7 +4965,7 @@ subroutine Driver ( RC ) integer, save :: unit_i=0 logical, save :: firsttime=.true. integer :: unit - integer :: NT_GLOBAL + integer :: NT_GLOBAL #endif @@ -6283,7 +6284,7 @@ subroutine Driver ( RC ) TILEZERO = 0.0 - call MAPL_TimerOn ( MAPL, "-CATCH" ) + call MAPL_TimerOn ( MAPL, "-CATCHCNCLM45" ) ! ---------------------------------------------------------------------------------------- @@ -7560,7 +7561,7 @@ subroutine Driver ( RC ) #ifdef DBG_CNLSM_INPUTS call MAPL_Get(MAPL, LocStream=LOCSTREAM, RC=STATUS) VERIFY_(STATUS) - call MAPL_LocStreamGet(LOCSTREAM, TILEGRID=TILEGRID, RC=STATUS) + call MAPL_LocStreamGet(LOCSTREAM, NT_GLOBAL=NT_GLOBAL, TILEGRID=TILEGRID, RC=STATUS) VERIFY_(STATUS) call MAPL_TileMaskGet(tilegrid, mask, rc=status) @@ -7653,8 +7654,6 @@ subroutine Driver ( RC ) unit = GETFILE( "catchcnclm45_params.data", form="unformatted", RC=STATUS ) VERIFY_(STATUS) - NT_GLOBAL = size(mask) - call WRITE_PARALLEL(NT_GLOBAL, UNIT) call WRITE_PARALLEL(DT, UNIT) call WRITE_PARALLEL(USE_FWET_FOR_RUNOFF, UNIT) @@ -7735,7 +7734,7 @@ subroutine Driver ( RC ) VERIFY_(STATUS) end if - deallocate(mask) + DEALLOC_(mask) #endif ! call unified land model @@ -8131,24 +8130,24 @@ subroutine Driver ( RC ) deallocate(WESNN ) deallocate(HTSNNN ) deallocate(SNDZN ) - deallocate(TILEZERO ) + deallocate(TILEZERO ) deallocate(DZSF ) - deallocate(SWNETFREE) - deallocate(SWNETSNOW) - deallocate(VEG1 ) - deallocate(VEG2 ) - deallocate(RCSAT ) - deallocate(DRCSDT ) - deallocate(DRCSDQ ) - deallocate(RCUNS ) - deallocate(DRCUDT ) - deallocate(DRCUDQ ) - deallocate(ZTH ) - deallocate(SLR ) - deallocate(RSL1 ) - deallocate(RSL2 ) - deallocate(SQSCAT ) - deallocate(RDC ) + deallocate(SWNETFREE) + deallocate(SWNETSNOW) + deallocate(VEG1 ) + deallocate(VEG2 ) + deallocate(RCSAT ) + deallocate(DRCSDT ) + deallocate(DRCSDQ ) + deallocate(RCUNS ) + deallocate(DRCUDT ) + deallocate(DRCUDQ ) + deallocate(ZTH ) + deallocate(SLR ) + deallocate(RSL1 ) + deallocate(RSL2 ) + deallocate(SQSCAT ) + deallocate(RDC ) deallocate(RDC_TMP_1) deallocate(RDC_TMP_2) deallocate(UUU ) @@ -8157,9 +8156,9 @@ subroutine Driver ( RC ) deallocate(LAI0 ) deallocate(GRN0 ) deallocate(Z0 ) - deallocate(D0 ) - deallocate(SFMC ) - deallocate(RZMC ) + deallocate(D0 ) + deallocate(SFMC ) + deallocate(RZMC ) deallocate(PRMC ) deallocate(ENTOT ) deallocate(WTOT ) @@ -8222,45 +8221,45 @@ subroutine Driver ( RC ) deallocate(FICE1 ) deallocate(SLDTOT ) deallocate( btran ) - deallocate( wgt ) - deallocate( bt1 ) - deallocate( bt2 ) - deallocate( bt4 ) - deallocate( wpp ) - deallocate( fwet ) - deallocate( sm1 ) - deallocate( sm2 ) + deallocate( wgt ) + deallocate( bt1 ) + deallocate( bt2 ) + deallocate( bt4 ) + deallocate( wpp ) + deallocate( fwet ) + deallocate( sm1 ) + deallocate( sm2 ) deallocate( sm4 ) deallocate( SWSRF1 ) - deallocate( SWSRF2 ) - deallocate( SWSRF4 ) - deallocate( btran1 ) - deallocate( btran2 ) - deallocate( btran3 ) - deallocate( tcx ) - deallocate( qax ) - deallocate( rcx ) - deallocate( rcxdt ) - deallocate( rcxdq ) - deallocate( tx1 ) - deallocate( tx2 ) - deallocate( tx3 ) - deallocate( qx1 ) - deallocate( qx2 ) - deallocate( qx3 ) - deallocate( car1 ) - deallocate( car2 ) - deallocate( car4 ) - deallocate( parzone ) - deallocate( para ) + deallocate( SWSRF2 ) + deallocate( SWSRF4 ) + deallocate( btran1 ) + deallocate( btran2 ) + deallocate( btran3 ) + deallocate( tcx ) + deallocate( qax ) + deallocate( rcx ) + deallocate( rcxdt ) + deallocate( rcxdq ) + deallocate( tx1 ) + deallocate( tx2 ) + deallocate( tx3 ) + deallocate( qx1 ) + deallocate( qx2 ) + deallocate( qx3 ) + deallocate( car1 ) + deallocate( car2 ) + deallocate( car4 ) + deallocate( parzone ) + deallocate( para ) deallocate( parav ) deallocate (scaled_fpar) deallocate (UNscaled_fpar) - deallocate( totwat ) + deallocate( totwat ) deallocate( nfire ) deallocate(som_closs) - deallocate( dayl ) - deallocate(dayl_fac ) + deallocate( dayl ) + deallocate(dayl_fac ) deallocate( fsnow ) deallocate( ityp_tmp ) deallocate( Qair_relative ) @@ -8293,13 +8292,13 @@ subroutine Driver ( RC ) deallocate( lons_degree ) deallocate( lnfm ) - deallocate( tgw ) - deallocate( rzm ) - deallocate( rc00 ) - deallocate( rcdt ) - deallocate( rcdq ) - deallocate( totcolc ) - deallocate( wtzone ) + deallocate( tgw ) + deallocate( rzm ) + deallocate( rc00 ) + deallocate( rcdt ) + deallocate( rcdq ) + deallocate( totcolc ) + deallocate( wtzone ) deallocate( sfm ) deallocate( bt1_sf ) deallocate( bt2_sf ) @@ -8309,37 +8308,37 @@ subroutine Driver ( RC ) deallocate( btran3_sf ) deallocate( btran_fire_rz ) deallocate( btran_fire_sf ) - deallocate( psnsunx ) - deallocate( psnshax ) - deallocate( sifsunx ) - deallocate( sifshax ) - deallocate( laisunx ) - deallocate( laishax ) - deallocate( elaz ) - deallocate( esaz ) - deallocate( fvez ) - deallocate( ityz ) + deallocate( psnsunx ) + deallocate( psnshax ) + deallocate( sifsunx ) + deallocate( sifshax ) + deallocate( laisunx ) + deallocate( laishax ) + deallocate( elaz ) + deallocate( esaz ) + deallocate( fvez ) + deallocate( ityz ) deallocate( lmrsunx ) - deallocate( lmrshax ) + deallocate( lmrshax ) deallocate( tlaz ) - deallocate( albdir ) - deallocate( albdif ) - deallocate( elai ) - deallocate( esai ) - deallocate( fveg ) - deallocate( tlai ) - deallocate( psnsun ) - deallocate( psnsha ) - deallocate( laisun ) - deallocate( laisha ) - deallocate( ityp ) + deallocate( albdir ) + deallocate( albdif ) + deallocate( elai ) + deallocate( esai ) + deallocate( fveg ) + deallocate( tlai ) + deallocate( psnsun ) + deallocate( psnsha ) + deallocate( laisun ) + deallocate( laisha ) + deallocate( ityp ) deallocate( lmrsun ) - deallocate( lmrsha ) - deallocate( ht ) - deallocate( tp ) - deallocate( soilice ) + deallocate( lmrsha ) + deallocate( ht ) + deallocate( tp ) + deallocate( soilice ) deallocate (PLSIN) - + call MAPL_TimerOff ( MAPL, "-CATCHCNCLM45" ) RETURN_(ESMF_SUCCESS) end subroutine Driver diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSland_GridComp/GEOScatch_GridComp/GEOS_CatchGridComp.F90 b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSland_GridComp/GEOScatch_GridComp/GEOS_CatchGridComp.F90 index a9bd57b19..07e5e7ed8 100644 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSland_GridComp/GEOScatch_GridComp/GEOS_CatchGridComp.F90 +++ b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSland_GridComp/GEOScatch_GridComp/GEOS_CatchGridComp.F90 @@ -1,4 +1,5 @@ #include "MAPL_Generic.h" +#define DEALLOC_(A) if(associated(A))then;A=0;if(MAPL_ShmInitialized)then; call MAPL_DeAllocNodeArray(A,rc=STATUS);else; deallocate(A,stat=STATUS);endif;_VERIFY(STATUS);NULLIFY(A);endif !============================================================================= module GEOS_CatchGridCompMod @@ -4964,7 +4965,7 @@ subroutine Driver ( RC ) #ifdef DBG_CATCH_INPUTS call MAPL_Get(MAPL, LocStream=LOCSTREAM, RC=STATUS) VERIFY_(STATUS) - call MAPL_LocStreamGet(LOCSTREAM, TILEGRID=TILEGRID, RC=STATUS) + call MAPL_LocStreamGet(LOCSTREAM, NT_GLOBAL=NT_GLOBAL, TILEGRID=TILEGRID, RC=STATUS) VERIFY_(STATUS) call MAPL_TileMaskGet(tilegrid, mask, rc=status) @@ -5053,8 +5054,6 @@ subroutine Driver ( RC ) unit = GETFILE( "catch_params.data", form="unformatted", RC=STATUS ) VERIFY_(STATUS) - NT_GLOBAL = size(mask) - call WRITE_PARALLEL(NT_GLOBAL, UNIT) call WRITE_PARALLEL(DT, UNIT) call WRITE_PARALLEL(USE_FWET_FOR_RUNOFF, UNIT) @@ -5131,7 +5130,7 @@ subroutine Driver ( RC ) VERIFY_(STATUS) end if - + DEALLOC_(mask) #endif ! Sanity Check to ensure IMPORT ITY from VEGDYN is consistent with INTERNAL ITY from CATCH @@ -5268,7 +5267,7 @@ subroutine Driver ( RC ) if (fexist) then call MAPL_Get(MAPL, LocStream=LOCSTREAM, RC=STATUS) VERIFY_(STATUS) - call MAPL_LocStreamGet(LOCSTREAM, TILEGRID=TILEGRID, RC=STATUS) + call MAPL_LocStreamGet(LOCSTREAM, NT_GLOBAL=NT_GLOBAL, TILEGRID=TILEGRID, RC=STATUS) VERIFY_(STATUS) call MAPL_TileMaskGet(tilegrid, mask, rc=status) VERIFY_(STATUS) @@ -5280,7 +5279,6 @@ subroutine Driver ( RC ) variables => InCfg%get_variables() var_iter = variables%begin() - NT_GLOBAL = size(mask) allocate(global_tmp_incr(NT_GLOBAL),source =0.0) allocate(local_tmp_incr(NTILES), source = 0.0) @@ -5323,7 +5321,7 @@ subroutine Driver ( RC ) call inFmt%close() deallocate(local_tmp_incr, global_tmp_incr) - deallocate(mask) + DEALLOC_(mask) ! consolidate increment arrays allocate(ghtcnt_incr(6,NTILES)) diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/CMakeLists.txt b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/CMakeLists.txt index 280a54466..8dc2753c6 100644 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/CMakeLists.txt +++ b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/CMakeLists.txt @@ -10,8 +10,6 @@ read_riveroutlet.F90 CubedSphere_GridMod.F90 rmTinyCatchParaMod.F90 comp_CATCHCN_AlbScale_parameters.F90 -sibalb.f -zenith.f zip.c util.c ) @@ -23,7 +21,7 @@ endif () include_directories(${INC_ESMF}) include_directories(${INC_NETCDF}) -esma_add_library(${this} SRCS ${srcs} DEPENDENCIES MAPL) +esma_add_library(${this} SRCS ${srcs} DEPENDENCIES MAPL GEOS_LandShared) target_link_libraries(${this} PRIVATE OpenMP::OpenMP_Fortran OpenMP::OpenMP_C) if(NOT FORTRAN_COMPILER_SUPPORTS_FINDLOC) @@ -41,13 +39,13 @@ ecbuild_add_executable (TARGET CombineRasters.x SOURCES CombineRasters.F90 LIBS ecbuild_add_executable (TARGET mkCatchParam.x SOURCES mkCatchParam.F90 LIBS MAPL ${this} ${OpenMP_Fortran_LIBRARIES}) set_target_properties(mkCatchParam.x PROPERTIES COMPILE_FLAGS "${OpenMP_Fortran_FLAGS}") set_target_properties(mkCatchParam.x PROPERTIES LINK_FLAGS "${OpenMP_Fortran_FLAGS}") - ecbuild_add_executable (TARGET mkCubeFVRaster.x SOURCES mkCubeFVRaster.F90 LIBS MAPL ${this}) ecbuild_add_executable (TARGET mkLandRaster.x SOURCES mkLandRaster.F90 LIBS MAPL ${this}) ecbuild_add_executable (TARGET mkLatLonRaster.x SOURCES mkLatLonRaster.F90 LIBS MAPL ${this}) ecbuild_add_executable (TARGET mkLISTilesPara.x SOURCES mkLISTilesPara.F90 LIBS MAPL ${this}) ecbuild_add_executable (TARGET mkMITAquaRaster.x SOURCES mkMITAquaRaster.F90 LIBS MAPL ${this}) ecbuild_add_executable (TARGET mkMOMAquaRaster.x SOURCES mkMOMAquaRaster.F90 LIBS MAPL ${this}) +ecbuild_add_executable (TARGET FillMomGrid.x SOURCES FillMomGrid.F90 LIBS MAPL ${this}) ecbuild_add_executable (TARGET mk_runofftbl.x SOURCES mk_runofftbl.F90 LIBS MAPL ${this}) ecbuild_add_executable (TARGET mkSMAPTilesPara.x SOURCES mkSMAPTilesPara.F90 LIBS MAPL ${this}) ecbuild_add_executable (TARGET mkSMAPTilesPara_v2.x SOURCES mkSMAPTilesPara_v2.F90 LIBS MAPL ${this}) diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/CombineRasters.F90 b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/CombineRasters.F90 index 6cb3e2a90..70d60ac9e 100644 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/CombineRasters.F90 +++ b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/CombineRasters.F90 @@ -33,7 +33,7 @@ program mkOverlaySimple integer :: nxt, argl, fill integer :: i, j, k, l, ip integer :: STATUS, i1, i2, nvars, rvars - integer :: ip1, ip2 + integer :: ip1, ip2, nf1, nf2 integer :: nx1, nx2, ny1, ny2, nx, ny integer :: maxtiles, hash integer :: count0,count1,count_rate @@ -162,8 +162,8 @@ program mkOverlaySimple ! Read raster sizes info from .til headers - read(TILUNIT1,*) ip1, nx1, ny1 - read(TILUNIT2,*) ip2, nx, ny + read(TILUNIT1,*) ip1, nf1, nx1, ny1 + read(TILUNIT2,*) ip2, nf2, nx, ny ! Both grids must be based on same shape rasters @@ -383,7 +383,11 @@ program mkOverlaySimple do k=1,ip rTable(1,k) = atan2(rTable(1,k),rTable(2,k))/d2r - rTable(2,k) = rTable(3,k)/rTable(4,k) + if(rTable(4,k) < 1.e-15) then + rTable(2,k) = rTable(3,k)/(rTable(4,k) + 1.e-15) + else + rTable(2,k) = rTable(3,k)/rTable(4,k) + endif rTable(3,k) = rTable(4,k) rTable(4,k) = rTable(5,k) end do diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/FillMomGrid.F90 b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/FillMomGrid.F90 index 15111ad28..7f3502fbf 100644 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/FillMomGrid.F90 +++ b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/FillMomGrid.F90 @@ -1,6 +1,8 @@ +!#include "Raster.h" #define VERIFY_(A) IF(A/=0)THEN;PRINT *,'ERROR AT LINE ', __LINE__;STOP;ENDIF #define ASSERT_(A) if(.not.A)then;print *,'Error:',__FILE__,__LINE__;stop;endif + program FillMomGrid use LogRectRasterizeMod @@ -23,32 +25,35 @@ program FillMomGrid integer, parameter :: TILUNIT1 = 22 integer, parameter :: TILUNIT2 = 23 - REAL(KIND=8), parameter :: PI = MAPL_PI + REAL(KIND=REAL64), parameter :: PI = MAPL_PI integer :: IARGC integer :: nxt, argl, fill integer :: i, j, k, l, ip integer :: STATUS, i1, i2, nvars, rvars - integer :: ip1, ip2 + integer :: ip1, ip2, nf1, nf2, ip3 integer :: io, jo + integer :: im, jm integer :: nx1, nx2, ny1, ny2, nx, ny integer :: maxtiles, hash integer :: LineOcn integer :: count0,count1,count_rate - REAL(KIND=8), pointer :: MOMLAT(:,:) ! Lats of MOM's T-cell centers - REAL(KIND=8), pointer :: MOMWET(:,:) ! TMASK of MOM's grid cells + REAL(KIND=REAL64) :: xmin, ymin, xmax, ymax, xs, ys + + REAL(KIND=REAL64), pointer :: MOMLAT(:,:) ! Lats of MOM's T-cell centers + REAL(KIND=REAL64), pointer :: MOMWET(:,:) ! TMASK of MOM's grid cells - integer, allocatable :: RST1(:,:) - integer, allocatable :: RST2(: ) + integer, allocatable :: RST1(:,:), RST3(:,:), RST0(:,:) + integer, allocatable :: RST2(: ) integer, allocatable :: iTable(:,:) - REAL(KIND=8) , allocatable :: Table1(:,:) - REAL(KIND=8) , allocatable :: Table2(:,:) - REAL(KIND=8) , allocatable :: rTable(:,:) - REAL(KIND=8) , allocatable :: cc(:), ss(:) - REAL(KIND=8) :: dx, dy, area, xc, yc, d2r, vv(4) - REAL(KIND=8) :: lats, lons, da + REAL(KIND=REAL64), allocatable :: Table1(:,:) + REAL(KIND=REAL64), allocatable :: Table2(:,:) + REAL(KIND=REAL64), allocatable :: rTable(:,:) + REAL(KIND=REAL64), allocatable :: cc(:), ss(:) + REAL(KIND=REAL64) :: dx, dy, area, xc, yc, d2r, vv(4) + REAL(KIND=REAL64) :: lats, lons, da logical :: DoZip logical :: Verb @@ -59,15 +64,18 @@ program FillMomGrid character*1 :: Opt character*128 :: arg character*128 :: Overlay='' + character*128 :: OverlayO='' character*128 :: GridName1, GridName2 character*128 :: Grid1, Grid2 character*128 :: TilFile, RstFile + character*128 :: TilFile1 character*128 :: GridFile character*128 :: & - Usage = "FillMomGrid -v -h -z -t MT -g GF -f TYPE BOTTOMRASTER TOPRASTER MOM_GRIDSPEC" + Usage = "FillMomGrid -v -z -t MT -g GF -f TYPE BOTTOMRASTER TOPRASTER MOM_GRIDSPEC" integer :: Pix1, Pix2 - + integer, allocatable, dimension (:) :: pfaf_yes, pfaf_rem, pfaf_new + INCLUDE "netcdf.inc" ! Argument defaults @@ -78,7 +86,7 @@ program FillMomGrid rstdir='rst/' ! Write in current dir maxtiles=4000000 - I = iargc() + I = command_argument_count() if(I < 2 .or. I > 11) then print *, trim(Usage) @@ -86,7 +94,8 @@ program FillMomGrid end if nxt = 1 - call getarg(nxt,arg) + !call getarg(nxt,arg) + call get_command_argument(nxt,arg) do while(arg(1:1)=='-') opt=arg(2:2) @@ -95,7 +104,8 @@ program FillMomGrid if(argl==2) then if(scan(opt,'zvh')==0) then nxt = nxt + 1 - call getarg(nxt,arg) + !call getarg(nxt,arg) + call get_command_argument(nxt,arg) end if else arg = arg(3:) @@ -115,24 +125,29 @@ program FillMomGrid read(arg,*) maxtiles case ('g') Overlay = trim(arg) + !case ('o') + ! OverlayO = trim(arg) case default print *, trim(Usage) call exit(1) end select nxt = nxt + 1 - call getarg(nxt,arg) + !call getarg(nxt,arg) + call get_command_argument(nxt,arg) end do Grid1 = ARG nxt = nxt + 1 - call getarg(nxt,arg) + !call getarg(nxt,arg) + call get_command_argument(nxt,arg) Grid2 = ARG nxt = nxt + 1 - call getarg(nxt,arg) + !call getarg(nxt,arg) + call get_command_argument(nxt,arg) GridFile = arg @@ -140,11 +155,17 @@ program FillMomGrid print*, 'Must Provide Overlay' call exit(0) end if + !if(trim(OverlayO)=='') then + ! print*, 'Must Provide OverlayO' + ! call exit(0) + !end if call ReadGridFile(GridFile, MOMLAT, MOMWET) print*, 'MOM grid dims' print*, size(MOMWET,dim=1), size(MOMWET,dim=2) + print*, 'grid1: ', trim(adjustl(Grid1)) + print*, 'grid2: ', trim(adjustl(Grid2)) if(DoZip) then @@ -153,6 +174,7 @@ program FillMomGrid else TilFile = trim(tildir)//trim(Overlay)//'.til' RstFile = trim(rstdir)//trim(Overlay)//'.rst' + TilFile1 = trim(tildir)//trim(OverlayO)//'.til' end if ! Input files: @@ -171,8 +193,11 @@ program FillMomGrid ! Read raster sizes info from .til headers - read(TILUNIT1,*) ip1, nx1, ny1 - read(TILUNIT2,*) ip2, nx, ny + read(TILUNIT1,*) ip1, nf1, nx1, ny1 + read(TILUNIT2,*) ip2, nf2, nx, ny + + print*, 'nx1 = ', nx1, ' nx = ', nx + print*, 'ny1 = ', ny1, ' ny = ', ny ! Both grids must be based on same shape rasters @@ -187,24 +212,34 @@ program FillMomGrid allocate(rst2(nx), stat=status) VERIFY_(STATUS) - allocate(Table1(6,ip1), stat=status) + allocate(Table1(8,ip1), stat=status) + VERIFY_(STATUS) + allocate(Table2(8,ip2), stat=status) + VERIFY_(STATUS) + + allocate(iTable(0:3,maxtiles),stat=status) + VERIFY_(STATUS) + allocate(rTable(1:4,maxtiles),stat=status) + VERIFY_(STATUS) + + allocate(rst0(nx,ny), stat=status) VERIFY_(STATUS) - allocate(Table2(6,ip2), stat=status) + allocate(rst3(nx,ny), stat=status) VERIFY_(STATUS) ! Read input tables read(TILUNIT1,*) k read(TILUNIT1,*) Grid1 - read(TILUNIT1,*) nx1 - read(TILUNIT1,*) ny1 + read(TILUNIT1,*) im + read(TILUNIT1,*) jm do j=2,k read(TILUNIT1,*) read(TILUNIT1,*) read(TILUNIT1,*) end do - if(Verb) print *, 'First input grid: ',trim(Grid1), ip1, nx1, ny1 + print *, 'First input grid: ',trim(Grid1), ip1, im, jm read(TILUNIT2,*) k read(TILUNIT2,*) Grid2 @@ -216,19 +251,27 @@ program FillMomGrid read(TILUNIT2,*) end do - if(Verb) print *, 'Second input grid: ',trim(Grid2), ip2, nx2, ny2 + print *, 'Second input grid: ',trim(Grid2), ip2, nx2, ny2 do k=1,ip1 - read(TILUNIT1,*) Table1(1:2,k),lons,lons,Table1(3:6,k) + read(TILUNIT1,*) Table1(:,k) enddo do k=1,ip2 - read(TILUNIT2,*) Table2(1:2,k),lons,lons,Table2(3:6,k) + read(TILUNIT2,*) Table2(:,k) if(nint(Table2(1,k)) == 0) then - LineOcn = nint(Table2(6,k)) + LineOcn = nint(Table2(8,k)) endif enddo + xmin = -180.0_8 + xmax = 180.0_8 + ymin = -90.0_8 + ymax = 90.0_8 + + dx = (xmax-xmin)/nx + dy = (ymax-ymin)/ny + d2r = (2._8*PI)/360.0_8 if(Verb) then call system_clock(count1) @@ -241,19 +284,29 @@ program FillMomGrid LATITUDES: do j=1,ny + lats = -90._8 + (j - 0.5_8)*dy + da = (sin(d2r*(lats+0.5*dy)) - & + sin(d2r*(lats-0.5*dy)) )*(dx*d2r) + + area = da + read(RSTUNIT2) Rst1(:,j) read(RSTUNIT1) Rst2 - + Rst0 (:,j) = Rst1(:,j) LONGITUDES: do i=1,nx Pix1 = Rst1(i,j) Pix2 = Rst2(i) if(Pix2 <= 0) cycle - io = nint(Table1(3,Pix2)) - jo = nint(Table1(4,Pix2)) - if(MOMLAT(io,jo) > 30.0 .or. MOMLAT(io,jo) < -30.0) then ! if at higher latitudes + io = nint(Table1(5,Pix2)) + jo = nint(Table1(6,Pix2)) + if(MOMLAT(io,jo) > 37.5 .or. MOMLAT(io,jo) < -60.0) then ! if at higher latitudes if(MOMWET(io,jo) > 0.5) then ! if this is a MOM ocean point - if(Pix1 /= LineOcn) Rst1(i,j) = LineOcn + if(Pix1 /= LineOcn) then + Rst1(i,j) = LineOcn + Table2(2,Pix1) = Table2(2,Pix1) - area + Table2(2,LineOcn) = Table2(2,LineOcn) + area + endif endif endif @@ -265,12 +318,81 @@ program FillMomGrid end if enddo LATITUDES ! End raster J-loop + + ! reindex Pfafstetter + ! ------------------- + allocate (pfaf_yes (1:ip2)) + allocate (pfaf_new (1:ip2)) -! Write .til and .rst files + pfaf_yes = 0 + pfaf_new = 0 + + do j = 1, ny + do i = 1, nx + pfaf_yes(Rst1(i,j))=Rst1(i,j) + end do + end do + k = count (pfaf_yes == 0) + print *, ' # of submerged cats', k + ip3 = ip2 - k + + allocate (pfaf_rem (1: ip3)) + pfaf_rem = pack (pfaf_yes, mask = (pfaf_yes > 0)) + + ! new pfaf table + + do k=1,ip3 + iTable(0,k) = nint(Table2(1,pfaf_rem(k))) + iTable(2:3,k) = nint(Table2(5:6,pfaf_rem(k))) + rTable(1,k) = Table2(3,pfaf_rem(k)) + rTable(2,k) = Table2(4,pfaf_rem(k)) + rTable(3,k) = Table2(2,pfaf_rem(k)) + rTable(4,k) = rTable(3,pfaf_rem(k)) + pfaf_new (pfaf_rem(k)) =k + enddo + + ! new pfaf raster + + do j = 1, ny + do i = 1, nx + Rst3 (i,j) = pfaf_new (Rst1(i,j)) + end do + end do + + ! -------------------------------- + ! SUMMARY + ! -------------------------------- + print *, ' Original FillMOM Re-indexed' + print *, ' ' + print *, ' # of ocean pixels ', count (Rst0 == ip2-2), count (Rst1 == ip2-2), count (Rst3 == ip3-2) + print *, ' # of lake pixels ', count (Rst0 == ip2-1), count (Rst1 == ip2-1), count (Rst3 == ip3-1) + print *, ' # of landice pixels', count (Rst0 == ip2 ), count (Rst1 == ip2 ), count (Rst3 == ip3 ) + print *, ' # of land pixels ', count (Rst0 <= ip2-3), count (Rst1 <= ip2-3), count (Rst3 <= ip3-3) + print *, ' MINVAL ', minval(Rst0), minval (Rst1), minval (Rst3) + print *, ' MAXVAL ', maxval(Rst0), maxval (Rst1), maxval (Rst3) - if(Verb) print *, 'Writing raster file...' - call WriteRaster(RstFile,Rst1,DoZip) + +! Write .til and .rst files + print *, 'Writing land til file...' + call WriteTiling(TilFile, (/Grid2/), (/ip3/), (/1/), (/ip3/), & + nx, ny, iTable(:,:ip3), rTable(:4,:ip3), Dozip, Verb ) + + !do k=1,ip1 + ! iTable(0,k) = nint(Table1(1,k)) + ! iTable(2:3,k) = nint(Table1(5:6,k)) + ! rTable(1,k) = Table1(3,k) + ! rTable(2,k) = Table1(4,k) + ! rTable(3,k) = Table1(2,k) + ! rTable(4,k) = rTable(3,k) + !enddo + + !print *, 'Writing ocn til file...' + !call WriteTiling(TilFile1, (/Grid1/), (/im/), (/jm/), (/ip1/), & + ! nx, ny, iTable(:,:ip1), rTable(:4,:ip1), Dozip, Verb ) + + print *, 'Writing raster file...' + call WriteRaster(RstFile,Rst3,DoZip) if(Verb) then call system_clock(count1) @@ -284,7 +406,7 @@ program FillMomGrid ! All done - if(Verb) print * , 'Terminated Normally' + print * , 'Terminated Normally' call exit(0) contains @@ -320,80 +442,39 @@ end subroutine FieldSize subroutine ReadGridFile(FILE, LAT, WET) character*(*), intent(IN ) :: FILE - REAL(KIND=8), pointer :: LAT(:,:) - REAL(KIND=8), pointer :: WET(:,:) + REAL(KIND=REAL64), pointer :: LAT(:,:) + REAL(KIND=REAL64), pointer :: WET(:,:) - integer :: STATUS, NCID, VARID, j - integer :: SIZ_XVERT_X, SIZ_XVERT_Y - integer :: SIZ_YVERT_X, SIZ_YVERT_Y + integer :: STATUS, NCID, VARID + integer :: SIZ_XVERT_X + integer :: SIZ_YVERT_Y logical :: newstyle integer :: ID, ITMP Status=NF_OPEN(FILE,NF_NOWRITE,NCID) ASSERT_(STATUS==NF_NOERR) - ITMP = NF_INQ_VARID (NCID, 'x_vert_T', ID ) - newstyle = ITMP==NF_NOERR - - - if( NEWSTYLE) then - - call fieldSize(NCID,'x_vert_T',SIZ_XVERT_X,1) - call fieldSize(NCID,'y_vert_T',SIZ_YVERT_Y,2) - - allocate(LAT(SIZ_XVERT_X,SIZ_YVERT_Y),stat=STATUS) - ASSERT_(STATUS==0) - allocate(WET(SIZ_XVERT_X,SIZ_YVERT_Y),stat=STATUS) - ASSERT_(STATUS==0) - - STATUS = NF_INQ_VARID (NCID, 'y_T', VARID ) - ASSERT_(STATUS==NF_NOERR) - status = NF_GET_VAR_DOUBLE(NCID, VARID, LAT) - ASSERT_(STATUS==NF_NOERR) - - STATUS = NF_INQ_VARID (NCID, 'wet', VARID ) - ASSERT_(STATUS==NF_NOERR) - STATUS = NF_GET_VAR_DOUBLE(NCID, VARID, WET) - ASSERT_(STATUS==NF_NOERR) - -!!$ print *, 'Newstyle' -!!$ print *, 'xs: ',xvert(1,1,:) -!!$ print *, 'ys: ',yvert(1,1,:) - - else - - call fieldSize(NCID,'geolon_vert_t',SIZ_XVERT_X,1) - call fieldSize(NCID,'geolat_vert_t',SIZ_YVERT_Y,2) - - - SIZ_XVERT_X = SIZ_XVERT_X-1 - SIZ_YVERT_Y = SIZ_YVERT_Y-1 -! print *, SIZ_XVERT_X,SIZ_YVERT_Y - - allocate(LAT(SIZ_XVERT_X,SIZ_YVERT_Y),stat=STATUS) - ASSERT_(STATUS==0) - allocate(WET(SIZ_XVERT_X,SIZ_YVERT_Y),stat=STATUS) - ASSERT_(STATUS==0) - - STATUS = NF_INQ_VARID (NCID, 'geolat_t', VARID ) - ASSERT_(STATUS==NF_NOERR) - status = NF_GET_VAR_DOUBLE(NCID, VARID, LAT) - ASSERT_(STATUS==NF_NOERR) + call fieldSize(NCID,'lon_centers',SIZ_XVERT_X,1) + call fieldSize(NCID,'lat_centers',SIZ_YVERT_Y,2) - STATUS = NF_INQ_VARID (NCID, 'wet', VARID ) - ASSERT_(STATUS==NF_NOERR) - STATUS = NF_GET_VAR_DOUBLE(NCID, VARID, WET) - ASSERT_(STATUS==NF_NOERR) - -!!$ print *, 'Oldstyle' -!!$ print *, 'xs: ',vertx(1,1),vertx(2,1),vertx(2,2),vertx(1,2) -!!$ print *, 'ys: ',verty(1,1),verty(2,1),verty(2,2),verty(1,2) + allocate(LAT(SIZ_XVERT_X,SIZ_YVERT_Y),stat=STATUS) + ASSERT_(STATUS==0) + allocate(WET(SIZ_XVERT_X,SIZ_YVERT_Y),stat=STATUS) + ASSERT_(STATUS==0) + STATUS = NF_INQ_VARID (NCID, 'lat_centers', VARID ) + ASSERT_(STATUS==NF_NOERR) + status = NF_GET_VAR_DOUBLE(NCID, VARID, LAT) + ASSERT_(STATUS==NF_NOERR) - endif + STATUS = NF_INQ_VARID (NCID, 'mask', VARID ) + ASSERT_(STATUS==NF_NOERR) + STATUS = NF_GET_VAR_DOUBLE(NCID, VARID, WET) + ASSERT_(STATUS==NF_NOERR) end subroutine READGRIDFILE + end program FillMomGrid !=================================================================== diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/clsm_plots.pro b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/clsm_plots.pro index a4e5b6e3c..8111bbacb 100755 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/clsm_plots.pro +++ b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/clsm_plots.pro @@ -441,11 +441,12 @@ endfor close,1 -load_colors thisDevice = !D.Name set_plot,'Z' Device, Set_Resolution=[720,800], Z_Buffer=0 +load_colors Erase,255 + !p.background = 255 !P.position=0 @@ -553,6 +554,15 @@ compute_zo,'ascat' , SCALE4Z0, ASZ0, Z2, tile_id compute_zo,'icarus', SCALE4Z0, ASZ0, Z2, tile_id compute_zo,'merged', SCALE4Z0, ASZ0, Z2, tile_id +; plotting irrigation parameters +; ------------------------------ + +;plot_crop_times, ncat, tile_id +;irrig_method, ncat, tile_id +;plot_lai_minmax, ncat, tile_id +;irrig_fractions, ncat, tile_id + + ; (12) generating NC_plot x NR_plot mask for plotting maps ;-------------------------------------------------------- @@ -2143,7 +2153,7 @@ endfor upval = max(canop_tiles) limits = [-60,-180,90,180] -load_colors + colors = [27,26,25,24,23,22,21,20,40,41,42,43,44,45,46,47,48] colors = reverse (colors) n_levels = n_elements (colors) @@ -2153,6 +2163,7 @@ levels = [lwval,lwval+(upval-lwval)/(n_levels -1) +indgen(n_levels -1)*(upval-lw thisDevice = !D.Name set_plot,'Z' Device, Set_Resolution=[800,400], Z_Buffer=0 +load_colors Erase,255 !p.background = 255 !P.position=0 @@ -2214,7 +2225,6 @@ END PRO plot_three_vars2, ncat, tile_id, data1, data2, data3 -load_colors im = n_elements(tile_id[*,0]) jm = n_elements(tile_id[0,*]) @@ -2248,6 +2258,7 @@ n_levels = n_elements (colors) thisDevice = !D.Name set_plot,'Z' Device, Set_Resolution=[720,900], Z_Buffer=0 +load_colors Erase,255 !p.background = 255 @@ -2325,10 +2336,11 @@ END pro plot_soilalb, ncat, tile_id,VISDR, VISDF, NIRDR, NIRDF -load_colors + thisDevice = !D.Name set_plot,'Z' Device, Set_Resolution=[720,500], Z_Buffer=0 +load_colors Erase,255 !p.background = 255 @@ -2645,13 +2657,15 @@ for k = 0, N_levels -1 do begin blue (k+1) = b_in (k) endfor +thisDevice = !D.Name +set_plot,'Z' +Device, Set_Resolution=[1080,600], Z_Buffer=0 + TVLCT,red,green,blue colors = indgen (N_levels) + 1 -thisDevice = !D.Name -set_plot,'Z' -Device, Set_Resolution=[1080,600], Z_Buffer=0 + Erase,255 !p.background = 255 @@ -2825,10 +2839,18 @@ r_type = [255,106,202,251, 0, 29, 77,109,142,233,255,255,255,127,164,164,217,2 g_type = [245, 91,178,154, 85,115,145,165,185, 23,131,131,191, 39, 53, 53, 72, 72,204,104, 70] b_type = [215,154,214,153, 0, 0, 0, 0, 13, 0, 0,200, 0, 4, 3,200, 1,200,204,200,200] +r_lct2 = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 120, 190, 240, 255, 255, 255, 255, 255, 233, 197, 158] +g_lct2 = [ 0, 0, 0, 83, 115, 167, 195, 227, 255, 255, 255, 255, 255, 219, 187, 159, 131, 51, 23, 0, 0] +b_lct2 = [130, 200, 255, 255, 255, 255, 255, 255, 255, 199, 135, 67, 15, 0, 0, 0, 0 , 0, 0, 0, 0] + r_veg = [233,255,255,255,210, 0, 0, 0,204,170,255,220,205, 0, 0,170, 0, 40,120,140,190,150,255,255, 0, 0, 0,195,255, 0] g_veg = [ 23,131,191,255,255,255,155, 0,204,240,255,240,205,100,160,200, 60,100,130,160,150,100,180,235,120,150,220, 20,245, 70] b_veg = [ 0, 0, 0,178,255,255,255,200,204,240,100,100,102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,175, 90,120,130, 0,215,200] +r_grads_rb = [160, 110, 30, 0, 0, 0, 0, 160, 230, 230, 240, 250, 240] +g_grads_rb = [ 0, 0, 60, 150, 200, 210, 220, 230, 220, 175, 130, 60, 0] +b_grads_rb = [200, 220, 255, 255, 200, 140, 0, 50, 50, 45, 40, 60, 130] + R (20:27) = r_green G (20:27) = g_green B (20:27) = b_green @@ -2853,6 +2875,13 @@ R (90:119) = r_veg G (90:119) = g_veg B (90:119) = b_veg +R (120:132) = r_grads_rb +G (120:132) = g_grads_rb +B (120:132) = b_grads_rb + +R (140:160) = r_lct2 +G (140:160) = g_lct2 +B (140:160) = b_lct2 TVLCT,R ,G ,B end @@ -2926,7 +2955,7 @@ upval = max(z2) lwval = min(z2) limits = [-60,-180,90,180] -load_colors + colors = [27,26,25,24,23,22,21,20,40,41,42,43,44,45,46,47,48] colors = reverse (colors) n_levels = n_elements (colors) @@ -2936,6 +2965,7 @@ levels = [lwval,lwval+(upval-lwval)/(n_levels -1) +indgen(n_levels -1)*(upval-lw thisDevice = !D.Name set_plot,'Z' Device, Set_Resolution=[800,400], Z_Buffer=0 +load_colors Erase,255 !p.background = 255 !P.position=0 @@ -2985,8 +3015,6 @@ end ; ==================================================================================== pro country_codes, tile_id -load_random_colors - im = n_elements(tile_id[*,0]) jm = n_elements(tile_id[0,*]) @@ -3035,6 +3063,7 @@ limits = [-60,-180,90,180] thisDevice = !D.Name set_plot,'Z' Device, Set_Resolution=[800,400], Z_Buffer=0 +load_random_colors Erase,255 !p.background = 255 !P.position=0 @@ -3198,11 +3227,11 @@ skip_lai: sea_label = ['DJF','MAM','JJA','SON'] -load_colors thisDevice = !D.Name set_plot,'Z' Device, Set_Resolution=[720,600], Z_Buffer=0 ;Device, Set_Resolution=[720,500], Z_Buffer=0 +load_colors Erase,255 !p.background = 255 @@ -3288,7 +3317,7 @@ pro proc_glass ;IDATA = '/gpfsm/dnb43/projects/p03/RS_DATA/GLASS/LAI/AVHRR/V4/HDF/' -;ODATA = '/discover/nobackup/rreichle/l_data/LandBCs_files_for_mkCatchParam/V001/GLASS-LAI/AVHRR.v4/' +;ODATA = '/discover/nobackup/projects/gmao/ssd/land/l_data/LandBCs_files_for_mkCatchParam/V001/GLASS-LAI/AVHRR.v4/' ;LABEL = 'GLASS01B02.V04.A' ;yearb = 1981 ;YEARe = 2017 @@ -3333,14 +3362,14 @@ for k = 0, N_levels -1 do begin green(k+1) = g_in (k) blue (k+1) = b_in (k) endfor - +thisDevice = !D.Name +set_plot,'Z' +Device, Set_Resolution=[800,500], Z_Buffer=0 TVLCT,red,green,blue colors = indgen (N_levels) + 1 limits = [-60,-180,90,180] -thisDevice = !D.Name -set_plot,'Z' -Device, Set_Resolution=[800,500], Z_Buffer=0 + Erase,255 !p.background = 255 @@ -3453,3 +3482,649 @@ endfor NCDF_CLOSE, id end + +; ------------------------------------------------------------------- + pro irrig_method, ncat, tile_id + +; Rerad 0.25-degree GRIPC and MIRCA data + +filename = '../irrig.dat' +limits = [-60.,-180.,90.,-180.] +if file_test ('limits.idl') then restore,'limits.idl' + +id = NCDF_OPEN (filename, /NOWRITE) + +NCDF_VARGET, id,'SPRINKLERFR',SPRINKLERV +NCDF_VARGET, id,'DRIPFR',DRIPV +NCDF_VARGET, id,'FLOODFR',FLOODV + +NCDF_CLOSE, id + +SPRINKLERV(where (SPRINKLERV gt 1.)) = !VALUES.F_NAN +DRIPV (where (DRIPV gt 1.)) = !VALUES.F_NAN +FLOODV (where (FLOODV gt 1.)) = !VALUES.F_NAN + +im = n_elements(tile_id[*,0]) +jm = n_elements(tile_id[0,*]) + +dx = 360. / im +dy = 180. / jm + +x = indgen(im)*dx -180. + dx/2. +y = indgen(jm)*dy -90. + dy/2. + +SPRINKLER = REPLICATE (!VALUES.F_NAN,IM, JM) +DRIP = REPLICATE (!VALUES.F_NAN,IM, JM) +FLOOD = REPLICATE (!VALUES.F_NAN,IM, JM) + +for j = 0l, jm -1l do begin + for i = 0l, im -1 do begin + if(tile_id[i,j] gt 0) then begin + SPRINKLER(i,j) = SPRINKLERV (tile_id[i,j] -1) + DRIP (i,j) = DRIPV (tile_id[i,j] -1) + FLOOD (i,j) = FLOODV (tile_id[i,j] -1) + endif + endfor +endfor + +SPRINKLER(where (SPRINKLER eq 0.)) = !VALUES.F_NAN +DRIP (where (DRIP eq 0.)) = !VALUES.F_NAN +FLOOD (where (FLOOD eq 0.)) = !VALUES.F_NAN + +colors = indgen (21) + 140 +levels = indgen (21)*0.1/2. + +position_row1 = [0.02, 0.70, 0.98, 0.95] +position_row2 = [0.02, 0.40, 0.98, 0.65] +position_row3 = [0.02, 0.10, 0.98, 0.35] + +position_col = [0.20, 0.02, 0.80, 0.05] + +thisDevice = !D.Name +set_plot,'Z' +Device, Set_Resolution=[850,1100], Z_Buffer=0,SET_FONT='Helvetica Bold', /TT_FONT +load_colors +;set_plot,'PS' +!P.font=0 +;Device, FILENAME= plotdir + 'IrrigMethod.ps',/color,/PORTRAIT,xsi=0.9*8.2, ysi=0.9*11.7, xoff=.7, yoff=.5, _extra=_extra,/INCHES +Erase,255 +!p.background = 255 +!P.position=0 + +MAP_SET,/CYLINDRICAL,/hires,color= 0,/NoErase,limit=limits , charsize = .9, title = 'SPRINKLER FRACTION', /noborder,/isotropic, position = position_row1 +contour,sprinkler,x,y,levels = levels,c_colors=colors,/cell_fill,/overplot +MAP_CONTINENTS,/COASTS,color=0,MLINETHICK=2 + +MAP_SET,/CYLINDRICAL,/hires,color= 0,/NoErase,limit=limits , charsize = .9, title = 'DRIP FRACTION', /noborder,/isotropic, position = position_row2 +contour,drip,x,y,levels = levels,c_colors=colors,/cell_fill,/overplot +MAP_CONTINENTS,/COASTS,color=0,MLINETHICK=2 + +MAP_SET,/CYLINDRICAL,/hires,color= 0,/NoErase,limit=limits , charsize = .9, title = 'FLOOD FRACTION', /noborder,/isotropic, position = position_row3 +contour,flood,x,y,levels = levels,c_colors=colors,/cell_fill,/overplot +MAP_CONTINENTS,/COASTS,color=0,MLINETHICK=2 + +colorbar,n_levels = 21, levels = levels, colors = colors, labels = levels, position = position_col +;DEVICE, /CLOSE +;Set_Plot, thisDevice +snapshot = TVRD() +TVLCT, r, g, b, /Get +Device, Z_Buffer=1 +Set_Plot, thisDevice +image24 = BytArr(3, 850, 1100) +image24[0,*,*] = r[snapshot] +image24[1,*,*] = g[snapshot] +image24[2,*,*] = b[snapshot] +Write_PNG, 'IrrigMethod.png' , image24 + +end +; --------------------------------------------------------------------------------------------- + + pro plot_lai_minmax, ncat, tile_id + +; Rerad 0.25-degree GRIPC and MIRCA data + +filename = '../irrig.dat' +limits = [-60.,-180.,90.,-180.] +if file_test ('limits.idl') then restore,'limits.idl' + +id = NCDF_OPEN (filename, /NOWRITE) + +NCDF_VARGET, id,'LAIMIN',LAI_MNV +NCDF_VARGET, id,'LAIMAX',LAI_MXV + +NCDF_CLOSE, id + +LAI_MNV (where (LAI_MNV gt 100.)) = !VALUES.F_NAN +LAI_MXV (where (LAI_MXV gt 100.)) = !VALUES.F_NAN + +im = n_elements(tile_id[*,0]) +jm = n_elements(tile_id[0,*]) + +dx = 360. / im +dy = 180. / jm + +x = indgen(im)*dx -180. + dx/2. +y = indgen(jm)*dy -90. + dy/2. + +LAI_MN = REPLICATE (!VALUES.F_NAN,IM, JM) +LAI_MX = REPLICATE (!VALUES.F_NAN,IM, JM) +for j = 0l, jm -1l do begin + for i = 0l, im -1 do begin + if(tile_id[i,j] gt 0) then begin + LAI_MN(i,j) = LAI_MNV (tile_id[i,j] -1) + LAI_MX(i,j) = LAI_MXV (tile_id[i,j] -1) + endif + endfor +endfor +LAI_MN (where (LAI_MN eq 0.)) = !VALUES.F_NAN +LAI_MX (where (LAI_MX eq 0.)) = !VALUES.F_NAN + +thisDevice = !D.Name +set_plot,'Z' +Device, Set_Resolution=[850,1100], Z_Buffer=0,SET_FONT='Helvetica Bold', /TT_FONT + +load_colors +r_in = [253,224,255,238,205,193,152, 0,124, 0, 0, 0, 0, 0, 0, 48,110, 85] +g_in = [253,238,255,238,205,255,251,255,252,255,238,205,139,128,100,128,139,107] +b_in = [253,224, 0, 0, 0,193,152,127, 0, 0, 0, 0, 0, 0, 0, 20, 61, 47] + +n_levels = n_elements (r_in) +levels=[0.,0.25,0.5,0.75,1.,1.25,1.5,10. * indgen(11)*0.05+2.] +red = intarr (256) +green= intarr (256) +blue = intarr (256) + +red (255) = 255 +green(255) = 255 +blue (255) = 255 + +for k = 0, N_levels -1 do begin + red (k+1) = r_in (k) + green(k+1) = g_in (k) + blue (k+1) = b_in (k) +endfor + +TVLCT,red,green,blue + +colors = indgen (N_levels) + 1 + +position_row1 = [0.02, 0.50, 0.98, 0.95] +position_row2 = [0.02, 0.10, 0.98, 0.45] + +position_col = [0.20, 0.02, 0.80, 0.05] + + +Erase,255 +!p.background = 255 +!P.position=0 + +MAP_SET,/CYLINDRICAL,/hires,color= 0,/NoErase,limit=limits , charsize = 1.5, title = 'LAI Minimum', /noborder,/isotropic, position = position_row1 +contour,LAI_MN,x,y,levels = levels,c_colors=colors,/cell_fill,/overplot +MAP_CONTINENTS,/COASTS,color=0,MLINETHICK=2 + +MAP_SET,/CYLINDRICAL,/hires,color= 0,/NoErase,limit=limits , charsize = 1.5, title = 'LAI Maximum', /noborder,/isotropic, position = position_row2 +contour,LAI_MX,x,y,levels = levels, c_colors=colors,/cell_fill,/overplot +MAP_CONTINENTS,/COASTS,color=0,MLINETHICK=2 +!P.position= position_col +alpha=fltarr(n_levels,2) +alpha(*,0)=levels +alpha(*,1)=levels +h=[0,1] + +dx = (240.)/(n_levels-1) + +clev = levels +clev (*) = 1 +contour,alpha,levels,h,levels=levels,c_colors=colors,/fill,/xstyle,/ystyle, $ + /noerase,yticks=1,ytickname=[' ',' '] ,xrange=[min(levels),max(levels)], $ + xtitle=' ', color=0,xtickv=levels, $ + C_charsize=1.0, charsize=0.5 ,xtickformat = "(A1)" +contour,alpha,levels,h,levels=levels,color=0,/overplot,c_label=clev + for k = 0,n_elements(colors) -1 do xyouts,levels[k],1.1,string(levels[k],format='(f4.2)') ,orientation=90,color=0,charsize =0.8 + + +snapshot = TVRD() +TVLCT, r, g, b, /Get +Device, Z_Buffer=1 +Set_Plot, thisDevice +image24 = BytArr(3, 850, 1100) +image24[0,*,*] = r[snapshot] +image24[1,*,*] = g[snapshot] +image24[2,*,*] = b[snapshot] +Write_PNG, 'LAI_minmax.png' , image24 + +end +; --------------------------------------------------------------------------------------------- + + pro irrig_fractions, ncat, tile_id + +; Rerad 0.25-degree GRIPC and MIRCA data +filename = '../irrig.dat' +limits = [-60.,-180.,90.,-180.] +if file_test ('limits.idl') then restore,'limits.idl' + +id = NCDF_OPEN (filename, /NOWRITE) + +NCDF_VARGET, id,'IRRIGFRAC',IRRIGFRACV +NCDF_VARGET, id,'PADDYFRAC',PADDYFRACV +NCDF_VARGET, id,'RAINFEDFRAC',RAINFEDFRACV + +NCDF_CLOSE, id + +IRRIGFRACV (where (IRRIGFRACV gt 1.)) = !VALUES.F_NAN +PADDYFRACV (where (PADDYFRACV gt 1.)) = !VALUES.F_NAN +RAINFEDFRACV(where (RAINFEDFRACV gt 1.)) = !VALUES.F_NAN + +im = n_elements(tile_id[*,0]) +jm = n_elements(tile_id[0,*]) + +dx = 360. / im +dy = 180. / jm + +x = indgen(im)*dx -180. + dx/2. +y = indgen(jm)*dy -90. + dy/2. + +IRRIGFRAC = REPLICATE (!VALUES.F_NAN,IM, JM) +PADDYFRAC = REPLICATE (!VALUES.F_NAN,IM, JM) +RAINFEDFRAC = REPLICATE (!VALUES.F_NAN,IM, JM) + +for j = 0l, jm -1l do begin + for i = 0l, im -1 do begin + if(tile_id[i,j] gt 0) then begin + IRRIGFRAC (i,j) = IRRIGFRACV (tile_id[i,j] -1) + PADDYFRAC (i,j) = PADDYFRACV (tile_id[i,j] -1) + RAINFEDFRAC(i,j) = RAINFEDFRACV (tile_id[i,j] -1) + endif + endfor +endfor + +IRRIGFRAC (where (IRRIGFRAC eq 0.)) = !VALUES.F_NAN +PADDYFRAC (where (PADDYFRAC eq 0.)) = !VALUES.F_NAN +RAINFEDFRAC(where (RAINFEDFRAC eq 0.)) = !VALUES.F_NAN + +colors = indgen (21) + 140 +levels = indgen (21)*0.05/2. + +position_row1 = [0.02, 0.70, 0.98, 0.95] +position_row2 = [0.02, 0.40, 0.98, 0.65] +position_row3 = [0.02, 0.10, 0.98, 0.35] + +position_col = [0.20, 0.02, 0.80, 0.05] + +thisDevice = !D.Name +set_plot,'Z' +Device, Set_Resolution=[850,1100], Z_Buffer=0,SET_FONT='Helvetica Bold', /TT_FONT +Erase,255 +!p.background = 255 +!P.position=0 + +MAP_SET,/CYLINDRICAL,/hires,color= 0,/NoErase,limit=limits , charsize = 1.5, title = 'IRRIGATED CROP FRACTION', /noborder,/isotropic, position = position_row1 +contour,irrigfrac,x,y,levels = levels,c_colors=colors,/cell_fill,/overplot +MAP_CONTINENTS,/COASTS,color=0,MLINETHICK=2 + +MAP_SET,/CYLINDRICAL,/hires,color= 0,/NoErase,limit=limits , charsize = 1.5, title = 'PADDY FRACTION', /noborder,/isotropic, position = position_row2 +contour,paddyfrac,x,y,levels = levels, c_colors=colors,/cell_fill,/overplot +MAP_CONTINENTS,/COASTS,color=0,MLINETHICK=2 + +MAP_SET,/CYLINDRICAL,/hires,color= 0,/NoErase,limit=limits , charsize = 1.5, title = 'RAINFED FRACTION', /noborder,/isotropic, position = position_row3 +contour,rainfedfrac,x,y,levels = levels,c_colors=colors,/cell_fill,/overplot +MAP_CONTINENTS,/COASTS,color=0,MLINETHICK=2 + + +colorbar,n_levels = 21, levels = levels, colors = colors, labels = levels, position = position_col + +snapshot = TVRD() +TVLCT, r, g, b, /Get +Device, Z_Buffer=1 +Set_Plot, thisDevice +image24 = BytArr(3, 850, 1100) +image24[0,*,*] = r[snapshot] +image24[1,*,*] = g[snapshot] +image24[2,*,*] = b[snapshot] +Write_PNG, 'GIA-Hybrid_IrrigFracs.png' , image24 + +end + +; ------------------------------------------------------------------------------------------- + +pro plot_crop_times, ncat, tile_id + + +filename = '../irrig.dat' +limits = [-60.,-180.,90.,-180.] +if file_test ('limits.idl') then restore,'limits.idl' + +id = NCDF_OPEN (filename, /NOWRITE) + +NCDF_VARGET, id,'IRRIGPLANT',plantv +NCDF_VARGET, id,'IRRIGHARVEST',harvestv +NCDF_VARGET, id,'CROPIRRIGFRAC',Fracv +NCDF_VARGET, id,'IRRIGTYPE',irrigtypev +NCDF_VARGET, id,'CROPCLASSNAME',cropname +NCDF_CLOSE, id + +cropname = string (cropname) + +im = n_elements(tile_id[*,0]) +jm = n_elements(tile_id[0,*]) + +dx = 360. / im +dy = 180. / jm + +xx = indgen(im)*dx -180. + dx/2. +yy = indgen(jm)*dy -90. + dy/2. +x = fltarr (IM,JM) +y = fltarr (IM,JM) +PLANT = REPLICATE (!VALUES.F_NAN,IM, JM, 2, 26) +HARVEST = REPLICATE (!VALUES.F_NAN,IM, JM, 2, 26) +FRAC = REPLICATE (!VALUES.F_NAN,IM, JM, 26) +IRRIGTYPE = REPLICATE (!VALUES.F_NAN,IM, JM, 26) + +for j = 0l, jm -1l do begin + for i = 0l, im -1 do begin + x (i,j) = xx(i) + y (i,j) = yy(j) + if(tile_id[i,j] gt 0) then begin + PLANT (i,j,*,*) = PLANTV (tile_id[i,j] -1,*,*) + HARVEST (i,j,*,*) = HARVESTV (tile_id[i,j] -1,*,*) + FRAC (i,j,*) = FRACV (tile_id[i,j] -1,*) + IRRIGTYPE(i,j,*) = IRRIGTYPEV (tile_id[i,j] -1,*) + endif + endfor +endfor +;for n = 0, 25 do begin +; data1 = frac (*,*,n) +; data2 = plant (*,*,0,n) +; data3 = harvest (*,*,0,n) +; for j = 0, nr - 1 do begin +; for i = 0, nc -1 do begin +; if (mask (i,j) gt 0.5) then begin +; +; if((Plant (I,J,0,n) gt 400) and (frac (i,j,n) gt 0.)) then begin +; print , i,j, n,Plant (I,J,0,0:3), frac (i,j,0:3) +; if((data2 (I,J) gt 400) and (data1 (i,j) gt 0.)) then begin +; print , i,j, n,data2 (I,J), data1 (i,j) +; +; endif +; endif +; endfor +; endfor +;endfor + +;fmask = where (frac gt 0.) +;frac (where (frac eq 0.)) = !VALUES.F_NAN +;plant (where (plant gt 400)) = !VALUES.F_NAN +;harvest (where (harvest gt 400)) = !VALUES.F_NAN +;stop + +colors = indgen (21) + 140 +levels = indgen (21)*0.05/2. +DOY = [ 1, 32, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366, 370] +DOYM = [15, 46, 74, 105, 135, 166, 196, 227, 258, 288, 319, 349, 366, 370] +DOYL = [15, 46, 74, 105, 135, 166, 196, 227, 258, 288, 319, 349, 366, 370] +ITYP = [1,2,3,4] +colors2= [69, 145, 64, 66, 70, 71,73,75,76, 78, 80, 113, 114, 116, 117] +colors3 = [69, 64,80] +row_dims1 = [0.10, 0.32, 0.54, 0.76] +row_dims2 = [0.27, 0.49, 0.71, 0.96] +;col_dmis1 = [0.02, 0.34, 0.66] +;col_dmis2 = [0.34, 0.66, 0.98] +col_dmis1 = [0.02, 0.25, 0.50, 0.75] +col_dmis2 = [0.25, 0.50, 0.75, 0.98] + +;position_col1 = [0.04, 0.02, 0.32, 0.05] +;position_col2 = [0.38, 0.02, 0.92, 0.05] +position_col1 = [0.04, 0.02, 0.32, 0.05] +position_col2 = [0.38, 0.02, 0.68, 0.05] +position_col3 = [0.70, 0.02, 0.92, 0.05] + +page = 1 +Row = 1 +A=findgen(16)*(!PI*2/16.) +usersym,0.1*cos(a),0.1*sin(a),/fill +thisDevice = !D.Name + +set_plot,'Z' +Device, Set_Resolution=[850,1100], Z_Buffer=0,SET_FONT='Helvetica Bold', /TT_FONT +load_colors +;set_plot,'PS' +;!P.font=0 +;Device, FILENAME= plotdir + 'gia_irrig_params.ps',/color,/PORTRAIT,xsi=0.9*8.2, ysi=0.9*11.7, xoff=.7, yoff=.5, _extra=_extra,/INCHES +Erase,255 +!p.background = 255 +!P.position=0 + +for n = 0, 25 do begin + + if (row eq 1) then begin + thisDevice = !D.Name + set_plot,'Z' + Device, Set_Resolution=[850,1100], Z_Buffer=0,SET_FONT='Helvetica Bold', /TT_FONT + Erase,255 + !p.background = 255 + !P.position=0 + endif + + data1 = frac (*,*,n) + fmask = where (data1 gt 0.) + this = plant (*,*,0,n) + data2 = this (fmask) + this = harvest (*,*,0,n) + data3 = this (fmask) + this = irrigtype (*,*,n) + data4 = this (fmask) + lons = x (fmask) + lats = y (fmask) + + data1 (where (data1 le 0)) = !VALUES.F_NAN + + for col = 0,3 do begin + print, col + if (col eq 0) then begin + ptitle = ' : frac' + data_grid = data1 + endif + + if (col eq 1) then begin + ptitle = ' : DOY plant' + data_grid = data2 + endif + + if (col eq 2) then begin + ptitle = ' : DOY harvest' + data_grid = data3 + endif + + if (col eq 3) then begin + ptitle = ' : IRRIGTYPE' + data_grid = data4 + endif + + plot_position = [col_dmis1(col),row_dims1(row-1), col_dmis2(col),row_dims2(row-1)] + print, col, row, plot_position + MAP_SET,/CYLINDRICAL,/hires,color= 0,/NoErase,limit=limits , charsize = 0.8, title = cropname(n) + ptitle, /noborder, position = plot_position + + if(col eq 0) then begin + contour,data_grid,x,y,levels = levels,c_colors=colors,/cell_fill,/overplot + endif else if (col eq 3) then begin + for i = 0l, n_elements (data_grid) -1l do begin + if(data_grid(i) gt 0.) then oplot,[lons(i), lons(i)], [lats(i), lats(i)],psym=8,color= colors3(value_locate (ITYP,data_grid(i))) + endfor + endif else begin + for i = 0l, n_elements (data_grid) -1l do begin + if((data_grid(i) gt 0.) and (data_grid(i) le 366.)) then oplot,[lons(i), lons(i)], [lats(i), lats(i)],psym=8,color= colors2(value_locate (doy,data_grid(i))) + endfor + + endelse + + MAP_CONTINENTS,/COASTS,color=0,MLINETHICK=2 + + endfor + + row = row + 1 + + if (row eq 5) then begin + + colorbar,n_levels = 21, levels = levels, colors = colors, labels = levels, position = position_col1 + colorbar,n_levels = n_elements (DOY), levels = DOY, colors = colors2, labels = DOY, position = position_col2 + colorbar,n_levels = 4, levels = [1,2,3,4], colors = colors3, labels = ['Sprinkler', 'Drip', 'Flood',''], position = position_col3 +; ERASE + snapshot = TVRD() + TVLCT, r, g, b, /Get + Device, Z_Buffer=1 + Set_Plot, thisDevice + image24 = BytArr(3, 850, 1100) + image24[0,*,*] = r[snapshot] + image24[1,*,*] = g[snapshot] + image24[2,*,*] = b[snapshot] + Write_PNG, 'gia_irrig_params_' + string (page, '(i2.2)') + '.png' , image24 + + row = 1 + page = page + 1 + + endif + + this = plant (*,*,1,n) + data2 = this (fmask) + + if(max (data2) gt 0) then begin + if (row eq 1) then begin + thisDevice = !D.Name + set_plot,'Z' + Device, Set_Resolution=[850,1100], Z_Buffer=0,SET_FONT='Helvetica Bold', /TT_FONT + Erase,255 + !p.background = 255 + !P.position=0 + endif + + this = plant (*,*,1,n) + data2 = this (fmask) + this = harvest (*,*,1,n) + data3 = this (fmask) + + for col = 0,2 do begin + if (col eq 0) then begin + ptitle = ' : frac' + data_grid = data1 + endif + + if (col eq 1) then begin + ptitle = ' : DOY plant' + data_grid = data2 + endif + + if (col eq 2) then begin + ptitle = ' : DOY harvest' + data_grid = data3 + endif + + plot_position = [col_dmis1(col),row_dims1(row-1), col_dmis2(col),row_dims2(row-1)] + print, col, row, plot_position + MAP_SET,/CYLINDRICAL,/hires,color= 0,/NoErase,limit=limits , charsize = 0.8, title = cropname(n) + ptitle, /noborder, position = plot_position + if(col eq 0) then begin + contour,data_grid,x,y,levels = levels,c_colors=colors,/cell_fill,/overplot + endif else if (col eq 3) then begin + for i = 0l, n_elements (data_grid) -1l do begin + if(data_grid(i) gt 0.) then oplot,[lons(i), lons(i)], [lats(i), lats(i)],psym=8,color= colors3(value_locate (ITYP,data_grid(i))) + endfor + endif else begin + for i = 0l, n_elements (data_grid) -1l do begin + if((data_grid(i) gt 0.) and (data_grid(i) le 366.)) then oplot,[lons(i), lons(i)], [lats(i), lats(i)],psym=8,color= colors2(value_locate (doy,data_grid(i))) + endfor + endelse + + MAP_CONTINENTS,/COASTS,color=0,MLINETHICK=2 + + endfor + row = row + 1 + + if (row eq 5) then begin + + colorbar,n_levels = 21, levels = levels, colors = colors, labels = levels, position = position_col1 + colorbar,n_levels = n_elements (DOY), levels = DOY, colors = colors2, labels = DOY, position = position_col2 + colorbar,n_levels = 4, levels = [1,2,3,4], colors = colors3, labels = ['Sprinkler', 'Drip', 'Flood',''], position = position_col3 +; ERASE + snapshot = TVRD() + TVLCT, r, g, b, /Get + Device, Z_Buffer=1 + Set_Plot, thisDevice + image24 = BytArr(3, 850, 1100) + image24[0,*,*] = r[snapshot] + image24[1,*,*] = g[snapshot] + image24[2,*,*] = b[snapshot] + Write_PNG, 'gia_irrig_params_' + string (page, '(i2.2)') + '.png' , image24 + + row = 1 + page = page + 1 + + endif + endif +endfor + +;DEVICE, /CLOSE +;Set_Plot, thisDevice +end +; ========================================================================= + +pro colorbar,n_levels = n_levels, levels = levels, colors = colors, labels = labels,$ + position = position, vertical= vertical, horizontal = horizontal + + IF KEYWORD_SET(vertical) THEN BEGIN + + !P.position=[position(2) + 0.02, position(1) ,position(2) + 0.05, position(3)] + + alpha=fltarr(2,n_levels) + alpha(0,*)=levels + alpha(1,*)=levels + h=[-1,1] + clev = levels + clev (*) = 1 + k = 0 + + levelsx = indgen (N_levels) + + contour,alpha,h,levelsx,levels=levels,c_colors=colors,/fill,/xstyle,/ystyle, $ + /noerase,xticks=1, xtickname=[' ',' '] ,yrange=[min(levelsx),max(levelsx)], $ + ytitle=' ', color=0, $ + C_charsize=1.0, charsize=0.5 ,xtickformat = "(A1)",ytickformat = "(A1)" + contour,alpha,h,levelsx,levels=levels,color=0,/overplot,c_label=clev + for k = 0,n_elements(levels) -1 do xyouts,1.1, levelsx[k],labels(k) ,color=0,charsize =1.2 + + endif else begin + +; !P.position=[position(0) +0.1, position(1)-0.06 ,position(2) - 0.1, position(1)-0.04] + !P.position=[0.15, 0.01, 0.85, 0.04] + IF KEYWORD_SET(position) then !P.position=position ; + + alpha=fltarr(n_levels,2) + alpha(*,0)=levels + alpha(*,1)=levels + h=[0,1] + clev = levels + clev (*) = 1 + k = 0 + + levelsx = indgen (N_levels) + + contour,alpha,levelsx,h,levels=levels,c_colors=colors,/fill,/xstyle,/ystyle, $ + /noerase,yticks=1, ytickname=[' ',' '] ,xrange=[min(levelsx),max(levelsx)], $ + xtitle=' ', color=0, $ + C_charsize=1.0, charsize=0.5 ,xtickformat = "(A1)",ytickformat = "(A1)" + contour,alpha,levelsx,h,levels=levels,color=0,/overplot,c_label=clev + + if(n_levels eq 4) then begin + + for k = 0,n_elements(levels) -1 do xyouts, levelsx[k],1.1, strtrim(labels(k)), color=0,charsize =0.8,orientation=90 + endif else begin + if(max (labels) le 1.) then begin + for k = 0,n_elements(levels) -1 do xyouts, levelsx[k],1.1,string(labels(k),'(f5.2)') ,color=0,charsize =0.8,orientation=90 + + endif else begin + for k = 0,n_elements(levels) -1 do xyouts, levelsx[k],1.1,string(labels(k),'(i3.3)') ,color=0,charsize =0.8,orientation=90 + endelse + endelse + endelse + + !P.position=0 + +end diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/comp_CATCHCN_AlbScale_parameters.F90 b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/comp_CATCHCN_AlbScale_parameters.F90 index 24d2fb3eb..16bd9f0f2 100644 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/comp_CATCHCN_AlbScale_parameters.F90 +++ b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/comp_CATCHCN_AlbScale_parameters.F90 @@ -14,8 +14,9 @@ MODULE comp_CATCHCN_AlbScale_parameters public :: albedo4catchcn character*400, PARAMETER :: & - InBCSDIR = '/gpfsm/dnb02/smahanam/MERRA3/FPAR/SMAP_EASEv2_M09/', & - EXPDIR = '/archive/u/smahanam/FPAR-ALB/e0004s_wet2/output/SMAP_EASEv2_M09_GLOBAL/', & + InBCSDIR = '/discover/nobackup/smahanam/MERRA3/FPAR/SMAP_EASEv2_M09/', & + !EXPDIR = '/archive/u/smahanam/FPAR-ALB/e0004s_wet2/output/SMAP_EASEv2_M09_GLOBAL/', & + EXPDIR = '/discover/nobackup/borescan/BCS/add_to_l_land/e0004s_wet2/output/SMAP_EASEv2_M09_GLOBAL/', & EXNAME = 'e0004s_wet2', & InGFILE = 'SMAP_EASEv2_M09_3856x1624' diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/compare_bcs.pro b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/compare_bcs.pro new file mode 100644 index 000000000..c14a1ce6c --- /dev/null +++ b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/compare_bcs.pro @@ -0,0 +1,997 @@ +;It sounds like ATAU and BTAU don’t differ? If not, great! Those (like tsa1, tsa2, tsb1, tsb2) would be hard to check… + +;Based on the Catchment code, the following fitted functions have to +;be within tolerance of each other (say, within 1%), +;even if the different parameter values themselves differ (i.e., because different compilers find different combinations of parameters that work): + +;(1) AR1W= AMIN1(1.,AMAX1(0.,(1.+ars1(n)*CATDEFW) & +; /(1.+ars2(n)*CATDEFW+ars3(n)*CATDEFW*CATDEFW))) ! for 0 clsm/soil - read (10,'(i8,i8,i4,i4,3f8.4,f12.8,f7.4,f10.4,3f7.3,4f7.3,2f10.4, f8.4)') & + read (10,'(i10,i8,i4,i4,3f8.4,f12.8,f7.4,f10.4,3f7.3,4f7.3,2f10.4, f8.4)') & tile_index,pfaf_code,soil_class_top,soil_class_com,BEE, & PSIS,POROS,COND, WPWET, DP2BR, gravel,OrgCarbon_top, & OrgCarbon_rz,sand_top,clay_top,sand_rz,clay_rz,WPWET_top, POROS_top, PMAP @@ -948,7 +951,7 @@ cat << _EOS1_ > clsm/soil _EOS1_ else cat << _EOS2_ > clsm/soil - read (10,'(i8,i8,i4,i4,3f8.4,f12.8,f7.4,f10.4)') & + read (10,'(i10,i8,i4,i4,3f8.4,f12.8,f7.4,f10.4)') & tile_index,pfaf_code,soil_class_top, & soil_class_com,BEE, PSIS,POROS,COND, & WPWET,soildepth @@ -1366,7 +1369,7 @@ cat << _EOF0_ > clsm/README1 surfexec and rzexec file name : tau_param.dat do n = 1, ${NTILES} - read (10,'(i8,i8,4f10.7)') & + read (10,'(i10,i8,4f10.7)') & tile_index,pfaf_code,atau2,btau2,atau5,btau5 end do where: @@ -1379,7 +1382,7 @@ cat << _EOF0_ > clsm/README1 root zone and water table file name : ts.dat do n = 1, ${NTILES} - read (10,'(i8,i8,f5.2,4(2x,e13.7))')tile_index,pfaf_code,gnu, & + read (10,'(i10,i8,f5.2,4(2x,e13.7))')tile_index,pfaf_code,gnu, & tsa1,tsa2,tsb1,tsb2 end do @@ -1392,7 +1395,7 @@ cat << _EOF0_ > clsm/README1 6.2.3 Baseflow parameters file name : bf.dat do n = 1, ${NTILES} - read (10,'(i8,i8,f5.2,3(2x,e13.7))')tile_index,pfaf_code,gnu,bf1,bf2,bf3 + read (10,'(i10,i8,f5.2,3(2x,e13.7))')tile_index,pfaf_code,gnu,bf1,bf2,bf3 end do where: @@ -1404,7 +1407,7 @@ cat << _EOF0_ > clsm/README1 6.2.4 Area fractioning parameters file name : ar.new do n = 1, ${NTILES} - read (10,'(i8,i8,f5.2,11(2x,e13.7))')tile_index,pfaf_code,gnu, & + read (10,'(i10,i8,f5.2,11(2x,e13.7))')tile_index,pfaf_code,gnu, & ars1,ars2,ars3,ara1,ara2,ara3,ara4,arw1,arw2,arw3,arw4 end do @@ -1528,6 +1531,7 @@ cat << _EOF1_ > clsm/README2 mouth_lat [degree] latitude at the river mouth `echo "${rout_smap}"` + 7.3 References Verdin, K.L., and J.P. Verdin (1999). A topographical system for delineation and codification of the Earths river basins. J. of Hydrology (218), 1-12. @@ -1595,7 +1599,10 @@ mkdir -p clsm/plots cd clsm/plots/ -module load tool/idl-8.5 +module purge +module use -a /discover/swdev/gmao_SIteam/modulefiles-SLES12 +source ../../bin/g5_modules +module load idl/8.5 idl <=1).and.(iraster (i,j) <=ntiles)) then - tot_cnt (iraster (i,j)) = tot_cnt (iraster (i,j)) + 1. - if (var_in(i,j) == 1) cnt_pix1(iraster (i,j)) = cnt_pix1(iraster (i,j)) + 1. - if (var_in(i,j) == 2) cnt_pix2(iraster (i,j)) = cnt_pix2(iraster (i,j)) + 1. - if (var_in(i,j) == 3) cnt_pix3(iraster (i,j)) = cnt_pix3(iraster (i,j)) + 1. - endif - end do - end do - - cnt_pix1 = cnt_pix1 / tot_cnt - cnt_pix2 = cnt_pix2 / tot_cnt - cnt_pix3 = cnt_pix3 / tot_cnt - - ! CLM typs and laimin, laimax - ! --------------------------- - - open(unit=27, file='clsm/CLM_veg_typs_fracs' ,form='formatted') - - do n=1,ntiles - read (27, *) i,j, CLMC_pt1, CLMC_pt2, CLMC_st1, CLMC_st2, & - CLMC_pf1, CLMC_pf2, CLMC_sf1, CLMC_sf2, & - CLM4_pt(n), CLM4_st(n), CLM4_pf(n),CLM4_sf(n) - end do - - CLOSE (27, STATUS = 'KEEP') - - lai_max = -9999. - lai_min = 9999. - - open (31, file =trim(LAIFILE), form = 'unformatted', action = 'read', status = 'old') - - READ_LAIFILE : do i = 1,100 - - read (31, IOSTAT= STATUS) yr,mo,dy,hr,mn,ss,yr1,mo1,dy1,hr1,mn1,ss1,nx,ny - if(STATUS /= 0) exit - read(31)lai - - do n = 1, ntiles - if(lai (n) < lai_min (n)) lai_min (n) = lai (n) - if(lai (n) > lai_max (n)) lai_max (n) = lai (n) - end do - - end do READ_LAIFILE - - CLOSE (31, STATUS = 'KEEP') - -! open (10,file = 'clsm/gripc.data', form = 'unformatted', action = 'write', status = 'unknown') -! write (10) cnt_pix1 -! write (10) cnt_pix2 -! write (10) cnt_pix3 -! close (10, status = 'keep') - - status = NF_CREATE ('clsm/irrigation_internal_rst', NF_NETCDF4, NCFID) ; VERIFY_(STATUS) - status = NF_DEF_DIM(NCFID, 'tile' , NTILES, CellID) ; VERIFY_(STATUS) - status = NF_DEF_VAR(NCFID, 'IRRIGFRAC' , NF_FLOAT, 1 ,CellID, vid) ; VERIFY_(STATUS) - status = NF_PUT_ATT_TEXT(NCFID, vid, 'long_name', & - LEN_TRIM('Fraction of irrigated cropland'), & - 'fraction of irrigated cropland') ; VERIFY_(STATUS) - status = NF_PUT_ATT_TEXT(NCFID, vid, 'units', 1,'1') ; VERIFY_(STATUS) - - status = NF_DEF_VAR(NCFID, 'PADDYFRAC' , NF_FLOAT, 1 ,CellID, vid) ; VERIFY_(STATUS) - status = NF_PUT_ATT_TEXT(NCFID, vid, 'long_name', & - LEN_TRIM('fraction of paddy cropland'), & - 'fraction of paddy cropland') ; VERIFY_(STATUS) - status = NF_PUT_ATT_TEXT(NCFID, vid, 'units', 1,'1') ; VERIFY_(STATUS) - - status = NF_DEF_VAR(NCFID, 'LAIMIN' , NF_FLOAT, 1 ,CellID, vid) ; VERIFY_(STATUS) - status = NF_PUT_ATT_TEXT(NCFID, vid, 'long_name', & - LEN_TRIM('Minimum LAI'), 'Minimum LAI') ; VERIFY_(STATUS) - status = NF_PUT_ATT_TEXT(NCFID, vid, 'units', 1,'1') ; VERIFY_(STATUS) - - status = NF_DEF_VAR(NCFID, 'LAIMAX' , NF_FLOAT, 1 ,CellID, vid) ; VERIFY_(STATUS) - status = NF_PUT_ATT_TEXT(NCFID, vid, 'long_name', & - LEN_TRIM('Maximum LAI'), 'Maximum LAI') ; VERIFY_(STATUS) - status = NF_PUT_ATT_TEXT(NCFID, vid, 'units', 1,'1') ; VERIFY_(STATUS) - - status = NF_DEF_VAR(NCFID, 'CLMPT' , NF_FLOAT, 1 ,CellID, vid) ; VERIFY_(STATUS) - status = NF_PUT_ATT_TEXT(NCFID, vid, 'long_name', & - LEN_TRIM('CLM primary type'), 'CLM primary type') ; VERIFY_(STATUS) - status = NF_PUT_ATT_TEXT(NCFID, vid, 'units', 1,'1') ; VERIFY_(STATUS) - - status = NF_DEF_VAR(NCFID, 'CLMST' , NF_FLOAT, 1 ,CellID, vid) ; VERIFY_(STATUS) - status = NF_PUT_ATT_TEXT(NCFID, vid, 'long_name', & - LEN_TRIM('CLM secondary type'), 'CLM secondary type') ; VERIFY_(STATUS) - status = NF_PUT_ATT_TEXT(NCFID, vid, 'units', 1,'1') ; VERIFY_(STATUS) - - status = NF_DEF_VAR(NCFID, 'CLMPF' , NF_FLOAT, 1 ,CellID, vid) ; VERIFY_(STATUS) - status = NF_PUT_ATT_TEXT(NCFID, vid, 'long_name', & - LEN_TRIM('CLM primary fraction'), 'CLM primary fraction') ; VERIFY_(STATUS) - status = NF_PUT_ATT_TEXT(NCFID, vid, 'units', 1,'1') ; VERIFY_(STATUS) - - status = NF_DEF_VAR(NCFID, 'CLMSF' , NF_FLOAT, 1 ,CellID, vid) ; VERIFY_(STATUS) - status = NF_PUT_ATT_TEXT(NCFID, vid, 'long_name', & - LEN_TRIM('CLM secondary fraction'), 'CLM secondary fraction') ; VERIFY_(STATUS) - status = NF_PUT_ATT_TEXT(NCFID, vid, 'units', 1,'1') ; VERIFY_(STATUS) - - status = NF_ENDDEF(NCFID) - - status = NF_PUT_VARA_REAL(NCFID,VarID(NCFID,'IRRIGFRAC') ,(/1/),(/NTILES/), cnt_pix2) ; VERIFY_(STATUS) - status = NF_PUT_VARA_REAL(NCFID,VarID(NCFID,'PADDYFRAC') ,(/1/),(/NTILES/), cnt_pix3) ; VERIFY_(STATUS) - status = NF_PUT_VARA_REAL(NCFID,VarID(NCFID,'LAIMIN' ) ,(/1/),(/NTILES/), lai_min) ; VERIFY_(STATUS) - status = NF_PUT_VARA_REAL(NCFID,VarID(NCFID,'LAIMAX' ) ,(/1/),(/NTILES/), lai_max) ; VERIFY_(STATUS) - status = NF_PUT_VARA_REAL(NCFID,VarID(NCFID,'CLMPT' ) ,(/1/),(/NTILES/), CLM4_pt) ; VERIFY_(STATUS) - status = NF_PUT_VARA_REAL(NCFID,VarID(NCFID,'CLMST' ) ,(/1/),(/NTILES/), CLM4_st) ; VERIFY_(STATUS) - status = NF_PUT_VARA_REAL(NCFID,VarID(NCFID,'CLMPF' ) ,(/1/),(/NTILES/), CLM4_pf/100.); VERIFY_(STATUS) - status = NF_PUT_VARA_REAL(NCFID,VarID(NCFID,'CLMSF' ) ,(/1/),(/NTILES/), CLM4_sf/100.); VERIFY_(STATUS) - STATUS = NF_CLOSE (NCFID) - - contains - - ! ---------------------------------------------------------------------- - - integer function VarID (NCFID, VNAME) - - integer, intent (in) :: NCFID - character(*), intent (in) :: VNAME - integer :: status - - STATUS = NF_INQ_VARID (NCFID, trim(VNAME) ,VarID) - IF (STATUS .NE. NF_NOERR) & - CALL HANDLE_ERR(STATUS, trim(VNAME)) - - end function VarID - - ! ----------------------------------------------------------------------- - - SUBROUTINE HANDLE_ERR(STATUS, Line) - - INTEGER, INTENT (IN) :: STATUS - CHARACTER(*), INTENT (IN) :: Line - - IF (STATUS .NE. NF_NOERR) THEN - PRINT *, trim(Line),': ',NF_STRERROR(STATUS) - STOP 'Stopped' - ENDIF - - END SUBROUTINE HANDLE_ERR - - ! ----------------------------------------------------------------------------- - -END PROGRAM irrg_model diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/make_bcs b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/make_bcs index ab1789744..d8b17283b 100755 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/make_bcs +++ b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/make_bcs @@ -1,5 +1,28 @@ #!/bin/tcsh -f +####################################################################### +# This script creates surface tiles, and writes all model input files +# (.til, .rst and land parameter) in BCSDIR for any specified +# combination of atmospheric and ocean grid resolutions. +# +# ---- USAGE ---- +# 1) STEP 1 : build the model. +# 2) STEP 2 : create a link to install/bin from the working directory. +# 3) STEP 3 : bin/make_bcs +# Answer the following questions: +# a) Enter the Atmospheric Horizontal Resolution Code(s) to build: +# b) Select the Land BCs version to use: +# c) Enter the Ocean Resolution Code(s) to build: +# (Note this selection is not relevant to land-only EASE grids) +# d) Enter sponsor code. +# +####################################################################### + +# process input arguments + +set SKIPLAND = NO +if ( $1 == noland ) set SKIPLAND = YES + ####################################################################### # Set GEOS5/ESMADIR Variables ####################################################################### @@ -17,6 +40,7 @@ source $ESMADIR/g5_modules setenv NCPUS `/usr/bin/lscpu | grep '^CPU(s)' | cut -d ':' -f2 | head -1 ` @ NCPUS = $NCPUS / 4 @ NCPUS = $NCPUS * 3 +set NCPUS = 20 setenv OMP_NUM_THREADS 1 ####################################################################### @@ -48,23 +72,27 @@ set pwd = `pwd` HRCODE: echo " " -echo "Enter the ${C1}Atmospheric Horizontal Resolution Code(s)${CR} to build:" -echo "----------------------------------------------------------------------------------------------" -echo " Lat/Lon Cubed-Sphere SMAP-EASEv2" -echo "----------------------------------------------------------------------------------------------" -echo " ${C2}b -- 2 deg ${CR} ${C2}c48 -- 2 deg ${CR} ${C2}m9 -- 9km EASEv2 Grid ${CR}" -echo " ${C2}c -- 1 deg ${CR} ${C2}c90 -- 1 deg ${CR} ${C2}m36 -- 36km EASEv2 Grid ${CR}" -echo " ${C2}m25 -- 25km EASEv2 Grid ${CR}" -echo " ${C2}d -- 1/2 deg ${CR} ${C2}c180 -- 1/2 deg (${C1}56-km${C2}) ${CR}" -echo " ${C2}e -- 1/4 deg (${C1}35-km${C2}) c360 -- 1/4 deg (${C1}28-km${C2}) ${CR} " -echo " ${C2} c720 -- 1/8 deg (${C1}14-km${C2}) ${CR}" -echo " ${C2} c1000 - 1/10 deg (${C1}10-km${C2}) ${CR}" -echo " ${C2} c1440 - 1/16 deg (${C1} 7-km${C2}) ${CR}" -echo " ${C2} c2880 - 1/32 deg (${C1} 3-km${C2}) ${CR}" -echo " ${C2} c3072 - 1/32 deg (${C1} 3-km${C2}) ${CR}" -echo " ${C2} c5760 - 1/64 deg (${C1}1.5-km${C2}) ${CR}" +echo "Enter 1-5 character alphanumeric code to select specific ${C1}Atmospheric Horizontal Resolution ${CR} to be build:" +echo "------------------------------------------------------------------------------------------------------------------" +echo " Lat/Lon Cubed-Sphere EASE (land-only)" +echo "------------------------------------------------------------------------------------------------------------------" +echo " ${C2}b -- 2 deg ${CR} ${C2}c12 -- 8 deg ${CR} ${C2}m1 -- 1km EASEv2 Grid ${CR}" +echo " ${C2}c -- 1 deg ${CR} ${C2}c24 -- 4 deg ${CR} ${C2}m3 -- 3km EASEv2 Grid ${CR}" +echo " ${C2}d -- 1/2 deg ${CR} ${C2}c48 -- 2 deg ${CR} ${C2}m9 -- 9km EASEv2 Grid ${CR}" +echo " ${C2}e -- 1/4 deg ${CR} ${C2}c90 -- 1 deg ${CR} ${C2}m36 -- 36km EASEv2 Grid ${CR}" +echo " ${C2} c180 -- 1/2 deg (${C1} 56-km${C2}) ${CR} ${C2}m25 -- 25km EASEv1 Grid ${CR}" +echo " ${C2} c360 -- 1/4 deg (${C1} 28-km${C2}) ${CR}" +echo " ${C2} c720 -- 1/8 deg (${C1} 14-km${C2}) ${CR}" +echo " ${C2} c768 -- 1/10 deg (${C1} 12-km${C2}) ${CR}" +echo " ${C2} c1000 -- 1/10 deg (${C1} 10-km${C2}) ${CR}" +echo " ${C2} c1152 -- 1/10 deg (${C1} 8-km${C2}) ${CR}" +echo " ${C2} c1440 -- 1/16 deg (${C1} 7-km${C2}) ${CR}" +echo " ${C2} c1536 -- 1/16 deg (${C1} 7-km${C2}) ${CR}" +echo " ${C2} c2880 -- 1/32 deg (${C1} 3-km${C2}) ${CR}" +echo " ${C2} c3072 -- 1/32 deg (${C1} 3-km${C2}) ${CR}" +echo " ${C2} c5760 -- 1/64 deg (${C1}1.5-km${C2}) ${CR}" echo " " -echo " ${C2}o -- other${CR} Lat/Lon or Cube" +#echo " ${C2}o -- other${CR} Lat/Lon or Cube" echo " " set dummy = `echo $<` set dummy = `echo $dummy | tr "[:upper:]" "[:lower:]"` @@ -91,6 +119,8 @@ foreach HRCODE ($dummy) $HRCODE != 'c2880' & \ $HRCODE != 'c3072' & \ $HRCODE != 'c5760' & \ + $HRCODE != 'm1' & \ + $HRCODE != 'm3' & \ $HRCODE != 'm9' & \ $HRCODE != 'm36' & \ $HRCODE != 'm25') goto HRCODE @@ -105,96 +135,140 @@ endif ####################################################################### -ORSLV: +LBCSV: echo -echo "Enter the ${C1}Ocean Resolution Code(s)${CR} to build:" -echo " where: ${C2}O1 -- Low-Resolution Reynolds 1 deg${CR} (Lon/Lat Data-Ocean: 360x180 ) " -echo " ${C2}O2 -- Med-Resolution Reynolds 1/4 deg${CR} (Lon/Lat Data-Ocean: 1440x720 ) " -echo " ${C2}O3 -- High-Resolution OSTIA 1/8 deg${CR} (Lon/Lat Data-Ocean: 2880x1440) " -echo " ${C2}T1 -- Low-Resolution Tripolar 3 deg${CR} (MOM-Tripolar-Ocean: 120x65 ) " -echo " ${C2}T2 -- Med-Resolution Tripolar 1 deg${CR} (MOM-Tripolar-Ocean: 360x200 ) " -echo " ${C2}T3 -- High-Resolution Tripolar 1/2 deg${CR} (MOM-Tripolar-Ocean: 720x410 ) " -echo " ${C2}T4 -- High-Resolution Tripolar 1/4 deg${CR} (MOM-Tripolar-Ocean: 1440x1080 ) " -echo " ${C2}CS -- Cubed-Sphere Ocean ${CR} (Cubed-Sphere Data-Ocean with Old Land) " -echo " ${C2}NL1-- Low-Resolution Reynolds 1 deg${CR} (Lon/Lat Data-Ocean: 360x180 with New Land) " -echo " ${C2}NL2-- Med-Resolution Reynolds 1/4 deg${CR} (Lon/Lat Data-Ocean: 1440x720 with New Land) " -echo " ${C2}NL3-- High-Resolution OSTIA 1/8 deg${CR} (Lon/Lat Data-Ocean: 2880x1440 with New Land) " -echo " ${C2}NCS-- Cubed-Sphere Ocean ${CR} (Cubed-Sphere Data-Ocean with New Land) " +echo "Enter 3-character alphanumeric code to select specific ${C1}Land BCs version ${CR} to use:" +echo " Choose: ${C2}F25 -- for Fortuna-2_5" +echo " ${C2}GM4 -- for /discover/nobackup/ltakacs/bcs/Ganymed-4_0/" +echo " ${C2}ICA -- for /discover/nobackup/ltakacs/bcs/Icarus/" +echo " ${C2}NL3 -- for /discover/nobackup/ltakacs/bcs/Icarus-NLv3/" +echo " ${C2}NL4 -- for /discover/nobackup/projects/gmao/smap/bcs_temporary/NLv4/" +echo " ${C2} equivalent parameter configuration and ancillary data." +echo " " +echo " NOTE: Due to compiler differences, code improvements and bug fixes that" +echo " have taken place since the above archived BCs were created, some parameter " +echo " files produced by current source codes may differ with those in the archived BCs." +echo " Nevertheless, the impact of those differences on science is insignificant and" +echo " the parameter files produced by current source codes can be considered as " +echo " scientifically equivalent to achieved BCs" +echo " " +echo " (OR press ENTER If you want to use the develop version of land BCs.)" set dummy = `echo $<` set dummy = `echo $dummy | tr "[:lower:]" "[:upper:]"` -set orslvs = $dummy[1] -foreach orslv ($dummy) - if( $orslv != 'O1' & \ - $orslv != 'O2' & \ - $orslv != 'O3' & \ - $orslv != 'T1' & \ - $orslv != 'T2' & \ - $orslv != 'T3' & \ - $orslv != 'T4' & \ - $orslv != 'NL1'& \ - $orslv != 'NL2'& \ - $orslv != 'NL3'& \ - $orslv != 'CS' & \ - $orslv != 'NCS') goto ORSLV - if( $orslv != "$orslvs" ) set orslvs = `echo ${orslvs} ${orslv}` -end +set lbcsv = DEF +if( $dummy == 'F25' | $dummy == 'GM4' | $dummy == 'ICA' | $dummy == 'NL3' | $dummy == 'NL4' | $dummy == 'NL4p') set lbcsv = $dummy + +####################################################################### + +if($HRCODES == m1 | $HRCODES == m3 | $HRCODES == m9 | $HRCODES == m36 | $HRCODES == m25) then + set orslvs = O1 + +else + +ORSLV: + + echo + echo "Enter 2-6 character alphanumeric code (no dashes) to select specific ${C1}Ocean Resolution ${CR} to be build:" + echo " Choose: ${C2}O1 -- Low-Resolution Reynolds 1 deg${CR} (Lon/Lat Data-Ocean: 360x180) " + echo " ${C2}O2 -- Med-Resolution Reynolds 1/4 deg${CR} (Lon/Lat Data-Ocean: 1440x720) " + echo " ${C2}O3 -- High-Resolution OSTIA 1/8 deg${CR} (Lon/Lat Data-Ocean: 2880x1440) " + echo " ${C2}T2 -- Med-Resolution Tripolar 1 deg${CR} (MOM-Tripolar-Ocean: 360x200) " + echo " ${C2}T3 -- High-Resolution Tripolar 1/2 deg${CR} (MOM-Tripolar-Ocean: 720x410) " + echo " ${C2}T4 -- High-Resolution Tripolar 1/4 deg${CR} (MOM-Tripolar-Ocean: 1440x1080) " + echo " ${C2}T1MOM6 -- Low-Resolution Tripolar 5 deg${CR} (MOM6-Tripolar-Ocean: 72x36) " +# echo " ${C2}T2MOM6 -- Med-Resolution Tripolar 1 deg${CR} (MOM6-Tripolar-Ocean: 360x210) " + echo " ${C2}T4MOM6 -- High-Resolution Tripolar 1/4 deg${CR} (MOM6-Tripolar-Ocean: 1440x1080) " + echo " ${C2}CS -- Cubed-Sphere Ocean ${CR} (Cubed-Sphere Data-Ocean ) " + echo " (Select anything just to move forward for land-only EASE grids.)" + set dummy = `echo $<` + set dummy = `echo $dummy | tr "[:lower:]" "[:upper:]"` + set orslvs = $dummy[1] + foreach orslv ($dummy) + if( $orslv != 'O1' & \ + $orslv != 'O2' & \ + $orslv != 'O3' & \ + $orslv != 'T2' & \ + $orslv != 'T3' & \ + $orslv != 'T4' & \ + $orslv != 'T1MOM6' & \ + $orslv != 'T2MOM6' & \ + $orslv != 'T4MOM6' & \ + $orslv != 'CS') goto ORSLV + if( $orslv != "$orslvs" ) set orslvs = `echo ${orslvs} ${orslv}` + end +endif + ####################################################################### echo "" -echo "${C1}Atmospheric Codes:${CR} ${C2}$HRCODES${CR}" +echo "${C1} Atmospheric Code:${CR} ${C2}$HRCODES${CR}" echo "${C1} Ocean Resolution:${CR} ${C2}$orslvs${CR}" +echo "${C1} Land BCs version:${CR} ${C2}$lbcsv${CR}" ####################################################################### ####################################################################### +set IRRIGTHRES = 2 set make_bcs_jobs = '' # ------------------------------------ # Loop over All Ocean Resolution Codes # ------------------------------------ -set GLOBAL_CATCH_DATA = /discover/nobackup/ltakacs/bcs/LandSurfaceData_for_Catchment_Parameters/global.cat_id.catch.ORIG.DL +foreach orslv ($orslvs) + +####################################################################### +# Select land-lakes-ice-ocean mask file +####################################################################### + set HOSTNAME = `hostname | rev | cut -c3- | rev` + if ( $HOSTNAME == discover ) then set l_data = /discover/nobackup/projects/gmao/ssd/land/l_data/LandBCs_files_for_mkCatchParam/V001/ else set l_data = /nobackup/gmao_SIteam/ModelData/l_data/LandBCs_files_for_mkCatchParam/V001/ endif -foreach orslv ($orslvs) -if( $orslv == NL1 | $orslv == T1 | $orslv == T2 | $orslv == T3) then - # Great-Lakes & Caspian-Sea treated as Model LAKE tiles, Surface Temperatures will be Model Derived - # ------------------------------------------------------------------------------------------------- - set GLOBAL_CATCH_DATA = ${l_data}/GEOS5_10arcsec_mask_freshwater-lakes.nc -endif +if ( $orslv == O1 | $orslv == T2 | $orslv == T3 | $orslv == T4 | \ + $orslv == T1MOM6 | $orslv == T2MOM6 | $orslv == T4MOM6 ) then -if( $orslv == NL2 | $orslv == NL3 | $orslv == NCS ) then - # Great-Lakes & Caspian-Sea treated as Model Ocean tiles, Surface Temperatures will be Model Derived - # -------------------------------------------------------------------------------------------------- - set GLOBAL_CATCH_DATA = ${l_data}/GEOS5_10arcsec_mask.nc -endif +# Great-Lakes & Caspian-Sea treated as Model LAKE tiles, Surface Temperatures will be Model Derived +# ------------------------------------------------------------------------------------------------- -if( $orslv == O1 ) then - # Great-Lakes & Caspian-Sea treated as Model LAKE tiles, Surface Temperatures will be Model Derived - # ------------------------------------------------------------------------------------------------- - set GLOBAL_CATCH_DATA = ${l_data}/global.cat_id.catch.DL -endif + if ( $lbcsv == F25 | $lbcsv == GM4 | $lbcsv == ICA ) then + set GLOBAL_CATCH_DATA = ${l_data}/global.cat_id.catch.DL + else + set GLOBAL_CATCH_DATA = ${l_data}/GEOS5_10arcsec_mask_freshwater-lakes.nc + endif + + +else if ( $orslv == O2 | $orslv == O3 | $orslv == CS ) then + +# Great-Lakes & Caspian-Sea treated as Model OCEAN tiles, Surface Temperatures will be taken from OCEAN SST Data +# -------------------------------------------------------------------------------------------------------------- + + if ( $lbcsv == F25 | $lbcsv == GM4 | $lbcsv == ICA ) then + set GLOBAL_CATCH_DATA = ${l_data}/global.cat_id.catch.GreatLakesCaspian_Updated.DL + else + set GLOBAL_CATCH_DATA = ${l_data}/GEOS5_10arcsec_mask.nc + endif + +else + + echo " !!!! Invalid Ocean Resolution, stopping !!!! " + exit -if( $orslv == O2 | $orslv == CS ) then - # Great-Lakes & Caspian-Sea treated as Model OCEAN tiles, Surface Temperatures will be taken from OCEAN SST Data - # -------------------------------------------------------------------------------------------------------------- - set GLOBAL_CATCH_DATA = ${l_data}/global.cat_id.catch.GreatLakesCaspian_Updated.DL endif -if( $orslv == O3 ) then - # Great-Lakes & Caspian-Sea treated as Model OCEAN tiles, Surface Temperatures will be taken from OCEAN SST Data - # -------------------------------------------------------------------------------------------------------------- - set GLOBAL_CATCH_DATA = ${l_data}/global.cat_id.catch.GreatLakesCaspian_Updated.DL +if($HRCODES == m1 | $HRCODES == m3 | $HRCODES == m9 | $HRCODES == m36 | $HRCODES == m25) then + set GLOBAL_CATCH_DATA = ${l_data}/GEOS5_10arcsec_mask.nc endif - set MASKFILE = `echo ${GLOBAL_CATCH_DATA} | rev | cut -d / -f1 | rev ` +set MASKFILE = `echo ${GLOBAL_CATCH_DATA} | rev | cut -d / -f1 | rev ` + +####################################################################### echo "" @@ -208,22 +282,18 @@ set LATLON_OCEAN = FALSE set TRIPOL_OCEAN = FALSE set CUBED_SPHERE_OCEAN = FALSE -if( $orslv == O1 | $orslv == NL1 ) then +if( $orslv == O1 ) then @ imo = 360 # Lat/Lon Data-Ocean (Reynolds 1-deg) @ jmo = 180 # Lat/Lon Data-Ocean (Reynolds 1-deg) endif -if( $orslv == O2 | $orslv == NL2 ) then +if( $orslv == O2 ) then @ imo = 1440 # Lat/Lon Data-Ocean (Reynolds 1/4-deg) @ jmo = 720 # Lat/Lon Data-Ocean (Reynolds 1/4-deg) endif -if( $orslv == O3 | $orslv == NL3 ) then +if( $orslv == O3 ) then @ imo = 2880 # Lat/Lon Data-Ocean (OSTIA 1/8-deg) @ jmo = 1440 # Lat/Lon Data-Ocean (OSTIA 1/8-deg) endif -if( $orslv == T1 ) then - @ imo = 120 # MOM Tripolar-Ocean - @ jmo = 65 # MOM Tripolar-Ocean -endif if( $orslv == T2 ) then @ imo = 360 # MOM Tripolar-Ocean @ jmo = 200 # MOM Tripolar-Ocean @@ -236,18 +306,37 @@ if( $orslv == T4 ) then @ imo = 1440 # MOM Tripolar-Ocean @ jmo = 1080 # MOM Tripolar-Ocean endif +if( $orslv == T1MOM6 ) then + @ imo = 72 # MOM6 Tripolar-Ocean + @ jmo = 36 # MOM6 Tripolar-Ocean +endif +if( $orslv == T2MOM6 ) then + @ imo = 360 # MOM6 Tripolar-Ocean + @ jmo = 210 # MOM6 Tripolar-Ocean +endif +if( $orslv == T4MOM6 ) then + @ imo = 1440 # MOM6 Tripolar-Ocean + @ jmo = 1080 # MOM6 Tripolar-Ocean +endif -if( $orslv == NL1 | $orslv == NL2 | $orslv == NL3 | $orslv == O1 | $orslv == O2| $orslv == O3 ) then +if( $orslv == O1 | $orslv == O2| $orslv == O3 ) then set LATLON_OCEAN = TRUE set DATENAME = DE set POLENAME = PE endif -if( $orslv == T1 | $orslv == T2 | $orslv == T3 | $orslv == T4 ) then +set MOM_VERSION = MOM5 +if( $orslv == T2 | $orslv == T3 | $orslv == T4 ) then set TRIPOL_OCEAN = TRUE + set MOM_VERSION = MOM5 + set DATENAME = TM + set POLENAME = TM +else if ( $orslv == T1MOM6 | $orslv == T2MOM6 | $orslv == T4MOM6 ) then + set TRIPOL_OCEAN = TRUE + set MOM_VERSION = MOM6 set DATENAME = TM set POLENAME = TM endif -if( $orslv == CS | $orslv == NCS ) set CUBED_SPHERE_OCEAN = TRUE +if( $orslv == CS ) set CUBED_SPHERE_OCEAN = TRUE # ------------------------------------- # Loop over All Atmospheric Resolutions @@ -375,6 +464,18 @@ if( $HRCODE == c5760 ) then @ NX = 43200 @ NY = 21600 endif +if( $HRCODE == m1 ) then + set im = 34704 + set jm = 14616 + set grid = ease + set MGRID = M01 +endif +if( $HRCODE == m3 ) then + set im = 11568 + set jm = 4872 + set grid = ease + set MGRID = M03 +endif if( $HRCODE == m9 ) then set im = 3856 set jm = 1624 @@ -393,13 +494,44 @@ if( $HRCODE == m25 ) then set grid = ease set MGRID = M25 endif -if( $MASKFILE == GEOS5_10arcsec_mask_freshwater-lakes.nc | $MASKFILE == GEOS5_10arcsec_mask.nc ) then - @ NX = 43200 - @ NY = 21600 -endif + if( $MASKFILE == GEOS5_10arcsec_mask_freshwater-lakes.nc | $MASKFILE == GEOS5_10arcsec_mask.nc ) then + @ NX = 43200 + @ NY = 21600 + endif set OUTDIR = `date +'%Y%m%d%H%M%S'` +# ------------------------- +# Get SPONSOR GROUP ID +# ------------------------- + +set group = "" +set sponsorinfo = `getsponsor` + +while ("$group" == "") + @ n = 1 + while ($n < $#sponsorinfo) + if ($sponsorinfo[$n] =~ g[0..9]*) then + set group = $sponsorinfo[$n] + #--break # uncomment this line to make 1st entry the default + endif + @ n++ + end + + getsponsor + if ("$group" != "") then + echo -n "select group: [$group] " + else + echo -n "select group: " + endif + + set reponse = $< + if ("$reponse" != "") set group = $reponse + +end + +mkdir -p $pwd/logs + ####################################################################### # LatLon Case ####################################################################### @@ -426,16 +558,27 @@ echo "${C1} Creating:${CR} ${C2}$BCJOB${CR}" cat << _EOF_ > $BCJOB #!/bin/csh -x +#SBATCH --output=$pwd/logs/$BCNAME.log +#SBATCH --error=$pwd/logs/$BCNAME.err +#SBATCH --account=$group +#SBATCH --time=12:00:00 +#SBATCH --ntasks=28 +#SBATCH --job-name=$BCNAME.j +#SBATCH --chdir=$pwd/$BCDIR +#SBATCH --constraint=sky + setenv ESMADIR $ESMADIR cd $pwd cd $BCDIR /bin/ln -s $pwd/bin -mkdir -p til rst data/MOM clsm/plots -ln -s /home/yvikhlia/nobackup/coupled/Forcings/a90x540_o360x200/INPUT/ data/MOM/360x200 -ln -s /home/yvikhlia/nobackup/coupled/Forcings/a90x540_o720x410/INPUT/ data/MOM/720x410 -ln -s /home/yvikhlia/nobackup/coupled/Forcings/a180x1080_o1440x1080/INPUT/ data/MOM/1440x1080 +mkdir -p til rst data/MOM5 data/MOM6 clsm/plots +ln -s /discover/nobackup/projects/gmao/ssd/aogcm/ocean_bcs/MOM5/360x200 data/MOM5/360x200 +ln -s /discover/nobackup/projects/gmao/ssd/aogcm/ocean_bcs/MOM5/720x410 data/MOM5/720x410 +ln -s /discover/nobackup/projects/gmao/ssd/aogcm/ocean_bcs/MOM5/1440x1080 data/MOM5/1440x1080 +ln -s /discover/nobackup/projects/gmao/ssd/aogcm/ocean_bcs/MOM6/72x36 data/MOM6/72x36 +ln -s /discover/nobackup/projects/gmao/ssd/aogcm/ocean_bcs/MOM6/1440x1080 data/MOM6/1440x1080 cd data ln -s $l_data CATCH @@ -445,6 +588,7 @@ cd ../ if( -e DC${IM}xPC${JM}_${DATENAME}${IMO}x${POLENAME}${JMO}.stdout ) /bin/rm -f DC${IM}xPC${JM}_${DATENAME}${IMO}x${POLENAME}${JMO}.stdout setenv MASKFILE $MASKFILE source bin/g5_modules +limit stacksize unlimited bin/mkLatLonRaster.x -x ${NX} -y ${NY} -t -1 ${IM} ${JM} >/dev/null bin/mkLandRaster.x -x ${NX} -y ${NY} -v -t ${NT} @@ -452,25 +596,38 @@ if( $LATLON_OCEAN == TRUE ) then bin/mkLatLonRaster.x -x ${NX} -y ${NY} -b DE -p PE -t 0 ${IMO} ${JMO} >/dev/null bin/CombineRasters.x -f 0 -t ${NT} DE${IMO}xPE${JMO} Pfafstetter >/dev/null bin/CombineRasters.x -t ${NT} DC${IM}xPC${JM} DE${IMO}xPE${JMO}-Pfafstetter - bin/mkCatchParam.x -x ${NX} -y ${NY} -g DC${IM}xPC${JM}_DE${IMO}xPE${JMO}-Pfafstetter + setenv OMP_NUM_THREADS 1 + if ($SKIPLAND != YES) bin/mkCatchParam.x -x ${NX} -y ${NY} -g DC${IM}xPC${JM}_DE${IMO}xPE${JMO}-Pfafstetter -v $lbcsv setenv OMP_NUM_THREADS ${NCPUS} - bin/mkCatchParam.x -x ${NX} -y ${NY} -g DC${IM}xPC${JM}_DE${IMO}xPE${JMO}-Pfafstetter + if ($SKIPLAND != YES) bin/mkCatchParam.x -x ${NX} -y ${NY} -g DC${IM}xPC${JM}_DE${IMO}xPE${JMO}-Pfafstetter -v $lbcsv + chmod 755 bin/create_README.csh + bin/create_README.csh endif if( $TRIPOL_OCEAN == TRUE ) then - bin/mkMOMAquaRaster.x -x $NX -y $NY data/MOM/${imo}x${jmo}/grid_spec.nc > /dev/null + bin/mkMOMAquaRaster.x -x $NX -y $NY data/${MOM_VERSION}/${imo}x${jmo}/MAPL_Tripolar.nc > /dev/null + /bin/cp til/Pfafstetter.til til/Pfafstetter-ORIG.til + /bin/cp rst/Pfafstetter.rst rst/Pfafstetter-ORIG.rst + bin/FillMomGrid.x -f 0 -g Pfafstetter-M ${DATENAME}${IMO}x${POLENAME}${JMO} Pfafstetter data/${MOM_VERSION}/${imo}x${jmo}/MAPL_Tripolar.nc + /bin/mv til/Pfafstetter-M.til til/Pfafstetter.til + /bin/mv rst/Pfafstetter-M.rst rst/Pfafstetter.rst bin/CombineRasters.x -f 0 -t ${NT} ${DATENAME}${IMO}x${POLENAME}${JMO} Pfafstetter >/dev/null bin/CombineRasters.x -t ${NT} DC${IM}xPC${JM} ${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter bin/mk_runofftbl.x DC${IM}xPC${JM}_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter - bin/mkCatchParam.x -x ${NX} -y ${NY} -g DE${IMO}xPE${JMO}_DE${IMO}xPE${JMO}-Pfafstetter + setenv OMP_NUM_THREADS 1 + if ($SKIPLAND != YES) bin/mkCatchParam.x -x ${NX} -y ${NY} -g DE${IMO}xPE${JMO}_DE${IMO}xPE${JMO}-Pfafstetter -v $lbcsv setenv OMP_NUM_THREADS ${NCPUS} - bin/mkCatchParam.x -x ${NX} -y ${NY} -g DE${IMO}xPE${JMO}_DE${IMO}xPE${JMO}-Pfafstetter + if ($SKIPLAND != YES) bin/mkCatchParam.x -x ${NX} -y ${NY} -g DE${IMO}xPE${JMO}_DE${IMO}xPE${JMO}-Pfafstetter -v $lbcsv + chmod 755 bin/create_README.csh + bin/create_README.csh endif /bin/mv clsm clsm.${IM}x${JM} /bin/cp til/DC${IM}xPC${JM}_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.til clsm.${IM}x${JM} +if( $TRIPOL_OCEAN == TRUE ) /bin/cp til/CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.TRN clsm.${IM}x${JM} /bin/rm clsm.${IM}x${JM}/DC${IM}xPC${JM}_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.file cd clsm.${IM}x${JM} + /bin/mv irrig.dat irrigation_${RS}_DC.dat /bin/mv vegdyn.data vegdyn_${RS}_DC.dat /bin/mv nirdf.dat nirdf_${RS}_DC.dat /bin/mv visdf.dat visdf_${RS}_DC.dat @@ -535,6 +692,9 @@ cd ../../ /bin/mv $BCJOB $BCNAME /bin/rm -r $OUTDIR +#mkdir -p IRRIG/$BCNAME/clsm +#bin/mkIrrigTiles.x -b $BCNAME -t DC${IM}xPC${JM}_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.til -r _${RS}_DC -p $IRRIGTHRES + _EOF_ chmod 755 $BCJOB set make_bcs_jobs = `echo $make_bcs_jobs $BCJOB` @@ -570,19 +730,232 @@ mkdir -p $BCDIR echo "${C1} Creating:${CR} ${C2}$BCJOB${CR}" /bin/rm -f $BCJOB +if ($HRCODE == c2880 | $HRCODE == c3072 | $HRCODE == c5760) then +cat << _EOF_ > $BCJOB +#!/bin/csh -x + +#SBATCH --output=$pwd/logs/$BCNAME.log +#SBATCH --error=$pwd/logs/$BCNAME.err +#SBATCH --account=$group +#SBATCH --time=12:00:00 +#SBATCH --ntasks=1 +#SBATCH --job-name=$BCNAME.j +#SBATCH --chdir=$pwd/$BCDIR +#SBATCH --constraint=sky + +setenv ESMADIR $ESMADIR + +cd $pwd +cd $BCDIR + +/bin/ln -s $pwd/bin +mkdir -p til rst data/MOM5 data/MOM6 clsm/plots +ln -s /discover/nobackup/projects/gmao/ssd/aogcm/ocean_bcs/MOM5/360x200 data/MOM5/360x200 +ln -s /discover/nobackup/projects/gmao/ssd/aogcm/ocean_bcs/MOM5/720x410 data/MOM5/720x410 +ln -s /discover/nobackup/projects/gmao/ssd/aogcm/ocean_bcs/MOM5/1440x1080 data/MOM5/1440x1080 +ln -s /discover/nobackup/projects/gmao/ssd/aogcm/ocean_bcs/MOM6/72x36 data/MOM6/72x36 +ln -s /discover/nobackup/projects/gmao/ssd/aogcm/ocean_bcs/MOM6/1440x1080 data/MOM6/1440x1080 + +cd data +ln -s $l_data CATCH + +cd ../ + +if( -e CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}.stdout ) /bin/rm -f CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}.stdout +setenv MASKFILE $MASKFILE +source bin/g5_modules +limit stacksize unlimited +bin/mkCubeFVRaster.x -x ${NX} -y ${NY} ${NC} >/dev/null +bin/mkLandRaster.x -x ${NX} -y ${NY} -v -t ${NT} + +if( $LATLON_OCEAN == TRUE ) then + bin/mkLatLonRaster.x -x ${NX} -y ${NY} -b DE -p PE -t 0 ${IMO} ${JMO} >/dev/null + bin/CombineRasters.x -f 0 -t ${NT} DE${IMO}xPE${JMO} Pfafstetter >/dev/null + bin/CombineRasters.x -t ${NT} CF${NC}x6C DE${IMO}xPE${JMO}-Pfafstetter + setenv OMP_NUM_THREADS 1 + if ($SKIPLAND != YES) bin/mkCatchParam.x -x ${NX} -y ${NY} -g CF${NC}x6C_DE${IMO}xPE${JMO}-Pfafstetter -v $lbcsv +endif + +if( $TRIPOL_OCEAN == TRUE ) then + bin/mkMOMAquaRaster.x -x ${NX} -y ${NY} data/${MOM_VERSION}/${imo}x${jmo}/MAPL_Tripolar.nc > /dev/null + /bin/cp til/Pfafstetter.til til/Pfafstetter-ORIG.til + /bin/cp rst/Pfafstetter.rst rst/Pfafstetter-ORIG.rst + bin/FillMomGrid.x -f 0 -g Pfafstetter-M ${DATENAME}${IMO}x${POLENAME}${JMO} Pfafstetter data/${MOM_VERSION}/${imo}x${jmo}/MAPL_Tripolar.nc + /bin/mv til/Pfafstetter-M.til til/Pfafstetter.til + /bin/mv rst/Pfafstetter-M.rst rst/Pfafstetter.rst + bin/CombineRasters.x -f 0 -t ${NT} ${DATENAME}${IMO}x${POLENAME}${JMO} Pfafstetter >/dev/null + bin/CombineRasters.x -t ${NT} CF${NC}x6C ${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter + bin/mk_runofftbl.x CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter + setenv OMP_NUM_THREADS 1 + if ($SKIPLAND != YES) bin/mkCatchParam.x -x ${NX} -y ${NY} -g CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter -v $lbcsv +endif + +if( $CUBED_SPHERE_OCEAN == TRUE ) then + bin/CombineRasters.x -f 0 -t ${NT} CF${NC}x6C Pfafstetter >/dev/null + bin/CombineRasters.x -t ${NT} CF${NC}x6C CF${NC}x6C-Pfafstetter + setenv OMP_NUM_THREADS 1 + if ($SKIPLAND != YES) bin/mkCatchParam.x -x ${NX} -y ${NY} -g CF${NC}x6C_CF${NC}x6C-Pfafstetter -v $lbcsv +endif +_EOF_ + +chmod 755 $BCJOB +set make_bcs_jobs = `echo $make_bcs_jobs $BCJOB` + +cat << _EOF_ > $BCJOB-2 +#!/bin/csh -x + +#SBATCH --output=$pwd/logs/$BCNAME-2.log +#SBATCH --error=$pwd/logs/$BCNAME-2.err +#SBATCH --account=$group +#SBATCH --time=12:00:00 +#SBATCH --ntasks=28 +#SBATCH --job-name=$BCNAME-2.j +#SBATCH --chdir=$pwd/$BCDIR +#SBATCH --constraint=sky + +setenv ESMADIR $ESMADIR + +cd $pwd +cd $BCDIR + +setenv MASKFILE $MASKFILE +source bin/g5_modules +limit stacksize unlimited + +if( $LATLON_OCEAN == TRUE ) then + setenv OMP_NUM_THREADS ${NCPUS} + if ($SKIPLAND != YES) bin/mkCatchParam.x -x ${NX} -y ${NY} -g CF${NC}x6C_DE${IMO}xPE${JMO}-Pfafstetter -v $lbcsv + chmod 755 bin/create_README.csh + bin/create_README.csh +endif + +if( $TRIPOL_OCEAN == TRUE ) then + setenv OMP_NUM_THREADS ${NCPUS} + if ($SKIPLAND != YES) bin/mkCatchParam.x -x ${NX} -y ${NY} -g CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter -v $lbcsv + chmod 755 bin/create_README.csh + bin/create_README.csh +endif + +if( $CUBED_SPHERE_OCEAN == TRUE ) then + setenv OMP_NUM_THREADS ${NCPUS} + if ($SKIPLAND != YES) bin/mkCatchParam.x -x ${NX} -y ${NY} -g CF${NC}x6C_CF${NC}x6C-Pfafstetter -v $lbcsv + chmod 755 bin/create_README.csh + bin/create_README.csh +endif + +/bin/mv clsm clsm.C${NC} +/bin/cp til/CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.til clsm.C${NC} +if( $TRIPOL_OCEAN == TRUE ) /bin/cp til/CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.TRN clsm.C${NC} +/bin/rm clsm.C${NC}/CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.file + +cd clsm.C${NC} + /bin/mv irrig.dat irrigation_${RC}.dat + /bin/mv vegdyn.data vegdyn_${RC}.dat + /bin/mv nirdf.dat nirdf_${RC}.dat + /bin/mv visdf.dat visdf_${RC}.dat + /bin/mv lai.dat lai_clim_${RC}.data + /bin/mv green.dat green_clim_${RC}.data + /bin/mv lnfm.dat lnfm_clim_${RC}.data + /bin/mv ndvi.dat ndvi_clim_${RC}.data + /bin/mv MODELFPARmean.dat MODELFPARmean_${RC}.dat + /bin/mv MODELFPARstd.dat MODELFPARstd_${RC}.dat + /bin/mv MODISFPARmean.dat MODISFPARmean_${RC}.dat + /bin/mv MODISFPARstd.dat MODISFPARstd_${RC}.dat + /bin/mv MODISNIRmean.dat MODISNIRmean_${RC}.dat + /bin/mv MODISNIRstd.dat MODISNIRstd_${RC}.dat + /bin/mv MODISVISmean.dat MODISVISmean_${RC}.dat + /bin/mv MODISVISstd.dat MODISVISstd_${RC}.dat + +/bin/rm -f sedfile +if( $CUBED_SPHERE_OCEAN == TRUE ) then +cat > sedfile << EOF +s/${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter/OC${nc}x${nc6}-CF/g +s/CF${NC}x6C/PE${nc}x${nc6}-CF/g +EOF +sed -f sedfile CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.til > tile.file +/bin/mv -f tile.file CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.til +/bin/rm -f sedfile +else +cat > sedfile << EOF +s/CF${NC}x6C/PE${nc}x${nc6}-CF/g +s/${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter/PE${imo}x${jmo}-${DATENAME}/g +EOF +sed -f sedfile CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.til > tile.file +/bin/mv -f tile.file CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.til +/bin/rm -f sedfile +endif + +cd ../ + +/bin/rm -rf CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO} +/bin/mv clsm.C${NC} CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO} + cd CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO} + mkdir clsm + /bin/mv ar.new \ + bf.dat \ + ts.dat \ + catchment.def \ + cti_stats.dat \ + tau_param.dat \ + soil_param.dat \ + mosaic_veg_typs_fracs \ + soil_param.first \ + README \ + bad_sat_param.tiles \ + lai.* \ + AlbMap* \ + plots \ + CLM_veg_typs_fracs \ + CLM4.5_veg_typs_fracs \ + mkCatchParam.log \ + CLM_NDep_SoilAlb_T2m \ + CLM4.5_abm_peatf_gdp_hdm_fc \ + catch_params.nc4 \ + catchcn_params.nc4 \ + country_and_state_code.data \ + clsm + cd ../ + +/bin/mv rst CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO} +/bin/mv til CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO} +/bin/mv $BCJOB-2 CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}/. +cd ../../ +/bin/mv $BCDIR/$BCNAME . +/bin/mv $BCJOB-2 $BCNAME +/bin/rm -r $OUTDIR + +#mkdir -p IRRIG/$BCNAME/clsm +#bin/mkIrrigTiles.x -b $BCNAME -t CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.til -r _${RC} -p $IRRIGTHRES + +_EOF_ +chmod 755 $BCJOB-2 +set make_bcs_jobs = `echo $make_bcs_jobs $BCJOB-2` + +else cat << _EOF_ > $BCJOB #!/bin/csh -x +#SBATCH --output=$pwd/logs/$BCNAME.log +#SBATCH --error=$pwd/logs/$BCNAME.err +#SBATCH --account=$group +#SBATCH --time=12:00:00 +#SBATCH --ntasks=28 +#SBATCH --job-name=$BCNAME.j +#SBATCH --chdir=$pwd/$BCDIR +#SBATCH --constraint=sky + setenv ESMADIR $ESMADIR cd $pwd cd $BCDIR /bin/ln -s $pwd/bin -mkdir -p til rst data/MOM clsm/plots -ln -s /home/yvikhlia/nobackup/coupled/Forcings/a90x540_o360x200/INPUT/ data/MOM/360x200 -ln -s /home/yvikhlia/nobackup/coupled/Forcings/a90x540_o720x410/INPUT/ data/MOM/720x410 -ln -s /home/yvikhlia/nobackup/coupled/Forcings/a180x1080_o1440x1080/INPUT/ data/MOM/1440x1080 +mkdir -p til rst data/MOM5 data/MOM6 clsm/plots +ln -s /discover/nobackup/projects/gmao/ssd/aogcm/ocean_bcs/MOM5/360x200 data/MOM5/360x200 +ln -s /discover/nobackup/projects/gmao/ssd/aogcm/ocean_bcs/MOM5/720x410 data/MOM5/720x410 +ln -s /discover/nobackup/projects/gmao/ssd/aogcm/ocean_bcs/MOM5/1440x1080 data/MOM5/1440x1080 +ln -s /discover/nobackup/projects/gmao/ssd/aogcm/ocean_bcs/MOM6/72x36 data/MOM6/72x36 +ln -s /discover/nobackup/projects/gmao/ssd/aogcm/ocean_bcs/MOM6/1440x1080 data/MOM6/1440x1080 cd data ln -s $l_data CATCH @@ -592,6 +965,7 @@ cd ../ if( -e CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}.stdout ) /bin/rm -f CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}.stdout setenv MASKFILE $MASKFILE source bin/g5_modules +limit stacksize unlimited bin/mkCubeFVRaster.x -x ${NX} -y ${NY} ${NC} >/dev/null bin/mkLandRaster.x -x ${NX} -y ${NY} -v -t ${NT} @@ -599,34 +973,50 @@ if( $LATLON_OCEAN == TRUE ) then bin/mkLatLonRaster.x -x ${NX} -y ${NY} -b DE -p PE -t 0 ${IMO} ${JMO} >/dev/null bin/CombineRasters.x -f 0 -t ${NT} DE${IMO}xPE${JMO} Pfafstetter >/dev/null bin/CombineRasters.x -t ${NT} CF${NC}x6C DE${IMO}xPE${JMO}-Pfafstetter - bin/mkCatchParam.x -x ${NX} -y ${NY} -g CF${NC}x6C_DE${IMO}xPE${JMO}-Pfafstetter + setenv OMP_NUM_THREADS 1 + if ($SKIPLAND != YES) bin/mkCatchParam.x -x ${NX} -y ${NY} -g CF${NC}x6C_DE${IMO}xPE${JMO}-Pfafstetter -v $lbcsv setenv OMP_NUM_THREADS ${NCPUS} - bin/mkCatchParam.x -x ${NX} -y ${NY} -g CF${NC}x6C_DE${IMO}xPE${JMO}-Pfafstetter + if ($SKIPLAND != YES) bin/mkCatchParam.x -x ${NX} -y ${NY} -g CF${NC}x6C_DE${IMO}xPE${JMO}-Pfafstetter -v $lbcsv + chmod 755 bin/create_README.csh + bin/create_README.csh endif if( $TRIPOL_OCEAN == TRUE ) then - bin/mkMOMAquaRaster.x -x ${NX} -y ${NY} data/MOM/${imo}x${jmo}/grid_spec.nc > /dev/null + bin/mkMOMAquaRaster.x -x ${NX} -y ${NY} data/${MOM_VERSION}/${imo}x${jmo}/MAPL_Tripolar.nc > /dev/null + /bin/cp til/Pfafstetter.til til/Pfafstetter-ORIG.til + /bin/cp rst/Pfafstetter.rst rst/Pfafstetter-ORIG.rst + bin/FillMomGrid.x -f 0 -g Pfafstetter-M ${DATENAME}${IMO}x${POLENAME}${JMO} Pfafstetter data/${MOM_VERSION}/${imo}x${jmo}/MAPL_Tripolar.nc + /bin/mv til/Pfafstetter-M.til til/Pfafstetter.til + /bin/mv rst/Pfafstetter-M.rst rst/Pfafstetter.rst bin/CombineRasters.x -f 0 -t ${NT} ${DATENAME}${IMO}x${POLENAME}${JMO} Pfafstetter >/dev/null bin/CombineRasters.x -t ${NT} CF${NC}x6C ${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter bin/mk_runofftbl.x CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter - bin/mkCatchParam.x -x ${NX} -y ${NY} -g CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter + setenv OMP_NUM_THREADS 1 + if ($SKIPLAND != YES) bin/mkCatchParam.x -x ${NX} -y ${NY} -g CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter -v $lbcsv setenv OMP_NUM_THREADS ${NCPUS} - bin/mkCatchParam.x -x ${NX} -y ${NY} -g CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter + if ($SKIPLAND != YES) bin/mkCatchParam.x -x ${NX} -y ${NY} -g CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter -v $lbcsv + chmod 755 bin/create_README.csh + bin/create_README.csh endif if( $CUBED_SPHERE_OCEAN == TRUE ) then bin/CombineRasters.x -f 0 -t ${NT} CF${NC}x6C Pfafstetter >/dev/null bin/CombineRasters.x -t ${NT} CF${NC}x6C CF${NC}x6C-Pfafstetter - bin/mkCatchParam.x -x ${NX} -y ${NY} -g CF${NC}x6C_CF${NC}x6C-Pfafstetter + setenv OMP_NUM_THREADS 1 + if ($SKIPLAND != YES) bin/mkCatchParam.x -x ${NX} -y ${NY} -g CF${NC}x6C_CF${NC}x6C-Pfafstetter -v $lbcsv setenv OMP_NUM_THREADS ${NCPUS} - bin/mkCatchParam.x -x ${NX} -y ${NY} -g CF${NC}x6C_CF${NC}x6C-Pfafstetter + if ($SKIPLAND != YES) bin/mkCatchParam.x -x ${NX} -y ${NY} -g CF${NC}x6C_CF${NC}x6C-Pfafstetter -v $lbcsv + chmod 755 bin/create_README.csh + bin/create_README.csh endif /bin/mv clsm clsm.C${NC} /bin/cp til/CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.til clsm.C${NC} +if( $TRIPOL_OCEAN == TRUE ) /bin/cp til/CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.TRN clsm.C${NC} /bin/rm clsm.C${NC}/CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.file cd clsm.C${NC} + /bin/mv irrig.dat irrigation_${RC}.dat /bin/mv vegdyn.data vegdyn_${RC}.dat /bin/mv nirdf.dat nirdf_${RC}.dat /bin/mv visdf.dat visdf_${RC}.dat @@ -701,9 +1091,13 @@ cd ../../ /bin/mv $BCJOB $BCNAME /bin/rm -r $OUTDIR +#mkdir -p IRRIG/$BCNAME/clsm +#bin/mkIrrigTiles.x -b $BCNAME -t CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.til -r _${RC} -p $IRRIGTHRES + _EOF_ chmod 755 $BCJOB set make_bcs_jobs = `echo $make_bcs_jobs $BCJOB` +endif endif # End Cube Test @@ -727,45 +1121,71 @@ set JM = `echo ${jm} | awk '{printf "%4.4i", $1}'` set BCNAME = SMAP_${EVERSION}_${MGRID} set BCDIR = $OUTDIR/$BCNAME.scratch set BCJOB = $BCDIR/$BCNAME.j - +set THISGRID = SMAP-${EVERSION}-${MGRID} if( -e $BCDIR) /bin/rm -r $BCDIR mkdir -p $BCDIR echo "${C1} Creating:${CR} ${C2}$BCJOB${CR}" /bin/rm -f $BCJOB + cat << _EOF_ > $BCJOB #!/bin/csh -x +#SBATCH --output=$pwd/logs/$BCNAME.log +#SBATCH --error=$pwd/logs/$BCNAME.err +#SBATCH --account=$group +#SBATCH --time=12:00:00 +#SBATCH --ntasks=28 +#SBATCH --job-name=$BCNAME.j +#SBATCH --chdir=$pwd/$BCDIR +#SBATCH --constraint=sky + setenv ESMADIR $ESMADIR cd $pwd cd $BCDIR /bin/ln -s $pwd/bin -mkdir -p til rst data/MOM clsm/plots +mkdir -p til rst data/MOM5 data/MOM6 clsm/plots cd data ln -s $l_data CATCH cd ../ source bin/g5_modules +limit stacksize unlimited if ( $EVERSION == EASEv2 ) then setenv MASKFILE ${MASKFILE} -bin/mkSMAPTilesPara_v2.x -smap_grid ${MGRID} +if(${MGRID} == M09 | ${MGRID} == M36) then + bin/mkLandRaster.x -x ${NX} -y ${NY} -v -t ${NT} + bin/mkSMAPTilesPara_v2.x -smap_grid ${MGRID} -pfaf_til T + bin/CombineRasters.x -f 0 -t 232000000 ${THISGRID} Pfafstetter > /dev/null + bin/CombineRasters.x -t 232000000 ${THISGRID} ${THISGRID}-Pfafstetter + /bin/mv til/${THISGRID}_${THISGRID}-Pfafstetter.til til/${THISGRID}_${THISGRID}-Pfafstetter.ind +endif +setenv OMP_NUM_THREADS 1 +bin/mkSMAPTilesPara_v2.x -smap_grid ${MGRID} -v $lbcsv setenv OMP_NUM_THREADS ${NCPUS} head -1 clsm/mkCatchParam.log > smap_cmd chmod 755 smap_cmd ./smap_cmd +chmod 755 bin/create_README.csh +bin/create_README.csh else setenv MASKFILE ${MASKFILE} +setenv OMP_NUM_THREADS 1 bin/mkSMAPTilesPara.x -smap_grid ${MGRID} setenv OMP_NUM_THREADS ${NCPUS} head -1 clsm/mkCatchParam.log > smap_cmd chmod 755 smap_cmd ./smap_cmd +chmod 755 bin/create_README.csh +bin/create_README.csh endif /bin/mv clsm clsm.${IM}x${JM} /bin/cp til/SMAP_${EVERSION}_${MGRID}_${RS}.til clsm.${IM}x${JM} +/bin/cp til//${THISGRID}_${THISGRID}-Pfafstetter.TIL clsm.${IM}x${JM} cd clsm.${IM}x${JM} + /bin/mv irrig.dat irrigation_${RS}_DE.dat /bin/mv vegdyn.data vegdyn_${RS}_DE.dat /bin/mv nirdf.dat nirdf_${RS}_DE.dat /bin/mv visdf.dat visdf_${RS}_DE.dat @@ -826,12 +1246,16 @@ cd ../../ /bin/mv $BCJOB $BCNAME /bin/rm -r $OUTDIR +#mkdir -p IRRIG/$BCNAME/clsm IRRIG/$BCNAME/rst +#bin/mkIrrigTiles.x -x 43200 -y 21600 -b $BCNAME -t SMAP_${EVERSION}_${MGRID}_${RS}.til -r _${RS}_DE -p $IRRIGTHRES +#/bin/cp $BCNAME/${THISGRID}_${THISGRID}-Pfafstetter.TIL IRRIG/$BCNAME/. _EOF_ + + chmod 755 $BCJOB set make_bcs_jobs = `echo $make_bcs_jobs $BCJOB` -endif # End if directory exists +endif # End if directory endif # End ease Test - end # End Atmospheric Resolution Loop # ----------------------------- @@ -840,15 +1264,28 @@ end # End Ocean Resolution Loop ####################################################################### -echo " " -echo "Do you want to submit ${C2}MAKE_BCS${CR} jobs to run in the background? (Y/N)" -echo "-------------------------------------------------------------------" -echo " " -set dummy = `echo $<` -set dummy = `echo $dummy | tr "[:lower:]" "[:upper:]"` -if(.$dummy == .Y | .$dummy == YES ) then - foreach job ($make_bcs_jobs) - nohup ./$job & - end +#echo " " +#echo "Are you planning to run ${C2}MAKE_BCS${CR} jobs on an interactive node? (Y/N)" +#echo "Enter N if you wish to submit to the SLURM queue instead " +#echo "-----------------------------------------------------------------------------" +#echo " " +#set dummy = `echo $<` +#set dummy = `echo $dummy | tr "[:lower:]" "[:upper:]"` +#if(.$dummy == .Y | .$dummy == YES ) then +# foreach job ($make_bcs_jobs) +# nohup ./$job & +# end +#else +foreach job ($make_bcs_jobs) + +set jobid="`sbatch $job | cut -d' ' -f4`" +echo $jobid + +if( -e $job-2) then +set jobid="`sbatch --dependency=afterok:$jobid $make_bcs_jobs[2] | cut -d' ' -f4`" +echo $jobid +exit endif +end +#endif diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mkCatchParam.F90 b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mkCatchParam.F90 index e87ff52ca..73030e0bd 100644 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mkCatchParam.F90 +++ b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mkCatchParam.F90 @@ -4,26 +4,12 @@ PROGRAM mkCatchParam ! ! !ARGUMENTS: ! -! Usage = "mkCatchParam -x nx -y ny -g Gridname -b DL -m MA -l LD -s SD -e EASE" +! Usage = "mkCatchParam -x nx -y ny -g Gridname -b DL -v LBSV -e EASE" ! -x: Size of longitude dimension of input raster. DEFAULT: 8640 ! -y: Size of latitude dimension of input raster. DEFAULT: 4320 ! -b: position of the dateline in the first box. DEFAULT: DC ! -g: Gridname (name of the .til or .rst file without file extension) -! -l: Choice of LAI data set. DEFAULT : MODGEO -! GLASSA : 8-day AVHRR climatology from the period 1981-2017 on 7200x3600 grid -! GLASSM : 8-day MODIS climatology from the period 2000-2017 on 7200x3600 grid -! MODISV6 : 8-day climatology from the period 2002.01-2016.10 on 86400x43200 grid -! MODGEO : MODIS with GEOLAND2 overlaid on South America, Afirca and Australia -! GEOLAND2: 10-day climatology from the period 1999-2011 on 40320x20160 grid -! GSWP2 : Monthly climatology from the period 1982-1998 on 360x180 grid -! MODIS : 8-day climatology from the period 2000-2013 on 43200x21600 grid -! GSWPH : Monthly climatology from the period 1982-1998 on 43200x21600 grid " -! -m: Choice of MODIS Albedo data. DEFAULT : MODIS2 -! MODIS1 : 16-day Climatology from 1'x1 (21600x10800) MODIS data from the period 2000-2004 -! MODIS2 : 8-day Climatology from 30"x30"(43200x21600) MODIS data from the period 2001-2011 -! -s: Choice of soil data. DEFAULT :HWSD -! HWSD : Merged HWSD-STATSGO2 soil properties on 43200x21600 with Woesten et al. (1999) Parameters -! NGDC : Reynolds soil texture clsses on 4320x2160 with GSWP2 soil hydraulic parameters +! -v: LBCSV : use a configuration from GEOS5 bcs directory ICA, NL3, NL4, or NL4p ! -e: EASE : This is optional if catchment.def file is available already or ! the til file format is pre-Fortuna-2. ! @@ -38,36 +24,38 @@ PROGRAM mkCatchParam use rmTinyCatchParaMod use process_hres_data use comp_CATCHCN_AlbScale_parameters, ONLY : albedo4catchcn +! use module_irrig_params, ONLY : create_irrig_params implicit none - integer :: NC = i_raster, NR = j_raster + integer :: NC = i_raster, NR = j_raster + character*4 :: LBSV = 'DEF' character*128 :: GridName = '' character*128 :: ARG, MaskFile character*256 :: CMD character*1 :: opt - character*8 :: LD = 'MODGEO' - character*4 :: SD = 'HWSD' + character*7 :: PEATSOURCE = 'GDLHWSD' + character*3 :: VEGZSOURCE = 'D&S' character*4 :: EASE =' ' - character*2 :: DL ='DC' - character*6 :: MA = 'MODIS2' + character*2 :: DL ='DC' integer :: II, JJ, Type integer :: I, J, iargc, nxt real*8 :: dx, dy, lon0 logical :: regrid - character(len=400), dimension (22) :: Usage + character(len=400), dimension (8) :: Usage character*128 :: Grid2 character*2 :: poles CHARACTER*100 :: gfile,fname,pdir,rstdir character*128 :: GridNameR = '' character*128 :: GridNameT = '' logical :: file_exists - logical, parameter :: F25Tag = .false. + logical :: F25Tag = .false. logical :: ease_grid=.false., redo_modis=.false. character*40 :: lai_name integer, parameter :: log_file = 998 include 'netcdf.inc' - type (regrid_map), allocatable, dimension (:,:) :: maparc30, mapgeoland2,maparc60 + type (regrid_map) :: maparc30, mapgeoland2,maparc60 character*200 :: tmpstring, tmpstring1, tmpstring2 + ! --------- VARIABLES FOR *OPENMP* PARALLEL ENVIRONMENT ------------ ! @@ -107,33 +95,17 @@ PROGRAM mkCatchParam ! !$OMP ENDPARALLEL - print *, running_omp , n_threads - ! call system('cd data/ ; ln -s /discover/nobackup/projects/gmao/ssd/land/l_data/LandBCs_files_for_mkCatchParam/V001/ CATCH') ! call system('cd ..') - USAGE(1) ="Usage: mkCatchParam -x nx -y ny -g Gridname -b DL -m MA -l LD -s SD -e EASE " + USAGE(1) ="Usage: mkCatchParam -x nx -y ny -g Gridname -b DL -v LBCSV -e EASE " USAGE(2) =" -x: Size of longitude dimension of input raster. DEFAULT: 8640 " USAGE(3) =" -y: Size of latitude dimension of input raster. DEFAULT: 4320 " USAGE(4) =" -g: Gridname (name of the .til or .rst file without file extension) " USAGE(5) =" -b: Position of the dateline in the first grid box (DC or DE). DEFAULT: DC " - USAGE(6) =" -l: Choice of LAI data set. DEFAULT : MODGEO " - USAGE(7) =" GLASSA : 8-day AVHRR climatology from the period 1981-2017 on 7200x3600 grid " - USAGE(8) =" GLASSM : 8-day MODIS climatology from the period 2000-2017 on 7200x3600 grid " - USAGE(9) =" MODISV6 : 8-day climatology from the period 2002.01-2016.10 on 86400x43200 grid " - USAGE(10)=" MODGEO : MODIS with GEOLAND2 overlaid on South America, Africa and Australia " - USAGE(11)=" GEOLAND2: 10-day climatology from the period 1999-2011 on 40320x20160 grid " - USAGE(12)=" GSWP2 : Monthly climatology from the period 1982-1998 on 360x180 grid " - USAGE(13)=" GSWPH : Monthly climatology from the period 1982-1998 on 43200x21600 grid " - USAGE(14)=" MODIS : 8-day climatology from the period 2000-2013 on 43200x21600 grid " - USAGE(15)=" -s: Choice of soil data. DEFAULT :HWSD " - USAGE(16)=" HWSD : Merged HWSD-STATSGO2 soil properties on 43200x21600 with Woesten (1999) Parameters" - USAGE(17)=" NGDC : Reynolds soil texture classes on 4320x2160 with GSWP2 soil hydraulic parameters " - USAGE(18)=" -m: Choice of MODIS Albedo data. DEFAULT : MODIS2 " - USAGE(19)=" MODIS1: 16-day Climatology from 1'x1'(21600x10800) MODIS data from the period 2000-2004 " - USAGE(20)=" MODIS2: 8-day Climatology from 0.5'x0.5'(43200x21600) MODIS data from period 2001-2011 " - USAGE(21)=" -e: EASE : This is optional if catchment.def file is available already or " - USAGE(22)=" the til file format is pre-Fortuna-2. " + USAGE(6) =" -e: EASE : This is optional if catchment.def file is available already or " + USAGE(7) =" the til file format is pre-Fortuna-2. " + USAGE(8) =" -v LBCSV : use a configuration from GEOS5 bcs directory F25, GM4, ICA, NL3, NL4, or NL4p " ! Process Arguments !------------------ @@ -145,12 +117,11 @@ PROGRAM mkCatchParam else open (log_file, file ='clsm/mkCatchParam.log', status='unknown', form='formatted',action='write') write (log_file,'(a)')trim(cmd) - write (log_file,'(a6,a3,L1)')'F25Tag',' : ' ,F25Tag + write (log_file,'(a)')' ' endif I = iargc() - - if(I < 1 .or. I > 16) then + if(I < 1 .or. I > 10) then write (log_file,'(a)') "Wrong Number of arguments: ", i do j = 1,size(usage) print "(sp,a100)", Usage(j) @@ -163,7 +134,7 @@ PROGRAM mkCatchParam do while(arg(1:1)=='-') opt=arg(2:2) if(len(trim(arg))==2) then - if(scan(opt,'zvh')==0) then + if(scan(opt,'zh')==0) then nxt = nxt + 1 call getarg(nxt,arg) endif @@ -177,14 +148,12 @@ PROGRAM mkCatchParam read(arg,'(i6)') nr case ('g') GridName = trim(arg) - case ('l') - LD = trim(arg) - case ('s') - SD = trim(arg) + case ('v') + LBSV = trim(arg) + if (trim(arg).eq."F25") F25Tag = .true. + call init_bcs_config (trim(LBSV)) case ('b') DL = trim(arg) - case ('m') - MA = trim(arg) case ('e') EASE = trim(arg) if(EASE=='EASE') ease_grid=.true. @@ -198,16 +167,6 @@ PROGRAM mkCatchParam call getarg(nxt,arg) end do - if(F25Tag) then -! -! Going back to f2.5 tag -! - LD ='GSWP2' - MA ='MODIS1' - SD ='HWSD' - - endif - call getenv ("MASKFILE" ,MaskFile ) if(trim(Gridname) == '') then @@ -225,12 +184,17 @@ PROGRAM mkCatchParam GridnameT='til/'//trim(Gridname) endif + if(process_peat) PEATSOURCE = 'PEATMAP' + if(jpl_height) VEGZSOURCE = 'JPL' + if(n_threads == 1) then - write (log_file,'(a)')trim(LD) - write (log_file,'(a)')trim(MA) - write (log_file,'(a)')trim(SD) + write (log_file,'(a)')trim(LAIBCS) + write (log_file,'(a)')trim(MODALB) + write (log_file,'(a)')trim(SOILBCS) write (log_file,'(a)')trim(MaskFile) + write (log_file,'(a)')trim(PEATSOURCE) + write (log_file,'(a)')trim(VEGZSOURCE) write (log_file,'(a)')' ' write (log_file,'(a)')'============================================================' write (log_file,'(a)')'............ Begin CLSM parameter generation:...............' @@ -245,8 +209,9 @@ PROGRAM mkCatchParam DL = 'DE' write (log_file,'(a)')'Cube Grid - assuming DE' endif - - CALL open_landparam_nc4_files + + inquire(file='clsm/catch_params.nc4', exist=file_exists) + if (.not.file_exists) CALL open_landparam_nc4_files ! Creating catchment.def ! ---------------------- @@ -280,10 +245,9 @@ PROGRAM mkCatchParam else inquire(file='clsm/mosaic_veg_typs_fracs', exist=file_exists) - call compute_mosaic_veg_types (nc,nr,ease_grid,regrid,gridnamet,gridnamer) - - write (log_file,'(a)')'Done creating vegetation types using IGBP SiB2 land cover..3' + call compute_mosaic_veg_types (nc,nr,ease_grid,regrid,gridnamet,gridnamer) + write (log_file,'(a)')'Done creating vegetation types using IGBP SiB2 land cover..3' endif ! Processing Vegetation Climatology @@ -291,34 +255,36 @@ PROGRAM mkCatchParam ! creating mapping arrays if necessary - if((trim(LD) == 'MODGEO').or.(trim(LD) == 'GEOLAND2')) then + if((trim(LAIBCS) == 'MODGEO').or.(trim(LAIBCS) == 'GEOLAND2')) then inquire(file='clsm/lai.GEOLAND2_10-DayClim', exist=file_exists) if (.not.file_exists) then - allocate (mapgeoland2 (1:40320,1:20160)) + !allocate (mapgeoland2 (1:40320,1:20160)) call create_mapping (nc,nr,40320,20160,mapgeoland2, gridnamer) lai_name = 'GEOLAND2_10-DayClim/geoland2_' - if(trim(LD) == 'GEOLAND2') then + if(trim(LAIBCS) == 'GEOLAND2') then call hres_lai_no_gswp (40320,20160,mapgeoland2,gridnamer, lai_name) else call hres_lai_no_gswp (40320,20160,mapgeoland2,gridnamer, lai_name, merge=1) endif - if(allocated(mapgeoland2)) deallocate (mapgeoland2) + ! if(allocated(mapgeoland2)) deallocate (mapgeoland2) + deallocate (mapgeoland2%map) + deallocate (mapgeoland2%ij_index) endif endif - if ((LD == 'MODGEO').or.(LD == 'MODIS').or.(MA == 'MODIS2')) then - allocate (maparc30 (1:43200,1:21600)) + if ((LAIBCS == 'MODGEO').or.(LAIBCS == 'MODIS').or.(MODALB == 'MODIS2')) then + ! allocate (maparc30 (1:43200,1:21600)) call create_mapping (nc,nr,43200,21600,maparc30, gridnamer) endif inquire(file='clsm/green.dat', exist=file_exists) if (.not.file_exists) then - if (trim(LD) == 'GSWP2') then + if (trim(LAIBCS) == 'GSWP2') then call process_gswp2_veg (nc,nr,regrid,'grnFrac',gridnamer) else - if (.not. allocated(maparc30)) then - allocate (maparc30 (1:43200,1:21600)) + if (size(maparc30%ij_index,1) /= 43200) then + ! allocate (maparc30 (1:43200,1:21600)) call create_mapping (nc,nr,43200,21600,maparc30, gridnamer) endif call hres_gswp2 (43200,21600, maparc30, gridnamer,'green') @@ -330,39 +296,39 @@ PROGRAM mkCatchParam if (.not.file_exists) then redo_modis = .true. - if (trim(LD) == 'GSWP2') call process_gswp2_veg (nc,nr,regrid,'LAI',gridnamer) - if (trim(LD) == 'GSWPH') then - if (.not. allocated(maparc30)) then - allocate (maparc30 (1:43200,1:21600)) + if (trim(LAIBCS) == 'GSWP2') call process_gswp2_veg (nc,nr,regrid,'LAI',gridnamer) + if (trim(LAIBCS) == 'GSWPH') then + if (size(maparc30%ij_index,1) /= 43200) then + ! allocate (maparc30 (1:43200,1:21600)) call create_mapping (nc,nr,43200,21600,maparc30, gridnamer) endif inquire(file='clsm/lai.MODIS_8-DayClim', exist=file_exists) if (.not.file_exists) call hres_gswp2 (43200,21600, maparc30, gridnamer,'lai') endif - if (trim(LD) == 'MODIS') then + if (trim(LAIBCS) == 'MODIS') then lai_name = 'MODIS_8-DayClim/MODIS_' call hres_lai_no_gswp (43200,21600,maparc30,gridnamer,lai_name) endif - if (trim(LD) == 'MODGEO') then + if (trim(LAIBCS) == 'MODGEO') then lai_name = 'MODIS_8-DayClim/MODIS_' inquire(file='clsm/lai.MODIS_8-DayClim', exist=file_exists) if (.not.file_exists)call hres_lai_no_gswp (43200,21600,maparc30,gridnamer,lai_name, merge=1) call merge_lai_data (MaskFile) endif - if (trim(LD) == 'MODISV6') then + if (trim(LAIBCS) == 'MODISV6') then lai_name = 'MCD15A2H.006/MODIS_' call grid2tile_modis6 (86400,43200,nc,nr,gridnamer,lai_name) endif - if (trim(LD) == 'GLASSA') then + if (trim(LAIBCS) == 'GLASSA') then lai_name = 'GLASS-LAI/AVHRR.v4/GLASS01B02.V04.AYYYY' call grid2tile_glass (nc,nr,gridnamer,lai_name) endif - if (trim(LD) == 'GLASSM') then + if (trim(LAIBCS) == 'GLASSM') then lai_name = 'GLASS-LAI/MODIS.v4/GLASS01B01.V04.AYYYY' call grid2tile_glass (nc,nr,gridnamer,lai_name) endif @@ -372,7 +338,7 @@ PROGRAM mkCatchParam inquire(file='clsm/ndvi.dat', exist=file_exists) if (.not.file_exists) call gimms_clim_ndvi (nc,nr,gridnamer) - write (log_file,'(a,a,a)')'Done computing ', trim(LD),' vegetation climatologies ............4' + write (log_file,'(a,a,a)')'Done computing ', trim(LAIBCS),' vegetation climatologies .............4' ! call modis_alb_on_tiles (nc,nr,ease_grid,regrid,gridnamet,gridnamer) ! call modis_scale_para (ease_grid,gridnamet) @@ -380,50 +346,55 @@ PROGRAM mkCatchParam ! MODIS albedo on tile space. The subroutine was replaced with "modis_alb_on_tiles_high" that process ! MODIS1 data on native grid and produces 8/16-day MODIS Albedo climatology - if(MA == 'MODIS1') then + if(MODALB == 'MODIS1') then inquire(file='clsm/AlbMap.WS.16-day.tile.0.7_5.0.dat', exist=file_exists) if (.not.file_exists) then - if(.not.F25Tag) then - allocate (maparc60 (1:21600,1:10800)) + if(F25Tag) then call create_mapping (nc,nr,21600,10800,maparc60, gridnamer) - call modis_alb_on_tiles_high (21600,10800,maparc60,MA,gridnamer) - if(allocated (maparc30)) deallocate (maparc60) + call modis_alb_on_tiles_high (21600,10800,maparc60,MODALB,gridnamer) + deallocate (maparc60%map) + deallocate (maparc60%ij_index) else + ! This option is for legacy sets like Fortuna 2.1 call modis_alb_on_tiles (nc,nr,ease_grid,regrid,gridnamet,gridnamer) endif endif endif - if(MA == 'MODIS2') then + if(MODALB == 'MODIS2') then inquire(file='clsm/AlbMap.WS.8-day.tile.0.7_5.0.dat', exist=file_exists) - if (.not.file_exists) call modis_alb_on_tiles_high (43200,21600,maparc30,MA,gridnamer) + if (.not.file_exists) call modis_alb_on_tiles_high (43200,21600,maparc30,MODALB,gridnamer) endif - write (log_file,'(a,a,a)')'Done putting ',trim(MA), ' Albedo on the tile space .............5' - - if(allocated (maparc30)) deallocate (maparc30) + write (log_file,'(a,a,a)')'Done putting ',trim(MODALB), ' Albedo on the tile space .............5' + if(.not.F25Tag) then + deallocate (maparc30%map) + deallocate (maparc30%ij_index) + endif + inquire(file='clsm/visdf.dat', exist=file_exists) if ((redo_modis).or.(.not.file_exists)) then - if(.not.F25Tag) then - call modis_scale_para_high (ease_grid,MA,gridnamet) - else - inquire(file='clsm/modis_scale_factor.albvf.clim', exist=file_exists) - if ((redo_modis).or.(.not.file_exists)) then - call modis_scale_para (ease_grid,gridnamet) - call REFORMAT_VEGFILES - endif - endif + ! if(.not.F25Tag) then + call modis_scale_para_high (ease_grid,MODALB,gridnamet) + ! else + ! This option is for legacy sets like Fortuna 2.1 + ! inquire(file='clsm/modis_scale_factor.albvf.clim', exist=file_exists) + ! if ((redo_modis).or.(.not.file_exists)) then + ! call modis_scale_para (ease_grid,gridnamet) + ! call REFORMAT_VEGFILES + ! endif + ! endif endif - write (log_file,'(a,a,a)')'Done computing ',trim(MA), ' scale factors .......................6' + write (log_file,'(a,a,a)')'Done computing ',trim(MODALB), ' scale factors .......................6' ! tmpstring1 = '-e EASE -g '//trim(gfile) ! write(tmpstring2,'(2(a2,x,i5,x))')'-x',nc,'-y',nr ! tmpstring = 'bin/mkCatchParam_openmp '//trim(tmpstring2)//' '//trim(tmpstring1) else - if(SD=='NGDC') call create_soil_types_files (nc,nr,ease_grid,gridnamet,gridnamer) - if(SD=='NGDC') write (log_file,'(a)')'Done creating NGDC soil types file .......................7a' + if(SOILBCS=='NGDC') call create_soil_types_files (nc,nr,ease_grid,gridnamet,gridnamer) + if(SOILBCS=='NGDC') write (log_file,'(a)')'Done creating NGDC soil types file .......................7a' ! Creating soil_param.first and tau_param.dat files that has 2 options: ! 1) NGDC soil properties, 2) HWSD-STATSGO2 Soil Properties @@ -431,22 +402,22 @@ PROGRAM mkCatchParam inquire(file='clsm/soil_param.first', exist=file_exists) if (.not.file_exists) then - if(SD=='NGDC') then + if(SOILBCS=='NGDC') then if(F25Tag) call soil_para_high (nc,nr,regrid,gridnamer,F25Tag=F25Tag) if(.not.F25Tag) call soil_para_high (nc,nr,regrid,gridnamer) endif - if(SD=='HWSD') call soil_para_hwsd (nc,nr,gridnamer) + if(SOILBCS=='HWSD') call soil_para_hwsd (nc,nr,gridnamer) endif - write (log_file,'(a,a,a)')'Done computing ',trim(SD),' soil parameters .......................7' + write (log_file,'(a,a,a)')'Done computing ',trim(SOILBCS),' soil parameters .......................7' inquire(file='clsm/ts.dat', exist=file_exists) if (.not.file_exists) then - if(SD=='NGDC') call create_model_para (MaskFile) - if(SD=='HWSD') call create_model_para_woesten (MaskFile) + if(SOILBCS=='NGDC') call create_model_para (MaskFile) + if(SOILBCS=='HWSD') call create_model_para_woesten (MaskFile) endif - write (log_file,'(a,a,a)')'Done computing CLSM model parameters based on ',trim(SD),'.........8' + write (log_file,'(a,a,a)')'Done computing CLSM model parameters based on ',trim(SOILBCS),'.........8' ! Commented out this call because 7.5-minute raster file is only used ! for plotting purposes @@ -470,14 +441,21 @@ PROGRAM mkCatchParam if (.not.file_exists) call CLM45_clim_parameters (nc,nr,gridnamer) write (log_file,'(a)')'Done creating CLM4.5 lightening frequency clim ...........11' - call country_codes (nc,nr,gridnamer) - call albedo4catchcn (gridnamet) + inquire(file='clsm/country_and_state_code.data', exist=file_exists) + if (.not.file_exists) call map_country_codes (nc,nr,gridnamer) + write (log_file,'(a)')'Done mapping country and state codes .....................12' + + ! inquire(file='clsm/irrig.dat', exist=file_exists) + ! if (.not.file_exists) call create_irrig_params (nc,nr,gridnamer) + ! write (log_file,'(a)')'Done computing irrigation model parameters ...............13' + + ! call albedo4catchcn (gridnamet) write (log_file,'(a)')'============================================================' write (log_file,'(a)')'DONE creating CLSM data files...............................' write (log_file,'(a)')'============================================================' - call system ('chmod 755 bin/create_README.csh ; bin/create_README.csh') +! call system ('chmod 755 bin/create_README.csh ; bin/create_README.csh') endif close (log_file,status='keep') diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mkLISTilesPara.F90 b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mkLISTilesPara.F90 index ab9ac5364..d224fb777 100644 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mkLISTilesPara.F90 +++ b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mkLISTilesPara.F90 @@ -7,7 +7,7 @@ PROGRAM mkLISTilesPara use MAPL_SortMod implicit none - integer , parameter :: nc_esa = 129600, nr_esa = 64800, SRTM_maxcat = 291284 + integer , parameter :: nc_esa = 129600, nr_esa = 64800 real , parameter :: pi= MAPL_PI integer , parameter :: HYDRO1k_maxcat = 6000000 integer, parameter :: nc_gswp2 = 360, nr_gswp2 = 180, n_gswp2 =15238 @@ -80,11 +80,11 @@ PROGRAM mkLISTilesPara ! create Grid2Catch transfer file ! ------------------------------- - CALL CREATE_ROUT_PARA_FILE (NC, NR, trim(gfile), deltaXY=dx) + ! CALL CREATE_ROUT_PARA_FILE (NC, NR, trim(gfile), deltaXY=dx) tmpstring1 = '-e EASE -g '//trim(gfile) write(tmpstring2,'(2(a2,x,i5,x))')'-x',nc,'-y',nr -tmpstring = 'bin/mkCatchParam_openmp '//trim(tmpstring2)//' '//trim(tmpstring1) +tmpstring = 'bin/mkCatchParam.x '//trim(tmpstring2)//' '//trim(tmpstring1) print *,trim(tmpstring) call system(tmpstring) @@ -552,7 +552,7 @@ SUBROUTINE create_files_esa (nc, nr, gfile,filename) nc_global = nint(360./dx) nr_global = nint(180./dy) - + if (nc_domain == 0) nc_domain = nc_global if (nr_domain == 0) nr_domain = nr_global @@ -597,7 +597,7 @@ SUBROUTINE create_files_esa (nc, nr, gfile,filename) tileid = 0 write (20,*) ncells - write (20,*) 2 + write (20,*) 1 write (20,'(a11)') glabel1 write (20,*) nc_global if (dateline == 0) then @@ -605,13 +605,13 @@ SUBROUTINE create_files_esa (nc, nr, gfile,filename) else write (20,*) nr_global endif - write (20,'(a9)') glabel2 - write (20,*) nc_domain - if (dateline == 0) then - write (20,*) nr_domain + 1 - else - write (20,*) nr_domain - endif + ! write (20,'(a9)') glabel2 + ! write (20,*) nc_domain + ! if (dateline == 0) then + ! write (20,*) nr_domain + 1 + ! else + ! write (20,*) nr_domain + ! endif regrid = .true. dx_esa = ceiling(real(nc_esa) / real(nc_global)) ! x-dimension (or # of ESA columns within the raster grid cell) @@ -783,12 +783,12 @@ SUBROUTINE create_files_esa (nc, nr, gfile,filename) write (20,*) nc_global read (19,*) nr_global write (20,*) nr_global - read (19,'(a9)') glabel2 - write (20,'(a9)') glabel2 - read (19,*) nc_domain - write (20,*) nc_domain - read (19,*) nr_domain - write (20,*) nr_domain +! read (19,'(a9)') glabel2 +! write (20,'(a9)') glabel2 +! read (19,*) nc_domain +! write (20,*) nc_domain +! read (19,*) nr_domain +! write (20,*) nr_domain write(23,*) ncells diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mkLandRaster.F90 b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mkLandRaster.F90 index a698b73c9..3af0ff1a6 100644 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mkLandRaster.F90 +++ b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mkLandRaster.F90 @@ -7,6 +7,7 @@ Program MakeLandRaster use MAPL_HashMod use process_hres_data use MAPL_SortMod + use rmTinyCatchParaMod, ONLY: SRTM_maxcat ! Program to create a surface raster file at 2.5' that has ! the ocean divided with a regular lat-lon DE grid. Its inputs @@ -50,7 +51,7 @@ Program MakeLandRaster ! ESA/SRTM ocean/land/ice/lake mask parameters ! -------------------------------------------- - integer, parameter :: SRTM_maxcat = 291284, nc_esa = 129600, nr_esa = 64800 + integer, parameter :: nc_esa = 129600, nr_esa = 64800 integer, allocatable, target, dimension (:,:) :: geos_msk, geos_msk2 REAL, allocatable, DIMENSION (:) :: loc_val INTEGER, ALLOCATABLE, DIMENSION (:) :: density, loc_int @@ -471,7 +472,7 @@ Program MakeLandRaster end if do k=1,ip - iTable( 3,k) = k + iTable( 3,k) = 1 end do if(Verb) print *, 'Writing til file...' diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mkMOMAquaRaster.F90 b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mkMOMAquaRaster.F90 index 725b49d7b..fcb9a96e9 100644 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mkMOMAquaRaster.F90 +++ b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mkMOMAquaRaster.F90 @@ -143,89 +143,58 @@ subroutine ReadGridFile(FILE,XVERT,YVERT) REAL_, pointer :: XVERT(:,:,:) REAL_, pointer :: YVERT(:,:,:) - integer :: STATUS, NCID, VARID, j + integer :: STATUS, NCID, VARID integer :: SIZ_XVERT_X, SIZ_XVERT_Y integer :: SIZ_YVERT_X, SIZ_YVERT_Y REAL_, pointer :: VERTX(:,:),VERTY(:,:) - logical :: newstyle - integer :: ID, ITMP Status=NF_OPEN(FILE,NF_NOWRITE,NCID) _ASSERT(STATUS==NF_NOERR,'needs informative message') - ITMP = NF_INQ_VARID (NCID, 'x_vert_T', ID ) - newstyle = ITMP==NF_NOERR + call fieldSize(NCID,'lon_corners',SIZ_XVERT_X,1) + call fieldSize(NCID,'lat_corners',SIZ_YVERT_Y,2) - if( NEWSTYLE) then - call fieldSize(NCID,'x_vert_T',SIZ_XVERT_X,1) - call fieldSize(NCID,'y_vert_T',SIZ_YVERT_Y,2) - - allocate(XVERT(SIZ_XVERT_X,SIZ_YVERT_Y,4),stat=STATUS) - _ASSERT(STATUS==0,'needs informative message') - allocate(YVERT(SIZ_XVERT_X,SIZ_YVERT_Y,4),stat=STATUS) - _ASSERT(STATUS==0,'needs informative message') - - STATUS = NF_INQ_VARID (NCID, 'x_vert_T', VARID ) - _ASSERT(STATUS==NF_NOERR,'needs informative message') - status = NF_GET_VAR_DOUBLE(NCID, VARID, XVERT) - _ASSERT(STATUS==NF_NOERR,'needs informative message') - - STATUS = NF_INQ_VARID (NCID, 'y_vert_T', VARID ) - _ASSERT(STATUS==NF_NOERR,'needs informative message') - STATUS = NF_GET_VAR_DOUBLE(NCID, VARID, YVERT) - _ASSERT(STATUS==NF_NOERR,'needs informative message') - -!!$ print *, 'Newstyle' -!!$ print *, 'xs: ',xvert(1,1,:) -!!$ print *, 'ys: ',yvert(1,1,:) - - else - - call fieldSize(NCID,'geolon_vert_t',SIZ_XVERT_X,1) - call fieldSize(NCID,'geolat_vert_t',SIZ_YVERT_Y,2) - - allocate(VERTX(SIZ_XVERT_X,SIZ_YVERT_Y),stat=STATUS) - _ASSERT(STATUS==0,'needs informative message') - allocate(VERTY(SIZ_XVERT_X,SIZ_YVERT_Y),stat=STATUS) - _ASSERT(STATUS==0,'needs informative message') + allocate(VERTX(SIZ_XVERT_X,SIZ_YVERT_Y),stat=STATUS) + _ASSERT(STATUS==0,'needs informative message') + allocate(VERTY(SIZ_XVERT_X,SIZ_YVERT_Y),stat=STATUS) + _ASSERT(STATUS==0,'needs informative message') ! print *, SIZ_XVERT_X,SIZ_YVERT_Y - SIZ_XVERT_X = SIZ_XVERT_X-1 - SIZ_YVERT_Y = SIZ_YVERT_Y-1 + SIZ_XVERT_X = SIZ_XVERT_X-1 + SIZ_YVERT_Y = SIZ_YVERT_Y-1 - allocate(XVERT(SIZ_XVERT_X,SIZ_YVERT_Y,4),stat=STATUS) - _ASSERT(STATUS==0,'needs informative message') - allocate(YVERT(SIZ_XVERT_X,SIZ_YVERT_Y,4),stat=STATUS) - _ASSERT(STATUS==0,'needs informative message') + allocate(XVERT(SIZ_XVERT_X,SIZ_YVERT_Y,4),stat=STATUS) + _ASSERT(STATUS==0,'needs informative message') + allocate(YVERT(SIZ_XVERT_X,SIZ_YVERT_Y,4),stat=STATUS) + _ASSERT(STATUS==0,'needs informative message') - STATUS = NF_INQ_VARID (NCID, 'geolon_vert_t', VARID ) - _ASSERT(STATUS==NF_NOERR,'needs informative message') - status = NF_GET_VAR_DOUBLE(NCID, VARID, VERTX) - _ASSERT(STATUS==NF_NOERR,'needs informative message') + STATUS = NF_INQ_VARID (NCID, 'lon_corners', VARID ) + _ASSERT(STATUS==NF_NOERR,'needs informative message') + status = NF_GET_VAR_DOUBLE(NCID, VARID, VERTX) + _ASSERT(STATUS==NF_NOERR,'needs informative message') - STATUS = NF_INQ_VARID (NCID, 'geolat_vert_t', VARID ) - _ASSERT(STATUS==NF_NOERR,'needs informative message') - STATUS = NF_GET_VAR_DOUBLE(NCID, VARID, VERTY) - _ASSERT(STATUS==NF_NOERR,'needs informative message') + STATUS = NF_INQ_VARID (NCID, 'lat_corners', VARID ) + _ASSERT(STATUS==NF_NOERR,'needs informative message') + STATUS = NF_GET_VAR_DOUBLE(NCID, VARID, VERTY) + _ASSERT(STATUS==NF_NOERR,'needs informative message') !!$ print *, 'Oldstyle' !!$ print *, 'xs: ',vertx(1,1),vertx(2,1),vertx(2,2),vertx(1,2) !!$ print *, 'ys: ',verty(1,1),verty(2,1),verty(2,2),verty(1,2) - XVERT(:,:,1) = VERTX(1:siz_xvert_x ,1:siz_yvert_y ) - XVERT(:,:,2) = VERTX(2:siz_xvert_x+1,1:siz_yvert_y ) - XVERT(:,:,3) = VERTX(2:siz_xvert_x+1,2:siz_yvert_y+1) - XVERT(:,:,4) = VERTX(1:siz_xvert_x ,2:siz_yvert_y+1) + XVERT(:,:,1) = VERTX(1:siz_xvert_x ,1:siz_yvert_y ) + XVERT(:,:,2) = VERTX(2:siz_xvert_x+1,1:siz_yvert_y ) + XVERT(:,:,3) = VERTX(2:siz_xvert_x+1,2:siz_yvert_y+1) + XVERT(:,:,4) = VERTX(1:siz_xvert_x ,2:siz_yvert_y+1) - yVERT(:,:,1) = VERTy(1:siz_xvert_x ,1:siz_yvert_y ) - yVERT(:,:,2) = VERTy(2:siz_xvert_x+1,1:siz_yvert_y ) - yVERT(:,:,3) = VERTy(2:siz_xvert_x+1,2:siz_yvert_y+1) - yVERT(:,:,4) = VERTy(1:siz_xvert_x ,2:siz_yvert_y+1) + yVERT(:,:,1) = VERTy(1:siz_xvert_x ,1:siz_yvert_y ) + yVERT(:,:,2) = VERTy(2:siz_xvert_x+1,1:siz_yvert_y ) + yVERT(:,:,3) = VERTy(2:siz_xvert_x+1,2:siz_yvert_y+1) + yVERT(:,:,4) = VERTy(1:siz_xvert_x ,2:siz_yvert_y+1) - endif end subroutine READGRIDFILE diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mkSMAPTilesPara.F90 b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mkSMAPTilesPara.F90 index 7c7b33368..2f5f4f7c6 100644 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mkSMAPTilesPara.F90 +++ b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mkSMAPTilesPara.F90 @@ -16,7 +16,7 @@ PROGRAM mkSMAPTilesPara_v1 integer i,j,ig,jg,i0,iop,n,d1,d2,j1,j2,i1,i2,ix, jx,icount,pcount integer :: NC = i_raster, NR = j_raster, NT = 16330000, ND = 10000, ND_raster = 10000 - integer, parameter :: SRTM_maxcat = 291284, nc_esa = 129600, nr_esa = 64800 + integer, parameter :: nc_esa = 129600, nr_esa = 64800 ! For regridding @@ -599,14 +599,14 @@ PROGRAM mkSMAPTilesPara_v1 write(11,*)l_index open (10, file ='til/'//trim(gfile)//'.til',form='formatted',status='unknown',action='write') - write (10,*)i_index, nc, nr + write (10,*)i_index, SRTM_maxcat, nc, nr write (10,*)1 write (10,*)'SMAP-EASEv2-'//trim(MGRID) write (10,*)nc_smap write (10,*)nr_smap - write (10,*)'NO-OCEAN' - write (10,*) -9999 - write (10,*) -9999 +! write (10,*)'NO-OCEAN' +! write (10,*) -9999 +! write (10,*) -9999 do l=1,i_index @@ -680,7 +680,7 @@ PROGRAM mkSMAPTilesPara_v1 ! create Grid2Catch transfer file ! ------------------------------- - CALL CREATE_ROUT_PARA_FILE (NC, NR, trim(gfile), MGRID=MGRID) + ! CALL CREATE_ROUT_PARA_FILE (NC, NR, trim(gfile), MGRID=MGRID) ! now run mkCatchParam ! -------------------- diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mkSMAPTilesPara_v2.F90 b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mkSMAPTilesPara_v2.F90 index e471ef294..79ec28562 100644 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mkSMAPTilesPara_v2.F90 +++ b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mkSMAPTilesPara_v2.F90 @@ -1,4 +1,7 @@ +#include "Raster.h" + PROGRAM mkSMAPTilesPara_v2 + ! This program constructs land and lake tiles for the SMAP-EASE-M09 and M36 grids (just set MGRID) ! for CLSM implementation. ! f90 -c create_smap_tiles.f90 @@ -10,13 +13,14 @@ PROGRAM mkSMAPTilesPara_v2 use process_hres_data use MAPL_SortMod use MAPL_ConstantsMod - + use LogRectRasterizeMod + implicit none - + character*4 :: LBSV = 'DEF' integer i,j,ig,jg,i0,iop,n,d1,d2,j1,j2,i1,i2,ix, jx,icount,pcount integer :: NC = i_raster, NR = j_raster, NT = 16330000, ND = 10000, ND_raster = 10000 - integer, parameter :: SRTM_maxcat = 291284, nc_esa = 129600, nr_esa = 64800 + integer, parameter :: nc_esa = 129600, nr_esa = 64800 ! For regridding @@ -55,10 +59,13 @@ PROGRAM mkSMAPTilesPara_v2 integer :: nc_smap,nr_smap, N_args, iargc real :: EASE_grid_area, CELL_km REAL :: dx,dy,d2r,lats,mnx,mxx,mny,mxy,sum1,sum2,jgv, VDUM,pix_area - character(40) :: arg + character(40) :: arg, EASElabel character*200 :: tmpstring, tmpstring1, tmpstring2 logical :: regrid = .false. character*128 :: MaskFile + logical :: pfaf_til = .false. + character*1 :: PF + include 'netcdf.inc' N_args = iargc() @@ -80,10 +87,19 @@ PROGRAM mkSMAPTilesPara_v2 if ( trim(arg) == '-smap_grid' ) then i = i+1 call getarg(i,MGRID) - + + elseif ( trim(arg) == '-pfaf_til' ) then + i = i+1 + call getarg(i,PF) + if (PF == 'T') pfaf_til = .true. + + elseif ( trim(arg) == '-v' ) then + i = i+1 + call getarg(i,LBSV) + else ! stop for any other arguments - print *,'USAGE : bin/mkSMAPTiles -smap_grid MXX' + print *,'USAGE : bin/mkSMAPTiles -smap_grid MXX -pfaf_til T' print *,'Allowed SMAP grids are: M09 M36 Ml' stop @@ -105,6 +121,7 @@ PROGRAM mkSMAPTilesPara_v2 nr_smap = 1624 gfile = 'SMAP_EASEv2_'//trim(MGRID)//'_3856x1624' EASE_grid_area = CELL_km*CELL_km + EASElabel = 'SMAP-EASEv2-M09' elseif(trim(MGRID) == 'M36') then @@ -113,6 +130,7 @@ PROGRAM mkSMAPTilesPara_v2 nr_smap = 406 gfile = 'SMAP_EASEv2_'//trim(MGRID)//'_964x406' EASE_grid_area = CELL_km*CELL_km + EASElabel = 'SMAP-EASEv2-M36' elseif(trim(MGRID) == 'M25') then @@ -169,7 +187,17 @@ PROGRAM mkSMAPTilesPara_v2 call getenv ("MASKFILE" ,MaskFile ) print *, 'Using MaskFile ', trim(MaskFile) + + if(pfaf_til) then + nc = 43200 ! Number of rows in raster file + nr = 21600 + call mkEASEv2Raster + + else + if((trim(MGRID) == 'M09').or.(trim(MGRID) == 'M36'))call write_tilfile + endif + if (index(MaskFile,'GEOS5_10arcsec_mask') /= 0) then ! New ESA (Veg) + SRTM (catchments) based mask file ! is overlaid on SMAP @@ -638,14 +666,14 @@ PROGRAM mkSMAPTilesPara_v2 write(11,*)l_index open (10, file ='til/'//trim(gfile)//'.til',form='formatted',status='unknown',action='write') - write (10,*)i_index, nc, nr + write (10,*)i_index,SRTM_maxcat, nc, nr write (10,*)1 write (10,*)'SMAP-EASEv2-'//trim(MGRID) write (10,*)nc_smap write (10,*)nr_smap - write (10,*)'NO-OCEAN' - write (10,*) -9999 - write (10,*) -9999 + ! write (10,*)'NO-OCEAN' + ! write (10,*) -9999 + ! write (10,*) -9999 do l=1,i_index @@ -682,7 +710,7 @@ PROGRAM mkSMAPTilesPara_v2 mxy = clat - write (11,'(i8,i8,5(2x,f9.4), i4)')l,pfaf,mnx,mxx,mny,mxy,tile_ele(l) + write (11,'(i10,i8,5(2x,f9.4), i4)')l,pfaf,mnx,mxx,mny,mxy,tile_ele(l) endif @@ -691,7 +719,7 @@ PROGRAM mkSMAPTilesPara_v2 fr_gcm= tile_area(l)/smap_grid_area(jg*ND + ig) if (index(MaskFile,'GEOS5_10arcsec_mask') /= 0) then - write(10,'(i10,i9,2f10.4,2i5,f19.12,i10,i15,e13.4)') & + write(10,'(i10,i9,2f10.4,2i6,f19.12,i10,i15,e13.4)') & typ,pfaf,clon,clat,ig-1,jg-1,fr_gcm ,pfaf,SRTM_catid(cindex) else write(10,'(i10,i9,2f10.4,2i5,f19.12,i10,e13.4,i8)') & @@ -719,17 +747,118 @@ PROGRAM mkSMAPTilesPara_v2 ! create Grid2Catch transfer file ! ------------------------------- - CALL CREATE_ROUT_PARA_FILE (NC, NR, trim(gfile), MGRID=MGRID) + ! CALL CREATE_ROUT_PARA_FILE (NC, NR, trim(gfile), MGRID=MGRID) + call system (tmpstring) + ! now run mkCatchParam ! -------------------- - tmpstring1 = '-e EASE -g '//trim(gfile) + tmpstring1 = '-e EASE -g '//trim(gfile)//' -v '//trim(LBSV) write(tmpstring2,'(2(a2,x,i5,x))')'-x',nc,'-y',nr tmpstring = 'bin/mkCatchParam.x '//trim(tmpstring2)//' '//trim(tmpstring1) print *,trim(tmpstring) - call system (tmpstring) + call system (tmpstring) + + contains + + ! ------------------------------------------------------------------------------- + + SUBROUTINE mkEASEv2Raster + + implicit none + + integer :: i, j, i_ease, j_ease + real*8, allocatable :: xs(:,:), ys(:,:) + real :: x,y, xout, yout + + allocate (xs ( nc_smap+1, nr_smap+1)) + allocate (ys ( nc_smap+1, nr_smap+1)) + + do j = 1, nr_smap + do i = 1, nc_smap + x = real(i-1) -0.5 + y = real(nr_smap - j)+0.5 + call easeV2_inverse(MGRID, x, y, yout, xout) + ys (i,j) = dble(yout) + xs (i,j) = dble(xout) + end do + end do + + do j = nr_smap + 1, nr_smap + 1 + do i = nc_smap + 1, nc_smap + 1 + x = real(i-1) -0.5 + y = -0.5 + call easeV2_inverse(MGRID, x, y, yout, xout) + ys (i,j) = dble(yout) + xs (i,j) = dble(xout) + end do + end do + + where (ys > 90.) + ys = 90.D0 + endwhere + where (ys < -90.) + ys = -90.D0 + endwhere + where (xs > 180.) + xs = 180.D0 + endwhere + where (xs < -180.) + xs = -180.D0 + endwhere + + call LRRasterize(EASElabel,xs,ys,nc=nc,nr=nr,Here=.false., Verb=.false.) + stop + end SUBROUTINE mkEASEv2Raster - END PROGRAM mkSMAPTilesPara_v2 + ! ------------------------------------------------------------ + + SUBROUTINE write_tilfile + + implicit none + + character*200 :: infile + integer :: NT, NF, NC, NR, NPF, NG, IDUM, i, N, icol, rcol + character*20 :: cdum + integer, dimension (:,:), allocatable :: iRtable + real, dimension (:,:), allocatable :: rRtable + + infile = 'til/'//trim(EASElabel)//'_'//trim(EASElabel)//'-Pfafstetter.' + + open (10,file = trim(infile)//'ind', form = 'formatted', action = 'read', status = 'old') + open (11,file = trim(infile)//'TIL', form = 'formatted', action = 'write', status = 'unknown') + + read (10, *) NT, NF, NC, NR + write (11,'(4I10)')NT, NF, NC, NR + read (10, *) NG + write(11, *) NG + + do n = 1, NG + read (10, '(a)') cdum + write(11, '(a)') trim (cdum) + read (10, *) IDUM + write(11, '(I10)') IDUM + read (10, *) IDUM + write(11, '(I10)') IDUM + end do + + icol = 7 + rcol = 5 + allocate (iRtable (1, 1:icol)) + allocate (rRtable (1, 1:rcol)) + + do n = 1, nt + read(10,'(I10,3E20.12,9(2I10,E20.12,I10))') iRtable (1,1),rRtable(1,1),rRtable(1,2),rRtable(1,3),iRtable (1,2),iRtable (1,3),rRtable(1,4),iRtable (1,4),& + iRtable (1,5),iRtable (1,6),rRtable(1,5),iRtable (1,7) + write(11,'(I10,3E20.12,9(2I10,E20.12,I10))') iRtable (1,1),rRtable(1,1),rRtable(1,2),rRtable(1,3),iRtable (1,2)-1,nr_smap - iRtable (1,3),rRtable(1,4),iRtable (1,4),& + iRtable (1,5),iRtable (1,6),rRtable(1,5),iRtable (1,7) + end do + + close (10, status = 'keep') + close (11, status = 'keep') + + END SUBROUTINE write_tilfile + END PROGRAM diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mk_runofftbl.F90 b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mk_runofftbl.F90 index 5b6c1506e..f69829259 100644 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mk_runofftbl.F90 +++ b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mk_runofftbl.F90 @@ -5,7 +5,7 @@ program Runoff implicit none - integer :: nx, ny + integer :: nx, ny, pf integer, allocatable :: lats(:,:), lons(:,:) integer, pointer :: rst(:,:), SortArr(:,:), key(:) integer, pointer :: srctile(:), srcweight(:), dstweight(:), dsttile(:) @@ -33,7 +33,7 @@ program Runoff open(10,file=fileT, form="formatted", status="old") - read(10,*) np, nx, ny + read(10,*) np, pf, nx, ny close(10) ! print *, nx, ny diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mod_process_hres_data.F90 b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mod_process_hres_data.F90 index 4eca6864d..74e8c80c0 100644 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mod_process_hres_data.F90 +++ b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mod_process_hres_data.F90 @@ -13,6 +13,7 @@ MODULE process_hres_data use date_time_util use leap_year use MAPL_ConstantsMod +use lsm_routines, ONLY: sibalb #if defined USE_EXTERNAL_FINDLOC use findloc_mod, only: findloc @@ -26,22 +27,27 @@ MODULE process_hres_data public :: soil_para_hwsd,hres_lai,hres_gswp2, merge_lai_data, grid2tile_modis6 public :: modis_alb_on_tiles_high,modis_scale_para_high,hres_lai_no_gswp -public :: histogram, regrid_map, create_mapping, esa2mosaic , esa2clm, ESA2CLM_45 -public :: grid2tile_ndep_t2m_alb, CREATE_ROUT_PARA_FILE, country_codes +public :: histogram, create_mapping, esa2mosaic , esa2clm, ESA2CLM_45 +public :: grid2tile_ndep_t2m_alb, CREATE_ROUT_PARA_FILE, map_country_codes, get_country_codes public :: CLM45_fixed_parameters, CLM45_clim_parameters, gimms_clim_ndvi, grid2tile_glass, open_landparam_nc4_files ! Below structure is used to regrid high resolution data to high resolution tile raster -integer, parameter :: N_tiles_per_cell = 8 -integer , parameter :: nc_esa = 129600, nr_esa = 64800, SRTM_maxcat = 291284 +integer, parameter :: N_tiles_per_cell = 9 +integer , parameter :: nc_esa = 129600, nr_esa = 64800 real, parameter :: pi= MAPL_PI,RADIUS=MAPL_RADIUS +integer, parameter :: N_GADM = 256 + 1, N_STATES = 50 -type :: regrid_map - +type :: do_regrid integer :: NT integer, dimension (N_tiles_per_cell) :: TID integer, dimension (N_tiles_per_cell) :: count - +end type do_regrid +type, public :: regrid_map + integer :: nc_data = 1 + integer :: nr_data = 1 + integer, allocatable, dimension (:,:) :: ij_index + type(do_regrid), pointer, dimension (:) :: map end type regrid_map contains @@ -617,7 +623,7 @@ SUBROUTINE ESA2CLM_45 (nc, nr, gfile) do k = 1, maxcat - read (11,'(i8,i8,5(2x,f9.4))') tid,cid,minlon,maxlon,minlat,maxlat + read (11,'(i10,i8,5(2x,f9.4))') tid,cid,minlon,maxlon,minlat,maxlat tile_lat = (minlat + maxlat)/2. scale = (ABS (tile_lat) - 32.)/10. scale = min (max(scale,0.),1.) @@ -774,7 +780,7 @@ SUBROUTINE ESA2CLM_45 (nc, nr, gfile) csf2 = 100. * csf2 / ftot endif - write (10,'(2I8,4I3,4f7.2,2I3,2f7.2)') & + write (10,'(2I10,4I3,4f7.2,2I3,2f7.2)') & tid,cid,cpt1, cpt2, cst1, cst2, cpf1, cpf2, csf1, csf2, & esa_clm_veg (1), esa_clm_veg (2), esa_clm_frac(1), esa_clm_frac(2) end do @@ -1342,7 +1348,7 @@ SUBROUTINE ESA2CLM (nc, nr, gfile) do k = 1, maxcat - read (11,'(i8,i8,5(2x,f9.4))') tid,cid,minlon,maxlon,minlat,maxlat + read (11,'(i10,i8,5(2x,f9.4))') tid,cid,minlon,maxlon,minlat,maxlat tile_lat = (minlat + maxlat)/2. scale = (ABS (tile_lat) - 32.)/10. scale = min (max(scale,0.),1.) @@ -1483,7 +1489,7 @@ SUBROUTINE ESA2CLM (nc, nr, gfile) csf2 = 100. * csf2 / ftot endif - write (10,'(2I8,4I3,4f7.2,2I3,2f7.2)') & + write (10,'(2I10,4I3,4f7.2,2I3,2f7.2)') & tid,cid,cpt1, cpt2, cst1, cst2, cpf1, cpf2, csf1, csf2, & esa_clm_veg (1), esa_clm_veg (2), esa_clm_frac(1), esa_clm_frac(2) @@ -1698,7 +1704,7 @@ SUBROUTINE ESA2MOSAIC (nc, nr, gfile) do k = 1, maxcat - read (11,'(i8,i8,5(2x,f9.4))') tid,cid + read (11,'(i10,i8,5(2x,f9.4))') tid,cid tem = 0. tem(1:6)=veg (k,1:6) @@ -1739,7 +1745,7 @@ SUBROUTINE ESA2MOSAIC (nc, nr, gfile) if (sfrac == 0.) mos2 = mos1 ! No secondary type if(.not.jpl_height) z2(k) = VGZ2(mos1) ityp (k) = mos1 - write (10,'(i8,i8,2(2x,i3),2(2x,f6.2),2x,f6.3,2x,f10.7)') & + write (10,'(i10,i8,2(2x,i3),2(2x,f6.2),2x,f6.3,2x,f10.7)') & tid,cid,mos1,mos2,100.*mfrac,100.*sfrac, z2(k), z0 (k) endif @@ -1819,8 +1825,8 @@ SUBROUTINE create_mapping (nc,nr,nc_data,nr_data,rmap, gfile) implicit none integer, intent (in) :: nc,nr,nc_data,nr_data - type (regrid_map), intent (inout), dimension (nc_data,nr_data) :: rmap - integer :: i,j,n, i1,i2,j1,j2,ncatch, nbins, status, NPLUS + type (regrid_map), intent (inout) :: rmap + integer :: i,j,n, i1,i2,j1,j2,ncatch, nbins, status, NPLUS,pix_count REAL, allocatable, DIMENSION (:) :: loc_val INTEGER, ALLOCATABLE, DIMENSION (:) :: density, loc_int logical, dimension (:), allocatable :: unq_mask @@ -1852,26 +1858,35 @@ SUBROUTINE create_mapping (nc,nr,nc_data,nr_data,rmap, gfile) dy_data = 180./real(nr_data) dx_geos = 360./real(nc) dy_geos = 180./real(nr) - rmap%NT = 0 if((nc_data >= nc).and.(nr_data >= nr)) then allocate(iraster(nc_data,nr_data),stat=STATUS); VERIFY_(STATUS) call RegridRaster(tile_id,iraster) - + NPLUS = count(iraster >= 1 .and. iraster <= ncatch) + allocate (rmap%ij_index(1:nc_data, 1:nr_data)) + allocate (rmap%map (1:NPLUS)) + rmap%map%NT = 0 + pix_count = 1 do j = 1,nr_data do i = 1,nc_data if((iraster (i,j) >=1).and.(iraster (i,j) <=ncatch)) then - rmap(i,j)%NT = 1 - rmap(i,j)%TID (rmap(i,j)%NT) = iraster (i,j) - rmap(i,j)%count(rmap(i,j)%NT) = 1 + rmap%map(pix_count)%NT = 1 + rmap%map(pix_count)%TID (rmap%map(pix_count)%NT) = iraster (i,j) + rmap%map(pix_count)%count(rmap%map(pix_count)%NT) = 1 + rmap%ij_index(i,j) = pix_count + pix_count = pix_count + 1 endif end do end do deallocate (iraster) ; VERIFY_(STATUS) else - + NPLUS = count(tile_id >= 1 .and. tile_id <= ncatch) + allocate (rmap%ij_index(1:nc_data, 1:nr_data)) + allocate (rmap%map (1:NPLUS)) + rmap%map%NT = 0 + pix_count = 1 do j = 1,nr_data lat1 = -90. + (j-1)*dy_data @@ -1907,28 +1922,33 @@ SUBROUTINE create_mapping (nc,nr,nc_data,nr_data,rmap, gfile) DO N =1,NBINS if(density(n) > 0) then - rmap(i,j)%NT = rmap(i,j)%NT + 1 - if(rmap(i,j)%NT > N_tiles_per_cell) then - print *,'N_tiles_per_cell exceeded :', rmap(i,j)%NT + rmap%map(pix_count)%NT = rmap%map(pix_count)%NT + 1 + if(rmap%map(pix_count)%NT > N_tiles_per_cell) then + print *,'N_tiles_per_cell exceeded :', rmap%map(pix_count)%NT print *,i,j,i1,i2,j1,j2 - print *,'NT',rmap(i,j)%NT - print *,rmap(i,j)%TID - print *,rmap(i,j)%count + print *,'NT',rmap%map(pix_count)%NT + print *,rmap%map(pix_count)%TID + print *,rmap%map(pix_count)%count stop endif - rmap(i,j)%TID (rmap(i,j)%NT) = NINT(loc_val(n)) - rmap(i,j)%count(rmap(i,j)%NT) = density(n) + rmap%map(pix_count)%TID (rmap%map(pix_count)%NT) = NINT(loc_val(n)) + rmap%map(pix_count)%count(rmap%map(pix_count)%NT) = density(n) + endif END DO + rmap%ij_index(i,j) = pix_count + pix_count = pix_count + 1 deallocate (loc_val, density) deallocate (loc_int, unq_mask) endif NULLIFY (subset) else if((tile_id (i1,j1) > 0).and.(tile_id(i1,j1).le.ncatch)) then - rmap(i,j)%NT = 1 - rmap(i,j)%TID(1) = tile_id (i1,j1) - rmap(i,j)%COUNT(1) = 1 + rmap%map(pix_count)%NT = 1 + rmap%map(pix_count)%TID(1) = tile_id (i1,j1) + rmap%map(pix_count)%COUNT(1) = 1 + rmap%ij_index(i,j) = pix_count + pix_count = pix_count + 1 endif endif end do @@ -1954,7 +1974,7 @@ SUBROUTINE merge_lai_data (MaskFile) integer, parameter :: i5_hydr = 5000142, i6_hydr = 5999900 ! Australia integer, parameter :: i1_srtm = 229075 , i2_srtm = 267083 ! South America integer, parameter :: i3_srtm = 75369 , i4_srtm = 140751 ! Africa - integer, parameter :: i5_srtm = 267084 , i6_srtm = 291284 ! Australia + integer, parameter :: i5_srtm = 267084 , i6_srtm = SRTM_maxcat ! Australia REAL, ALLOCATABLE, dimension (:) :: geol2_lai_bf,geol2_lai_af,geol2_lai, lai real :: dum, gyr,gmn,gdy,gyr1,gmn1,gdy1, slice1,slice2 @@ -2106,10 +2126,10 @@ SUBROUTINE modis_scale_para_high (ease_grid,MA,gfile) integer :: yy,j,month integer, allocatable, dimension (:) :: vegcls real, allocatable, dimension (:) :: & - modisvf, modisnf,albvr,albnr,albvf,albnf,lat,lon, & - green,lai,snw,lai_before,lai_after,grn_before,grn_after + modisvf, modisnf,albvf,albnf, lat,lon, & + green,lai,lai_before,lai_after,grn_before,grn_after real, allocatable, dimension (:) :: & - calbvr,calbnr,calbvf,calbnf + calbvf,calbnf, zero_array, one_array, albvr,albnr character*300 :: ifile1,ifile2,ofile integer, dimension(12), parameter :: days_in_month_nonleap = & (/ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 /) @@ -2120,10 +2140,7 @@ SUBROUTINE modis_scale_para_high (ease_grid,MA,gfile) fname='clsm/catchment.def' open (10,file=fname,status='old',action='read',form='formatted') read (10,*)maxcat - - allocate (albvr (1:maxcat)) allocate (albvf (1:maxcat)) - allocate (albnr (1:maxcat)) allocate (albnf (1:maxcat)) allocate (calbvf (1:maxcat)) allocate (calbnf (1:maxcat)) @@ -2136,7 +2153,10 @@ SUBROUTINE modis_scale_para_high (ease_grid,MA,gfile) allocate (lai_after (1:maxcat)) allocate (grn_after (1:maxcat)) allocate (vegcls (1:maxcat)) - allocate (snw (1:maxcat)) + allocate (zero_array (1:maxcat)) + allocate (one_array (1:maxcat)) + allocate (albvr (1:maxcat)) + allocate (albnr (1:maxcat)) close (10,status='keep') fname=trim(gfile)//'.til' @@ -2147,13 +2167,13 @@ SUBROUTINE modis_scale_para_high (ease_grid,MA,gfile) read (10,*)ip read (10,*)j_dum - read (10,'(a)')version - read (10,*)nc_gcm - read (10,*)nr_gcm - read (10,'(a)')version - read (10,*)nc_ocean - read (10,*)nr_ocean + do n = 1, j_dum + read (10,'(a)')version + read (10,*)nc_gcm + read (10,*)nr_gcm + end do + do n = 1,ip if (ease_grid) then read(10,*,IOSTAT=ierr) typ,pfs,lon,lat,ig,jg,fr_gcm @@ -2163,7 +2183,7 @@ SUBROUTINE modis_scale_para_high (ease_grid,MA,gfile) endif if (typ == 100) then ip2 = n - read (20,'(i8,i8,2(2x,i3),2(2x,f6.4))') & + read (20,'(i10,i8,2(2x,i3),2(2x,f6.4))') & indr1,indr1,vegcls(ip2),indr1,fr_gcm,fr_gcm endif if(ierr /= 0)write (*,*)'Problem reading', n, ease_grid @@ -2171,15 +2191,16 @@ SUBROUTINE modis_scale_para_high (ease_grid,MA,gfile) close (10,status='keep') close (20,status='keep') - albvr =0. albvf =0. - albnr =0. albnf =0. calbvf =0. calbnf =0. modisvf =0. modisnf =0. - snw =0. + zero_array = 0. + one_array = 1. + albvr = 0. + albnr = 0. ! MODIS Albedo files if(MA == 'MODIS1') then @@ -2275,8 +2296,6 @@ SUBROUTINE modis_scale_para_high (ease_grid,MA,gfile) calbvf =0. calbnf =0. - albvr =0. - albnr =0. albvf =0. albnf =0. tsteps =0. @@ -2364,10 +2383,11 @@ SUBROUTINE modis_scale_para_high (ease_grid,MA,gfile) call Time_Interp_Fac (date_time_new, gf_green_time, af_green_time, slice1, slice2) green = (slice1*grn_before + slice2*grn_after) - call sibalb( & - albvr,albnr,albvf,albnf, & - lai, green, 0.0, snw, vegcls, maxcat) - + call sibalb ( & + MAXCAT,vegcls,lai,green, zero_array, & + one_array,one_array,one_array,one_array, & + ALBVR, ALBNR, albvf, albnf) + calbvf = calbvf + albvf calbnf = calbnf + albnf tsteps = tsteps + 1. @@ -2380,9 +2400,9 @@ SUBROUTINE modis_scale_para_high (ease_grid,MA,gfile) calbvf = calbvf/tsteps calbnf = calbnf/tsteps - modisvf = modisvf/calbvf - modisnf = modisnf/calbnf - + modisvf = modisvf/(calbvf + 1.e-20) + modisnf = modisnf/(calbnf + 1.e-20) + do n =1, maxcat ! if(modisvf(n).le.0)print *,'Negative MODISVF scale param at cell',n, modisvf(n) ! if(modisnf(n).le.0)print *,'Negative MODISNF scale param at cell',n, modisnf(n) @@ -2421,8 +2441,6 @@ SUBROUTINE modis_scale_para_high (ease_grid,MA,gfile) call Get_MidTime(yr,mn,dy,yr1,mn1,dy1,af_modis_time) calbvf =0. calbnf =0. - albvr =0. - albnr =0. albvf =0. albnf =0. tsteps =0. @@ -2430,11 +2448,12 @@ SUBROUTINE modis_scale_para_high (ease_grid,MA,gfile) endif end do - deallocate (modisvf,modisnf,albvr,albvf,albnf,albnr) + deallocate (modisvf,modisnf,albvf,albnf) deallocate (green,lai) deallocate (vegcls) deallocate (calbvf,calbnf) - deallocate (lai_before,grn_before, lai_after,grn_after,snw) + deallocate (lai_before,grn_before, lai_after,grn_after) + deallocate (zero_array, one_array, albvr, albnr) close (10, status='keep') close (11, status='keep') @@ -2456,10 +2475,10 @@ SUBROUTINE modis_alb_on_tiles_high (nc_data,nr_data,rmap,MA,gfiler) ! implicit none integer, intent (in) :: nc_data,nr_data - type (regrid_map), intent (in), dimension (nc_data,nr_data) :: rmap + type (regrid_map), intent (in) :: rmap character*6 :: MA character(*) :: gfiler - integer :: n,maxcat,i,j,k,ncid,i_highd,j_highd,nx_adj,ny_adj + integer :: n,maxcat,i,j,k,ncid,i_highd,j_highd,nx_adj,ny_adj, pix_count integer :: status,iLL,jLL,ix,jx,vid,nc_10,nr_10,n_tslices,d_undef,t, & time_slice,time_slice_next,yr,mn,dd,yr1,mn1,dd1,i1,i2 character*100 :: fname,fout @@ -2579,24 +2598,26 @@ SUBROUTINE modis_alb_on_tiles_high (nc_data,nr_data,rmap,MA,gfiler) status = NF_GET_VARA_INT (ncid,5,(/1,1,time_slice/),(/nc_10,nr_10,1/),net_data2); VERIFY_(STATUS) do j = jLL,jLL + nr_10 -1 - do i = iLL, iLL + nc_10 -1 + do i = iLL, iLL + nc_10 -1 + pix_count = rmap%ij_index(i,j) if(net_data1(i-iLL +1 ,j - jLL +1) > 0) then - if(rmap(i,j)%nt > 0) then - do n = 1, rmap(i,j)%nt - vec_AlbVis(rmap(i,j)%tid(n)) = vec_AlbVis(rmap(i,j)%tid(n)) + & - sf*net_data1(i-iLL +1 ,j - jLL +1)*rmap(i,j)%count(n) - count_AlbVis(rmap(i,j)%tid(n))= count_AlbVis(rmap(i,j)%tid(n)) + & - 1.*rmap(i,j)%count(n) + + if(rmap%map(pix_count)%nt > 0) then + do n = 1, rmap%map(pix_count)%nt + vec_AlbVis(rmap%map(pix_count)%tid(n)) = vec_AlbVis(rmap%map(pix_count)%tid(n)) + & + sf*net_data1(i-iLL +1 ,j - jLL +1)*rmap%map(pix_count)%count(n) + count_AlbVis(rmap%map(pix_count)%tid(n))= count_AlbVis(rmap%map(pix_count)%tid(n)) + & + 1.*rmap%map(pix_count)%count(n) end do endif endif if(net_data2(i-iLL +1 ,j - jLL +1) > 0) then - if(rmap(i,j)%nt > 0) then - do n = 1, rmap(i,j)%nt - vec_AlbNir(rmap(i,j)%tid(n)) = vec_AlbNir(rmap(i,j)%tid(n)) + & - sf*net_data2(i-iLL +1 ,j - jLL +1)*rmap(i,j)%count(n) - count_AlbNir(rmap(i,j)%tid(n))= count_AlbNir(rmap(i,j)%tid(n)) + & - 1.*rmap(i,j)%count(n) + if(rmap%map(pix_count)%nt > 0) then + do n = 1, rmap%map(pix_count)%nt + vec_AlbNir(rmap%map(pix_count)%tid(n)) = vec_AlbNir(rmap%map(pix_count)%tid(n)) + & + sf*net_data2(i-iLL +1 ,j - jLL +1)*rmap%map(pix_count)%count(n) + count_AlbNir(rmap%map(pix_count)%tid(n))= count_AlbNir(rmap%map(pix_count)%tid(n)) + & + 1.*rmap%map(pix_count)%count(n) end do endif endif @@ -3150,7 +3171,7 @@ SUBROUTINE hres_lai_no_gswp (nc_data,nr_data,rmap,gfiler,lai_name, merge) integer, intent (in) :: nc_data,nr_data real, parameter :: dxy = 1. integer :: QSize - type (regrid_map), intent (in), dimension (nc_data,nr_data) :: rmap + type (regrid_map), intent (in) :: rmap character(*) :: gfiler,lai_name integer :: n,maxcat,i,j,k,ncid,i_highd,j_highd,nx_adj,ny_adj,ierr,nx,ny integer :: status,iLL,jLL,ix,jx,vid,nc_10,nr_10,n_tslices,d_undef,t, & @@ -3164,7 +3185,7 @@ SUBROUTINE hres_lai_no_gswp (nc_data,nr_data,rmap,gfiler,lai_name, merge) REAL, ALLOCATABLE, dimension (:) :: vec_lai, count_lai,tile_lon, tile_lat & , x, y !, distance real, allocatable, target, dimension (:,:) :: lai_grid - INTEGER ::imn,imx,jmn,jmx,mval,d1,d2,l + INTEGER ::imn,imx,jmn,jmx,mval,d1,d2,l,pix_count character(len=4), dimension (:), allocatable :: MMDD, MMDD_next logical :: regrid REAL :: sf, dum,dist_save,tile_distance,minlat,maxlat,minlon,maxlon @@ -3306,13 +3327,14 @@ SUBROUTINE hres_lai_no_gswp (nc_data,nr_data,rmap,gfiler,lai_name, merge) do j = jLL,jLL + nr_10 -1 do i = iLL, iLL + nc_10 -1 if(net_data1(i-iLL +1 ,j - jLL +1) /= d_undef) then - if(rmap(i,j)%nt > 0) then - do n = 1, rmap(i,j)%nt - if(vec_lai(rmap(i,j)%tid(n)) == -9999.) vec_lai(rmap(i,j)%tid(n)) = 0. - vec_lai(rmap(i,j)%tid(n)) = vec_lai(rmap(i,j)%tid(n)) + & - sf*net_data1(i-iLL +1 ,j - jLL +1)*rmap(i,j)%count(n) - count_lai(rmap(i,j)%tid(n)) = & - count_lai(rmap(i,j)%tid(n)) + 1.*rmap(i,j)%count(n) + pix_count = rmap%ij_index(i,j) + if(rmap%map(pix_count)%nt > 0) then + do n = 1, rmap%map(pix_count)%nt + if(vec_lai(rmap%map(pix_count)%tid(n)) == -9999.) vec_lai(rmap%map(pix_count)%tid(n)) = 0. + vec_lai(rmap%map(pix_count)%tid(n)) = vec_lai(rmap%map(pix_count)%tid(n)) + & + sf*net_data1(i-iLL +1 ,j - jLL +1)*rmap%map(pix_count)%count(n) + count_lai(rmap%map(pix_count)%tid(n)) = & + count_lai(rmap%map(pix_count)%tid(n)) + 1.*rmap%map(pix_count)%count(n) end do endif endif @@ -3471,7 +3493,7 @@ SUBROUTINE hres_gswp2 (nc_data,nr_data,rmap, gfiler,lai_name,merge) integer :: n,maxcat,i,j,k,ncid,i_highd,j_highd,nx_adj,ny_adj,ierr integer :: status,iLL,jLL,ix,jx,vid,nc_10,nr_10,n_tslices,d_undef,t, & time_slice,time_slice_next,yr,mn,dd,yr1,mn1,dd1,i1,i2 - type (regrid_map), intent (in), dimension (nc_data,nr_data) :: rmap + type (regrid_map), intent (in) :: rmap real :: dum, gyr,gmn,gdy,gyr1,gmn1,gdy1, slice1,slice2 character*100 :: fname,fout character*10 :: string @@ -3487,7 +3509,7 @@ SUBROUTINE hres_gswp2 (nc_data,nr_data,rmap, gfiler,lai_name,merge) af_lai_time integer, intent(in), optional :: merge real, parameter :: dxy = 1. - integer :: nx, ny, QSize + integer :: nx, ny, QSize, pix_count REAL, ALLOCATABLE, dimension (:) :: x,y,tile_lon, tile_lat real, allocatable, target, dimension (:,:) :: data_grid integer, pointer, dimension (:,:) :: QSub @@ -3608,13 +3630,14 @@ SUBROUTINE hres_gswp2 (nc_data,nr_data,rmap, gfiler,lai_name,merge) do j = jLL,jLL + nr_10 -1 do i = iLL, iLL + nc_10 -1 if(net_data1(i-iLL +1 ,j - jLL +1) /= d_undef) then - if(rmap(i,j)%nt > 0) then - do n = 1, rmap(i,j)%nt - if(vec_lai(rmap(i,j)%tid(n)) == -9999.) vec_lai(rmap(i,j)%tid(n)) = 0. - vec_lai(rmap(i,j)%tid(n)) = vec_lai(rmap(i,j)%tid(n)) + & - sf*net_data1(i-iLL +1 ,j - jLL +1)*rmap(i,j)%count(n) - count_lai(rmap(i,j)%tid(n)) = & - count_lai(rmap(i,j)%tid(n)) + 1.*rmap(i,j)%count(n) + pix_count = rmap%ij_index(i,j) + if(rmap%map(pix_count)%nt > 0) then + do n = 1, rmap%map(pix_count)%nt + if(vec_lai(rmap%map(pix_count)%tid(n)) == -9999.) vec_lai(rmap%map(pix_count)%tid(n)) = 0. + vec_lai(rmap%map(pix_count)%tid(n)) = vec_lai(rmap%map(pix_count)%tid(n)) + & + sf*net_data1(i-iLL +1 ,j - jLL +1)*rmap%map(pix_count)%count(n) + count_lai(rmap%map(pix_count)%tid(n)) = & + count_lai(rmap%map(pix_count)%tid(n)) + 1.*rmap%map(pix_count)%count(n) end do endif endif @@ -3745,9 +3768,9 @@ SUBROUTINE soil_para_hwsd (nx,ny,gfiler) ! A specific treatment of peatland hydrology in the NASA Catchment Land Surface Model. J. Adv. Model. Earth Sys., 11, ! 2130-2162. doi: 10.1029/2018MS001574. - REAL, PARAMETER :: p_poros = 0.93, p_bee = 3.5, p_psis = -0.03, p_ks = 2.8e-5, pmap_thresh = 0.3, p_wp = 0.3672 - REAL, DIMENSION (:), POINTER :: PMAP - REAL :: d_poros, d_bee, d_psis, d_ks + REAL, PARAMETER :: pmap_thresh = 0.5 + REAL, DIMENSION (:), POINTER :: PMAP + REAL, ALLOCATABLE, DIMENSION (:,:) :: PMAPR ! --------- VARIABLES FOR *OPENMP* PARALLEL ENVIRONMENT ------------ ! @@ -4011,8 +4034,30 @@ SUBROUTINE soil_para_hwsd (nx,ny,gfiler) status = NF_CLOSE(ncid) endif end do - end do - + end do + + if(process_peat) then + print *, 'PMAP_THRESH : ', pmap_thresh + allocate(pmapr (1:i_highd,1:j_highd)) + status = NF_OPEN ('data/CATCH/PEATMAP_mask.nc4', NF_NOWRITE, ncid) + status = NF_GET_VARA_REAL (ncid,NC_VarID(NCID,'PEATMAP'), (/1,1/),(/i_highd, j_highd/), pmapr) ; VERIFY_(STATUS) + +! move HWSD sub-surface peat to peat-rich mineral Group 3 because merged surface peat defines sub-surface peat +! ------------------------------------------------------------------------------------------------------------ + where (oc_sub*sf >= cF_lim(4)) + oc_sub = NINT(8./sf) + endwhere + +! Hybridize: add OC 1km PEATMAP pixels to HWSD oc_top +! --------------------------------------------------- + where (pmapr >= pmap_thresh) + oc_top = NINT(33.0/sf) + endwhere + + deallocate (pmapr) + status = NF_CLOSE(ncid) + endif + deallocate (net_data1) deallocate (net_data2) deallocate (net_data3) @@ -4089,6 +4134,29 @@ SUBROUTINE soil_para_hwsd (nx,ny,gfiler) raster => grav_grid end if + + ! compute peat fraction on tile for CLM45+ + + allocate(pmap (1:maxcat)) + allocate(count_soil(1:maxcat)) + + pmap = 0. + count_soil = 0. + + do j=1,ny_adj + do i=1,nx_adj + if((iRaster(i,j).gt.0).and.(iRaster(i,j).le.maxcat)) then + count_soil(iRaster(i,j)) = count_soil(iRaster(i,j)) + 1. + if (raster3(i,j)*sf >= cF_lim(4)) then + pmap (iRaster(i,j)) = pmap(iRaster(i,j)) + 1 + endif + endif + end do + end do + + where (count_soil > 0) pmap = pmap /count_soil + + deallocate (count_soil) ! Deallocate large arrays allocate(land_pixels(1:size(iRaster,1),1:size(iRaster,2))) @@ -4307,7 +4375,7 @@ SUBROUTINE soil_para_hwsd (nx,ny,gfiler) !$OMP data_vec4,data_vec5,data_vec6,cF_lim, & !$OMP table_map,soil_class_top,soil_class_com, & !$OMP soc_vec,poc_vec,ncells_top,ncells_top_pro,& -!$OMP ncells_sub_pro) & +!$OMP ncells_sub_pro,process_peat) & !$OMP PRIVATE(n,i,j,k,icount,t_count,i1,i2,ss_clay, & !$OMP ss_sand,ss_clay_all,ss_sand_all, & !$OMP ss_oc_all,cFamily,factor,o_cl,o_clp,ktop, & @@ -4371,6 +4439,15 @@ SUBROUTINE soil_para_hwsd (nx,ny,gfiler) if (sum(cFamily) == 0.) o_cl = 1 if (sum(cFamily) > 0.) o_cl = maxloc(cFamily, dim = 1) + if (process_peat) then + ! if 50% or more of the tile surface is covered with peat, we assume the tile is peat + if (cFamily(4)/real(i) > 0.5) then + o_cl = 4 + else + if (sum(cFamily(1:3)) > 0.) o_cl = maxloc(cFamily(1:3), dim = 1) + endif + endif + cFamily = 0. do j=1,2*i @@ -4525,7 +4602,7 @@ SUBROUTINE soil_para_hwsd (nx,ny,gfiler) END DO !$OMP ENDPARALLELDO - call process_peatmap (nx, ny, gfiler, pmap) +! call process_peatmap (nx, ny, gfiler, pmap) inquire(file='clsm/catch_params.nc4', exist=file_exists) @@ -4587,23 +4664,23 @@ SUBROUTINE soil_para_hwsd (nx,ny,gfiler) fac_surf = soil_class_top(n) fac = soil_class_com(n) - if(process_peat) then - if(pmap (n) > pmap_thresh) then - fac_surf = 253 - fac = 253 - endif + if(process_peat) then + ! the maximum peat soil depth is set to the value Michel used to derive parameters (1334.) + if (fac_surf == 253) soildepth(n) = 5000. ! max(soildepth(n),5000.) + ! reseet subsurface tro peat if surface soil type is peat + if (fac_surf == 253) fac = 253 endif wp_wetness = a_wp(fac) /a_poros(fac) - write (11,'(i8,i8,i4,i4,3f8.4,f12.8,f7.4,f10.4,3f7.3,4f7.3,2f10.4, f8.4)')tindex,pfafindex, & + write (11,'(i10,i8,i4,i4,3f8.4,f12.8,f7.4,f10.4,3f7.3,4f7.3,2f10.4, f8.4)')tindex,pfafindex, & fac_surf, fac, a_bee(fac),a_psis(fac),a_poros(fac),& a_aksat(fac)/exp(-1.0*zks*gnu),wp_wetness,soildepth(n), & grav_vec(n),soc_vec(n),poc_vec(n), & a_sand(fac_surf),a_clay(fac_surf),a_sand(fac),a_clay(fac), & a_wpsurf(fac_surf)/a_porosurf(fac_surf),a_porosurf(fac_surf), pmap(n) - write (12,'(i8,i8,4f10.7)')tindex,pfafindex, & + write (12,'(i10,i8,4f10.7)')tindex,pfafindex, & atau_2cm(fac_surf),btau_2cm(fac_surf),atau(fac_surf),btau(fac_surf) if (allocated (parms4file)) then @@ -4622,7 +4699,7 @@ SUBROUTINE soil_para_hwsd (nx,ny,gfiler) endif end do write (11,'(a)')' ' - write (11,'(a)')'FMT=i8,i8,i4,i4,3f8.4,f12.8,f7.4,f10.4,3f7.3,4f7.3,2f10.4' + write (11,'(a)')'FMT=i10,i8,i4,i4,3f8.4,f12.8,f7.4,f10.4,3f7.3,4f7.3,2f10.4' write (11,'(a)')'TileIndex PfafID SoilClassTop SoilClassProfile BEE PSIS POROS Ks_at_SURF WPWET SoilDepth %Grav %OCTop %OCProf %Sand_top %Clay_top %Sand_prof %Clay_prof WPWET_SURF POROS_SURF' close (10, status = 'keep') close (11, status = 'keep') @@ -5420,7 +5497,7 @@ SUBROUTINE CREATE_ROUT_PARA_FILE (NC, NR, gfile, MGRID, deltaXY) pfaf_index = 0 pfaf_area = 0. - READ (10,'(i8,i8,5(2x,f9.4), i4)')l,pfaf,mnx,mxx,mny,mxy + READ (10,'(i10,i8,5(2x,f9.4), i4)')l,pfaf,mnx,mxx,mny,mxy IL1 = FLOOR ((180. + mnx)/DXY30 + 1.) IL2 = CEILING((180. + mxx)/DXY30 + 1.) @@ -5677,7 +5754,7 @@ SUBROUTINE CLM45_fixed_parameters (nc,nr,gfiler) if(count_pix(i,3) > 0.) abm_int = NINT(abm (i) / count_pix(i,3)) if(count_pix(i,4) > 0.) hdm_r = hdm (i) / count_pix(i,4) - write (10,'(2I8, i3, f8.4, f8.2, f10.2, f8.4)' ) tid, cid, abm_int, peatf_r, gdp_r, hdm_r, field_cap(sc_com) + write (10,'(2I10, i3, f8.4, f8.2, f10.2, f8.4)' ) tid, cid, abm_int, peatf_r, gdp_r, hdm_r, field_cap(sc_com) end do @@ -6291,336 +6368,419 @@ END SUBROUTINE open_landparam_nc4_files ! ---------------------------------------------------------------------------------------------- - SUBROUTINE country_codes (NC, NR, gfiler) + SUBROUTINE map_country_codes (NC, NR, gfiler) implicit none integer , intent (in) :: nc, nr character (*) :: gfiler - integer, parameter :: N_GADM = 256 + 1, N_STATES = 50 + integer, parameter :: GC = 43200 integer, parameter :: GR = 21600 - - character*20, dimension (N_STATES) :: ST_NAME - character*48, dimension (N_GADM ) :: CNT_NAME - INTEGER, dimension (N_GADM ) :: index_RANGE + INTEGER, dimension (:), pointer :: index_RANGE + character*20, dimension (:), pointer :: ST_NAME + character*48, dimension (:), pointer :: CNT_NAME + integer :: CNT_CODE, ST_CODE integer :: i(GC),j(GR), k,n, status, ncid, varid, maxcat, I0(1), j0(1) INTEGER, TARGET, ALLOCATABLE, dimension (:,:):: ST_grid, cnt_grid real :: lat_mn, lat_mx, lon_mn, lon_mx real (kind =8) :: XG(GC),YG(GR), y0, x0, dxy - - DATA ST_NAME / & - 'AK 1 Alaska ' ,& - 'AL 2 Alabama ' ,& - 'AZ 3 Arizona ' ,& - 'AR 4 Arkansas ' ,& - 'CA 5 California ' ,& - 'CO 6 Colorado ' ,& - 'CT 7 Connecticut ' ,& - 'DE 8 Delaware ' ,& - 'FL 9 Florida ' ,& - 'GA 10 Georgia ' ,& - 'HI 11 Hawaii ' ,& - 'IA 12 Iowa ' ,& - 'ID 13 Idaho ' ,& - 'IL 14 Illinois ' ,& - 'IN 15 Indiana ' ,& - 'KS 16 Kansas ' ,& - 'KY 17 Kentucky ' ,& - 'LA 18 Louisiana ' ,& - 'MA 19 Massachusetts ' ,& - 'MD 20 Maryland ' ,& - 'ME 21 Maine ' ,& - 'MI 22 Michigan ' ,& - 'MN 23 Minnesota ' ,& - 'MO 24 Missouri ' ,& - 'MS 25 Mississippi ' ,& - 'MT 26 Montana ' ,& - 'NC 27 NorthCarolina ' ,& - 'ND 28 NorthDakota ' ,& - 'NE 29 Nebraska ' ,& - 'NH 30 NewHampshire ' ,& - 'NJ 31 NewJersey ' ,& - 'NM 32 NewMexico ' ,& - 'NV 33 Nevada ' ,& - 'NY 34 NewYork ' ,& - 'OH 35 Ohio ' ,& - 'OK 36 Oklahoma ' ,& - 'OR 37 Oregon ' ,& - 'PA 38 Pennsylvania ' ,& - 'RI 39 RhodeIsland ' ,& - 'SC 40 SouthCarolina ' ,& - 'SD 41 SouthDakota ' ,& - 'TN 42 Tennessee ' ,& - 'TX 43 Texas ' ,& - 'UT 44 Utah ' ,& - 'VA 45 Virginia ' ,& - 'VT 46 Vermont ' ,& - 'WA 47 Washington ' ,& - 'WI 48 Wisconsin ' ,& - 'WV 49 WestVirginia ' ,& - 'WY 50 Wyoming ' / + + call get_country_codes (index_RANGE = index_RANGE, ST_NAME = ST_NAME, & + CNT_NAME = CNT_NAME) - DATA CNT_NAME / & - 'ABW 14 Aruba ' ,& - 'AFG 1 Afghanistan ' ,& - 'AGO 8 Angola ' ,& - 'AIA 9 Anguilla ' ,& - 'ALA 3 Aland ' ,& - 'ALB 4 Albania ' ,& - 'AND 7 Andorra ' ,& - 'ARE 241 United Arab Emirates ' ,& - 'ARG 12 Argentina ' ,& - 'ARM 13 Armenia ' ,& - 'ASM 6 American Samoa ' ,& - 'ATA 10 Antarctica ' ,& - 'ATF 82 French Southern Territories ' ,& - 'ATG 11 Antigua and Barbuda ' ,& - 'AUS 15 Australia ' ,& - 'AUT 16 Austria ' ,& - 'AZE 17 Azerbaijan ' ,& - 'BDI 39 Burundi ' ,& - 'BEL 23 Belgium ' ,& - 'BEN 25 Benin ' ,& - 'BES 29 Bonaire, Sint Eustatius and Saba ' ,& - 'BFA 38 Burkina Faso ' ,& - 'BGD 20 Bangladesh ' ,& - 'BGR 37 Bulgaria ' ,& - 'BHR 19 Bahrain ' ,& - 'BHS 18 Bahamas ' ,& - 'BIH 30 Bosnia and Herzegovina ' ,& - 'BLM 190 Saint-Barthelemy ' ,& - 'BLR 22 Belarus ' ,& - 'BLZ 24 Belize ' ,& - 'BMU 26 Bermuda ' ,& - 'BOL 28 Bolivia ' ,& - 'BRA 33 Brazil ' ,& - 'BRB 21 Barbados ' ,& - 'BRN 36 Brunei ' ,& - 'BTN 27 Bhutan ' ,& - 'BVT 32 Bouvet Island ' ,& - 'BWA 31 Botswana ' ,& - 'CAF 46 Central African Republic ' ,& - 'CAN 42 Canada ' ,& - 'CCK 52 Cocos Islands ' ,& - 'CHE 223 Switzerland ' ,& - 'CHL 48 Chile ' ,& - 'CHN 49 China ' ,& - 'CIV 57 Cote dIvoire ' ,& - 'CMR 41 Cameroon ' ,& - 'COD 0 Democratic Republic of the Congo ' ,& - 'COG 185 Republic of Congo ' ,& - 'COK 55 Cook Islands ' ,& - 'COL 53 Colombia ' ,& - 'COM 54 Comoros ' ,& - 'CPV 43 Cape Verde ' ,& - 'CRI 56 Costa Rica ' ,& - 'CUB 59 Cuba ' ,& - 'CUW 60 Curacao ' ,& - 'CXR 50 Christmas Island ' ,& - 'CYM 45 Cayman Islands ' ,& - 'CYP 61 Cyprus ' ,& - 'CZE 62 Czech Republic ' ,& - 'DEU 86 Germany ' ,& - 'DJI 65 Djibouti ' ,& - 'DMA 66 Dominica ' ,& - 'DNK 64 Denmark ' ,& - 'DOM 67 Dominican Republic ' ,& - 'DZA 5 Algeria ' ,& - 'ECU 68 Ecuador ' ,& - 'EGY 69 Egypt ' ,& - 'ERI 72 Eritrea ' ,& - 'ESH 253 Western Sahara ' ,& - 'ESP 215 Spain ' ,& - 'EST 73 Estonia ' ,& - 'ETH 74 Ethiopia ' ,& - 'FIN 78 Finland ' ,& - 'FJI 77 Fiji ' ,& - 'FLK 75 Falkland Islands ' ,& - 'FRA 79 France ' ,& - 'FRO 76 Faroe Islands ' ,& - 'FSM 146 Micronesia ' ,& - 'GAB 83 Gabon ' ,& - 'GBR 242 United Kingdom ' ,& - 'GEO 85 Georgia ' ,& - 'GGY 95 Guernsey ' ,& - 'GHA 87 Ghana ' ,& - 'GIB 88 Gibraltar ' ,& - 'GIN 96 Guinea ' ,& - 'GLP 92 Guadeloupe ' ,& - 'GMB 84 Gambia ' ,& - 'GNB 97 Guinea-Bissau ' ,& - 'GNQ 71 Equatorial Guinea ' ,& - 'GRC 89 Greece ' ,& - 'GRD 91 Grenada ' ,& - 'GRL 90 Greenland ' ,& - 'GTM 94 Guatemala ' ,& - 'GUF 80 French Guiana ' ,& - 'GUM 93 Guam ' ,& - 'GUY 98 Guyana ' ,& - 'HKG 102 Hong Kong ' ,& - 'HMD 100 Heard Island and McDonald Islands ' ,& - 'HND 101 Honduras ' ,& - 'HRV 58 Croatia ' ,& - 'HTI 99 Haiti ' ,& - 'HUN 103 Hungary ' ,& - 'IDN 106 Indonesia ' ,& - 'IMN 110 Isle of Man ' ,& - 'IND 105 India ' ,& - 'IOT 34 British Indian Ocean Territory ' ,& - 'IRL 109 Ireland ' ,& - 'IRN 107 Iran ' ,& - 'IRQ 108 Iraq ' ,& - 'ISL 104 Iceland ' ,& - 'ISR 111 Israel ' ,& - 'ITA 112 Italy ' ,& - 'JAM 113 Jamaica ' ,& - 'JEY 115 Jersey ' ,& - 'JOR 116 Jordan ' ,& - 'JPN 114 Japan ' ,& - 'KAZ 117 Kazakhstan ' ,& - 'KEN 118 Kenya ' ,& - 'KGZ 122 Kyrgyzstan ' ,& - 'KHM 40 Cambodia ' ,& - 'KIR 119 Kiribati ' ,& - 'KNA 193 Saint Kitts and Nevis ' ,& - 'KOR 213 South Korea ' ,& - 'KWT 121 Kuwait ' ,& - 'LAO 123 Laos ' ,& - 'LBN 125 Lebanon ' ,& - 'LBR 127 Liberia ' ,& - 'LBY 128 Libya ' ,& - 'LCA 194 Saint Lucia ' ,& - 'LIE 129 Liechtenstein ' ,& - 'LKA 217 Sri Lanka ' ,& - 'LSO 126 Lesotho ' ,& - 'LTU 130 Lithuania ' ,& - 'LUX 131 Luxembourg ' ,& - 'LVA 124 Latvia ' ,& - 'MAC 132 Macao ' ,& - 'MAF 191 Saint-Martin ' ,& - 'MAR 152 Morocco ' ,& - 'MCO 148 Monaco ' ,& - 'MDA 147 Moldova ' ,& - 'MDG 134 Madagascar ' ,& - 'MDV 137 Maldives ' ,& - 'MEX 145 Mexico ' ,& - 'MHL 140 Marshall Islands ' ,& - 'MKD 133 Macedonia ' ,& - 'MLI 138 Mali ' ,& - 'MLT 139 Malta ' ,& - 'MMR 154 Myanmar ' ,& - 'MNE 150 Montenegro ' ,& - 'MNG 149 Mongolia ' ,& - 'MNP 168 Northern Mariana Islands ' ,& - 'MOZ 153 Mozambique ' ,& - 'MRT 142 Mauritania ' ,& - 'MSR 151 Montserrat ' ,& - 'MTQ 141 Martinique ' ,& - 'MUS 143 Mauritius ' ,& - 'MWI 135 Malawi ' ,& - 'MYS 136 Malaysia ' ,& - 'MYT 144 Mayotte ' ,& - 'NAM 155 Namibia ' ,& - 'NCL 159 New Caledonia ' ,& - 'NER 162 Niger ' ,& - 'NFK 165 Norfolk Island ' ,& - 'NGA 163 Nigeria ' ,& - 'NIC 161 Nicaragua ' ,& - 'NIU 164 Niue ' ,& - 'NLD 158 Netherlands ' ,& - 'NOR 169 Norway ' ,& - 'NPL 157 Nepal ' ,& - 'NRU 156 Nauru ' ,& - 'NZL 160 New Zealand ' ,& - 'OMN 170 Oman ' ,& - 'PAK 171 Pakistan ' ,& - 'PAN 174 Panama ' ,& - 'PCN 180 Pitcairn Islands ' ,& - 'PER 178 Peru ' ,& - 'PHL 179 Philippines ' ,& - 'PLW 172 Palau ' ,& - 'PNG 175 Papua New Guinea ' ,& - 'POL 181 Poland ' ,& - 'PRI 183 Puerto Rico ' ,& - 'PRK 166 North Korea ' ,& - 'PRT 182 Portugal ' ,& - 'PRY 177 Paraguay ' ,& - 'PSE 173 Palestina ' ,& - 'PYF 81 French Polynesia ' ,& - 'QAT 184 Qatar ' ,& - 'REU 186 Reunion ' ,& - 'ROU 187 Romania ' ,& - 'RUS 188 Russia ' ,& - 'RWA 189 Rwanda ' ,& - 'SAU 200 Saudi Arabia ' ,& - 'SDN 218 Sudan ' ,& - 'SEN 201 Senegal ' ,& - 'SGP 205 Singapore ' ,& - 'SGS 212 South Georgia and the South Sandwich Is ' ,& - 'SHN 192 Saint Helena ' ,& - 'SJM 220 Svalbard and Jan Mayen ' ,& - 'SLB 209 Solomon Islands ' ,& - 'SLE 204 Sierra Leone ' ,& - 'SLV 70 El Salvador ' ,& - 'SMR 198 San Marino ' ,& - 'SOM 210 Somalia ' ,& - 'SPM 195 Saint Pierre and Miquelon ' ,& - 'SRB 202 Serbia ' ,& - 'SSD 214 South Sudan ' ,& - 'STP 199 Sao Tome and Principe ' ,& - 'SUR 219 Suriname ' ,& - 'SVK 207 Slovakia ' ,& - 'SVN 208 Slovenia ' ,& - 'SWE 222 Sweden ' ,& - 'SWZ 221 Swaziland ' ,& - 'SXM 206 Sint Maarten ' ,& - 'SYC 203 Seychelles ' ,& - 'SYR 224 Syria ' ,& - 'TCA 237 Turks and Caicos Islands ' ,& - 'TCD 47 Chad ' ,& - 'TGO 230 Togo ' ,& - 'THA 228 Thailand ' ,& - 'TJK 226 Tajikistan ' ,& - 'TKL 231 Tokelau ' ,& - 'TKM 236 Turkmenistan ' ,& - 'TLS 229 Timor-Leste ' ,& - 'TON 232 Tonga ' ,& - 'TTO 233 Trinidad and Tobago ' ,& - 'TUN 234 Tunisia ' ,& - 'TUR 235 Turkey ' ,& - 'TUV 238 Tuvalu ' ,& - 'TWN 225 Taiwan ' ,& - 'TZA 227 Tanzania ' ,& - 'UGA 239 Uganda ' ,& - 'UKR 240 Ukraine ' ,& - 'UMI 244 United States Minor Outlying Islands ' ,& - 'URY 245 Uruguay ' ,& - 'USA 243 United States ' ,& - 'UZB 246 Uzbekistan ' ,& - 'VAT 248 Vatican City ' ,& - 'VCT 196 Saint Vincent and the Grenadines ' ,& - 'VEN 249 Venezuela ' ,& - 'VGB 35 British Virgin Islands ' ,& - 'VIR 251 Virgin Islands, U.S. ' ,& - 'VNM 250 Vietnam ' ,& - 'VUT 247 Vanuatu ' ,& - 'WLF 252 Wallis and Futuna ' ,& - 'WSM 197 Samoa ' ,& - 'XAD 2 Akrotiri and Dhekelia ' ,& - 'XCA 44 Caspian Sea ' ,& - 'XCL 51 Clipperton Island ' ,& - 'XKO 120 Kosovo ' ,& - 'XNC 167 Northern Cyprus ' ,& - 'XPI 176 Paracel Islands ' ,& - 'XSP 216 Spratly Islands ' ,& - 'YEM 254 Yemen ' ,& - 'ZAF 211 South Africa ' ,& - 'ZMB 255 Zambia ' ,& - 'ZWE 256 Zimbabwe ' ,& - 'UNK 257 Unknown '/ + ! Reading number of tiles + ! ----------------------- + + open (20, file = 'clsm/catchment.def', form = 'formatted', status = 'old', & + action = 'read') - DATA INDEX_RANGE / & + read (20, *) maxcat + + + ! READ PEATMAP source data files and regrid + ! ----------------------------------------- + + status = NF_OPEN ('data/CATCH/GADM_Country_and_USStates_codes_1km.nc4', NF_NOWRITE, ncid) + + allocate (cnt_grid (1 : GC, 1 : GR)) + allocate (st_grid (1 : GC, 1 : GR)) + + status = NF_INQ_VARID (ncid,'UNIT_CODE',VarID) ; VERIFY_(STATUS) + status = NF_GET_VARA_INT (ncid,VarID, (/1,1,1/),(/GC, GR,1/), cnt_grid) ; VERIFY_(STATUS) + status = NF_GET_VARA_INT (ncid,VarID, (/1,1,2/),(/GC, GR,1/), st_grid) ; VERIFY_(STATUS) + where (st_grid == 0) st_grid = 999 + status = NF_CLOSE(ncid) + + open (10,file='clsm/country_and_state_code.data', & + form='formatted',status='unknown') + + dxy = 360./GC + do k = 1, GC + xg(k) = (k-1)*dxy -180. + dxy/2. + end do + do k = 1, GR + yg(k) = (k-1)*dxy -90. + dxy/2. + end do + + DO n = 1, MAXCAT + read (20,*) i0,j0, lon_mn, lon_mx, lat_mn, lat_mx + x0 = (lon_mn + lon_mx)/2. + y0 = (lat_mn + lat_mx)/2. + I = 0 + J = 0 + WHERE ((xg >= x0).and.(xg < x0 + dxy)) I = 1 + WHERE ((yg >= y0).and.(yg < y0 + dxy)) J = 1 + + I0 =FINDLOC(I,1) + J0 =FINDLOC(J,1) + + cnt_code = cnt_grid(I0(1), J0(1)) + st_code = st_grid (I0(1), J0(1)) + + if(cnt_code > 300) then + CNT_CODE = 257 + endif + + if(st_code <= 50) then + write (10, '(i10, 2I4, 1x, a48, a20)') n, cnt_code, st_code, CNT_NAME(FINDLOC(INDEX_RANGE, CNT_CODE)), ST_NAME (ST_CODE) + else + write (10, '(i10, 2I4, 1x, a48, a20)') n, cnt_code, st_code, CNT_NAME(FINDLOC(INDEX_RANGE, CNT_CODE)), 'OUTSIDE USA' + endif + + END DO + + close (10, status = 'keep') + close (20, status = 'keep') + END SUBROUTINE map_country_codes + + ! ------------------------------------------------------------------------------------------- + + SUBROUTINE get_country_codes (index_RANGE, ST_NAME, CNT_NAME, ST_NAME_ABR, CNT_NAME_ABR) + + implicit none + + INTEGER, dimension (N_GADM ), TARGET :: index_RANGE_DATA + character*20, dimension (N_STATES), TARGET :: ST_NAME_DATA + character*48, dimension (N_GADM ), TARGET :: CNT_NAME_DATA + INTEGER, dimension (:), pointer, intent (inout), optional :: index_RANGE + character*20, dimension (:), pointer, intent (inout), optional :: ST_NAME + character*48, dimension (:), pointer, intent (inout), optional :: CNT_NAME + character*2, dimension (:), pointer, intent (inout), optional :: ST_NAME_ABR + character*3, dimension (:), pointer, intent (inout), optional :: CNT_NAME_ABR + + DATA ST_NAME_DATA / & + 'AK 1 Alaska ' ,& + 'AL 2 Alabama ' ,& + 'AZ 3 Arizona ' ,& + 'AR 4 Arkansas ' ,& + 'CA 5 California ' ,& + 'CO 6 Colorado ' ,& + 'CT 7 Connecticut ' ,& + 'DE 8 Delaware ' ,& + 'FL 9 Florida ' ,& + 'GA 10 Georgia ' ,& + 'HI 11 Hawaii ' ,& + 'IA 12 Iowa ' ,& + 'ID 13 Idaho ' ,& + 'IL 14 Illinois ' ,& + 'IN 15 Indiana ' ,& + 'KS 16 Kansas ' ,& + 'KY 17 Kentucky ' ,& + 'LA 18 Louisiana ' ,& + 'MA 19 Massachusetts ' ,& + 'MD 20 Maryland ' ,& + 'ME 21 Maine ' ,& + 'MI 22 Michigan ' ,& + 'MN 23 Minnesota ' ,& + 'MO 24 Missouri ' ,& + 'MS 25 Mississippi ' ,& + 'MT 26 Montana ' ,& + 'NC 27 NorthCarolina ' ,& + 'ND 28 NorthDakota ' ,& + 'NE 29 Nebraska ' ,& + 'NH 30 NewHampshire ' ,& + 'NJ 31 NewJersey ' ,& + 'NM 32 NewMexico ' ,& + 'NV 33 Nevada ' ,& + 'NY 34 NewYork ' ,& + 'OH 35 Ohio ' ,& + 'OK 36 Oklahoma ' ,& + 'OR 37 Oregon ' ,& + 'PA 38 Pennsylvania ' ,& + 'RI 39 RhodeIsland ' ,& + 'SC 40 SouthCarolina ' ,& + 'SD 41 SouthDakota ' ,& + 'TN 42 Tennessee ' ,& + 'TX 43 Texas ' ,& + 'UT 44 Utah ' ,& + 'VA 45 Virginia ' ,& + 'VT 46 Vermont ' ,& + 'WA 47 Washington ' ,& + 'WI 48 Wisconsin ' ,& + 'WV 49 WestVirginia ' ,& + 'WY 50 Wyoming ' / + + DATA CNT_NAME_DATA / & + 'ABW 14 Aruba ' ,& + 'AFG 1 Afghanistan ' ,& + 'AGO 8 Angola ' ,& + 'AIA 9 Anguilla ' ,& + 'ALA 3 Aland ' ,& + 'ALB 4 Albania ' ,& + 'AND 7 Andorra ' ,& + 'ARE 241 United Arab Emirates ' ,& + 'ARG 12 Argentina ' ,& + 'ARM 13 Armenia ' ,& + 'ASM 6 American Samoa ' ,& + 'ATA 10 Antarctica ' ,& + 'ATF 82 French Southern Territories ' ,& + 'ATG 11 Antigua and Barbuda ' ,& + 'AUS 15 Australia ' ,& + 'AUT 16 Austria ' ,& + 'AZE 17 Azerbaijan ' ,& + 'BDI 39 Burundi ' ,& + 'BEL 23 Belgium ' ,& + 'BEN 25 Benin ' ,& + 'BES 29 Bonaire, Sint Eustatius and Saba ' ,& + 'BFA 38 Burkina Faso ' ,& + 'BGD 20 Bangladesh ' ,& + 'BGR 37 Bulgaria ' ,& + 'BHR 19 Bahrain ' ,& + 'BHS 18 Bahamas ' ,& + 'BIH 30 Bosnia and Herzegovina ' ,& + 'BLM 190 Saint-Barthelemy ' ,& + 'BLR 22 Belarus ' ,& + 'BLZ 24 Belize ' ,& + 'BMU 26 Bermuda ' ,& + 'BOL 28 Bolivia ' ,& + 'BRA 33 Brazil ' ,& + 'BRB 21 Barbados ' ,& + 'BRN 36 Brunei ' ,& + 'BTN 27 Bhutan ' ,& + 'BVT 32 Bouvet Island ' ,& + 'BWA 31 Botswana ' ,& + 'CAF 46 Central African Republic ' ,& + 'CAN 42 Canada ' ,& + 'CCK 52 Cocos Islands ' ,& + 'CHE 223 Switzerland ' ,& + 'CHL 48 Chile ' ,& + 'CHN 49 China ' ,& + 'CIV 57 Cote dIvoire ' ,& + 'CMR 41 Cameroon ' ,& + 'COD 0 Democratic Republic of the Congo ' ,& + 'COG 185 Republic of Congo ' ,& + 'COK 55 Cook Islands ' ,& + 'COL 53 Colombia ' ,& + 'COM 54 Comoros ' ,& + 'CPV 43 Cape Verde ' ,& + 'CRI 56 Costa Rica ' ,& + 'CUB 59 Cuba ' ,& + 'CUW 60 Curacao ' ,& + 'CXR 50 Christmas Island ' ,& + 'CYM 45 Cayman Islands ' ,& + 'CYP 61 Cyprus ' ,& + 'CZE 62 Czech Republic ' ,& + 'DEU 86 Germany ' ,& + 'DJI 65 Djibouti ' ,& + 'DMA 66 Dominica ' ,& + 'DNK 64 Denmark ' ,& + 'DOM 67 Dominican Republic ' ,& + 'DZA 5 Algeria ' ,& + 'ECU 68 Ecuador ' ,& + 'EGY 69 Egypt ' ,& + 'ERI 72 Eritrea ' ,& + 'ESH 253 Western Sahara ' ,& + 'ESP 215 Spain ' ,& + 'EST 73 Estonia ' ,& + 'ETH 74 Ethiopia ' ,& + 'FIN 78 Finland ' ,& + 'FJI 77 Fiji ' ,& + 'FLK 75 Falkland Islands ' ,& + 'FRA 79 France ' ,& + 'FRO 76 Faroe Islands ' ,& + 'FSM 146 Micronesia ' ,& + 'GAB 83 Gabon ' ,& + 'GBR 242 United Kingdom ' ,& + 'GEO 85 Georgia ' ,& + 'GGY 95 Guernsey ' ,& + 'GHA 87 Ghana ' ,& + 'GIB 88 Gibraltar ' ,& + 'GIN 96 Guinea ' ,& + 'GLP 92 Guadeloupe ' ,& + 'GMB 84 Gambia ' ,& + 'GNB 97 Guinea-Bissau ' ,& + 'GNQ 71 Equatorial Guinea ' ,& + 'GRC 89 Greece ' ,& + 'GRD 91 Grenada ' ,& + 'GRL 90 Greenland ' ,& + 'GTM 94 Guatemala ' ,& + 'GUF 80 French Guiana ' ,& + 'GUM 93 Guam ' ,& + 'GUY 98 Guyana ' ,& + 'HKG 102 Hong Kong ' ,& + 'HMD 100 Heard Island and McDonald Islands ' ,& + 'HND 101 Honduras ' ,& + 'HRV 58 Croatia ' ,& + 'HTI 99 Haiti ' ,& + 'HUN 103 Hungary ' ,& + 'IDN 106 Indonesia ' ,& + 'IMN 110 Isle of Man ' ,& + 'IND 105 India ' ,& + 'IOT 34 British Indian Ocean Territory ' ,& + 'IRL 109 Ireland ' ,& + 'IRN 107 Iran ' ,& + 'IRQ 108 Iraq ' ,& + 'ISL 104 Iceland ' ,& + 'ISR 111 Israel ' ,& + 'ITA 112 Italy ' ,& + 'JAM 113 Jamaica ' ,& + 'JEY 115 Jersey ' ,& + 'JOR 116 Jordan ' ,& + 'JPN 114 Japan ' ,& + 'KAZ 117 Kazakhstan ' ,& + 'KEN 118 Kenya ' ,& + 'KGZ 122 Kyrgyzstan ' ,& + 'KHM 40 Cambodia ' ,& + 'KIR 119 Kiribati ' ,& + 'KNA 193 Saint Kitts and Nevis ' ,& + 'KOR 213 South Korea ' ,& + 'KWT 121 Kuwait ' ,& + 'LAO 123 Laos ' ,& + 'LBN 125 Lebanon ' ,& + 'LBR 127 Liberia ' ,& + 'LBY 128 Libya ' ,& + 'LCA 194 Saint Lucia ' ,& + 'LIE 129 Liechtenstein ' ,& + 'LKA 217 Sri Lanka ' ,& + 'LSO 126 Lesotho ' ,& + 'LTU 130 Lithuania ' ,& + 'LUX 131 Luxembourg ' ,& + 'LVA 124 Latvia ' ,& + 'MAC 132 Macao ' ,& + 'MAF 191 Saint-Martin ' ,& + 'MAR 152 Morocco ' ,& + 'MCO 148 Monaco ' ,& + 'MDA 147 Moldova ' ,& + 'MDG 134 Madagascar ' ,& + 'MDV 137 Maldives ' ,& + 'MEX 145 Mexico ' ,& + 'MHL 140 Marshall Islands ' ,& + 'MKD 133 Macedonia ' ,& + 'MLI 138 Mali ' ,& + 'MLT 139 Malta ' ,& + 'MMR 154 Myanmar ' ,& + 'MNE 150 Montenegro ' ,& + 'MNG 149 Mongolia ' ,& + 'MNP 168 Northern Mariana Islands ' ,& + 'MOZ 153 Mozambique ' ,& + 'MRT 142 Mauritania ' ,& + 'MSR 151 Montserrat ' ,& + 'MTQ 141 Martinique ' ,& + 'MUS 143 Mauritius ' ,& + 'MWI 135 Malawi ' ,& + 'MYS 136 Malaysia ' ,& + 'MYT 144 Mayotte ' ,& + 'NAM 155 Namibia ' ,& + 'NCL 159 New Caledonia ' ,& + 'NER 162 Niger ' ,& + 'NFK 165 Norfolk Island ' ,& + 'NGA 163 Nigeria ' ,& + 'NIC 161 Nicaragua ' ,& + 'NIU 164 Niue ' ,& + 'NLD 158 Netherlands ' ,& + 'NOR 169 Norway ' ,& + 'NPL 157 Nepal ' ,& + 'NRU 156 Nauru ' ,& + 'NZL 160 New Zealand ' ,& + 'OMN 170 Oman ' ,& + 'PAK 171 Pakistan ' ,& + 'PAN 174 Panama ' ,& + 'PCN 180 Pitcairn Islands ' ,& + 'PER 178 Peru ' ,& + 'PHL 179 Philippines ' ,& + 'PLW 172 Palau ' ,& + 'PNG 175 Papua New Guinea ' ,& + 'POL 181 Poland ' ,& + 'PRI 183 Puerto Rico ' ,& + 'PRK 166 North Korea ' ,& + 'PRT 182 Portugal ' ,& + 'PRY 177 Paraguay ' ,& + 'PSE 173 Palestina ' ,& + 'PYF 81 French Polynesia ' ,& + 'QAT 184 Qatar ' ,& + 'REU 186 Reunion ' ,& + 'ROU 187 Romania ' ,& + 'RUS 188 Russia ' ,& + 'RWA 189 Rwanda ' ,& + 'SAU 200 Saudi Arabia ' ,& + 'SDN 218 Sudan ' ,& + 'SEN 201 Senegal ' ,& + 'SGP 205 Singapore ' ,& + 'SGS 212 South Georgia and the South Sandwich Is ' ,& + 'SHN 192 Saint Helena ' ,& + 'SJM 220 Svalbard and Jan Mayen ' ,& + 'SLB 209 Solomon Islands ' ,& + 'SLE 204 Sierra Leone ' ,& + 'SLV 70 El Salvador ' ,& + 'SMR 198 San Marino ' ,& + 'SOM 210 Somalia ' ,& + 'SPM 195 Saint Pierre and Miquelon ' ,& + 'SRB 202 Serbia ' ,& + 'SSD 214 South Sudan ' ,& + 'STP 199 Sao Tome and Principe ' ,& + 'SUR 219 Suriname ' ,& + 'SVK 207 Slovakia ' ,& + 'SVN 208 Slovenia ' ,& + 'SWE 222 Sweden ' ,& + 'SWZ 221 Swaziland ' ,& + 'SXM 206 Sint Maarten ' ,& + 'SYC 203 Seychelles ' ,& + 'SYR 224 Syria ' ,& + 'TCA 237 Turks and Caicos Islands ' ,& + 'TCD 47 Chad ' ,& + 'TGO 230 Togo ' ,& + 'THA 228 Thailand ' ,& + 'TJK 226 Tajikistan ' ,& + 'TKL 231 Tokelau ' ,& + 'TKM 236 Turkmenistan ' ,& + 'TLS 229 Timor-Leste ' ,& + 'TON 232 Tonga ' ,& + 'TTO 233 Trinidad and Tobago ' ,& + 'TUN 234 Tunisia ' ,& + 'TUR 235 Turkey ' ,& + 'TUV 238 Tuvalu ' ,& + 'TWN 225 Taiwan ' ,& + 'TZA 227 Tanzania ' ,& + 'UGA 239 Uganda ' ,& + 'UKR 240 Ukraine ' ,& + 'UMI 244 United States Minor Outlying Islands ' ,& + 'URY 245 Uruguay ' ,& + 'USA 243 United States ' ,& + 'UZB 246 Uzbekistan ' ,& + 'VAT 248 Vatican City ' ,& + 'VCT 196 Saint Vincent and the Grenadines ' ,& + 'VEN 249 Venezuela ' ,& + 'VGB 35 British Virgin Islands ' ,& + 'VIR 251 Virgin Islands, U.S. ' ,& + 'VNM 250 Vietnam ' ,& + 'VUT 247 Vanuatu ' ,& + 'WLF 252 Wallis and Futuna ' ,& + 'WSM 197 Samoa ' ,& + 'XAD 2 Akrotiri and Dhekelia ' ,& + 'XCA 44 Caspian Sea ' ,& + 'XCL 51 Clipperton Island ' ,& + 'XKO 120 Kosovo ' ,& + 'XNC 167 Northern Cyprus ' ,& + 'XPI 176 Paracel Islands ' ,& + 'XSP 216 Spratly Islands ' ,& + 'YEM 254 Yemen ' ,& + 'ZAF 211 South Africa ' ,& + 'ZMB 255 Zambia ' ,& + 'ZWE 256 Zimbabwe ' ,& + 'UNK 257 Unknown '/ + + DATA INDEX_RANGE_DATA / & 14 ,& 1 ,& 8 ,& @@ -6879,139 +7039,16 @@ SUBROUTINE country_codes (NC, NR, gfiler) 256 ,& 257 / + if(present(index_RANGE )) index_RANGE => index_RANGE_DATA + if(present(ST_NAME )) ST_NAME => ST_NAME_DATA + if(present(CNT_NAME )) CNT_NAME => CNT_NAME_DATA + if(present(ST_NAME_ABR )) ST_NAME_ABR => ST_NAME_DATA (:)(1:2) + if(present(CNT_NAME_ABR)) CNT_NAME_ABR=> CNT_NAME_DATA(:)(1:3) - ! Reading number of tiles - ! ----------------------- - - open (20, file = 'clsm/catchment.def', form = 'formatted', status = 'old', & - action = 'read') - - read (20, *) maxcat - - - ! READ PEATMAP source data files and regrid - ! ----------------------------------------- - - status = NF_OPEN ('data/CATCH/GADM_Country_and_USStates_codes_1km.nc4', NF_NOWRITE, ncid) - - allocate (cnt_grid (1 : GC, 1 : GR)) - allocate (st_grid (1 : GC, 1 : GR)) - - status = NF_INQ_VARID (ncid,'UNIT_CODE',VarID) ; VERIFY_(STATUS) - status = NF_GET_VARA_INT (ncid,VarID, (/1,1,1/),(/GC, GR,1/), cnt_grid) ; VERIFY_(STATUS) - status = NF_GET_VARA_INT (ncid,VarID, (/1,1,2/),(/GC, GR,1/), st_grid) ; VERIFY_(STATUS) - where (st_grid == 0) st_grid = 999 - status = NF_CLOSE(ncid) - - open (10,file='clsm/country_and_state_code.data', & - form='formatted',status='unknown') - - dxy = 360./GC - do k = 1, GC - xg(k) = (k-1)*dxy -180. + dxy/2. - end do - do k = 1, GR - yg(k) = (k-1)*dxy -90. + dxy/2. - end do - - DO n = 1, MAXCAT - read (20,*) i0,j0, lon_mn, lon_mx, lat_mn, lat_mx - x0 = (lon_mn + lon_mx)/2. - y0 = (lat_mn + lat_mx)/2. - I = 0 - J = 0 - WHERE ((xg >= x0).and.(xg < x0 + dxy)) I = 1 - WHERE ((yg >= y0).and.(yg < y0 + dxy)) J = 1 - - I0 =FINDLOC(I,1) - J0 =FINDLOC(J,1) - - cnt_code = cnt_grid(I0(1), J0(1)) - st_code = st_grid (I0(1), J0(1)) - - if(cnt_code > 300) then - CNT_CODE = 257 - endif - - if(st_code <= 50) then - write (10, '(i8, 2I4, 1x, a48, a20)') n, cnt_code, st_code, CNT_NAME(FINDLOC(INDEX_RANGE, CNT_CODE)), ST_NAME (ST_CODE) - else - write (10, '(i8, 2I4, 1x, a48, a20)') n, cnt_code, st_code, CNT_NAME(FINDLOC(INDEX_RANGE, CNT_CODE)), 'OUTSIDE USA' - endif - - END DO - - close (10, status = 'keep') - close (20, status = 'keep') - END SUBROUTINE country_codes + END SUBROUTINE get_country_codes END MODULE process_hres_data -! ------------------------------------------------------------------------------------------------------------------------------- +! ---------------------------------------------------------------------------------------------- -#ifdef DO_CLM45 -!gmake FOPT='-DDO_CLM45' -!mpiifort -o ../bin/mk_clm45 -DsysLinux -DESMA64 -DHAS_NETCDF4 -DHAS_NETCDF3 -DH5_HAVE_PARALLEL -DNETCDF_NEED_NF_MPIIO -DHAVE_SHMEM -I/discover/nobackup/projects/gmao/share/gmao_ops/Baselibs/v4.0.6_build1/x86_64-unknown-linux-gnu/ifort_15.0.2.164-intelmpi_5.0.3.048/Linux/include/esmf -I/discover/nobackup/projects/gmao/share/gmao_ops/Baselibs/v4.0.6_build1/x86_64-unknown-linux-gnu/ifort_15.0.2.164-intelmpi_5.0.3.048/Linux/include/esmf -DDO_CLM45 -fPIC -fpe0 -fp-model source -heap-arrays 32 -assume noold_maxminloc -align dcommons -DEIGHT_BYTE -I../mod/ -I/discover/nobackup/projects/gmao/share/gmao_ops/Baselibs/v4.0.6_build1/x86_64-unknown-linux-gnu/ifort_15.0.2.164-intelmpi_5.0.3.048/Linux/include/netcdf -L/discover/nobackup/projects/gmao/share/gmao_ops/Baselibs/v4.0.6_build1/x86_64-unknown-linux-gnu/ifort_15.0.2.164-intelmpi_5.0.3.048/Linux/lib -L../lib/ -I../include/ -I/discover/nobackup/projects/gmao/share/gmao_ops/Baselibs/v4.0.6_build1/x86_64-unknown-linux-gnu/ifort_15.0.2.164-intelmpi_5.0.3.048/Linux/include/netcdf -I/discover/nobackup/projects/gmao/share/gmao_ops/Baselibs/v4.0.6_build1/x86_64-unknown-linux-gnu/ifort_15.0.2.164-intelmpi_5.0.3.048/Linux/include/hdf5 mod_clm45_routines.F90 ../lib/libraster.a -lz -L../lib -lraster -L/discover/nobackup/projects/gmao/share/gmao_ops/Baselibs/v4.0.6_build1/x86_64-unknown-linux-gnu/ifort_15.0.2.164-intelmpi_5.0.3.048/Linux/lib -lnetcdff -lnetcdf -L/discover/nobackup/projects/gmao/share/gmao_ops/Baselibs/v4.0.6_build1/x86_64-unknown-linux-gnu/ifort_15.0.2.164-intelmpi_5.0.3.048/Linux/lib -L/discover/nobackup/projects/gmao/share/gmao_ops/Baselibs/v4.0.6_build1/x86_64-unknown-linux-gnu/ifort_15.0.2.164-intelmpi_5.0.3.048/Linux/lib -lnetcdf -ljpeg -lmfhdf -ldf -lhdf5_hl -lhdf5 -lm -L/discover/nobackup/projects/gmao/share/gmao_ops/Baselibs/v4.0.6_build1/x86_64-unknown-linux-gnu/ifort_15.0.2.164-intelmpi_5.0.3.048/Linux/lib -lmfhdf -ldf -lsz -ljpeg -lgpfs -L/discover/nobackup/projects/gmao/share/gmao_ops/Baselibs/v4.0.6_build1/x86_64-unknown-linux-gnu/ifort_15.0.2.164-intelmpi_5.0.3.048/Linux/lib -lcurl -lssl -lcrypto -lssl -lcrypto -ldl -lz -lz -lrt -lm -lm -L/discover/nobackup/projects/gmao/share/gmao_ops/Baselibs/v4.0.6_build1/x86_64-unknown-linux-gnu/ifort_15.0.2.164-intelmpi_5.0.3.048/Linux/lib -lcurl -lssl -lcrypto -lssl -lcrypto -ldl -lz -lz -lrt -lm -lirc -ldl -lc -lpthread -lrt - PROGRAM mk_clm45 - - use mod_clm45_routines - implicit none - character*400 :: arg(3), gfiler - integer :: n , iargc, nc, nr - - if(iargc() /= 3) then - print *, "Wrong Number of arguments: ", iargc() - print *, "Usage : ./mkclm45 NC NR rst/gfile" - stop - endif - - do n=1,3 - call getarg(n,arg(n)) - enddo - - read(arg(1),*) NC - read(arg(2),*) NR - read(arg(3),'(a)') gfiler - - call CLM45_fixed_parameters (nc, nr, gfiler) - call CLM45_clim_parameters (nc, nr, gfiler) - - END PROGRAM mk_clm45 - -#endif - -! ------------------------------------------------------------------------------------------------------ - -#ifdef DO_GIMMS -!gmake FOPT='-DDO_GIMMS' -!mpiifort -o ../bin/mk_gimms -DsysLinux -DESMA64 -DHAS_NETCDF4 -DHAS_NETCDF3 -DH5_HAVE_PARALLEL -DNETCDF_NEED_NF_MPIIO -DHAVE_SHMEM -I/discover/nobackup/projects/gmao/share/gmao_ops/Baselibs/v4.0.6_build1/x86_64-unknown-linux-gnu/ifort_15.0.2.164-intelmpi_5.0.3.048/Linux/include/esmf -I/discover/nobackup/projects/gmao/share/gmao_ops/Baselibs/v4.0.6_build1/x86_64-unknown-linux-gnu/ifort_15.0.2.164-intelmpi_5.0.3.048/Linux/include/esmf -DDO_GIMMS -O3 -qopt-report0 -ftz -align all -fno-alias -qno-offload -traceback -fPIC -fpe0 -fp-model source -heap-arrays 32 -assume noold_maxminloc -align dcommons -DEIGHT_BYTE -I../mod/ -I/discover/nobackup/projects/gmao/share/gmao_ops/Baselibs/v4.0.6_build1/x86_64-unknown-linux-gnu/ifort_15.0.2.164-intelmpi_5.0.3.048/Linux/include/netcdf -L/discover/nobackup/projects/gmao/share/gmao_ops/Baselibs/v4.0.6_build1/x86_64-unknown-linux-gnu/ifort_15.0.2.164-intelmpi_5.0.3.048/Linux/lib -L../lib/ -I../include/ gimms_ndvi.F90 ../lib/libraster.a -lz -L../lib -lraster -L/discover/nobackup/projects/gmao/share/gmao_ops/Baselibs/v4.0.6_build1/x86_64-unknown-linux-gnu/ifort_15.0.2.164-intelmpi_5.0.3.048/Linux/lib -lnetcdff -lnetcdf -L/discover/nobackup/projects/gmao/share/gmao_ops/Baselibs/v4.0.6_build1/x86_64-unknown-linux-gnu/ifort_15.0.2.164-intelmpi_5.0.3.048/Linux/lib -L/discover/nobackup/projects/gmao/share/gmao_ops/Baselibs/v4.0.6_build1/x86_64-unknown-linux-gnu/ifort_15.0.2.164-intelmpi_5.0.3.048/Linux/lib -lnetcdf -ljpeg -lmfhdf -ldf -lhdf5_hl -lhdf5 -lm -L/discover/nobackup/projects/gmao/share/gmao_ops/Baselibs/v4.0.6_build1/x86_64-unknown-linux-gnu/ifort_15.0.2.164-intelmpi_5.0.3.048/Linux/lib -lmfhdf -ldf -lsz -ljpeg -lgpfs -L/discover/nobackup/projects/gmao/share/gmao_ops/Baselibs/v4.0.6_build1/x86_64-unknown-linux-gnu/ifort_15.0.2.164-intelmpi_5.0.3.048/Linux/lib -lcurl -lssl -lcrypto -lssl -lcrypto -ldl -lz -lz -lrt -lm -lm -L/discover/nobackup/projects/gmao/share/gmao_ops/Baselibs/v4.0.6_build1/x86_64-unknown-linux-gnu/ifort_15.0.2.164-intelmpi_5.0.3.048/Linux/lib -lcurl -lssl -lcrypto -lssl -lcrypto -ldl -lz -lz -lrt -lm -lirc -ldl -lc -lpthread -lrt -L/gpfsm/dnb32/mbhat/GCC/install/gcc-4.6.3/lib/gcc/x86_64-unknown-linux-gnu/4.6.3 -lstdc++ - - PROGRAM mk_gimms - - use gimms_ndvi - implicit none - character*400 :: arg(4), gfiler, vegfile - integer :: n , iargc, nc, nr - - if(iargc() /= 4) then - print *, "Wrong Number of arguments: ", iargc() - print *, "Usage : ./mkclm45 NC NR rst/gfile vegfile" - stop - endif - - do n=1,4 - call getarg(n,arg(n)) - enddo - - read(arg(1),*) NC - read(arg(2),*) NR - read(arg(3),'(a)') gfiler - read(arg(4),'(a)') vegfile - - call ascat_r0 (nc, nr, gfiler, vegfile) - call gimms_clim_ndvi (nc, nr, gfiler) - - END PROGRAM mk_gimms - -#endif diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/rasterize.F90 b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/rasterize.F90 index 0c6a2addf..8a3370b26 100644 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/rasterize.F90 +++ b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/rasterize.F90 @@ -4,7 +4,8 @@ module LogRectRasterizeMod use MAPL_SORTMOD - + use rmTinyCatchParaMod, ONLY: SRTM_maxcat + implicit none private @@ -213,7 +214,7 @@ subroutine WriteTilingIR(File, GridName, im, jm, ipx, nx, ny, iTable, rTable, Zi if(DoZip) then call ZipBuff(trim(File)//char(0),trim(Line)//char(0),0,1,1) - write(LINE,'(3I10)') ip, nx, ny + write(LINE,'(4I10)') ip, SRTM_maxcat, nx, ny call ZipBuff(trim(File)//char(0),trim(Line)//char(0),1,1,1) write(LINE,'(I10)' ) ng call ZipBuff(trim(File)//char(0),trim(Line)//char(0),1,1,1) @@ -234,7 +235,7 @@ subroutine WriteTilingIR(File, GridName, im, jm, ipx, nx, ny, iTable, rTable, Zi Inquire(Unit=Unit,Opened=Opened) end do open (UNIT,file=trim(File), form='formatted', status='unknown') - write(UNIT,'(3I10)') ip, nx, ny + write(UNIT,'(4I10)') ip, SRTM_maxcat, nx, ny write(UNIT,'(I10)' ) ng do l=1,ng ix=index(GridName(l),'/',Back=.true.) @@ -350,7 +351,7 @@ subroutine OpenTiling(Unit, File, GridName, im, jm, ip, nx, ny, Zip, Verb) if(DoZip) then Unit = -1 call ZipBuff(trim(File)//char(0),trim(Line)//char(0),0,1,1) - write(LINE,'(3I10)') ip, nx, ny + write(LINE,'(4I10)') ip, SRTM_maxcat, nx, ny call ZipBuff(trim(File)//char(0),trim(Line)//char(0),1,1,1) write(LINE,'(I10)' ) 1 call ZipBuff(trim(File)//char(0),trim(Line)//char(0),1,1,1) @@ -369,7 +370,7 @@ subroutine OpenTiling(Unit, File, GridName, im, jm, ip, nx, ny, Zip, Verb) Inquire(Unit=Unit,Opened=Opened) end do open (UNIT,file=trim(File), form='formatted', status='unknown') - write(UNIT,'(3I10)') ip, nx, ny + write(UNIT,'(4I10)') ip,SRTM_maxcat, nx, ny write(UNIT,'(I10)' ) 1 ix=index(GridName ,'/',Back=.true.) write(UNIT, * ) trim(GridName (ix+1:)) diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/rmTinyCatchParaMod.F90 b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/rmTinyCatchParaMod.F90 index 420ee1ca1..8edc887b9 100644 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/rmTinyCatchParaMod.F90 +++ b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/rmTinyCatchParaMod.F90 @@ -10,11 +10,12 @@ module rmTinyCatchParaMod use date_time_util use leap_year use MAPL_ConstantsMod + use lsm_routines, ONLY: sibalb implicit none logical, parameter :: error_file=.true. integer, parameter :: n_SoilClasses = 253 - real, parameter :: gnu=1.0, zks = 2.0 + real, parameter :: zks = 2.0 integer, parameter :: i_raster = 8640, j_raster=4320 integer, parameter :: ncat_gswp2 = 15238 REAL, PARAMETER :: undef = 1.e+20 @@ -27,7 +28,7 @@ module rmTinyCatchParaMod include 'netcdf.inc' logical :: preserve_soiltype = .false. character*100 :: c_data = 'data/CATCH/' - logical :: process_peat = .false. + private @@ -40,16 +41,91 @@ module rmTinyCatchParaMod public mineral_perc, process_gswp2_veg,center_pix, soil_class public tgen, sat_param,REFORMAT_VEGFILES,base_param,ts_param public :: Get_MidTime, Time_Interp_Fac, compute_stats, c_data - public :: ascat_r0, jpl_canoph, NC_VarID, process_peat - logical, parameter, public :: jpl_height = .false. - -type :: mineral_perc - real :: clay_perc - real :: silt_perc - real :: sand_perc -end type mineral_perc + public :: ascat_r0, jpl_canoph, NC_VarID, init_bcs_config + INTEGER, PARAMETER, public:: SRTM_maxcat = 291284 + logical, public, save :: process_peat = .true. + logical, public, save :: jpl_height = .true. + character*8, public, save :: LAIBCS = 'MODGEO' + character*4, public, save :: SOILBCS = 'HWSD' + character*6, public, save :: MODALB = 'MODIS2' + REAL, save :: GNU = 1.0 + + type :: mineral_perc + real :: clay_perc + real :: silt_perc + real :: sand_perc + end type mineral_perc contains + + SUBROUTINE init_bcs_config (LBSV) + + implicit none + + character(*), intent (in) :: LBSV +! LAIBCS: Choice of LAI data set. DEFAULT : MODGEO +! GLASSA : 8-day AVHRR climatology from the period 1981-2017 on 7200x3600 grid +! GLASSM : 8-day MODIS climatology from the period 2000-2017 on 7200x3600 grid +! MODISV6 : 8-day climatology from the period 2002.01-2016.10 on 86400x43200 grid +! MODGEO : MODIS with GEOLAND2 overlaid on South America, Afirca and Australia +! GEOLAND2: 10-day climatology from the period 1999-2011 on 40320x20160 grid +! GSWP2 : Monthly climatology from the period 1982-1998 on 360x180 grid +! MODIS : 8-day climatology from the period 2000-2013 on 43200x21600 grid +! GSWPH : Monthly climatology from the period 1982-1998 on 43200x21600 grid " +! MODALB: Choice of MODIS Albedo data. DEFAULT : MODIS2 +! MODIS1 : 16-day Climatology from 1'x1 (21600x10800) MODIS data from the period 2000-2004 +! MODIS2 : 8-day Climatology from 30"x30"(43200x21600) MODIS data from the period 2001-2011 +! SOILBCS:Choice of soil data. DEFAULT :HWSD +! HWSD : Merged HWSD-STATSGO2 soil properties on 43200x21600 with Woesten et al. (1999) Parameters + + select case (trim(LBSV)) + + case ("F25") + LAIBCS = 'GSWP2' + SOILBCS = 'NGDC' + MODALB = 'MODIS1' + GNU = 2.17 + process_peat = .false. + jpl_height = .false. + + case ("GM4", "ICA") + LAIBCS = 'GSWP2' + SOILBCS = 'NGDC' + MODALB = 'MODIS2' + process_peat = .false. + jpl_height = .false. + + case ("NL3") + LAIBCS = 'MODGEO' + SOILBCS = 'HWSD' + MODALB = 'MODIS2' + process_peat = .false. + jpl_height = .false. + + case ("NL4") + LAIBCS = 'MODGEO' + SOILBCS = 'HWSD' + MODALB = 'MODIS2' + process_peat = .false. + jpl_height = .true. + + case ("NL4p") + LAIBCS = 'MODGEO' + SOILBCS = 'HWSD' + MODALB = 'MODIS2' + process_peat = .true. + jpl_height = .true. + + case ("DEF") + LAIBCS = 'MODGEO' + SOILBCS = 'HWSD' + MODALB = 'MODIS2' + process_peat = .true. + jpl_height = .true. + + end select + + END SUBROUTINE init_bcs_config ! _____________________________________________________________________________________________ ! @@ -526,7 +602,7 @@ SUBROUTINE soil_para_high (nx,ny,regrid,gfile,F25Tag) character(*) :: gfile character*10 :: dline CHARACTER*20 :: version,resoln,continent - integer :: iret,ncid + integer :: iret,ncid,ncid1 real, allocatable, target, dimension (:,:) :: SOIL_HIGH integer, allocatable, dimension (:,:) :: tile_id REAL, ALLOCATABLE :: count_soil(:) @@ -537,6 +613,49 @@ SUBROUTINE soil_para_high (nx,ny,regrid,gfile,F25Tag) logical :: regrid real, pointer :: Raster(:,:) logical, intent (in), optional :: F25Tag + logical :: file_exists + real, allocatable, dimension (:,:) :: parms4file + +! --------- VARIABLES FOR *OPENMP* PARALLEL ENVIRONMENT ------------ +! +! NOTE: "!$" is for conditional compilation +! +logical :: running_omp = .false. +! +!$ integer :: omp_get_thread_num, omp_get_num_threads +! +integer :: n_threads=1 +! +! ------------------------------------------------------------------ + + ! ----------- OpenMP PARALLEL ENVIRONMENT ---------------------------- + ! + ! FIND OUT WHETHER -omp FLAG HAS BEEN SET DURING COMPILATION + ! + !$ running_omp = .true. ! conditional compilation + ! + ! ECHO BASIC OMP VARIABLES + ! + !$OMP PARALLEL DEFAULT(NONE) SHARED(running_omp,n_threads) + ! + !$OMP SINGLE + ! + !$ n_threads = omp_get_num_threads() + ! + !$ write (*,*) 'running_omp = ', running_omp + !$ write (*,*) + !$ write (*,*) 'parallel OpenMP with ', n_threads, 'threads' + !$ write (*,*) + !$OMP ENDSINGLE + ! + !$OMP CRITICAL + !$ write (*,*) 'thread ', omp_get_thread_num(), ' alive' + !$OMP ENDCRITICAL + ! + !$OMP BARRIER + ! + !$OMP ENDPARALLEL + ! ----------- OpenMP PARALLEL ENVIRONMENT ---------------------------- data lbee /3.30, 3.80, 4.34, 5.25, 3.63, 5.96, 7.32, & 8.41, 8.34, 9.70, 10.78, 12.93/ @@ -568,6 +687,7 @@ SUBROUTINE soil_para_high (nx,ny,regrid,gfile,F25Tag) i_sib = i_raster j_sib = j_raster + fname='clsm/catchment.def' open (10,file=fname,status='old',action='read',form='formatted') @@ -579,6 +699,13 @@ SUBROUTINE soil_para_high (nx,ny,regrid,gfile,F25Tag) allocate(count_soil(1:maxcat)) allocate(tile_id(1:nx,1:ny)) + inquire(file='clsm/catch_params.nc4', exist=file_exists) + + if(file_exists) then + status = NF_OPEN ('clsm/catch_params.nc4', NF_WRITE, ncid) ; VERIFY_(STATUS) + allocate (parms4file (1:maxcat, 1:10)) + endif + soil_high =-9999. fname=trim(gfile)//'.rst' @@ -593,15 +720,15 @@ SUBROUTINE soil_para_high (nx,ny,regrid,gfile,F25Tag) if (present(F25Tag)) then - iret = NF_OPEN('data/CATCH/SoilDepth.nc',NF_NOWRITE, ncid) + iret = NF_OPEN('data/CATCH/SoilDepth.nc',NF_NOWRITE, ncid1) ASSERT_(iret==NF_NOERR) allocate (soildepth_gswp2(1: ncat_gswp2)) allocate (land_gswp2 (1: ncat_gswp2)) - iret = NF_GET_VARA_INT (ncid, 3,(/1/),(/ncat_gswp2/),land_gswp2) + iret = NF_GET_VARA_INT (ncid1, 3,(/1/),(/ncat_gswp2/),land_gswp2) ASSERT_(iret==NF_NOERR) - iret = NF_GET_VARA_REAL(ncid, 4,(/1/),(/ncat_gswp2/),soildepth_gswp2) + iret = NF_GET_VARA_REAL(ncid1, 4,(/1/),(/ncat_gswp2/),soildepth_gswp2) ASSERT_(iret==NF_NOERR) - iret = NF_CLOSE(ncid) + iret = NF_CLOSE(ncid1) ASSERT_(iret==NF_NOERR) k1 = i_raster/360 @@ -683,7 +810,7 @@ SUBROUTINE soil_para_high (nx,ny,regrid,gfile,F25Tag) swit =0 DO n=1 , maxcat read (10,*) tindex,pfafindex, soil_class_top - write (22,'(i8,i8,4f10.7)')tindex,pfafindex,atau2(soil_class_top), & + write (22,'(i10,i8,4f10.7)')tindex,pfafindex,atau2(soil_class_top), & btau2(soil_class_top),atau5(soil_class_top),btau5(soil_class_top) read (11,*) tindex,pfafindex, soil_class_com @@ -705,15 +832,46 @@ SUBROUTINE soil_para_high (nx,ny,regrid,gfile,F25Tag) cond=lcond(soil_gswp)/exp(-1.*zks*gnu) wpwet=lwpwet(soil_gswp)/lporo(soil_gswp) - write (21,'(i8,i8,i4,i4,3f8.4,f12.8,f7.4,f10.3)')tindex,pfafindex, & + write (21,'(i10,i8,i4,i4,3f8.4,f12.8,f7.4,f10.3)')tindex,pfafindex, & soil_class_top,soil_class_com,lBEE(soil_gswp), lPSIS(soil_gswp), & lPORO(soil_gswp),COND,WPWET,soildepth(n) - + + if (allocated (parms4file)) then + + parms4file (n, 1) = lBEE(soil_gswp) + parms4file (n, 2) = COND + parms4file (n, 3) = lPORO(soil_gswp) + parms4file (n, 4) = lPSIS(soil_gswp) + parms4file (n, 5) = WPWET + parms4file (n, 6) = soildepth(n) + parms4file (n, 7) = atau2(soil_class_top) + parms4file (n, 8) = btau2(soil_class_top) + parms4file (n, 9) = atau5(soil_class_top) + parms4file (n,10) = btau5(soil_class_top) + + endif + END DO close (10,status='delete') close (11,status='delete') close (21,status='keep') close (22,status='keep') + + if(file_exists) then + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'BEE' ) ,(/1/),(/maxcat/), parms4file (:, 1)) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'COND' ) ,(/1/),(/maxcat/), parms4file (:, 2)) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'POROS') ,(/1/),(/maxcat/), parms4file (:, 3)) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'PSIS' ) ,(/1/),(/maxcat/), parms4file (:, 4)) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'WPWET') ,(/1/),(/maxcat/), parms4file (:, 5)) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'DP2BR') ,(/1/),(/maxcat/), parms4file (:, 6)) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'ATAU2') ,(/1/),(/maxcat/), parms4file (:, 7)) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'BTAU2') ,(/1/),(/maxcat/), parms4file (:, 8)) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'ATAU5') ,(/1/),(/maxcat/), parms4file (:, 9)) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'BTAU5') ,(/1/),(/maxcat/), parms4file (:,10)) ; VERIFY_(STATUS) + STATUS = NF_CLOSE (NCID) ; VERIFY_(STATUS) + DEALLOCATE (parms4file) + endif + deallocate (soildepth, soil_high) if(regrid) then deallocate(raster) @@ -1179,13 +1337,13 @@ SUBROUTINE modis_alb_on_tiles (nx,ny,ease_grid,regrid,gfilet,gfiler) open (10,file=fname,status='old',action='read',form='formatted') read (10,*)ip read (10,*)j_dum - read (10,'(a)')version - read (10,*)nc_gcm - read (10,*)nr_gcm - read (10,'(a)')version - read (10,*)nc_ocean - read (10,*)nr_ocean - + + do n = 1, j_dum + read (10,'(a)')version + read (10,*)nc_gcm + read (10,*)nr_gcm + end do + do n = 1,ip if (ease_grid) then read(10,*,IOSTAT=ierr) typ,pfs,lon,lat,ig,jg,fr_gcm @@ -1318,16 +1476,57 @@ SUBROUTINE modis_scale_para (ease_grid,gfile) character*30, dimension (2,2) :: geosname integer, allocatable, dimension (:) :: vegcls real, allocatable, dimension (:) :: & - modisalb,scale_fac,albvr,albnr,albvf,albnf,lat,lon, & - green,lai,sunang,snw,lai_before,lai_after,grn_before,grn_after + modisalb,scale_fac,albvf,albnf, lat,lon, & + green,lai,lai_before,lai_after,grn_before,grn_after real, allocatable, dimension (:) :: & - calbvr,calbnr,calbvf,calbnf + calbvf,calbnf, zero_array, one_array, albvr,albnr character*300 :: ifile1,ifile2,ofile integer, dimension(12), parameter :: days_in_month_nonleap = & (/ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 /) integer :: day, hour, min ,secs_in_day,k real :: yr,mn,dy,yr1,mn1,dy1,dum, slice1,slice2 +! --------- VARIABLES FOR *OPENMP* PARALLEL ENVIRONMENT ------------ +! +! NOTE: "!$" is for conditional compilation +! +logical :: running_omp = .false. +! +!$ integer :: omp_get_thread_num, omp_get_num_threads +! +integer :: n_threads=1 +! +! ------------------------------------------------------------------ + + ! ----------- OpenMP PARALLEL ENVIRONMENT ---------------------------- + ! + ! FIND OUT WHETHER -omp FLAG HAS BEEN SET DURING COMPILATION + ! + !$ running_omp = .true. ! conditional compilation + ! + ! ECHO BASIC OMP VARIABLES + ! + !$OMP PARALLEL DEFAULT(NONE) SHARED(running_omp,n_threads) + ! + !$OMP SINGLE + ! + !$ n_threads = omp_get_num_threads() + ! + !$ write (*,*) 'running_omp = ', running_omp + !$ write (*,*) + !$ write (*,*) 'parallel OpenMP with ', n_threads, 'threads' + !$ write (*,*) + !$OMP ENDSINGLE + ! + !$OMP CRITICAL + !$ write (*,*) 'thread ', omp_get_thread_num(), ' alive' + !$OMP ENDCRITICAL + ! + !$OMP BARRIER + ! + !$OMP ENDPARALLEL + ! ----------- OpenMP PARALLEL ENVIRONMENT ---------------------------- + data sibname /'albvr','albnr', & 'albvf','albnf'/ data geosname /'visdr','nirdr', & @@ -1336,8 +1535,6 @@ SUBROUTINE modis_scale_para (ease_grid,gfile) fname='clsm/catchment.def' open (10,file=fname,status='old',action='read',form='formatted') read (10,*)maxcat - - allocate (albvr (1:maxcat)) allocate (albvf (1:maxcat)) allocate (albnf (1:maxcat)) allocate (calbvf (1:maxcat)) @@ -1349,9 +1546,11 @@ SUBROUTINE modis_scale_para (ease_grid,gfile) allocate (grn_before (1:maxcat)) allocate (lai_after (1:maxcat)) allocate (grn_after (1:maxcat)) - allocate (vegcls (1:maxcat)) - allocate (sunang (1:maxcat)) - allocate (snw (1:maxcat)) + allocate (vegcls (1:maxcat)) + allocate (zero_array (1:maxcat)) + allocate (one_array (1:maxcat)) + allocate (albvr (1:maxcat)) + allocate (albnr (1:maxcat)) close (10,status='keep') date_time_new%year =2002 @@ -1377,13 +1576,13 @@ SUBROUTINE modis_scale_para (ease_grid,gfile) read (10,*)ip read (10,*)j_dum - read (10,'(a)')version - read (10,*)nc_gcm - read (10,*)nr_gcm - read (10,'(a)')version - read (10,*)nc_ocean - read (10,*)nr_ocean + do n = 1, j_dum + read (10,'(a)')version + read (10,*)nc_gcm + read (10,*)nr_gcm + end do + do n = 1,ip if (ease_grid) then read(10,*,IOSTAT=ierr) typ,pfs,lon,lat,ig,jg,fr_gcm @@ -1393,7 +1592,7 @@ SUBROUTINE modis_scale_para (ease_grid,gfile) endif if (typ == 100) then ip2 = n - read (20,'(i8,i8,2(2x,i3),2(2x,f6.4))') & + read (20,'(i10,i8,2(2x,i3),2(2x,f6.4))') & indr1,indr1,vegcls(ip2),indr1,fr_gcm,fr_gcm endif if(ierr /= 0)write (*,*)'Problem reading' @@ -1402,14 +1601,16 @@ SUBROUTINE modis_scale_para (ease_grid,gfile) close (20,status='keep') cyy='00-04' - albvr =0. albvf =0. albnf =0. calbvf =0. calbnf =0. modisalb =0. - snw =0. - sunang =0. + zero_array = 0. + one_array = 1. + albvr = 0. + albnr = 0. + unit1 =10 unit2 =20 unit3 =30 @@ -1476,8 +1677,6 @@ SUBROUTINE modis_scale_para (ease_grid,gfile) calbvf =0. calbnf =0. - albvr =0. - albnr =0. albvf =0. albnf =0. tsteps =0. @@ -1523,12 +1722,13 @@ SUBROUTINE modis_scale_para (ease_grid,gfile) tsteps = tsteps + 1. - call sibalb( & - albvr,albvr,albvf,albnf, & - lai, green, 0.0, snw, vegcls, maxcat) - - calbvf = calbvf + albvf - calbnf = calbnf + albnf + call sibalb ( & + MAXCAT,vegcls,lai,green, zero_array, & + one_array,one_array,one_array,one_array, & + ALBVR, ALBNR, albvf, albnf) + + calbvf = calbvf + albvf + calbnf = calbnf + albnf end do @@ -1546,8 +1746,8 @@ SUBROUTINE modis_scale_para (ease_grid,gfile) if(unit2==20)write (unit2) (calbvf(n),n=1,maxcat) if(unit2==21)write (unit2) (calbnf(n),n=1,maxcat) - if(unit2==20) modisalb = modisalb/calbvf - if(unit2==21) modisalb = modisalb/calbnf + if(unit2==20) modisalb = modisalb/(calbvf + 1.e-20) + if(unit2==21) modisalb = modisalb/(calbnf + 1.e-20) do n =1, maxcat if(modisalb(n).le.0)then @@ -1574,10 +1774,11 @@ SUBROUTINE modis_scale_para (ease_grid,gfile) end do - deallocate (modisalb,albvr,albvf,albnf) - deallocate (green,lai,sunang) + deallocate (modisalb,albvf,albnf) + deallocate (green,lai) deallocate (vegcls) deallocate (calbvf,calbnf) + deallocate (zero_array, one_array, albvr, albnr) unit1 =10 unit2 =20 @@ -1748,15 +1949,15 @@ SUBROUTINE catchment_def (nx,ny,regrid,dateline,gfilet,gfiler) allocate(tile_area(ip)) id=0 read (10,*)j_dum - read (10,'(a)')version - read (10,*)nc_gcm - read (10,*)nr_gcm - read (10,'(a)')version - read (10,*)nc_ocean - read (10,*)nr_ocean - dx_gcm = 360./float(nc_gcm) - dy_gcm = 180./float(nr_gcm) + do n = 1, j_dum + read (10,'(a)')version + read (10,*)nc_gcm + read (10,*)nr_gcm + end do + +! dx_gcm = 360./float(nc_gcm) +! dy_gcm = 180./float(nr_gcm) do n = 1,ip @@ -1886,7 +2087,7 @@ SUBROUTINE catchment_def (nx,ny,regrid,dateline,gfilet,gfiler) ! limits(j,1) = max(limits(j,1),(i_index(j)-1)*dx_gcm -180. - dx_gcm/2.) ! limits(j,2) = min(limits(j,2),(i_index(j)-1)*dx_gcm -180. + dx_gcm/2.) ! endif - write (10,'(i8,i8,5(2x,f9.4))')j+ip1,id(j+ip1),limits(j,1), & + write (10,'(i10,i8,5(2x,f9.4))')j+ip1,id(j+ip1),limits(j,1), & limits(j,2),limits(j,3),limits(j,4),tile_ele(j) end do @@ -1950,6 +2151,46 @@ SUBROUTINE create_soil_types_files (nx,ny,ease_grid,gfilet,gfiler) INTEGER :: typ,pfs,ig,jg,j_dum,ierr,indx_dum,indr1,indr2,indr3 ,ip2 integer :: nx,ny,status logical :: ease_grid + +! --------- VARIABLES FOR *OPENMP* PARALLEL ENVIRONMENT ------------ +! +! NOTE: "!$" is for conditional compilation +! +logical :: running_omp = .false. +! +!$ integer :: omp_get_thread_num, omp_get_num_threads +! +integer :: n_threads=1 + +! ----------- OpenMP PARALLEL ENVIRONMENT ---------------------------- +! +! FIND OUT WHETHER -omp FLAG HAS BEEN SET DURING COMPILATION +! +!$ running_omp = .true. ! conditional compilation +! +! ECHO BASIC OMP VARIABLES +! +!$OMP PARALLEL DEFAULT(NONE) SHARED(running_omp,n_threads) +! +!$OMP SINGLE +! +!$ n_threads = omp_get_num_threads() +! +!$ write (*,*) 'running_omp = ', running_omp +!$ write (*,*) +!$ write (*,*) 'parallel OpenMP with ', n_threads, 'threads' +!$ write (*,*) +!$OMP ENDSINGLE +! +!$OMP CRITICAL +!$ write (*,*) 'thread ', omp_get_thread_num(), ' alive' +!$OMP ENDCRITICAL +! +!$OMP BARRIER +! +!$OMP ENDPARALLEL +! ----------- OpenMP PARALLEL ENVIRONMENT ---------------------------- + colsib = nx rowsib = ny ! @@ -1969,12 +2210,12 @@ SUBROUTINE create_soil_types_files (nx,ny,ease_grid,gfilet,gfiler) open (10,file=fname,status='old',action='read',form='formatted') read (10,*)ip read (10,*)j_dum - read (10,'(a)')version - read (10,*)nc_gcm - read (10,*)nr_gcm - read (10,'(a)')version - read (10,*)nc_ocean - read (10,*)nr_ocean + + do n = 1, j_dum + read (10,'(a)')version + read (10,*)nc_gcm + read (10,*)nr_gcm + end do allocate(id(ip)) id=0 @@ -2007,8 +2248,6 @@ SUBROUTINE create_soil_types_files (nx,ny,ease_grid,gfilet,gfiler) ! Top layer soil classification 0-30cm ! -! open (unit=11, file=ifile, form='unformatted', status='old',access='direct',recl=1, & -! convert = 'little_endian') open (unit=11, file=ifile, form='unformatted', status='old', & convert = 'big_endian') @@ -2199,19 +2438,21 @@ SUBROUTINE compute_mosaic_veg_types (nx,ny,ease_grid,regrid,gfilet,gfiler) integer, pointer :: Raster(:,:) real, pointer, dimension (:) :: z2, z0 real, dimension (6) :: VGZ2 = (/35.0, 20.0, 17.0, 0.6, 0.5, 0.6/) ! Dorman and Sellers (1989) - + logical :: file_exists + integer :: ncid + fname=trim(gfilet)//'.til' open (10,file=fname,status='old',action='read',form='formatted') read (10,*)ip allocate(id(1:ip)) read (10,*)j_dum - read (10,'(a)')version - read (10,*)nc_gcm - read (10,*)nr_gcm - read (10,'(a)')version - read (10,*)nc_ocean - read (10,*)nr_ocean + + do n = 1, j_dum + read (10,'(a)')version + read (10,*)nc_gcm + read (10,*)nr_gcm + end do do n = 1,ip if (ease_grid) then @@ -2232,7 +2473,6 @@ SUBROUTINE compute_mosaic_veg_types (nx,ny,ease_grid,regrid,gfilet,gfiler) open (10,file=trim(c_data)//'sib22.5_v2.0.dat',form='unformatted', & status='old',action='read',convert='big_endian') - READ(10)sib_veg2 close (10,status='keep') @@ -2398,23 +2638,41 @@ SUBROUTINE compute_mosaic_veg_types (nx,ny,ease_grid,regrid,gfilet,gfiler) if(.not.jpl_height) z2(j) = VGZ2(mos_veg(j,1)) mos_veg(j,1) = mos_veg(j-1,1) mos_veg(j,2) = mos_veg(j-1,2) - write (10,'(i8,i8,2(2x,i3),2(2x,f6.2),2x,f6.3,2x,f10.7)') & + write (10,'(i10,i8,2(2x,i3),2(2x,f6.2),2x,f6.3,2x,f10.7)') & j+ip1,id(j+ip1),mos_veg(j-1,1),mos_veg(j-1,2),veg_frac(j,1),veg_frac(j,2),z2(j), z0 (j) else if(.not.jpl_height) z2(j) = VGZ2(mos_veg(j,1)) - write (10,'(i8,i8,2(2x,i3),2(2x,f6.2),2x,f6.3,2x,f10.7)') & + write (10,'(i10,i8,2(2x,i3),2(2x,f6.2),2x,f6.3,2x,f10.7)') & j+ip1,id(j+ip1),mos_veg(j,1),mos_veg(j,2),veg_frac(j,1),veg_frac(j,2),z2(j), z0 (j) endif end do close(10,status='keep') - open (20,file='clsm/vegdyn.data',status='unknown',action='write',form='unformatted', & - convert='little_endian') + inquire(file='clsm/catch_params.nc4', exist=file_exists) - write (20) real(mos_veg(:,1)) - write (20) z2 (:) - write (20) z0 (:) - close (20) + if(file_exists) then + status = NF_OPEN ('clsm/catch_params.nc4', NF_WRITE, ncid ) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'OLD_ITY'),(/1/),(/maxcat/),real(mos_veg(:,1))) ; VERIFY_(STATUS) + STATUS = NF_CLOSE (NCID) ; VERIFY_(STATUS) + endif + + inquire(file='clsm/vegdyn.data', exist=file_exists) + + if(file_exists) then + status = NF_OPEN ('clsm/vegdyn.data', NF_WRITE, ncid ) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'ITY' ),(/1/),(/maxcat/),real(mos_veg(:,1))) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'Z2CH' ),(/1/),(/maxcat/),z2 ) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'ASCATZ0'),(/1/),(/maxcat/),Z0 ) ; VERIFY_(STATUS) + STATUS = NF_CLOSE (NCID) ; VERIFY_(STATUS) + else + open (20,file='clsm/vegdyn.data',status='unknown',action='write',form='unformatted', & + convert='little_endian') + + write (20) real(mos_veg(:,1)) + write (20) z2 (:) + write (20) z0 (:) + close (20) + endif deallocate (sib_veg2,sib_veg,mos_veg,veg_frac,zdep2_g,id, z0, z2) if(regrid) then @@ -2428,7 +2686,7 @@ END SUBROUTINE compute_mosaic_veg_types SUBROUTINE cti_stat_file (ease_grid,gfile, MaskFile) IMPLICIT NONE - INTEGER, PARAMETER :: nbcat=36716,nofvar=6, SRTM_maxcat = 291284 + INTEGER, PARAMETER :: nbcat=36716,nofvar=6 INTEGER :: n,i,ip, itext(SRTM_maxcat,2),ix, jx,ip2, maxcat INTEGER :: typ,pfs,ig,jg,j_dum,ierr,indx_dum,indr1,indr2,indr3 INTEGER*8 :: idum8 @@ -2458,31 +2716,31 @@ SUBROUTINE cti_stat_file (ease_grid,gfile, MaskFile) id=0 read (10,*)j_dum - read (10,'(a)')version - read (10,*)nc_gcm - read (10,*)nr_gcm - read (10,'(a)')version - read (10,*)nc_ocean - read (10,*)nr_ocean + + do n = 1, j_dum + read (10,'(a)')version + read (10,*)nc_gcm + read (10,*)nr_gcm + end do do n = 1,ip if (ease_grid) then read(10,*,IOSTAT=ierr) typ,pfs,lon,lat,ig,jg,fr_gcm,i_dum else - read(10,'(I10,3E20.12,9(2I10,E20.12,I10))',IOSTAT=ierr) & - typ,tarea,lon,lat,ig,jg,fr_gcm,indx_dum,pfs,i_dum,fr_cat,j_dum + read(10,'(I10,3E20.12,9(2I10,E20.12,I10))',IOSTAT=ierr) & + typ,tarea,lon,lat,ig,jg,fr_gcm,indx_dum,pfs,i_dum,fr_cat,j_dum endif - id(n)=pfs - indx_old(n) = i_dum - if (index(MaskFile,'GEOS5_10arcsec_mask') /= 0) indx_old(n) = pfs - if (typ == 100) ip2 = n - if(ierr /= 0)write (*,*)'Problem reading',fname - if(ierr /= 0) stop + id(n)=pfs + indx_old(n) = j_dum + if (index(MaskFile,'GEOS5_10arcsec_mask') /= 0) indx_old(n) = pfs + if (typ == 100) ip2 = n + if (ierr /= 0) write (*,*)'Problem reading',fname + if (ierr /= 0) stop end do close (10,status='keep') -! + allocate(colin2cat(1:6000000)) colin2cat=0 if (index(MaskFile,'GEOS5_10arcsec_mask') /= 0) then @@ -2546,12 +2804,12 @@ SUBROUTINE cti_stat_file (ease_grid,gfile, MaskFile) if((i > ip1).and.(i <= ip2))then if(((id(i).ge.5000142).and.(id(i).le.5025829)))then - write(20,'(i8,i8,5(1x,f8.4),i5,e18.3)')i,id(i),var(indx_old(i),1)*11.1/9.1,var(indx_old(i),2), & + write(20,'(i10,i8,5(1x,f8.4),i5,e18.3)')i,id(i),var(indx_old(i),1)*11.1/9.1,var(indx_old(i),2), & var(indx_old(i),3),var(indx_old(i),4),var(indx_old(i),5),itext(indx_old(i),2), & var(indx_old(i),6) else - write(20,'(i8,i8,5(1x,f8.4),i5,e18.3)')i,id(i),var(indx_old(i),1),var(indx_old(i),2), & + write(20,'(i10,i8,5(1x,f8.4),i5,e18.3)')i,id(i),var(indx_old(i),1),var(indx_old(i),2), & var(indx_old(i),3),var(indx_old(i),4),var(indx_old(i),5),itext(indx_old(i),2), & var(indx_old(i),6) endif @@ -2596,6 +2854,10 @@ SUBROUTINE create_model_para (MaskFile) character(*) :: MaskFile logical :: picked + integer :: ncid, status + logical :: file_exists + real, allocatable, dimension (:,:) :: parms4file + ! --------- VARIABLES FOR *OPENMP* PARALLEL ENVIRONMENT ------------ ! ! NOTE: "!$" is for conditional compilation @@ -2609,7 +2871,7 @@ SUBROUTINE create_model_para (MaskFile) integer, dimension(:), allocatable :: low_ind, upp_ind ! ! ------------------------------------------------------------------ - + ! ----------- OpenMP PARALLEL ENVIRONMENT ---------------------------- ! ! FIND OUT WHETHER -omp FLAG HAS BEEN SET DURING COMPILATION @@ -2637,9 +2899,9 @@ SUBROUTINE create_model_para (MaskFile) !$OMP BARRIER ! !$OMP ENDPARALLEL + ! ----------- OpenMP PARALLEL ENVIRONMENT ---------------------------- !c------------------------------------------------------------------------- - losfile =trim(c_data)//'GSWP2_loss_perday/loss_perday' !c opening files @@ -2668,11 +2930,10 @@ SUBROUTINE create_model_para (MaskFile) gfrc(iwt,irz,n,i)=amin1(fracl,1.) enddo enddo - close (120,status='keep') - + close (120,status='keep') end do end do - fname='clsm/soil_param.first' + fname='clsm/soil_param.first' open (10,file=fname,action='read', & form='formatted',status='old') @@ -2759,10 +3020,9 @@ SUBROUTINE create_model_para (MaskFile) do n=1,nbcatch - read(11,'(i8,i8,5(1x,f8.4))') tindex1,pfaf1,meanlu,stdev & - ,minlu,maxlu,coesk - read(10,*) tindex2(n),pfaf2(n),soil_class_top(n),soil_class_com(n), & - BEE(n), PSIS(n),POROS(n),COND(n),WPWET(n),soildepth(n) + read(11,'(i10,i8,5(1x,f8.4))') tindex1,pfaf1,meanlu,stdev,minlu,maxlu,coesk + read(10,*) tindex2(n),pfaf2(n),soil_class_top(n),soil_class_com(n), & + BEE(n),PSIS(n),POROS(n),COND(n),WPWET(n),soildepth(n) if(tindex1.ne.tindex2(n))then write(*,*)'Warnning 1: tindex mismatched' @@ -2787,15 +3047,32 @@ SUBROUTINE create_model_para (MaskFile) TOPVAR(n) = stdev*stdev TOPSKEW(n) = coesk*stdev*stdev*stdev - if ( TOPVAR(n) .eq. 0. .or. coesk .eq. 0. & - .or. topskew(n) .eq. 0.) then + if (TOPVAR(n) .eq. 0. .or. coesk .eq. 0. .or. topskew(n) .eq. 0.) then write(*,*) 'Problem: undefined values:' - write(*,*) TOPMEAN(n),TOPVAR(n),coesk, & - minlu,maxlu + write(*,*) TOPMEAN(n),TOPVAR(n),coesk,minlu,maxlu stop endif END DO + inquire(file='clsm/catch_params.nc4', exist=file_exists) + + if(file_exists) then + status = NF_OPEN ('clsm/catch_params.nc4', NF_WRITE, ncid) ; VERIFY_(STATUS) + allocate (parms4file (1:nbcatch, 1:25)) + status = NF_GET_VARA_REAL(NCID,NC_VarID(NCID,'BEE' ),(/1/),(/nbcatch/),BEE (:)) ; VERIFY_(STATUS) + status = NF_GET_VARA_REAL(NCID,NC_VarID(NCID,'COND' ),(/1/),(/nbcatch/),COND (:)) ; VERIFY_(STATUS) + status = NF_GET_VARA_REAL(NCID,NC_VarID(NCID,'POROS'),(/1/),(/nbcatch/),POROS(:)) ; VERIFY_(STATUS) + status = NF_GET_VARA_REAL(NCID,NC_VarID(NCID,'PSIS' ),(/1/),(/nbcatch/),PSIS (:)) ; VERIFY_(STATUS) + status = NF_GET_VARA_REAL(NCID,NC_VarID(NCID,'WPWET'),(/1/),(/nbcatch/),WPWET(:)) ; VERIFY_(STATUS) + status = NF_GET_VARA_REAL(NCID,NC_VarID(NCID,'DP2BR'),(/1/),(/nbcatch/),soildepth (:)) ; VERIFY_(STATUS) + parms4file (:,12) = BEE (:) + parms4file (:,16) = COND (:) + parms4file (:,18) = POROS (:) + parms4file (:,19) = PSIS (:) + parms4file (:,24) = WPWET (:) + parms4file (:,25) = soildepth(:) + endif + rewind(10) allocate(low_ind(n_threads)) @@ -2884,7 +3161,7 @@ SUBROUTINE create_model_para (MaskFile) tsa1(n),tsa2(n),tsb1(n),tsb2(n) & ) - END DO + END DO END DO !$OMP ENDPARALLELDO tile_pick = 0 @@ -2902,17 +3179,39 @@ SUBROUTINE create_model_para (MaskFile) ! Writing the parameters, in the same order as in catchment.def ! if((ars1(n).lt.0.).and.(ars2(n).le.0.3).and.(ars3(n).le.0.04).and.(arw1(n).ne.9999.))then if((arw1(n).ne.9999.).and.(ars1(n).ne.9999.))then - write(20,'(i8,i8,f5.2,11(2x,e14.7))') & + write(20,'(i10,i8,f5.2,11(2x,e14.7))') & tindex2(n),pfaf2(n),gnu, & ars1(n),ars2(n),ars3(n), & ara1(n),ara2(n),ara3(n),ara4(n), & arw1(n),arw2(n),arw3(n),arw4(n) - write(30,'(i8,i8,f5.2,3(2x,e13.7))')tindex2(n),pfaf2(n),gnu,bf1(n),bf2(n),bf3(n) - write(40,'(i8,i8,f5.2,4(2x,e13.7))')tindex2(n),pfaf2(n),gnu, & + write(30,'(i10,i8,f5.2,3(2x,e13.7))')tindex2(n),pfaf2(n),gnu,bf1(n),bf2(n),bf3(n) + write(40,'(i10,i8,f5.2,4(2x,e13.7))')tindex2(n),pfaf2(n),gnu, & tsa1(n),tsa2(n),tsb1(n),tsb2(n) - write(42,'(i8,i8,i4,i4,3f8.4,f12.8,f7.4,f10.3)') tindex2(n),pfaf2(n),soil_class_top(n),soil_class_com(n), & + write(42,'(i10,i8,i4,i4,3f8.4,f12.8,f7.4,f10.3)') tindex2(n),pfaf2(n),soil_class_top(n),soil_class_com(n), & BEE(n), PSIS(n),POROS(n),COND(n),WPWET(n),soildepth(n) + + if (allocated (parms4file)) then + parms4file (n, 1) = ara1(n) + parms4file (n, 2) = ara2(n) + parms4file (n, 3) = ara3(n) + parms4file (n, 4) = ara4(n) + parms4file (n, 5) = ars1(n) + parms4file (n, 6) = ars2(n) + parms4file (n, 7) = ars3(n) + parms4file (n, 8) = arw1(n) + parms4file (n, 9) = arw2(n) + parms4file (n,10) = arw3(n) + parms4file (n,11) = arw4(n) + parms4file (n,13) = bf1(n) + parms4file (n,14) = bf2(n) + parms4file (n,15) = bf3(n) + parms4file (n,17) = gnu + parms4file (n,20) = tsa1(n) + parms4file (n,21) = tsa2(n) + parms4file (n,22) = tsb1(n) + parms4file (n,23) = tsb2(n) + endif else if(preserve_soiltype) then @@ -2947,7 +3246,7 @@ SUBROUTINE create_model_para (MaskFile) if (error_file) then write (41,*)n,k endif - write(20,'(i8,i8,f5.2,11(2x,e14.7))') & + write(20,'(i10,i8,f5.2,11(2x,e14.7))') & tindex2(n),pfaf2(n),gnu, & ars1(k),ars2(k),ars3(k), & ara1(k),ara2(k),ara3(k),ara4(k), & @@ -2964,12 +3263,38 @@ SUBROUTINE create_model_para (MaskFile) arw3(n)=arw3(k) arw4(n)=arw4(k) - write(30,'(i8,i8,f5.2,3(2x,e13.7))')tindex2(n),pfaf2(n),gnu,bf1(k),bf2(k),bf3(k) - write(40,'(i8,i8,f5.2,4(2x,e13.7))')tindex2(n),pfaf2(n),gnu, & + write(30,'(i10,i8,f5.2,3(2x,e13.7))')tindex2(n),pfaf2(n),gnu,bf1(k),bf2(k),bf3(k) + write(40,'(i10,i8,f5.2,4(2x,e13.7))')tindex2(n),pfaf2(n),gnu, & tsa1(k),tsa2(k),tsb1(k),tsb2(k) - write(42,'(i8,i8,i4,i4,3f8.4,f12.8,f7.4,f10.3)') tindex2(n),pfaf2(n),soil_class_top(k),soil_class_com(k), & + write(42,'(i10,i8,i4,i4,3f8.4,f12.8,f7.4,f10.3)') tindex2(n),pfaf2(n),soil_class_top(k),soil_class_com(k), & BEE(k), PSIS(k),POROS(k),COND(k),WPWET(k),soildepth(k) - + if (allocated (parms4file)) then + parms4file (n, 1) = ara1(k) + parms4file (n, 2) = ara2(k) + parms4file (n, 3) = ara3(k) + parms4file (n, 4) = ara4(k) + parms4file (n, 5) = ars1(k) + parms4file (n, 6) = ars2(k) + parms4file (n, 7) = ars3(k) + parms4file (n, 8) = arw1(k) + parms4file (n, 9) = arw2(k) + parms4file (n,10) = arw3(k) + parms4file (n,11) = arw4(k) + parms4file (n,12) = BEE(k) + parms4file (n,13) = bf1(k) + parms4file (n,14) = bf2(k) + parms4file (n,15) = bf3(k) + parms4file (n,16) = COND(k) + parms4file (n,17) = gnu + parms4file (n,18) = POROS(k) + parms4file (n,19) = PSIS(k) + parms4file (n,20) = tsa1(k) + parms4file (n,21) = tsa2(k) + parms4file (n,22) = tsb1(k) + parms4file (n,23) = tsb2(k) + parms4file (n,24) = wpwet (k) + parms4file (n,25) = soildepth(k) + endif else do k =n-1,1,-1 @@ -2992,15 +3317,15 @@ SUBROUTINE create_model_para (MaskFile) write (41,*)n,k endif - write(20,'(i8,i8,f5.2,11(2x,e14.7))') & + write(20,'(i10,i8,f5.2,11(2x,e14.7))') & tindex2(n),pfaf2(n),gnu, & ars1(k),ars2(k),ars3(k), & ara1(k),ara2(k),ara3(k),ara4(k), & arw1(k),arw2(k),arw3(k),arw4(k) - write(30,'(i8,i8,f5.2,3(2x,e13.7))')tindex2(n),pfaf2(n),gnu,bf1(k),bf2(k),bf3(k) - write(40,'(i8,i8,f5.2,4(2x,e13.7))')tindex2(n),pfaf2(n),gnu, & + write(30,'(i10,i8,f5.2,3(2x,e13.7))')tindex2(n),pfaf2(n),gnu,bf1(k),bf2(k),bf3(k) + write(40,'(i10,i8,f5.2,4(2x,e13.7))')tindex2(n),pfaf2(n),gnu, & tsa1(k),tsa2(k),tsb1(k),tsb2(k) - write(42,'(i8,i8,i4,i4,3f8.4,f12.8,f7.4,f10.3)') tindex2(n),pfaf2(n),soil_class_top(k),soil_class_com(k), & + write(42,'(i10,i8,i4,i4,3f8.4,f12.8,f7.4,f10.3)') tindex2(n),pfaf2(n),soil_class_top(k),soil_class_com(k), & BEE(k), PSIS(k),POROS(k),COND(k),WPWET(k),soildepth(k) ars1(n)=ars1(k) ars2(n)=ars2(k) @@ -3013,12 +3338,39 @@ SUBROUTINE create_model_para (MaskFile) arw2(n)=arw2(k) arw3(n)=arw3(k) arw4(n)=arw4(k) + + if (allocated (parms4file)) then + parms4file (n, 1) = ara1(k) + parms4file (n, 2) = ara2(k) + parms4file (n, 3) = ara3(k) + parms4file (n, 4) = ara4(k) + parms4file (n, 5) = ars1(k) + parms4file (n, 6) = ars2(k) + parms4file (n, 7) = ars3(k) + parms4file (n, 8) = arw1(k) + parms4file (n, 9) = arw2(k) + parms4file (n,10) = arw3(k) + parms4file (n,11) = arw4(k) + parms4file (n,12) = BEE(k) + parms4file (n,13) = bf1(k) + parms4file (n,14) = bf2(k) + parms4file (n,15) = bf3(k) + parms4file (n,16) = COND(k) + parms4file (n,17) = gnu + parms4file (n,18) = POROS(k) + parms4file (n,19) = PSIS(k) + parms4file (n,20) = tsa1(k) + parms4file (n,21) = tsa2(k) + parms4file (n,22) = tsb1(k) + parms4file (n,23) = tsb2(k) + parms4file (n,24) = wpwet (k) + parms4file (n,25) = soildepth(k) + endif exit endif if((k==1) .and. (.not. picked)) then print *,'Warning ar.new is bad at n=',n - print *,'Call Sarith ......' stop endif end do @@ -3046,17 +3398,43 @@ SUBROUTINE create_model_para (MaskFile) endif enddo write (41,*)n,k - write(20,'(i8,i8,f5.2,11(2x,e14.7))') & + write(20,'(i10,i8,f5.2,11(2x,e14.7))') & tindex2(n),pfaf2(n),gnu, & ars1(k),ars2(k),ars3(k), & ara1(k),ara2(k),ara3(k),ara4(k), & arw1(k),arw2(k),arw3(k),arw4(k) - write(30,'(i8,i8,f5.2,3(2x,e13.7))')tindex2(n),pfaf2(n),gnu,bf1(k),bf2(k),bf3(k) - write(40,'(i8,i8,f5.2,4(2x,e13.7))')tindex2(n),pfaf2(n),gnu, & + write(30,'(i10,i8,f5.2,3(2x,e13.7))')tindex2(n),pfaf2(n),gnu,bf1(k),bf2(k),bf3(k) + write(40,'(i10,i8,f5.2,4(2x,e13.7))')tindex2(n),pfaf2(n),gnu, & tsa1(k),tsa2(k),tsb1(k),tsb2(k) - write(42,'(i8,i8,i4,i4,3f8.4,f12.8,f7.4,f10.3)') tindex2(n),pfaf2(n),soil_class_top(k),soil_class_com(k), & + write(42,'(i10,i8,i4,i4,3f8.4,f12.8,f7.4,f10.3)') tindex2(n),pfaf2(n),soil_class_top(k),soil_class_com(k), & BEE(k), PSIS(k),POROS(k),COND(k),WPWET(k),soildepth(k) - + if (allocated (parms4file)) then + parms4file (n, 1) = ara1(k) + parms4file (n, 2) = ara2(k) + parms4file (n, 3) = ara3(k) + parms4file (n, 4) = ara4(k) + parms4file (n, 5) = ars1(k) + parms4file (n, 6) = ars2(k) + parms4file (n, 7) = ars3(k) + parms4file (n, 8) = arw1(k) + parms4file (n, 9) = arw2(k) + parms4file (n,10) = arw3(k) + parms4file (n,11) = arw4(k) + parms4file (n,12) = BEE(k) + parms4file (n,13) = bf1(k) + parms4file (n,14) = bf2(k) + parms4file (n,15) = bf3(k) + parms4file (n,16) = COND(k) + parms4file (n,17) = gnu + parms4file (n,18) = POROS(k) + parms4file (n,19) = PSIS(k) + parms4file (n,20) = tsa1(k) + parms4file (n,21) = tsa2(k) + parms4file (n,22) = tsb1(k) + parms4file (n,23) = tsb2(k) + parms4file (n,24) = wpwet (k) + parms4file (n,25) = soildepth(k) + endif endif endif @@ -3075,14 +3453,45 @@ SUBROUTINE create_model_para (MaskFile) close(20,status='keep') close(30,status='keep') close(40,status='keep') -! close(11,status='delete') - + close(11,status='keep') + close(12,status='keep') + close(42,status='keep') if (error_file) then close(21,status='delete') close(31,status='delete') close(41,status='keep') endif + if(file_exists) then + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'ARA1' ) ,(/1/),(/nbcatch/), parms4file (:, 1)) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'ARA2' ) ,(/1/),(/nbcatch/), parms4file (:, 2)) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'ARA3' ) ,(/1/),(/nbcatch/), parms4file (:, 3)) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'ARA4' ) ,(/1/),(/nbcatch/), parms4file (:, 4)) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'ARS1' ) ,(/1/),(/nbcatch/), parms4file (:, 5)) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'ARS2' ) ,(/1/),(/nbcatch/), parms4file (:, 6)) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'ARS3' ) ,(/1/),(/nbcatch/), parms4file (:, 7)) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'ARW1' ) ,(/1/),(/nbcatch/), parms4file (:, 8)) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'ARW2' ) ,(/1/),(/nbcatch/), parms4file (:, 9)) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'ARW3' ) ,(/1/),(/nbcatch/), parms4file (:,10)) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'ARW4' ) ,(/1/),(/nbcatch/), parms4file (:,11)) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'BEE' ) ,(/1/),(/nbcatch/), parms4file (:,12)) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'BF1' ) ,(/1/),(/nbcatch/), parms4file (:,13)) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'BF2' ) ,(/1/),(/nbcatch/), parms4file (:,14)) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'BF3' ) ,(/1/),(/nbcatch/), parms4file (:,15)) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'COND' ) ,(/1/),(/nbcatch/), parms4file (:,16)) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'GNU' ) ,(/1/),(/nbcatch/), parms4file (:,17)) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'POROS') ,(/1/),(/nbcatch/), parms4file (:,18)) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'PSIS' ) ,(/1/),(/nbcatch/), parms4file (:,19)) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'TSA1' ) ,(/1/),(/nbcatch/), parms4file (:,20)) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'TSA2' ) ,(/1/),(/nbcatch/), parms4file (:,21)) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'TSB1' ) ,(/1/),(/nbcatch/), parms4file (:,22)) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'TSB2' ) ,(/1/),(/nbcatch/), parms4file (:,23)) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'WPWET') ,(/1/),(/nbcatch/), parms4file (:,24)) ; VERIFY_(STATUS) + status = NF_PUT_VARA_REAL(NCID,NC_VarID(NCID,'DP2BR') ,(/1/),(/nbcatch/), parms4file (:,25)) ; VERIFY_(STATUS) + STATUS = NF_CLOSE (NCID) ; VERIFY_(STATUS) + DEALLOCATE (parms4file) + endif + END SUBROUTINE create_model_para !-------------------------------------------------------------------- @@ -3332,10 +3741,10 @@ SUBROUTINE create_model_para_woesten (Maskfile) good_sand =0. do n=1,nbcatch - read(11,'(i8,i8,5(1x,f8.4))') tindex1,pfaf1,meanlu,stdev & + read(11,'(i10,i8,5(1x,f8.4))') tindex1,pfaf1,meanlu,stdev & ,minlu,maxlu,coesk - read(10,'(i8,i8,i4,i4,3f8.4,f12.8,f7.4,f10.4,3f7.3,4f7.3,2f10.4)') & + read(10,'(i10,i8,i4,i4,3f8.4,f12.8,f7.4,f10.4,3f7.3,4f7.3,2f10.4)') & tindex2(n),pfaf2(n),soil_class_top(n),soil_class_com(n), & BEE(n), PSIS(n),POROS(n),COND(n),WPWET(n),soildepth(n), & grav_vec(n),soc_vec(n),poc_vec(n), & @@ -3353,6 +3762,13 @@ SUBROUTINE create_model_para_woesten (Maskfile) write(*,*)'Warnning 1: pfafstetter mismatched' stop endif + if((process_peat).and.(soil_class_top(n) == 253)) then + meanlu = 9.3 + stdev = 0.12 + minlu = 8.5 + maxlu = 11.5 + coesk = 0.25 + endif if (index(MaskFile,'GEOS5_10arcsec_mask') /= 0) then TOPMEAN(n) = meanlu @@ -3444,7 +3860,6 @@ SUBROUTINE create_model_para_woesten (Maskfile) taberr1(n),taberr2(n),taberr3(n),taberr4(n), & normerr1(n),normerr2(n),normerr3(n),normerr4(n)) - CALL BASE_PARAM( & BEE(n),PSIS(n),POROS(n),COND(n), & ST, AC, & @@ -3465,10 +3880,11 @@ SUBROUTINE create_model_para_woesten (Maskfile) tsa1(n),tsa2(n),tsb1(n),tsb2(n) & ) - if(POROS(n) >= 0.8) then + if(soil_class_com(n) == 253) then ! Michel Bechtold paper - PEATCLSM_fitting_CLSM_params.R produced these data values. if(process_peat) then + ars1(n) = -7.9514018e-03 ars2(n) = 6.2297356e-02 ars3(n) = 1.9187240e-03 @@ -3484,6 +3900,11 @@ SUBROUTINE create_model_para_woesten (Maskfile) bf1(n) = 4.6088086e+02 bf2(n) = 1.4237401e-01 bf3(n) = 6.9803000e+00 + + tsa1(n) = -2.417581e+00 + tsa2(n) = -4.784762e+00 + tsb1(n) = -3.700285e-03 + tsb2(n) = -2.392484e-03 endif endif @@ -3550,24 +3971,24 @@ SUBROUTINE create_model_para_woesten (Maskfile) END DO DO n=1,nbcatch - read(10,'(i8,i8,i4,i4,3f8.4,f12.8,f7.4,f10.4,3f7.3,4f7.3,2f10.4, f8.4)') & + read(10,'(i10,i8,i4,i4,3f8.4,f12.8,f7.4,f10.4,3f7.3,4f7.3,2f10.4, f8.4)') & tindex2(n),pfaf2(n),soil_class_top(n),soil_class_com(n), & BEE(n), PSIS(n),POROS(n),COND(n),WPWET(n),soildepth(n), & grav_vec(n),soc_vec(n),poc_vec(n), & a_sand_surf(n),a_clay_surf(n),atile_sand(n),atile_clay(n) , & wpwet_surf(n),poros_surf(n), pmap(n) if((ars1(n).ne.9999.).and.(arw1(n).ne.9999.))then - write(20,'(i8,i8,f5.2,11(2x,e14.7))') & + write(20,'(i10,i8,f5.2,11(2x,e14.7))') & tindex2(n),pfaf2(n),gnu, & ars1(n),ars2(n),ars3(n), & ara1(n),ara2(n),ara3(n),ara4(n), & arw1(n),arw2(n),arw3(n),arw4(n) - write(30,'(i8,i8,f5.2,3(2x,e13.7))')tindex2(n),pfaf2(n),gnu,bf1(n),bf2(n),bf3(n) - write(40,'(i8,i8,f5.2,4(2x,e13.7))')tindex2(n),pfaf2(n),gnu, & + write(30,'(i10,i8,f5.2,3(2x,e13.7))')tindex2(n),pfaf2(n),gnu,bf1(n),bf2(n),bf3(n) + write(40,'(i10,i8,f5.2,4(2x,e13.7))')tindex2(n),pfaf2(n),gnu, & tsa1(n),tsa2(n),tsb1(n),tsb2(n) - write(42,'(i8,i8,i4,i4,3f8.4,f12.8,f7.4,f10.4,3f7.3,4f7.3,2f10.4, f8.4)') & + write(42,'(i10,i8,i4,i4,3f8.4,f12.8,f7.4,f10.4,3f7.3,4f7.3,2f10.4, f8.4)') & tindex2(n),pfaf2(n),soil_class_top(n),soil_class_com(n), & BEE(n), PSIS(n),POROS(n),COND(n),WPWET(n),soildepth(n), & grav_vec(n),soc_vec(n),poc_vec(n), & @@ -3645,16 +4066,16 @@ SUBROUTINE create_model_para_woesten (Maskfile) ! BEE(k), PSIS(k),POROS(k),COND(k),WPWET(k),soildepth(k) endif - write(20,'(i8,i8,f5.2,11(2x,e14.7))') & + write(20,'(i10,i8,f5.2,11(2x,e14.7))') & tindex2(n),pfaf2(n),gnu, & ars1(k),ars2(k),ars3(k), & ara1(k),ara2(k),ara3(k),ara4(k), & arw1(k),arw2(k),arw3(k),arw4(k) - write(30,'(i8,i8,f5.2,3(2x,e13.7))')tindex2(n),pfaf2(n),gnu,bf1(k),bf2(k),bf3(k) - write(40,'(i8,i8,f5.2,4(2x,e13.7))')tindex2(n),pfaf2(n),gnu, & + write(30,'(i10,i8,f5.2,3(2x,e13.7))')tindex2(n),pfaf2(n),gnu,bf1(k),bf2(k),bf3(k) + write(40,'(i10,i8,f5.2,4(2x,e13.7))')tindex2(n),pfaf2(n),gnu, & tsa1(k),tsa2(k),tsb1(k),tsb2(k) - write(42,'(i8,i8,i4,i4,3f8.4,f12.8,f7.4,f10.4,3f7.3,4f7.3,2f10.4, f8.4)') & + write(42,'(i10,i8,i4,i4,3f8.4,f12.8,f7.4,f10.4,3f7.3,4f7.3,2f10.4, f8.4)') & tindex2(n),pfaf2(n),soil_class_top(k),soil_class_com(k), & BEE(k), PSIS(k),POROS(k),COND(k),WPWET(k),soildepth(k), & grav_vec(k),soc_vec(k),poc_vec(k), & @@ -3707,15 +4128,15 @@ SUBROUTINE create_model_para_woesten (Maskfile) endif enddo write (41,*)n,k - write(20,'(i8,i8,f5.2,11(2x,e14.7))') & + write(20,'(i10,i8,f5.2,11(2x,e14.7))') & tindex2(n),pfaf2(n),gnu, & ars1(k),ars2(k),ars3(k), & ara1(k),ara2(k),ara3(k),ara4(k), & arw1(k),arw2(k),arw3(k),arw4(k) - write(30,'(i8,i8,f5.2,3(2x,e13.7))')tindex2(n),pfaf2(n),gnu,bf1(k),bf2(k),bf3(k) - write(40,'(i8,i8,f5.2,4(2x,e13.7))')tindex2(n),pfaf2(n),gnu, & + write(30,'(i10,i8,f5.2,3(2x,e13.7))')tindex2(n),pfaf2(n),gnu,bf1(k),bf2(k),bf3(k) + write(40,'(i10,i8,f5.2,4(2x,e13.7))')tindex2(n),pfaf2(n),gnu, & tsa1(k),tsa2(k),tsb1(k),tsb2(k) - write(42,'(i8,i8,i4,i4,3f8.4,f12.8,f7.4,f10.4,3f7.3,4f7.3,2f10.4, f8.4)')& + write(42,'(i10,i8,i4,i4,3f8.4,f12.8,f7.4,f10.4,3f7.3,4f7.3,2f10.4, f8.4)')& tindex2(n),pfaf2(n),soil_class_top(k),soil_class_com(k), & BEE(k), PSIS(k),POROS(k),COND(k),WPWET(k),soildepth(k), & grav_vec(k),soc_vec(k),poc_vec(k), & @@ -5214,7 +5635,6 @@ SUBROUTINE CURVE2(arw1,arw2,arw3,arw4,cdcr1,WPWET,flag) endif end SUBROUTINE CURVE2 - ! ****************************************************************** subroutine tgen ( & @@ -5284,7 +5704,7 @@ subroutine tgen ( & ! evaluate the gamma function - CALL GAMMLN(TOPETA,GAMLN) + CALL GAMMLN (TOPETA,GAMLN) CUMAC=0.0 @@ -5360,11 +5780,10 @@ subroutine tgen ( & END subroutine tgen - - + ! ******************************************************************** - SUBROUTINE GAMMLN(XX,GAMLN) + SUBROUTINE GAMMLN (XX,GAMLN) implicit none DOUBLE PRECISION :: COF(6),STP,HALF,ONE,FPF,X,TMP,SER @@ -6846,7 +7265,7 @@ SUBROUTINE jpl_canoph (nc,nr,gfiler, z2) implicit none ! 1) JPL Canopy Height - ! /discover/nobackup/rreichle/l_data/LandBCs_files_for_mkCatchParam/V001//Simard_Pinto_3DGlobalVeg_JGR.nc4 + ! /discover/nobackup/projects/gmao/ssd/land/l_data/LandBCs_files_for_mkCatchParam/V001//Simard_Pinto_3DGlobalVeg_JGR.nc4 integer, intent (in) :: nc, nr real, pointer, dimension (:), intent (inout) :: z2 diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/sibalb.f b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/sibalb.f deleted file mode 100644 index 8d37339ff..000000000 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/sibalb.f +++ /dev/null @@ -1,566 +0,0 @@ - SUBROUTINE SIBALB ( - O AVISDR, ANIRDR, AVISDF, ANIRDF, - I VLAI, VGRN, ZTH, SNW, ITYP, IRUN - & ) - - IMPLICIT NONE - - REAL ALVDRS, ALIDRS - REAL ALVDRD, ALIDRD - REAL ALVDRI, ALIDRI - - PARAMETER ( - ` ALVDRS = 0.100 - `, ALIDRS = 0.200 - - `, ALVDRD = 0.300 - `, ALIDRD = 0.350 - - `, ALVDRI = 0.700 - `, ALIDRI = 0.700 - ` ) - -* ALVDRS: Albedo of soil for visible direct solar radiation. -* ALIDRS: Albedo of soil for infra-red direct solar radiation. -* ALVDFS: Albedo of soil for visible diffuse solar radiation. -* ALIDFS: Albedo of soil for infra-red diffuse solar radiation. - - - INTEGER NLAI - - PARAMETER (NLAI = 14 ) - - - REAL EPSLN, BLAI, DLAI - - PARAMETER (EPSLN = 1.E-6) - PARAMETER (BLAI = 0.5) - PARAMETER (DLAI = 0.5) - - REAL ZERO, ONE - - PARAMETER (ZERO=0., ONE=1.0) - - REAL ALATRM - - PARAMETER (ALATRM = BLAI + (NLAI - 1) * DLAI - EPSLN) - - INTEGER NTYPS - - PARAMETER (NTYPS=9) - - INTEGER IRUN - - REAL AVISDR (IRUN), ANIRDR (IRUN), AVISDF (IRUN), ANIRDF (IRUN), - ` VLAI (IRUN), VGRN (IRUN), ZTH (IRUN), SNW (IRUN) - -* OUTPUTS: - -* AVISDR: visible, direct albedo. -* ANIRDR: near infra-red, direct albedo. -* AVISDF: visible, diffuse albedo. -* ANIRDF: near infra-red, diffuse albedo. - -* INPUTS: - -* VLAI: the leaf area index. -* VGRN: the greenness index. -* ZTH: The cosine of the solar zenith angle. -* SNW: Snow cover in meters water equivalent. -* - - - - INTEGER ITYP (IRUN) - -C ITYP: Vegetation type as follows: -C 1: BROADLEAF EVERGREEN TREES -C 2: BROADLEAF DECIDUOUS TREES -C 3: NEEDLELEAF TREES -C 4: GROUND COVER -C 5: BROADLEAF SHRUBS -C 6: DWARF TREES (TUNDRA) -C 7: BARE SOIL -C 8: DESSERT -C 9: ICE -C IRUN: Chip index -C - - -* [ Definition of Variables: ] -* - INTEGER I, LAI - - - REAL FAC, GAMMA, BETA, ALPHA, - ` DX, DY, ALA, GRN (2), - ` SNWALB (4, NTYPS), SNWMID (NTYPS) - -* - -* [ Definition of Functions: ] -* - REAL COEFF - -C -------------------------------------------------- - - - -C Constants used in albedo calculations: - - REAL ALVDR (NLAI, 2, NTYPS) - REAL BTVDR (NLAI, 2, NTYPS) - REAL GMVDR (NLAI, 2, NTYPS) - REAL ALIDR (NLAI, 2, NTYPS) - REAL BTIDR (NLAI, 2, NTYPS) - REAL GMIDR (NLAI, 2, NTYPS) - -C (Data statements for ALVDR described in full; data statements for -C other constants follow same framework.) - -C BROADLEAF EVERGREEN (ITYP=4); GREEN=0.33; LAI: .5-7 - DATA (ALVDR (I, 1, 1), I = 1, 14) - ` /0.0808, 0.0796, 0.0792, 0.0790, 10*0.0789/ - -C BROADLEAF EVERGREEN (ITYP=4); GREEN=0.67; LAI: .5-7 - DATA (ALVDR (I, 2, 1), I = 1, 14) - ` /0.0788, 0.0775, 0.0771, 0.0769, 10*0.0768/ - -C BROADLEAF DECIDUOUS (ITYP=1); GREEN=0.33; LAI: .5-7 - DATA (ALVDR (I, 1, 2), I = 1, 14) - ` /0.0803, 0.0790, 0.0785, 0.0784, 3*0.0783, 7*0.0782/ - -C BROADLEAF DECIDUOUS (ITYP=1); GREEN=0.67; LAI: .5-7 - DATA (ALVDR (I, 2, 2), I = 1, 14) - ` /0.0782, 0.0770, 0.0765, 0.0763, 10*0.0762/ - -C NEEDLELEAF (ITYP=3); GREEN=0.33; LAI=.5-7 - DATA (ALVDR (I, 1, 3), I = 1, 14) - ` /0.0758, 0.0746, 0.0742, 0.0740, 10*0.0739/ - -C NEEDLELEAF (ITYP=3); GREEN=0.67; LAI=.5-7 - DATA (ALVDR (I, 2, 3), I = 1, 14) - ` /0.0683, 0.0672, 0.0667, 2*0.0665, 9*0.0664/ - -C GROUNDCOVER (ITYP=2); GREEN=0.33; LAI=.5-7 - DATA (ALVDR (I, 1, 4), I = 1, 14) - ` /0.2436, 0.2470, 0.2486, 0.2494, 0.2498, 0.2500, 2*0.2501, - ` 6*0.2502 - ` / -C GROUNDCOVER (ITYP=2); GREEN=0.67; LAI=.5-7 - DATA (ALVDR (I, 2, 4), I = 1, 14) /14*0.1637/ - -C BROADLEAF SHRUBS (ITYP=5); GREEN=0.33,LAI=.5-7 - DATA (ALVDR (I, 1, 5), I = 1, 14) - & /0.0807, 0.0798, 0.0794, 0.0792, 0.0792, 9*0.0791/ - -C BROADLEAF SHRUBS (ITYP=5); GREEN=0.67,LAI=.5-7 - DATA (ALVDR (I, 2, 5), I = 1, 14) - & /0.0787, 0.0777, 0.0772, 0.0771, 10*0.0770/ - -C DWARF TREES, OR TUNDRA (ITYP=6); GREEN=0.33,LAI=.5-7 - DATA (ALVDR (I, 1, 6), I = 1, 14) - & /0.0802, 0.0791, 0.0787, 0.0786, 10*0.0785/ - -C DWARF TREES, OR TUNDRA (ITYP=6); GREEN=0.67,LAI=.5-7 - DATA (ALVDR (I, 2, 6), I = 1, 14) - & /0.0781, 0.0771, 0.0767, 0.0765, 0.0765, 9*0.0764/ - - -C BARE SOIL - DATA (ALVDR (I, 1, 7), I = 1, 14) /14*ALVDRS/ - DATA (ALVDR (I, 2, 7), I = 1, 14) /14*ALVDRS/ - -C DESERT - DATA (ALVDR (I, 1, 8), I = 1, 14) /14*ALVDRD/ - DATA (ALVDR (I, 2, 8), I = 1, 14) /14*ALVDRD/ - -C ICE - DATA (ALVDR (I, 1, 9), I = 1, 14) /14*ALVDRI/ - DATA (ALVDR (I, 2, 9), I = 1, 14) /14*ALVDRI/ -C**** -C**** ------------------------------------------------- - DATA (BTVDR (I, 1, 1), I = 1, 14) - ` /0.0153, 0.0372, 0.0506, 0.0587, 0.0630, 0.0652, 0.0663, - ` 0.0668, 0.0671, 0.0672, 4*0.0673 - ` / - DATA (BTVDR (I, 2, 1), I = 1, 14) - * /0.0135, 0.0354, 0.0487, 0.0568, 0.0611, 0.0633, 0.0644, - ` 0.0650, 0.0652, 0.0654, 0.0654, 3*0.0655 - ` / - DATA (BTVDR (I, 1, 2), I = 1, 14) - * /0.0148, 0.0357, 0.0462, 0.0524, 0.0554, 0.0569, 0.0576, - ` 0.0579, 0.0580, 0.0581, 0.0581, 3*0.0582 - ` / - DATA (BTVDR (I, 2, 2), I = 1, 14) - * /0.0131, 0.0342, 0.0446, 0.0508, 0.0539, 0.0554, 0.0560, - ` 0.0564, 0.0565, 5*0.0566 - ` / - DATA (BTVDR (I, 1, 3), I = 1, 14) - * /0.0108, 0.0334, 0.0478, 0.0571, 0.0624, 0.0652, 0.0666, - ` 0.0673, 0.0677, 0.0679, 4*0.0680 - ` / - DATA (BTVDR (I, 2, 3), I = 1, 14) - * /0.0034, 0.0272, 0.0408, 0.0501, 0.0554, 0.0582, 0.0597, - * 0.0604, 0.0608, 0.0610, 4*0.0611 - ` / - DATA (BTVDR (I, 1, 4), I = 1, 14) - * /0.2050, 0.2524, 0.2799, 0.2947, 0.3022, 0.3059, 0.3076, - * 0.3085, 0.3088, 0.3090, 4*0.3091 - ` / - DATA (BTVDR (I, 2, 4), I = 1, 14) - * /0.1084, 0.1404, 0.1617, 0.1754, 0.1837, 0.1887, 0.1915, - * 0.1931, 0.1940, 0.1946, 0.1948, 0.1950, 2*0.1951 - ` / - DATA (BTVDR (I, 1, 5), I = 1, 14) - & /0.0203, 0.0406, 0.0548, 0.0632, 0.0679, 0.0703, 0.0716, - & 0.0722, 0.0726, 0.0727, 0.0728, 0.0728, 0.0728, 0.0729 - ` / - - DATA (BTVDR (I, 2, 5), I = 1, 14) - & /0.0184, 0.0385, 0.0526, 0.0611, 0.0658, 0.0683, 0.0696, - & 0.0702, 0.0705, 0.0707, 4*0.0708 - ` / - - DATA (BTVDR (I, 1, 6), I = 1, 14) - & /0.0199, 0.0388, 0.0494, 0.0554, 0.0584, 0.0599, 0.0606, - & 0.0609, 0.0611, 5*0.0612 - ` / - - DATA (BTVDR (I, 2, 6), I = 1, 14) - & /0.0181, 0.0371, 0.0476, 0.0537, 0.0568, 0.0583, 0.0590, - & 0.0593, 0.0595, 0.0595, 4*0.0596 - ` / - - DATA (BTVDR (I, 1, 7), I = 1, 14) /14*0./ - DATA (BTVDR (I, 2, 7), I = 1, 14) /14*0./ - - DATA (BTVDR (I, 1, 8), I = 1, 14) /14*0./ - DATA (BTVDR (I, 2, 8), I = 1, 14) /14*0./ - - DATA (BTVDR (I, 1, 9), I = 1, 14) /14*0./ - DATA (BTVDR (I, 2, 9), I = 1, 14) /14*0./ - -C**** -C**** ----------------------------------------------------------- - DATA (GMVDR (I, 1, 1), I = 1, 14) - ` /0.0814, 0.1361, 0.2078, 0.2650, 0.2986, 0.3169, 0.3265, - * 0.3313, 0.3337, 0.3348, 0.3354, 0.3357, 2*0.3358 - ` / - DATA (GMVDR (I, 2, 1), I = 1, 14) - * /0.0760, 0.1336, 0.2034, 0.2622, 0.2969, 0.3159, 0.3259, - * 0.3309, 0.3333, 0.3346, 0.3352, 0.3354, 2*0.3356 - ` / - DATA (GMVDR (I, 1, 2), I = 1, 14) - * /0.0834, 0.1252, 0.1558, 0.1927, 0.2131, 0.2237, 0.2290, - * 0.2315, 0.2327, 0.2332, 0.2335, 2*0.2336, 0.2337 - ` / - DATA (GMVDR (I, 2, 2), I = 1, 14) - * /0.0789, 0.1235, 0.1531, 0.1912, 0.2122, 0.2232, 0.2286, - * 0.2312, 0.2324, 0.2330, 0.2333, 0.2334, 2*0.2335 - ` / - DATA (GMVDR (I, 1, 3), I = 1, 14) - * /0.0647, 0.1342, 0.2215, 0.2968, 0.3432, 0.3696, 0.3838, - * 0.3912, 0.3950, 0.3968, 0.3978, 0.3982, 0.3984, 0.3985 - ` / - DATA (GMVDR (I, 2, 3), I = 1, 14) - * /0.0258, 0.1227, 0.1999, 0.2825, 0.3339, 0.3634, 0.3794, - * 0.3877, 0.3919, 0.3940, 0.3950, 0.3956, 0.3958, 0.3959 - ` / - DATA (GMVDR (I, 1, 4), I = 1, 14) - * /0.3371, 0.5762, 0.7159, 0.7927, 0.8324, 0.8526, 0.8624, - * 0.8671, 0.8693, 0.8704, 0.8709, 0.8710, 2*0.8712 - ` / - DATA (GMVDR (I, 2, 4), I = 1, 14) - * /0.2634, 0.4375, 0.5532, 0.6291, 0.6763, 0.7048, 0.7213, - * 0.7310, 0.7363, 0.7395, 0.7411, 0.7420, 0.7426, 0.7428 - ` / - DATA (GMVDR (I, 1, 5), I = 1, 14) - & /0.0971, 0.1544, 0.2511, 0.3157, 0.3548, 0.3768, 0.3886, - & 0.3948, 0.3978, 0.3994, 0.4001, 0.4006, 0.4007, 0.4008 - ` / - - DATA (GMVDR (I, 2, 5), I = 1, 14) - & /0.0924, 0.1470, 0.2458, 0.3123, 0.3527, 0.3756, 0.3877, - & 0.3942, 0.3974, 0.3990, 0.3998, 0.4002, 0.4004, 0.4005 - ` / - - DATA (GMVDR (I, 1, 6), I = 1, 14) - & /0.0970, 0.1355, 0.1841, 0.2230, 0.2447, 0.2561, 0.2617, - & 0.2645, 0.2658, 0.2664, 0.2667, 3*0.2669 - ` / - - DATA (GMVDR (I, 2, 6), I = 1, 14) - & /0.0934, 0.1337, 0.1812, 0.2213, 0.2437, 0.2554, 0.2613, - & 0.2642, 0.2656, 0.2662, 0.2665, 0.2667, 0.2667, 0.2668 - ` / - - DATA (GMVDR (I, 1, 7), I = 1, 14) /14*1./ - DATA (GMVDR (I, 2, 7), I = 1, 14) /14*1./ - - DATA (GMVDR (I, 1, 8), I = 1, 14) /14*1./ - DATA (GMVDR (I, 2, 8), I = 1, 14) /14*1./ - - DATA (GMVDR (I, 1, 9), I = 1, 14) /14*1./ - DATA (GMVDR (I, 2, 9), I = 1, 14) /14*1./ - -C**** -C**** ----------------------------------------------------------- - - DATA (ALIDR (I, 1, 1), I = 1, 14) - * /0.2867, 0.2840, 0.2828, 0.2822, 0.2819, 0.2818, 2*0.2817, - * 6*0.2816 - ` / - DATA (ALIDR (I, 2, 1), I = 1, 14) - * /0.3564, 0.3573, 0.3577, 0.3580, 2*0.3581, 8*0.3582/ - DATA (ALIDR (I, 1, 2), I = 1, 14) - * /0.2848, 0.2819, 0.2804, 0.2798, 0.2795, 2*0.2793, 7*0.2792/ - DATA (ALIDR (I, 2, 2), I = 1, 14) - * /0.3544, 0.3550, 0.3553, 2*0.3555, 9*0.3556/ - DATA (ALIDR (I, 1, 3), I = 1, 14) - * /0.2350, 0.2311, 0.2293, 0.2285, 0.2281, 0.2280, 8*0.2279/ - DATA (ALIDR (I, 2, 3), I = 1, 14) - * /0.2474, 0.2436, 0.2418, 0.2410, 0.2406, 0.2405, 3*0.2404, - * 5*0.2403 - ` / - DATA (ALIDR (I, 1, 4), I = 1, 14) - * /0.5816, 0.6157, 0.6391, 0.6556, 0.6673, 0.6758, 0.6820, - * 0.6866, 0.6899, 0.6924, 0.6943, 0.6956, 0.6966, 0.6974 - ` / - DATA (ALIDR (I, 2, 4), I = 1, 14) - * /0.5489, 0.5770, 0.5955, 0.6079, 0.6163, 0.6221, 0.6261, - * 0.6288, 0.6308, 0.6321, 0.6330, 0.6337, 0.6341, 0.6344 - ` / - DATA (ALIDR (I, 1, 5), I = 1, 14) - & /0.2845, 0.2837, 0.2832, 0.2831, 0.2830, 9*0.2829/ - DATA (ALIDR (I, 2, 5), I = 1, 14) - & /0.3532, 0.3562, 0.3578, 0.3586, 0.3590, 0.3592, 0.3594, - & 0.3594, 0.3594, 5*0.3595 - ` / - DATA (ALIDR (I, 1, 6), I = 1, 14) - & /0.2825, 0.2812, 0.2806, 0.2803, 0.2802, 9*0.2801/ - DATA (ALIDR (I, 2, 6), I = 1, 14) - & /0.3512, 0.3538, 0.3552, 0.3559, 0.3562, 0.3564, 0.3565, - & 0.3565, 6*0.3566 - ` / - - DATA (ALIDR (I, 1, 7), I = 1, 14) /14*ALIDRS/ - DATA (ALIDR (I, 2, 7), I = 1, 14) /14*ALIDRS/ - - DATA (ALIDR (I, 1, 8), I = 1, 14) /14*ALIDRD/ - DATA (ALIDR (I, 2, 8), I = 1, 14) /14*ALIDRD/ - - DATA (ALIDR (I, 1, 9), I = 1, 14) /14*ALIDRI/ - DATA (ALIDR (I, 2, 9), I = 1, 14) /14*ALIDRI/ - -C**** -C**** ----------------------------------------------------------- - DATA (BTIDR (I, 1, 1), I = 1, 14) - * /0.1291, 0.1707, 0.1969, 0.2125, 0.2216, 0.2267, 0.2295, - * 0.2311, 0.2319, 0.2323, 0.2326, 2*0.2327, 0.2328 - ` / - DATA (BTIDR (I, 2, 1), I = 1, 14) - * /0.1939, 0.2357, 0.2598, 0.2735, 0.2810, 0.2851, 0.2874, - * 0.2885, 0.2892, 0.2895, 0.2897, 3*0.2898 - ` / - DATA (BTIDR (I, 1, 2), I = 1, 14) - * /0.1217, 0.1522, 0.1713, 0.1820, 0.1879, 0.1910, 0.1926, - * 0.1935, 0.1939, 0.1942, 2*0.1943, 2*0.1944 - ` / - DATA (BTIDR (I, 2, 2), I = 1, 14) - * /0.1781, 0.2067, 0.2221, 0.2301, 0.2342, 0.2363, 0.2374, - * 0.2379, 0.2382, 0.2383, 2*0.2384, 2*0.2385 - ` / - DATA (BTIDR (I, 1, 3), I = 1, 14) - * /0.0846, 0.1299, 0.1614, 0.1814, 0.1935, 0.2004, 0.2043, - * 0.2064, 0.2076, 0.2082, 0.2085, 2*0.2087, 0.2088 - ` / - DATA (BTIDR (I, 2, 3), I = 1, 14) - * /0.0950, 0.1410, 0.1722, 0.1921, 0.2042, 0.2111, 0.2151, - * 0.2172, 0.2184, 0.2191, 0.2194, 0.2196, 2*0.2197 - ` / - DATA (BTIDR (I, 1, 4), I = 1, 14) - * /0.5256, 0.7444, 0.9908, 1.2700, 1.5680, 1.8505, 2.0767, - * 2.2211, 2.2808, 2.2774, 2.2362, 2.1779, 2.1160, 2.0564 - ` / - DATA (BTIDR (I, 2, 4), I = 1, 14) - * /0.4843, 0.6714, 0.8577, 1.0335, 1.1812, 1.2858, 1.3458, - * 1.3688, 1.3685, 1.3546, 1.3360, 1.3168, 1.2989, 1.2838 - ` / - DATA (BTIDR (I, 1, 5), I = 1, 14) - & /0.1498, 0.1930, 0.2201, 0.2364, 0.2460, 0.2514, 0.2544, - & 0.2560, 0.2569, 0.2574, 0.2577, 0.2578, 0.2579, 0.2579 - ` / - - DATA (BTIDR (I, 2, 5), I = 1, 14) - & /0.2184, 0.2656, 0.2927, 0.3078, 0.3159, 0.3202, 0.3224, - & 0.3235, 0.3241, 0.3244, 0.3245, 3*0.3246 - ` / - - DATA (BTIDR (I, 1, 6), I = 1, 14) - & /0.1369, 0.1681, 0.1860, 0.1958, 0.2010, 0.2038, 0.2053, - & 0.2060, 0.2064, 0.2066, 0.2067, 3*0.2068 - ` / - - DATA (BTIDR (I, 2, 6), I = 1, 14) - & /0.1969, 0.2268, 0.2416, 0.2488, 0.2521, 0.2537, 0.2544, - & 0.2547, 0.2548, 5*0.2549 - ` / - - - DATA (BTIDR (I, 1, 7), I = 1, 14) /14*0./ - DATA (BTIDR (I, 2, 7), I = 1, 14) /14*0./ - - DATA (BTIDR (I, 1, 8), I = 1, 14) /14*0./ - DATA (BTIDR (I, 2, 8), I = 1, 14) /14*0./ - - DATA (BTIDR (I, 1, 9), I = 1, 14) /14*0./ - DATA (BTIDR (I, 2, 9), I = 1, 14) /14*0./ - -C**** -C**** -------------------------------------------------------------- - DATA (GMIDR (I, 1, 1), I = 1, 14) - * /0.1582, 0.2581, 0.3227, 0.3635, 0.3882, 0.4026, 0.4108, - * 0.4154, 0.4179, 0.4193, 0.4200, 0.4204, 0.4206, 0.4207 - ` / - DATA (GMIDR (I, 2, 1), I = 1, 14) - * /0.1934, 0.3141, 0.3818, 0.4200, 0.4415, 0.4533, 0.4598, - * 0.4633, 0.4651, 0.4662, 0.4667, 0.4671, 2*0.4672 - ` / - DATA (GMIDR (I, 1, 2), I = 1, 14) - * /0.1347, 0.1871, 0.2277, 0.2515, 0.2651, 0.2727, 0.2768, - * 0.2790, 0.2801, 0.2808, 0.2811, 0.2812, 0.2813, 0.2814 - ` / - DATA (GMIDR (I, 2, 2), I = 1, 14) - * /0.1440, 0.2217, 0.2629, 0.2839, 0.2947, 0.3003, 0.3031, - * 0.3046, 0.3054, 0.3058, 0.3060, 2*0.3061, 0.3062 - ` / - DATA (GMIDR (I, 1, 3), I = 1, 14) - * /0.1372, 0.2368, 0.3235, 0.3839, 0.4229, 0.4465, 0.4602, - * 0.4679, 0.4722, 0.4745, 0.4758, 0.4764, 0.4768, 0.4770 - ` / - DATA (GMIDR (I, 2, 3), I = 1, 14) - * /0.1435, 0.2524, 0.3370, 0.3955, 0.4332, 0.4563, 0.4697, - * 0.4773, 0.4815, 0.4839, 0.4851, 0.4858, 0.4861, 0.4863 - ` / - DATA (GMIDR (I, 1, 4), I = 1, 14) - * /0.4298, 0.9651, 1.6189, 2.4084, 3.2992, 4.1928, 4.9611, - * 5.5095, 5.8085, 5.9069, 5.8726, 5.7674, 5.6346, 5.4944 - ` / - DATA (GMIDR (I, 2, 4), I = 1, 14) - * /0.4167, 0.8974, 1.4160, 1.9414, 2.4147, 2.7803, 3.0202, - * 3.1468, 3.1954, 3.1932, 3.1676, 3.1328, 3.0958, 3.0625 - ` / - DATA (GMIDR (I, 1, 5), I = 1, 14) - & /0.1959, 0.3203, 0.3985, 0.4472, 0.4766, 0.4937, 0.5034, - & 0.5088, 0.5117, 0.5134, 0.5143, 0.5147, 0.5150, 0.5152 - ` / - - DATA (GMIDR (I, 2, 5), I = 1, 14) - & /0.2328, 0.3859, 0.4734, 0.5227, 0.5498, 0.5644, 0.5720, - & 0.5761, 0.5781, 0.5792, 0.5797, 0.5800, 0.5802, 0.5802 - ` / - - DATA (GMIDR (I, 1, 6), I = 1, 14) - & /0.1447, 0.2244, 0.2698, 0.2953, 0.3094, 0.3170, 0.3211, - & 0.3233, 0.3244, 0.3250, 0.3253, 0.3255, 0.3256, 0.3256 - ` / - - DATA (GMIDR (I, 2, 6), I = 1, 14) - & /0.1643, 0.2624, 0.3110, 0.3347, 0.3461, 0.3517, 0.3543, - & 0.3556, 0.3562, 0.3564, 0.3565, 0.3566, 0.3566, 0.3566 - ` / - - DATA (GMIDR (I, 1, 7), I = 1, 14) /14*1./ - DATA (GMIDR (I, 2, 7), I = 1, 14) /14*1./ - - DATA (GMIDR (I, 1, 8), I = 1, 14) /14*1./ - DATA (GMIDR (I, 2, 8), I = 1, 14) /14*1./ - - DATA (GMIDR (I, 1, 9), I = 1, 14) /14*1./ - DATA (GMIDR (I, 2, 9), I = 1, 14) /14*1./ - - -C**** ----------------------------------------------------------- - - DATA GRN /0.33, 0.67/ - - DATA SNWALB /.85, .50, .85, .50, - * .85, .50, .85, .50, - * .85, .50, .85, .50, - * .85, .50, .85, .50, - * .85, .50, .85, .50, - & .85, .50, .85, .50, - & .85, .50, .85, .50, - & .85, .50, .85, .50, - & .85, .50, .85, .50 - ` / - - DATA SNWMID /50.,50.,50.,2.,50.,2.,2.,2.,2./ - - -CFPP$ EXPAND (COEFF) - - DO 100 I=1,IRUN -C print*,'1 ok' - ALA = AMIN1 (AMAX1 (ZERO, VLAI(I)), ALATRM) - LAI = 1 + MAX(0, INT((ALA-BLAI)/DLAI) ) - DX = (ALA - (BLAI+(LAI-1)*DLAI)) * (ONE/DLAI) - DY = (VGRN(I)- GRN(1)) * (ONE/(GRN(2) - GRN(1))) - -C print*,'2 ok' - ALPHA = COEFF (ALVDR (1, 1, ITYP (I)), NLAI, LAI ,DX, DY) - BETA = COEFF (BTVDR (1, 1, ITYP (I)), NLAI, LAI ,DX, DY) - GAMMA = COEFF (GMVDR (1, 1, ITYP (I)), NLAI, LAI ,DX, DY) - - GAMMA = MAX(GAMMA,0.01) - -C print*,'3 ok' -! AVISDR(I) = ALPHA - ZTH(I)*BETA / (GAMMA+ZTH(I)) - AVISDF(I) = ALPHA-BETA - * + 2.*BETA*GAMMA*(1.-GAMMA*ALOG((1.+GAMMA)/GAMMA)) - -C print*,'4 ok' - ALPHA = COEFF (ALIDR (1, 1, ITYP (I)), NLAI, LAI ,DX, DY) - BETA = COEFF (BTIDR (1, 1, ITYP (I)), NLAI, LAI ,DX, DY) - GAMMA = COEFF (GMIDR (1, 1, ITYP (I)), NLAI, LAI ,DX, DY) - - GAMMA = MAX(GAMMA,0.01) - -C print*,'5 ok',zth(i),gamma,ityp(i),lai,dx,dy,vgrn(i),vlai(i) -! ANIRDR(I) = ALPHA - ZTH(I)*BETA / (GAMMA+ZTH(I)) -C print*,'5b ok' - ANIRDF(I) = ALPHA-BETA - * + 2.*BETA*GAMMA*(1.-GAMMA*ALOG((1.+GAMMA)/GAMMA)) - -C print*,'6 ok' - IF (SNW (I) .GT. ZERO) THEN - FAC = SNW(I) / (SNW(I) + SNWMID(ITYP(I))) - -C print*,'7 ok' -! AVISDR(I) = AVISDR(I) + (SNWALB(1,ITYP(I)) - AVISDR(I)) * FAC -! ANIRDR(I) = ANIRDR(I) + (SNWALB(2,ITYP(I)) - ANIRDR(I)) * FAC - AVISDF(I) = AVISDF(I) + (SNWALB(3,ITYP(I)) - AVISDF(I)) * FAC - ANIRDF(I) = ANIRDF(I) + (SNWALB(4,ITYP(I)) - ANIRDF(I)) * FAC - ENDIF -C print*,'8 ok' - - 100 CONTINUE - - RETURN - END - - - FUNCTION COEFF(TABLE, NTABL, LAI ,DX, DY) - - INTEGER NTABL, LAI - - REAL TABLE (NTABL, 2), DX, DY - - COEFF = (TABLE(LAI, 1) - * + (TABLE(LAI ,2) - TABLE(LAI ,1)) * DY ) * (1.0-DX) - * + (TABLE(LAI+1,1) - * + (TABLE(LAI+1,2) - TABLE(LAI+1,1)) * DY ) * DX - - RETURN - END diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/zenith.f b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/zenith.f deleted file mode 100644 index 4c586e56c..000000000 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/zenith.f +++ /dev/null @@ -1,159 +0,0 @@ - -C -C do 100 j=1,12 -C print * -C do 100 i=1,24 -C -C hour = i -C -C call solar(0.,0.,j*30,i*3600,zth,slr) -C -C print *, j, i, zth, slr -C -C100 continue -C -C stop -C end -C -C -C - SUBROUTINE SOLAR(CLON,SLON,CLAT,SLAT,DAY0,SEC0,ZTH,SLR) - - INTEGER DAYSPRYR, EQNX - - - PARAMETER - * (DAYLEN=86400., DAYSPRYR=365, AE=6.371E6 - *, OB=23.45, PER=102.0, ECC=.0167 - *, EQNX=80, SO=1365.0) - - PARAMETER - * (ZERO=0.0, ONE=1.0, TWO=2.0, THREE=3.0 - *, FOUR=4.0, FIVE=5.0, SIX=6.0, ONE80=180.0 - *, HALF=0.5, THIRD=ONE/THREE, FOURTH=0.25 - *, PI=3.1415926535898, UNDEF=-999.) - - - -C********************************************************************* -C*********************** ARIES MODEL ******************************** -C********************* SUBROUTINE SOLAR ****************************** -C********************* 3 SEPTEMBER 1992 ****************************** -C********************************************************************* - -C ARGUMENTS - - REAL CLAT, CLON - REAL SLAT, SLON - INTEGER DAY0, SEC0 - REAL ZTH, SLR - -C LOCALS - - DIMENSION TH(DAYSPRYR) - - LOGICAL FIRST - DATA FIRST/ .TRUE. / - - SAVE TH - -C reichle, 10 July 2002: why is astro only called in the first -C call to solar? shouldn't "first" be saved to achieve that? - - IF (FIRST) THEN - FIRST = .FALSE. - CALL ASTRO(TH) - ENDIF - - - C = CLAT - S = SLAT - - CH = CLON - SH = SLON - -c -------------------------------- -c -c next line modified by reichle, 10 July 2002 -c (prevent iday from reaching 366 in a leap year, which -c does not work because there are only 365 days per year -c hard-wired into this routine...) -c -c IDAY = DAY0 - iday = min( day0, dayspryr) -c -c --------------------------------- - - - IDYP1 = MOD(IDAY,DAYSPRYR) + 1 - FAC = FLOAT(SEC0)/DAYLEN - - CFAC = COS(FAC*TWO*PI) - SFAC = SIN(FAC*TWO*PI) - - HC = CFAC*CH - SFAC*SH - - THNOW = TH(IDAY)*(ONE-FAC) + TH(IDYP1)*FAC - ZS = SIN(THNOW) * SIN(OB*PI/ONE80) - ZC = SQRT(ONE-ZS*ZS) - PP = (ONE-ECC*COS(THNOW - PER*PI/ONE80 )) / (1.-ECC*ECC) - PP = PP * PP - - SZS = S*ZS - CZC = C*ZC - ZTH = AMAX1(SZS + CZC*HC,ZERO) - SLR = ZTH*(SO*PP) - - RETURN - END - - - - SUBROUTINE ASTRO(TH) - -C SCCS VERSION %W% %G% - -C SCCS VERSION @(#)mlsize.h 1.1 8/31/92 - - - INTEGER DAYSPRYR, EQNX - - PARAMETER - * (DAYLEN=86400., DAYSPRYR=365, AE=6.371E6 - *, OB=23.45, PER=102.0, ECC=.0167 - *, EQNX=80, SO=1365.0) - - PARAMETER - * (ZERO=0.0, ONE=1.0, TWO=2.0, THREE=3.0 - *, FOUR=4.0, FIVE=5.0, SIX=6.0, ONE80=180.0 - *, HALF=0.5, THIRD=ONE/THREE, FOURTH=0.25 - *, PI=3.1415926535898, UNDEF=-999.) - - DIMENSION TH(DAYSPRYR) - -c reichle, 10 July 2002: are these function definitions??? - - PYTH(X) = SQRT(ONE-X*X) - FUN(Y) = (TWO*PI/(PYTH(ECC)**3))*(ONE/DAYSPRYR) - * *(ONE - ECC*COS(Y-PER*PI/ONE80) ) ** 2 - - - KM = EQNX - TH(KM) = ZERO - DO 200 K=2,DAYSPRYR - - T1 = FUN(TH(KM) ) - T2 = FUN(TH(KM)+T1/TWO) - T3 = FUN(TH(KM)+T2/TWO) - T4 = FUN(TH(KM)+T3 ) - - KP = MOD(EQNX-2+K,DAYSPRYR) + 1 - TH(KP) = TH(KM) + (T1 + TWO*(T2 + T3) + T4) / SIX - KM = KP - -200 CONTINUE - - - RETURN - END - diff --git a/GEOSogcm_GridComp/GEOS_OceanGridComp/GEOS_OceanGridComp.F90 b/GEOSogcm_GridComp/GEOS_OceanGridComp/GEOS_OceanGridComp.F90 index 2e2dcc19f..0a4bdf48e 100644 --- a/GEOSogcm_GridComp/GEOS_OceanGridComp/GEOS_OceanGridComp.F90 +++ b/GEOSogcm_GridComp/GEOS_OceanGridComp/GEOS_OceanGridComp.F90 @@ -129,7 +129,7 @@ subroutine SetServices ( GC, RC ) end select endif - call MAPL_GetResource(MAPL, iDUAL_OCEAN, 'DUAL_OCEAN:', default=0, RC=STATUS ) + call MAPL_GetResource(MAPL, iDUAL_OCEAN, 'DUAL_OCEAN:', default=0, __RC__ ) DUAL_OCEAN = iDUAL_OCEAN /= 0 OCNd = 0 diff --git a/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/1440x1080/README.md b/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/1440x1080/README.md index 94290846a..dac3e7f85 100644 --- a/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/1440x1080/README.md +++ b/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/1440x1080/README.md @@ -1 +1 @@ -This configuration was adapted from https://github.com/NOAA-GFDL/MOM6-examples/tree/dev/gfdl/ice_ocean_SIS2/OM4_025 +This configuration was adapted from: https://github.com/NOAA-GFDL/MOM6-examples/tree/dev/gfdl/ice_ocean_SIS2/OM4_025 diff --git a/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/360x320/geos/README.md b/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/360x320/geos/README.md index fba56b91a..20dbdd2ab 100644 --- a/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/360x320/geos/README.md +++ b/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/360x320/geos/README.md @@ -1 +1 @@ -This configuration was adapted from https://github.com/NOAA-GFDL/MOM6-examples/tree/dev/gfdl/ocean_only/global_ALE/z. +This configuration was adapted from: https://github.com/NOAA-GFDL/MOM6-examples/tree/dev/gfdl/ice_ocean_SIS2/OM_1deg diff --git a/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/72x36/MOM_input b/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/72x36/MOM_input new file mode 100755 index 000000000..783bb470a --- /dev/null +++ b/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/72x36/MOM_input @@ -0,0 +1,460 @@ +! This input file provides the adjustable run-time parameters for version 6 of the Modular Ocean Model (MOM6). +! Where appropriate, parameters use usually given in MKS units. + +! This particular file is for the example in global_ALE. + +! This MOM_input file typically contains only the non-default values that are needed to reproduce this example. +! A full list of parameters for this example can be found in the corresponding MOM_parameter_doc.all file +! which is generated by the model at run-time. + +! === module MOM_domains === +TRIPOLAR_N = True ! [Boolean] default = False + ! Use tripolar connectivity at the northern edge of the domain. With + ! TRIPOLAR_N, NIGLOBAL must be even. +NIGLOBAL = 72 ! + ! The total number of thickness grid points in the x-direction in the physical + ! domain. With STATIC_MEMORY_ this is set in MOM_memory.h at compile time. +NJGLOBAL = 36 ! + ! The total number of thickness grid points in the y-direction in the physical + ! domain. With STATIC_MEMORY_ this is set in MOM_memory.h at compile time. +! LAYOUT = 8, 8 ! + ! The processor layout that was actually used. + +! === module MOM === +DIABATIC_FIRST = True ! [Boolean] default = False + ! If true, apply diabatic and thermodynamic processes, including buoyancy + ! forcing and mass gain or loss, before stepping the dynamics forward. +THICKNESSDIFFUSE = True ! [Boolean] default = False + ! If true, interface heights are diffused with a coefficient of KHTH. +THICKNESSDIFFUSE_FIRST = True ! [Boolean] default = False + ! If true, do thickness diffusion before dynamics. This is only used if + ! THICKNESSDIFFUSE is true. +DT = 3600.0 ! [s] + ! The (baroclinic) dynamics time step. The time-step that is actually used will + ! be an integer fraction of the forcing time-step (DT_FORCING in ocean-only mode + ! or the coupling timestep in coupled mode.) +DT_THERM = 7200.0 ! [s] default = 3600.0 + ! The thermodynamic and tracer advection time step. Ideally DT_THERM should be + ! an integer multiple of DT and less than the forcing or coupling time-step, + ! unless THERMO_SPANS_COUPLING is true, in which case DT_THERM can be an integer + ! multiple of the coupling timestep. By default DT_THERM is set to DT. +DTBT_RESET_PERIOD = 0.0 ! [s] default = 7200.0 + ! The period between recalculations of DTBT (if DTBT <= 0). If DTBT_RESET_PERIOD + ! is negative, DTBT is set based only on information available at + ! initialization. If 0, DTBT will be set every dynamics time step. The default + ! is set by DT_THERM. This is only used if SPLIT is true. +FRAZIL = True ! [Boolean] default = False + ! If true, water freezes if it gets too cold, and the accumulated heat deficit + ! is returned in the surface state. FRAZIL is only used if + ! ENABLE_THERMODYNAMICS is true. +DO_GEOTHERMAL = False ! [Boolean] default = False + ! If true, apply geothermal heating. +BOUND_SALINITY = True ! [Boolean] default = False + ! If true, limit salinity to being positive. (The sea-ice model may ask for more + ! salt than is available and drive the salinity negative otherwise.) +MIN_SALINITY = 0.01 ! [PPT] default = 0.0 + ! The minimum value of salinity when BOUND_SALINITY=True. +C_P = 3925.0 ! [J kg-1 K-1] default = 3991.86795711963 + ! The heat capacity of sea water, approximated as a constant. This is only used + ! if ENABLE_THERMODYNAMICS is true. The default value is from the TEOS-10 + ! definition of conservative temperature. +CHECK_BAD_SURFACE_VALS = True ! [Boolean] default = False + ! If true, check the surface state for ridiculous values. +SAVE_INITIAL_CONDS = True ! [Boolean] default = False + ! If true, write the initial conditions to a file given by IC_OUTPUT_FILE. + +! === module MOM_fixed_initialization === +INPUTDIR = "INPUT" ! default = "." + ! The directory in which input files are found. + +! === module MOM_grid_init === +GRID_CONFIG = "mosaic" ! + ! A character string that determines the method for defining the horizontal + ! grid. Current options are: + ! mosaic - read the grid from a mosaic (supergrid) + ! file set by GRID_FILE. + ! cartesian - use a (flat) Cartesian grid. + ! spherical - use a simple spherical grid. + ! mercator - use a Mercator spherical grid. +GRID_FILE = "ocean_hgrid.nc" ! + ! Name of the file from which to read horizontal grid data. +TOPO_CONFIG = "file" ! + ! This specifies how bathymetry is specified: + ! file - read bathymetric information from the file + ! specified by (TOPO_FILE). + ! flat - flat bottom set to MAXIMUM_DEPTH. + ! bowl - an analytically specified bowl-shaped basin + ! ranging between MAXIMUM_DEPTH and MINIMUM_DEPTH. + ! spoon - a similar shape to 'bowl', but with an vertical + ! wall at the southern face. + ! halfpipe - a zonally uniform channel with a half-sine + ! profile in the meridional direction. + ! bbuilder - build topography from list of functions. + ! benchmark - use the benchmark test case topography. + ! Neverworld - use the Neverworld test case topography. + ! DOME - use a slope and channel configuration for the + ! DOME sill-overflow test case. + ! ISOMIP - use a slope and channel configuration for the + ! ISOMIP test case. + ! DOME2D - use a shelf and slope configuration for the + ! DOME2D gravity current/overflow test case. + ! Kelvin - flat but with rotated land mask. + ! seamount - Gaussian bump for spontaneous motion test case. + ! dumbbell - Sloshing channel with reservoirs on both ends. + ! shelfwave - exponential slope for shelfwave test case. + ! Phillips - ACC-like idealized topography used in the Phillips config. + ! dense - Denmark Strait-like dense water formation and overflow. + ! USER - call a user modified routine. +MAXIMUM_DEPTH = 6000.0 ! [m] + ! The maximum depth of the ocean. +MINIMUM_DEPTH = 0.5 ! [m] default = 0.0 + ! If MASKING_DEPTH is unspecified, then anything shallower than MINIMUM_DEPTH is + ! assumed to be land and all fluxes are masked out. If MASKING_DEPTH is + ! specified, then all depths shallower than MINIMUM_DEPTH but deeper than + ! MASKING_DEPTH are rounded to MINIMUM_DEPTH. +CHANNEL_CONFIG = "none" ! default = "none" + ! A parameter that determines which set of channels are + ! restricted to specific widths. Options are: + ! none - All channels have the grid width. + ! global_1deg - Sets 16 specific channels appropriate + ! for a 1-degree model, as used in CM2G. + ! list - Read the channel locations and widths from a + ! text file, like MOM_channel_list in the MOM_SIS + ! test case. + ! file - Read open face widths everywhere from a + ! NetCDF file on the model grid. +PARALLEL_RESTARTFILES = True ! [Boolean] default = False + ! If true, each processor writes its own restart file, otherwise a single + ! restart file is generated + +! === module MOM_verticalGrid === +! Parameters providing information about the vertical grid. + +! === module MOM_EOS === + +! === module MOM_tracer_flow_control === +USE_IDEAL_AGE_TRACER = True ! [Boolean] default = False + ! If true, use the ideal_age_example tracer package. + +! === module ideal_age_example === + +! === module MOM_coord_initialization === +COORD_CONFIG = "file" ! default = "none" + ! This specifies how layers are to be defined: + ! ALE or none - used to avoid defining layers in ALE mode + ! file - read coordinate information from the file + ! specified by (COORD_FILE). + ! BFB - Custom coords for buoyancy-forced basin case + ! based on SST_S, T_BOT and DRHO_DT. + ! linear - linear based on interfaces not layers + ! layer_ref - linear based on layer densities + ! ts_ref - use reference temperature and salinity + ! ts_range - use range of temperature and salinity + ! (T_REF and S_REF) to determine surface density + ! and GINT calculate internal densities. + ! gprime - use reference density (RHO_0) for surface + ! density and GINT calculate internal densities. + ! ts_profile - use temperature and salinity profiles + ! (read from COORD_FILE) to set layer densities. + ! USER - call a user modified routine. +! COORD_FILE = "Layer_coord.nc" ! + ! The file from which the coordinate densities are read. + +! === module MOM_state_initialization === +INIT_LAYERS_FROM_Z_FILE = True ! [Boolean] default = False + ! If true, initialize the layer thicknesses, temperatures, and salinities from a + ! Z-space file on a latitude-longitude grid. + +! === module MOM_initialize_layers_from_Z === +TEMP_SALT_Z_INIT_FILE = "WOA05_pottemp_salt.nc" ! default = "temp_salt_z.nc" + ! The name of the z-space input file used to initialize temperatures (T) and + ! salinities (S). If T and S are not in the same file, TEMP_Z_INIT_FILE and + ! SALT_Z_INIT_FILE must be set. +Z_INIT_FILE_PTEMP_VAR = "PTEMP" ! default = "ptemp" + ! The name of the potential temperature variable in TEMP_Z_INIT_FILE. +Z_INIT_FILE_SALT_VAR = "SALT" ! default = "salt" + ! The name of the salinity variable in SALT_Z_INIT_FILE. + +! === module MOM_diag_mediator === + +! === module MOM_MEKE === +USE_MEKE = True ! [Boolean] default = False + ! If true, turns on the MEKE scheme which calculates a sub-grid mesoscale eddy + ! kinetic energy budget. +MEKE_GMCOEFF = 1.0 ! [nondim] default = -1.0 + ! The efficiency of the conversion of potential energy into MEKE by the + ! thickness mixing parameterization. If MEKE_GMCOEFF is negative, this + ! conversion is not used or calculated. + +! === module MOM_lateral_mixing_coeffs === +USE_VARIABLE_MIXING = True ! [Boolean] default = False + ! If true, the variable mixing code will be called. This allows diagnostics to + ! be created even if the scheme is not used. If KHTR_SLOPE_CFF>0 or + ! KhTh_Slope_Cff>0, this is set to true regardless of what is in the parameter + ! file. +RESOLN_SCALED_KH = True ! [Boolean] default = False + ! If true, the Laplacian lateral viscosity is scaled away when the first + ! baroclinic deformation radius is well resolved. +RESOLN_SCALED_KHTH = True ! [Boolean] default = False + ! If true, the interface depth diffusivity is scaled away when the first + ! baroclinic deformation radius is well resolved. + +! === module MOM_set_visc === +CHANNEL_DRAG = True ! [Boolean] default = False + ! If true, the bottom drag is exerted directly on each layer proportional to the + ! fraction of the bottom it overlies. +HBBL = 10.0 ! [m] + ! The thickness of a bottom boundary layer with a viscosity of KVBBL if + ! BOTTOMDRAGLAW is not defined, or the thickness over which near-bottom + ! velocities are averaged for the drag law if BOTTOMDRAGLAW is defined but + ! LINEAR_DRAG is not. +DRAG_BG_VEL = 0.1 ! [m s-1] default = 0.0 + ! DRAG_BG_VEL is either the assumed bottom velocity (with LINEAR_DRAG) or an + ! unresolved velocity that is combined with the resolved velocity to estimate + ! the velocity magnitude. DRAG_BG_VEL is only used when BOTTOMDRAGLAW is + ! defined. +BBL_USE_EOS = True ! [Boolean] default = False + ! If true, use the equation of state in determining the properties of the bottom + ! boundary layer. Otherwise use the layer target potential densities. +BBL_THICK_MIN = 0.1 ! [m] default = 0.0 + ! The minimum bottom boundary layer thickness that can be used with + ! BOTTOMDRAGLAW. This might be Kv/(cdrag*drag_bg_vel) to give Kv as the minimum + ! near-bottom viscosity. +KV = 1.0E-04 ! [m2 s-1] + ! The background kinematic viscosity in the interior. The molecular value, ~1e-6 + ! m2 s-1, may be used. + +! === module MOM_thickness_diffuse === +KHTH = 600.0 ! [m2 s-1] default = 0.0 + ! The background horizontal thickness diffusivity. +KHTH_MAX = 900.0 ! [m2 s-1] default = 0.0 + ! The maximum horizontal thickness diffusivity. +KHTH_USE_FGNV_STREAMFUNCTION = True ! [Boolean] default = False + ! If true, use the streamfunction formulation of Ferrari et al., 2010, which + ! effectively emphasizes graver vertical modes by smoothing in the vertical. +FGNV_C_MIN = 0.01 ! [m s-1] default = 0.0 + ! A minium wave speed used in the Ferrari et al., 2010, streamfunction + ! formulation. + +! === module MOM_dynamics_split_RK2 === +TIDES = True ! [Boolean] default = False + ! If true, apply tidal momentum forcing. + +! === module MOM_continuity === + +! === module MOM_continuity_PPM === +ETA_TOLERANCE = 1.0E-06 ! [m] default = 3.15E-09 + ! The tolerance for the differences between the barotropic and baroclinic + ! estimates of the sea surface height due to the fluxes through each face. The + ! total tolerance for SSH is 4 times this value. The default is + ! 0.5*NK*ANGSTROM, and this should not be set less than about + ! 10^-15*MAXIMUM_DEPTH. +VELOCITY_TOLERANCE = 1.0E-04 ! [m s-1] default = 3.0E+08 + ! The tolerance for barotropic velocity discrepancies between the barotropic + ! solution and the sum of the layer thicknesses. + +! === module MOM_CoriolisAdv === +BOUND_CORIOLIS = True ! [Boolean] default = False + ! If true, the Coriolis terms at u-points are bounded by the four estimates of + ! (f+rv)v from the four neighboring v-points, and similarly at v-points. This + ! option would have no effect on the SADOURNY Coriolis scheme if it were + ! possible to use centered difference thickness fluxes. + +! === module MOM_tidal_forcing === +TIDE_M2 = True ! [Boolean] default = False + ! If true, apply tidal momentum forcing at the M2 frequency. This is only used + ! if TIDES is true. +TIDE_SAL_SCALAR_VALUE = 0.094 ! [m m-1] + ! The constant of proportionality between sea surface height (really it should + ! be bottom pressure) anomalies and bottom geopotential anomalies. This is only + ! used if TIDES and TIDE_USE_SAL_SCALAR are true. + +! === module MOM_PressureForce === + +! === module MOM_PressureForce_AFV === + +! === module MOM_hor_visc === +LAPLACIAN = True ! [Boolean] default = False + ! If true, use a Laplacian horizontal viscosity. +KH_VEL_SCALE = 0.01 ! [m s-1] default = 0.0 + ! The velocity scale which is multiplied by the grid spacing to calculate the + ! Laplacian viscosity. The final viscosity is the largest of this scaled + ! viscosity, the Smagorinsky and Leith viscosities, and KH. +AH_VEL_SCALE = 0.05 ! [m s-1] default = 0.0 + ! The velocity scale which is multiplied by the cube of the grid spacing to + ! calculate the biharmonic viscosity. The final viscosity is the largest of this + ! scaled viscosity, the Smagorinsky and Leith viscosities, and AH. +SMAGORINSKY_AH = True ! [Boolean] default = False + ! If true, use a biharmonic Smagorinsky nonlinear eddy viscosity. +SMAG_BI_CONST = 0.06 ! [nondim] default = 0.0 + ! The nondimensional biharmonic Smagorinsky constant, typically 0.015 - 0.06. + +! === module MOM_vert_friction === +MAXVEL = 6.0 ! [m s-1] default = 3.0E+08 + ! The maximum velocity allowed before the velocity components are truncated. + +! === module MOM_barotropic === +BOUND_BT_CORRECTION = True ! [Boolean] default = False + ! If true, the corrective pseudo mass-fluxes into the barotropic solver are + ! limited to values that require less than maxCFL_BT_cont to be accommodated. +BT_PROJECT_VELOCITY = True ! [Boolean] default = False + ! If true, step the barotropic velocity first and project out the velocity + ! tendency by 1+BEBT when calculating the transport. The default (false) is to + ! use a predictor continuity step to find the pressure field, and then to do a + ! corrector continuity step using a weighted average of the old and new + ! velocities, with weights of (1-BEBT) and BEBT. +BEBT = 0.2 ! [nondim] default = 0.1 + ! BEBT determines whether the barotropic time stepping uses the forward-backward + ! time-stepping scheme or a backward Euler scheme. BEBT is valid in the range + ! from 0 (for a forward-backward treatment of nonrotating gravity waves) to 1 + ! (for a backward Euler treatment). In practice, BEBT must be greater than about + ! 0.05. +DTBT = -0.95 ! [s or nondim] default = -0.98 + ! The barotropic time step, in s. DTBT is only used with the split explicit time + ! stepping. To set the time step automatically based the maximum stable value + ! use 0, or a negative value gives the fraction of the stable value. Setting + ! DTBT to 0 is the same as setting it to -0.98. The value of DTBT that will + ! actually be used is an integer fraction of DT, rounding down. + +! === module MOM_mixed_layer_restrat === +MIXEDLAYER_RESTRAT = False ! [Boolean] default = False + ! If true, a density-gradient dependent re-stratifying flow is imposed in the + ! mixed layer. Can be used in ALE mode without restriction but in layer mode can + ! only be used if BULKMIXEDLAYER is true. +!FOX_KEMPER_ML_RESTRAT_COEF = 20.0 ! [nondim] default = 0.0 + ! A nondimensional coefficient that is proportional to the ratio of the + ! deformation radius to the dominant lengthscale of the submesoscale mixed layer + ! instabilities, times the minimum of the ratio of the mesoscale eddy kinetic + ! energy to the large-scale geostrophic kinetic energy or 1 plus the square of + ! the grid spacing over the deformation radius, as detailed by Fox-Kemper et al. + ! (2010) + +! === module MOM_diagnostics === + +! === module MOM_diabatic_driver === +! The following parameters are used for diabatic processes. +USE_LEGACY_DIABATIC_DRIVER = False ! [Boolean] default = True + ! If true, use a legacy version of the diabatic subroutine. This is temporary + ! and is needed to avoid change in answers. + +! === module MOM_tidal_mixing === +! Vertical Tidal Mixing Parameterization +INT_TIDE_DISSIPATION = False ! [Boolean] default = False + ! If true, use an internal tidal dissipation scheme to drive diapycnal mixing, + ! along the lines of St. Laurent et al. (2002) and Simmons et al. (2004). +!INT_TIDE_DECAY_SCALE = 300.3003003003003 ! [m] default = 500.0 + ! The decay scale away from the bottom for tidal TKE with the new coding when + ! INT_TIDE_DISSIPATION is used. +!KAPPA_ITIDES = 6.28319E-04 ! [m-1] default = 6.283185307179586E-04 + ! A topographic wavenumber used with INT_TIDE_DISSIPATION. The default is 2pi/10 + ! km, as in St.Laurent et al. 2002. +!KAPPA_H2_FACTOR = 0.75 ! [nondim] default = 1.0 + ! A scaling factor for the roughness amplitude with INT_TIDE_DISSIPATION. +!TKE_ITIDE_MAX = 0.1 ! [W m-2] default = 1000.0 + ! The maximum internal tide energy source available to mix above the bottom + ! boundary layer with INT_TIDE_DISSIPATION. +!READ_TIDEAMP = False ! [Boolean] default = False + ! If true, read a file (given by TIDEAMP_FILE) containing the tidal amplitude + ! with INT_TIDE_DISSIPATION. + +! === module MOM_geothermal === +!GEOTHERMAL_SCALE = 0 ! [W m-2 or various] default = 0.0 + ! The constant geothermal heat flux, a rescaling factor for the heat flux read + ! from GEOTHERMAL_FILE, or 0 to disable the geothermal heating. + +! === module MOM_set_diffusivity === +BBL_MIXING_AS_MAX = False ! [Boolean] default = True + ! If true, take the maximum of the diffusivity from the BBL mixing and the other + ! diffusivities. Otherwise, diffusivity from the BBL_mixing is simply added. +USE_LOTW_BBL_DIFFUSIVITY = True ! [Boolean] default = False + ! If true, uses a simple, imprecise but non-coordinate dependent, model of BBL + ! mixing diffusivity based on Law of the Wall. Otherwise, uses the original BBL + ! scheme. + +! === module MOM_bkgnd_mixing === +! Adding static vertical background mixing coefficients +KD = 2.0E-05 ! [m2 s-1] default = 0.0 + ! The background diapycnal diffusivity of density in the interior. Zero or the + ! molecular value, ~1e-7 m2 s-1, may be used. +KD_MIN = 2.0E-06 ! [m2 s-1] default = 2.0E-07 + ! The minimum diapycnal diffusivity. +HENYEY_IGW_BACKGROUND = True ! [Boolean] default = False + ! If true, use a latitude-dependent scaling for the near surface background + ! diffusivity, as described in Harrison & Hallberg, JPO 2008. +KD_MAX = 0.1 ! [m2 s-1] default = -1.0 + ! The maximum permitted increment for the diapycnal diffusivity from TKE-based + ! parameterizations, or a negative value for no limit. + +! === module MOM_kappa_shear === +! Parameterization of shear-driven turbulence following Jackson, Hallberg and Legg, JPO 2008 +USE_JACKSON_PARAM = True ! [Boolean] default = False + ! If true, use the Jackson-Hallberg-Legg (JPO 2008) shear mixing + ! parameterization. +MAX_RINO_IT = 25 ! [nondim] default = 50 + ! The maximum number of iterations that may be used to estimate the Richardson + ! number driven mixing. + +! === module MOM_diabatic_aux === +! The following parameters are used for auxiliary diabatic processes. +VAR_PEN_SW = True ! [Boolean] default = False + ! If true, use one of the CHL_A schemes specified by OPACITY_SCHEME to determine + ! the e-folding depth of incoming short wave radiation. +CHL_FILE = "seawifs_1998-2006_GOLD_smoothed_2X_5deg.nc" ! + ! CHL_FILE is the file containing chl_a concentrations in the variable CHL_A. It + ! is used when VAR_PEN_SW and CHL_FROM_FILE are true. + +! === module MOM_mixed_layer === +HMIX_MIN = 2.0 ! [m] default = 0.0 + ! The minimum mixed layer depth if the mixed layer depth is determined + ! dynamically. + +! === module MOM_opacity === +PEN_SW_NBANDS = 3 ! default = 1 + ! The number of bands of penetrating shortwave radiation. + +! === module MOM_tracer_advect === +TRACER_ADVECTION_SCHEME = "PPM:H3" ! default = "PLM" + ! The horizontal transport scheme for tracers: + ! PLM - Piecewise Linear Method + ! PPM:H3 - Piecewise Parabolic Method (Huyhn 3rd order) + ! PPM - Piecewise Parabolic Method (Colella-Woodward) + +! === module MOM_tracer_hor_diff === +KHTR = 600.0 ! [m2 s-1] default = 0.0 + ! The background along-isopycnal tracer diffusivity. +KHTR_MIN = 50.0 ! [m2 s-1] default = 0.0 + ! The minimum along-isopycnal tracer diffusivity. +KHTR_MAX = 900.0 ! [m2 s-1] default = 0.0 + ! The maximum along-isopycnal tracer diffusivity. + +! === module MOM_sum_output === +MAXTRUNC = 5000 ! [truncations save_interval-1] default = 0 + ! The run will be stopped, and the day set to a very large value if the velocity + ! is truncated more than MAXTRUNC times between energy saves. Set MAXTRUNC to 0 + ! to stop if there is any truncation of velocities. +ENERGYSAVEDAYS = 0.5 ! [days] default = 1.0 + ! The interval in units of TIMEUNIT between saves of the energies of the run and + ! other globally summed diagnostics. + +! === module MOM_surface_forcing === +READ_GUST_2D = False ! [Boolean] default = False + ! If true, use a 2-dimensional gustiness supplied from an input file + +! === module MOM_main (MOM_driver) === +RESTART_CONTROL = 3 ! default = 1 + ! An integer whose bits encode which restart files are written. Add 2 (bit 1) + ! for a time-stamped file, and odd (bit 0) for a non-time-stamped file. A + ! non-time-stamped restart file is saved at the end of the run segment for any + ! non-negative value. + +! === module MOM_write_cputime === + +! Debugging parameters set to non-default values +U_TRUNC_FILE = "U_velocity_truncations" ! default = "" + ! The absolute path to a file into which the accelerations leading to zonal + ! velocity truncations are written. Undefine this for efficiency if this + ! diagnostic is not needed. +V_TRUNC_FILE = "V_velocity_truncations" ! default = "" + ! The absolute path to a file into which the accelerations leading to meridional + ! velocity truncations are written. Undefine this for efficiency if this + ! diagnostic is not needed. diff --git a/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/72x36/MOM_override b/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/72x36/MOM_override new file mode 100755 index 000000000..a9b1e357b --- /dev/null +++ b/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/72x36/MOM_override @@ -0,0 +1,33 @@ +! Blank file in which we can put "overrides" for parameters +NK = 50 +LAYOUT = 3, 2 +#override DT = 900.0 +#override DT_THERM = 900. + +#override USE_REGRIDDING = True +#override BULKMIXEDLAYER = False +COORD_FILE = "Layer_coord50.nc" +USE_STORED_SLOPES = True +USE_NEUTRAL_DIFFUSION = True +SIMPLE_TKE_TO_KD = True +REGRIDDING_COORDINATE_MODE = "Z*" +ALE_COORDINATE_CONFIG = "FILE:vgrid.nc,dz" +REMAPPING_SCHEME = "PPM_H4" +HMIX_FIXED = 0.5 +CFL_TRUNCATE_RAMP_TIME = 7200. +Z_INIT_ALE_REMAPPING = True +ENERGETICS_SFC_PBL = True +USE_MLD_ITERATION = False +MASS_WEIGHT_IN_PRESSURE_GRADIENT = True + +VERBOSITY = 9 +DEBUG = True +FATAL_UNUSED_PARAMS = True + +TOPO_FILE = "ocean_topog_Edited.nc" + +RESTART_CHECKSUMS_REQUIRED = False + +HFREEZE = 10.0 +BAD_VAL_SST_MIN = -3.0 +BAD_VAL_SSS_MAX = 55.0 diff --git a/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/72x36/MOM_parameter_doc.all b/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/72x36/MOM_parameter_doc.all new file mode 100644 index 000000000..c414edade --- /dev/null +++ b/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/72x36/MOM_parameter_doc.all @@ -0,0 +1,1978 @@ +! This file was written by the model and records all non-layout or debugging parameters used at run-time. + +! === module MOM === +SPLIT = True ! [Boolean] default = True + ! Use the split time stepping if true. +CALC_RHO_FOR_SEA_LEVEL = False ! [Boolean] default = False + ! If true, the in-situ density is used to calculate the effective sea level that + ! is returned to the coupler. If false, the Boussinesq parameter RHO_0 is used. +ENABLE_THERMODYNAMICS = True ! [Boolean] default = True + ! If true, Temperature and salinity are used as state variables. +USE_EOS = True ! [Boolean] default = True + ! If true, density is calculated from temperature and salinity with an equation + ! of state. If USE_EOS is true, ENABLE_THERMODYNAMICS must be true as well. +DIABATIC_FIRST = True ! [Boolean] default = False + ! If true, apply diabatic and thermodynamic processes, including buoyancy + ! forcing and mass gain or loss, before stepping the dynamics forward. +USE_CONTEMP_ABSSAL = False ! [Boolean] default = False + ! If true, the prognostics T&S are the conservative temperature and absolute + ! salinity. Care should be taken to convert them to potential temperature and + ! practical salinity before exchanging them with the coupler and/or reporting + ! T&S diagnostics. +ADIABATIC = False ! [Boolean] default = False + ! There are no diapycnal mass fluxes if ADIABATIC is true. This assumes that KD + ! = KDML = 0.0 and that there is no buoyancy forcing, but makes the model faster + ! by eliminating subroutine calls. +DO_DYNAMICS = True ! [Boolean] default = True + ! If False, skips the dynamics calls that update u & v, as well as the gravity + ! wave adjustment to h. This may be a fragile feature, but can be useful during + ! development +OFFLINE_TRACER_MODE = False ! [Boolean] default = False + ! If true, barotropic and baroclinic dynamics, thermodynamics are all bypassed + ! with all the fields necessary to integrate the tracer advection and diffusion + ! equation are read in from files stored from a previous integration of the + ! prognostic model. NOTE: This option only used in the ocean_solo_driver. +USE_REGRIDDING = True ! [Boolean] default = False + ! If True, use the ALE algorithm (regridding/remapping). If False, use the + ! layered isopycnal algorithm. +BULKMIXEDLAYER = False ! [Boolean] default = False + ! If true, use a Kraus-Turner-like bulk mixed layer with transitional buffer + ! layers. Layers 1 through NKML+NKBL have variable densities. There must be at + ! least NKML+NKBL+1 layers if BULKMIXEDLAYER is true. BULKMIXEDLAYER can not be + ! used with USE_REGRIDDING. The default is influenced by ENABLE_THERMODYNAMICS. +THICKNESSDIFFUSE = True ! [Boolean] default = False + ! If true, interface heights are diffused with a coefficient of KHTH. +THICKNESSDIFFUSE_FIRST = True ! [Boolean] default = False + ! If true, do thickness diffusion before dynamics. This is only used if + ! THICKNESSDIFFUSE is true. +BATHYMETRY_AT_VEL = False ! [Boolean] default = False + ! If true, there are separate values for the basin depths at velocity points. + ! Otherwise the effects of topography are entirely determined from thickness + ! points. +DT = 900.0 ! [s] + ! The (baroclinic) dynamics time step. The time-step that is actually used will + ! be an integer fraction of the forcing time-step (DT_FORCING in ocean-only mode + ! or the coupling timestep in coupled mode.) +DT_THERM = 900.0 ! [s] default = 900.0 + ! The thermodynamic and tracer advection time step. Ideally DT_THERM should be + ! an integer multiple of DT and less than the forcing or coupling time-step, + ! unless THERMO_SPANS_COUPLING is true, in which case DT_THERM can be an integer + ! multiple of the coupling timestep. By default DT_THERM is set to DT. +THERMO_SPANS_COUPLING = False ! [Boolean] default = False + ! If true, the MOM will take thermodynamic and tracer timesteps that can be + ! longer than the coupling timestep. The actual thermodynamic timestep that is + ! used in this case is the largest integer multiple of the coupling timestep + ! that is less than or equal to DT_THERM. +HMIX_SFC_PROP = 1.0 ! [m] default = 1.0 + ! If BULKMIXEDLAYER is false, HMIX_SFC_PROP is the depth over which to average + ! to find surface properties like SST and SSS or density (but not surface + ! velocities). +HMIX_UV_SFC_PROP = 0.0 ! [m] default = 0.0 + ! If BULKMIXEDLAYER is false, HMIX_UV_SFC_PROP is the depth over which to + ! average to find surface flow properties, SSU, SSV. A non-positive value + ! indicates no averaging. +HFREEZE = 10.0 ! [m] default = -1.0 + ! If HFREEZE > 0, melt potential will be computed. The actual depth over which + ! melt potential is computed will be min(HFREEZE, OBLD), where OBLD is the + ! boundary layer depth. If HFREEZE <= 0 (default), melt potential will not be + ! computed. +INTERPOLATE_P_SURF = False ! [Boolean] default = False + ! If true, linearly interpolate the surface pressure over the coupling time + ! step, using the specified value at the end of the step. +DTBT_RESET_PERIOD = 0.0 ! [s] default = 900.0 + ! The period between recalculations of DTBT (if DTBT <= 0). If DTBT_RESET_PERIOD + ! is negative, DTBT is set based only on information available at + ! initialization. If 0, DTBT will be set every dynamics time step. The default + ! is set by DT_THERM. This is only used if SPLIT is true. +FRAZIL = True ! [Boolean] default = False + ! If true, water freezes if it gets too cold, and the accumulated heat deficit + ! is returned in the surface state. FRAZIL is only used if + ! ENABLE_THERMODYNAMICS is true. +DO_GEOTHERMAL = False ! [Boolean] default = False + ! If true, apply geothermal heating. +BOUND_SALINITY = True ! [Boolean] default = False + ! If true, limit salinity to being positive. (The sea-ice model may ask for more + ! salt than is available and drive the salinity negative otherwise.) +MIN_SALINITY = 0.01 ! [PPT] default = 0.0 + ! The minimum value of salinity when BOUND_SALINITY=True. +C_P = 3925.0 ! [J kg-1 K-1] default = 3991.86795711963 + ! The heat capacity of sea water, approximated as a constant. This is only used + ! if ENABLE_THERMODYNAMICS is true. The default value is from the TEOS-10 + ! definition of conservative temperature. +USE_PSURF_IN_EOS = True ! [Boolean] default = True + ! If true, always include the surface pressure contributions in equation of + ! state calculations. +P_REF = 2.0E+07 ! [Pa] default = 2.0E+07 + ! The pressure that is used for calculating the coordinate density. (1 Pa = 1e4 + ! dbar, so 2e7 is commonly used.) This is only used if USE_EOS and + ! ENABLE_THERMODYNAMICS are true. +FIRST_DIRECTION = 0 ! default = 0 + ! An integer that indicates which direction goes first in parts of the code that + ! use directionally split updates, with even numbers (or 0) used for x- first + ! and odd numbers used for y-first. +CHECK_BAD_SURFACE_VALS = True ! [Boolean] default = False + ! If true, check the surface state for ridiculous values. +BAD_VAL_SSH_MAX = 20.0 ! [m] default = 20.0 + ! The value of SSH above which a bad value message is triggered, if + ! CHECK_BAD_SURFACE_VALS is true. +BAD_VAL_SSS_MAX = 55.0 ! [PPT] default = 45.0 + ! The value of SSS above which a bad value message is triggered, if + ! CHECK_BAD_SURFACE_VALS is true. +BAD_VAL_SST_MAX = 45.0 ! [deg C] default = 45.0 + ! The value of SST above which a bad value message is triggered, if + ! CHECK_BAD_SURFACE_VALS is true. +BAD_VAL_SST_MIN = -3.0 ! [deg C] default = -2.1 + ! The value of SST below which a bad value message is triggered, if + ! CHECK_BAD_SURFACE_VALS is true. +BAD_VAL_COLUMN_THICKNESS = 0.0 ! [m] default = 0.0 + ! The value of column thickness below which a bad value message is triggered, if + ! CHECK_BAD_SURFACE_VALS is true. +DEFAULT_2018_ANSWERS = False ! [Boolean] default = False + ! This sets the default value for the various _2018_ANSWERS parameters. +SURFACE_2018_ANSWERS = False ! [Boolean] default = False + ! If true, use expressions for the surface properties that recover the answers + ! from the end of 2018. Otherwise, use more appropriate expressions that differ + ! at roundoff for non-Boussinesq cases. +USE_DIABATIC_TIME_BUG = False ! [Boolean] default = False + ! If true, uses the wrong calendar time for diabatic processes, as was done in + ! MOM6 versions prior to February 2018. This is not recommended. +SAVE_INITIAL_CONDS = True ! [Boolean] default = False + ! If true, write the initial conditions to a file given by IC_OUTPUT_FILE. +IC_OUTPUT_FILE = "MOM_IC" ! default = "MOM_IC" + ! The file into which to write the initial conditions. +WRITE_GEOM = 1 ! default = 1 + ! If =0, never write the geometry and vertical grid files. If =1, write the + ! geometry and vertical grid files only for a new simulation. If =2, always + ! write the geometry and vertical grid files. Other values are invalid. +ENSEMBLE_OCEAN = False ! [Boolean] default = False + ! If False, The model is being run in serial mode as a single realization. If + ! True, The current model realization is part of a larger ensemble and at the + ! end of step MOM, we will perform a gather of the ensemble members for + ! statistical evaluation and/or data assimilation. + +! === module MOM_domains === +REENTRANT_X = True ! [Boolean] default = True + ! If true, the domain is zonally reentrant. +REENTRANT_Y = False ! [Boolean] default = False + ! If true, the domain is meridionally reentrant. +TRIPOLAR_N = True ! [Boolean] default = False + ! Use tripolar connectivity at the northern edge of the domain. With + ! TRIPOLAR_N, NIGLOBAL must be even. +NIGLOBAL = 72 ! + ! The total number of thickness grid points in the x-direction in the physical + ! domain. With STATIC_MEMORY_ this is set in MOM_memory.h at compile time. +NJGLOBAL = 36 ! + ! The total number of thickness grid points in the y-direction in the physical + ! domain. With STATIC_MEMORY_ this is set in MOM_memory.h at compile time. +NIHALO = 4 ! default = 4 + ! The number of halo points on each side in the x-direction. How this is set + ! varies with the calling component and static or dynamic memory configuration. +NJHALO = 4 ! default = 4 + ! The number of halo points on each side in the y-direction. How this is set + ! varies with the calling component and static or dynamic memory configuration. + +! === module MOM_hor_index === +! Sets the horizontal array index types. + +! === module MOM_fixed_initialization === +INPUTDIR = "INPUT" ! default = "." + ! The directory in which input files are found. + +! === module MOM_grid_init === +GRID_CONFIG = "mosaic" ! + ! A character string that determines the method for defining the horizontal + ! grid. Current options are: + ! mosaic - read the grid from a mosaic (supergrid) + ! file set by GRID_FILE. + ! cartesian - use a (flat) Cartesian grid. + ! spherical - use a simple spherical grid. + ! mercator - use a Mercator spherical grid. +GRID_FILE = "ocean_hgrid.nc" ! + ! Name of the file from which to read horizontal grid data. +USE_TRIPOLAR_GEOLONB_BUG = False ! [Boolean] default = False + ! If true, use older code that incorrectly sets the longitude in some points + ! along the tripolar fold to be off by 360 degrees. +TOPO_CONFIG = "file" ! + ! This specifies how bathymetry is specified: + ! file - read bathymetric information from the file + ! specified by (TOPO_FILE). + ! flat - flat bottom set to MAXIMUM_DEPTH. + ! bowl - an analytically specified bowl-shaped basin + ! ranging between MAXIMUM_DEPTH and MINIMUM_DEPTH. + ! spoon - a similar shape to 'bowl', but with an vertical + ! wall at the southern face. + ! halfpipe - a zonally uniform channel with a half-sine + ! profile in the meridional direction. + ! bbuilder - build topography from list of functions. + ! benchmark - use the benchmark test case topography. + ! Neverworld - use the Neverworld test case topography. + ! DOME - use a slope and channel configuration for the + ! DOME sill-overflow test case. + ! ISOMIP - use a slope and channel configuration for the + ! ISOMIP test case. + ! DOME2D - use a shelf and slope configuration for the + ! DOME2D gravity current/overflow test case. + ! Kelvin - flat but with rotated land mask. + ! seamount - Gaussian bump for spontaneous motion test case. + ! dumbbell - Sloshing channel with reservoirs on both ends. + ! shelfwave - exponential slope for shelfwave test case. + ! Phillips - ACC-like idealized topography used in the Phillips config. + ! dense - Denmark Strait-like dense water formation and overflow. + ! USER - call a user modified routine. +TOPO_FILE = "ocean_topog_Edited.nc" ! default = "topog.nc" + ! The file from which the bathymetry is read. +TOPO_VARNAME = "depth" ! default = "depth" + ! The name of the bathymetry variable in TOPO_FILE. +TOPO_EDITS_FILE = "" ! default = "" + ! The file from which to read a list of i,j,z topography overrides. +ALLOW_LANDMASK_CHANGES = False ! [Boolean] default = False + ! If true, allow topography overrides to change land mask. +MAXIMUM_DEPTH = 6000.0 ! [m] + ! The maximum depth of the ocean. +MINIMUM_DEPTH = 0.5 ! [m] default = 0.0 + ! If MASKING_DEPTH is unspecified, then anything shallower than MINIMUM_DEPTH is + ! assumed to be land and all fluxes are masked out. If MASKING_DEPTH is + ! specified, then all depths shallower than MINIMUM_DEPTH but deeper than + ! MASKING_DEPTH are rounded to MINIMUM_DEPTH. + +! === module MOM_open_boundary === +! Controls where open boundaries are located, what kind of boundary condition to impose, and what data to apply, +! if any. +OBC_NUMBER_OF_SEGMENTS = 0 ! default = 0 + ! The number of open boundary segments. +MASKING_DEPTH = -9999.0 ! [m] default = -9999.0 + ! The depth below which to mask points as land points, for which all fluxes are + ! zeroed out. MASKING_DEPTH is ignored if negative. +CHANNEL_CONFIG = "none" ! default = "none" + ! A parameter that determines which set of channels are + ! restricted to specific widths. Options are: + ! none - All channels have the grid width. + ! global_1deg - Sets 16 specific channels appropriate + ! for a 1-degree model, as used in CM2G. + ! list - Read the channel locations and widths from a + ! text file, like MOM_channel_list in the MOM_SIS + ! test case. + ! file - Read open face widths everywhere from a + ! NetCDF file on the model grid. +ROTATION = "2omegasinlat" ! default = "2omegasinlat" + ! This specifies how the Coriolis parameter is specified: + ! 2omegasinlat - Use twice the planetary rotation rate + ! times the sine of latitude. + ! betaplane - Use a beta-plane or f-plane. + ! USER - call a user modified routine. +OMEGA = 7.2921E-05 ! [s-1] default = 7.2921E-05 + ! The rotation rate of the earth. +GRID_ROTATION_ANGLE_BUGS = False ! [Boolean] default = False + ! If true, use an older algorithm to calculate the sine and cosines needed + ! rotate between grid-oriented directions and true north and east. Differences + ! arise at the tripolar fold. +PARALLEL_RESTARTFILES = True ! [Boolean] default = False + ! If true, each processor writes its own restart file, otherwise a single + ! restart file is generated + +! === module MOM_verticalGrid === +! Parameters providing information about the vertical grid. +G_EARTH = 9.8 ! [m s-2] default = 9.8 + ! The gravitational acceleration of the Earth. +RHO_0 = 1035.0 ! [kg m-3] default = 1035.0 + ! The mean ocean density used with BOUSSINESQ true to calculate accelerations + ! and the mass for conservation properties, or with BOUSSINSEQ false to convert + ! some parameters from vertical units of m to kg m-2. +BOUSSINESQ = True ! [Boolean] default = True + ! If true, make the Boussinesq approximation. +ANGSTROM = 1.0E-10 ! [m] default = 1.0E-10 + ! The minimum layer thickness, usually one-Angstrom. +H_TO_M = 1.0 ! [m H-1] default = 1.0 + ! A constant that translates the model's internal units of thickness into m. +NK = 50 ! [nondim] + ! The number of model layers. + +! === module MOM_tracer_registry === + +! === module MOM_EOS === +EQN_OF_STATE = "WRIGHT" ! default = "WRIGHT" + ! EQN_OF_STATE determines which ocean equation of state should be used. + ! Currently, the valid choices are "LINEAR", "UNESCO", "WRIGHT", "NEMO" and + ! "TEOS10". This is only used if USE_EOS is true. +EOS_QUADRATURE = False ! [Boolean] default = False + ! If true, always use the generic (quadrature) code code for the integrals of + ! density. +TFREEZE_FORM = "LINEAR" ! default = "LINEAR" + ! TFREEZE_FORM determines which expression should be used for the freezing + ! point. Currently, the valid choices are "LINEAR", "MILLERO_78", "TEOS10" +TFREEZE_S0_P0 = 0.0 ! [deg C] default = 0.0 + ! When TFREEZE_FORM=LINEAR, this is the freezing potential temperature at S=0, + ! P=0. +DTFREEZE_DS = -0.054 ! [deg C PSU-1] default = -0.054 + ! When TFREEZE_FORM=LINEAR, this is the derivative of the freezing potential + ! temperature with salinity. +DTFREEZE_DP = 0.0 ! [deg C Pa-1] default = 0.0 + ! When TFREEZE_FORM=LINEAR, this is the derivative of the freezing potential + ! temperature with pressure. + +! === module MOM_restart === +RESTARTFILE = "MOM.res" ! default = "MOM.res" + ! The name-root of the restart file. +LARGE_FILE_SUPPORT = True ! [Boolean] default = True + ! If true, use the file-size limits with NetCDF large file support (4Gb), + ! otherwise the limit is 2Gb. +MAX_FIELDS = 100 ! default = 100 + ! The maximum number of restart fields that can be used. +RESTART_CHECKSUMS_REQUIRED = False ! [Boolean] default = True + ! If true, require the restart checksums to match and error out otherwise. Users + ! may want to avoid this comparison if for example the restarts are made from a + ! run with a different mask_table than the current run, in which case the + ! checksums will not match and cause crash. + +! === module MOM_tracer_flow_control === +USE_USER_TRACER_EXAMPLE = False ! [Boolean] default = False + ! If true, use the USER_tracer_example tracer package. +USE_DOME_TRACER = False ! [Boolean] default = False + ! If true, use the DOME_tracer tracer package. +USE_ISOMIP_TRACER = False ! [Boolean] default = False + ! If true, use the ISOMIP_tracer tracer package. +USE_RGC_TRACER = False ! [Boolean] default = False + ! If true, use the RGC_tracer tracer package. +USE_IDEAL_AGE_TRACER = True ! [Boolean] default = False + ! If true, use the ideal_age_example tracer package. +USE_REGIONAL_DYES = False ! [Boolean] default = False + ! If true, use the regional_dyes tracer package. +USE_OIL_TRACER = False ! [Boolean] default = False + ! If true, use the oil_tracer tracer package. +USE_ADVECTION_TEST_TRACER = False ! [Boolean] default = False + ! If true, use the advection_test_tracer tracer package. +USE_OCMIP2_CFC = False ! [Boolean] default = False + ! If true, use the MOM_OCMIP2_CFC tracer package. +USE_generic_tracer = False ! [Boolean] default = False + ! If true and _USE_GENERIC_TRACER is defined as a preprocessor macro, use the + ! MOM_generic_tracer packages. +USE_PSEUDO_SALT_TRACER = False ! [Boolean] default = False + ! If true, use the pseudo salt tracer, typically run as a diagnostic. +USE_BOUNDARY_IMPULSE_TRACER = False ! [Boolean] default = False + ! If true, use the boundary impulse tracer. +USE_DYED_OBC_TRACER = False ! [Boolean] default = False + ! If true, use the dyed_obc_tracer tracer package. + +! === module ideal_age_example === +DO_IDEAL_AGE = True ! [Boolean] default = True + ! If true, use an ideal age tracer that is set to 0 age in the mixed layer and + ! ages at unit rate in the interior. +DO_IDEAL_VINTAGE = False ! [Boolean] default = False + ! If true, use an ideal vintage tracer that is set to an exponentially + ! increasing value in the mixed layer and is conserved thereafter. +DO_IDEAL_AGE_DATED = False ! [Boolean] default = False + ! If true, use an ideal age tracer that is everywhere 0 before + ! IDEAL_AGE_DATED_START_YEAR, but the behaves like the standard ideal age tracer + ! - i.e. is set to 0 age in the mixed layer and ages at unit rate in the + ! interior. +AGE_IC_FILE = "" ! default = "" + ! The file in which the age-tracer initial values can be found, or an empty + ! string for internal initialization. +AGE_IC_FILE_IS_Z = False ! [Boolean] default = False + ! If true, AGE_IC_FILE is in depth space, not layer space +TRACERS_MAY_REINIT = False ! [Boolean] default = False + ! If true, tracers may go through the initialization code if they are not found + ! in the restart files. Otherwise it is a fatal error if the tracers are not + ! found in the restart files of a restarted run. + +! === module MOM_coord_initialization === +COORD_CONFIG = "file" ! default = "none" + ! This specifies how layers are to be defined: + ! ALE or none - used to avoid defining layers in ALE mode + ! file - read coordinate information from the file + ! specified by (COORD_FILE). + ! BFB - Custom coords for buoyancy-forced basin case + ! based on SST_S, T_BOT and DRHO_DT. + ! linear - linear based on interfaces not layers + ! layer_ref - linear based on layer densities + ! ts_ref - use reference temperature and salinity + ! ts_range - use range of temperature and salinity + ! (T_REF and S_REF) to determine surface density + ! and GINT calculate internal densities. + ! gprime - use reference density (RHO_0) for surface + ! density and GINT calculate internal densities. + ! ts_profile - use temperature and salinity profiles + ! (read from COORD_FILE) to set layer densities. + ! USER - call a user modified routine. +GFS = 9.8 ! [m s-2] default = 9.8 + ! The reduced gravity at the free surface. +COORD_FILE = "Layer_coord50.nc" ! + ! The file from which the coordinate densities are read. +COORD_VAR = "Layer" ! default = "Layer" + ! The variable in COORD_FILE that is to be used for the coordinate densities. +REMAP_UV_USING_OLD_ALG = False ! [Boolean] default = False + ! If true, uses the old remapping-via-a-delta-z method for remapping u and v. If + ! false, uses the new method that remaps between grids described by an old and + ! new thickness. +REGRIDDING_COORDINATE_MODE = "Z*" ! default = "LAYER" + ! Coordinate mode for vertical regridding. Choose among the following + ! possibilities: LAYER - Isopycnal or stacked shallow water layers + ! ZSTAR, Z* - stretched geopotential z* + ! SIGMA_SHELF_ZSTAR - stretched geopotential z* ignoring shelf + ! SIGMA - terrain following coordinates + ! RHO - continuous isopycnal + ! HYCOM1 - HyCOM-like hybrid coordinate + ! SLIGHT - stretched coordinates above continuous isopycnal + ! ADAPTIVE - optimize for smooth neutral density surfaces +REGRIDDING_COORDINATE_UNITS = "m" ! default = "m" + ! Units of the regridding coordinate. +ALE_COORDINATE_CONFIG = "FILE:vgrid.nc,dz" ! default = "UNIFORM" + ! Determines how to specify the coordinate resolution. Valid options are: + ! PARAM - use the vector-parameter ALE_RESOLUTION + ! UNIFORM[:N] - uniformly distributed + ! FILE:string - read from a file. The string specifies + ! the filename and variable name, separated + ! by a comma or space, e.g. FILE:lev.nc,dz + ! or FILE:lev.nc,interfaces=zw + ! WOA09[:N] - the WOA09 vertical grid (approximately) + ! FNC1:string - FNC1:dz_min,H_total,power,precision + ! HYBRID:string - read from a file. The string specifies + ! the filename and two variable names, separated + ! by a comma or space, for sigma-2 and dz. e.g. + ! HYBRID:vgrid.nc,sigma2,dz +!ALE_RESOLUTION = 3*10.1, 2*10.2, 10.3, 10.5, 10.7, 10.9, 11.3, 11.7, 12.4, 13.3, 14.6, 16.3, 18.6, 21.7, 25.9, 31.4, 38.5, 47.4, 58.4, 71.3, 86.0, 101.9, 118.1, 134.0, 148.7, 161.6, 172.6, 181.5, 188.6, 194.1, 198.3, 201.4, 203.7, 205.4, 206.7, 207.6, 208.3, 208.7, 209.1, 209.3, 209.5, 209.7, 2*209.8, 2*209.9, 209.0 ! [m] + ! The distribution of vertical resolution for the target + ! grid used for Eulerian-like coordinates. For example, + ! in z-coordinate mode, the parameter is a list of level + ! thicknesses (in m). In sigma-coordinate mode, the list + ! is of non-dimensional fractions of the water column. +MIN_THICKNESS = 0.001 ! [m] default = 0.001 + ! When regridding, this is the minimum layer thickness allowed. +REMAPPING_SCHEME = "PPM_H4" ! default = "PLM" + ! This sets the reconstruction scheme used for vertical remapping for all + ! variables. It can be one of the following schemes: PCM (1st-order + ! accurate) + ! PLM (2nd-order accurate) + ! PPM_H4 (3rd-order accurate) + ! PPM_IH4 (3rd-order accurate) + ! PQM_IH4IH3 (4th-order accurate) + ! PQM_IH6IH5 (5th-order accurate) +FATAL_CHECK_RECONSTRUCTIONS = False ! [Boolean] default = False + ! If true, cell-by-cell reconstructions are checked for consistency and if + ! non-monotonicity or an inconsistency is detected then a FATAL error is issued. +FATAL_CHECK_REMAPPING = False ! [Boolean] default = False + ! If true, the results of remapping are checked for conservation and new extrema + ! and if an inconsistency is detected then a FATAL error is issued. +REMAP_BOUND_INTERMEDIATE_VALUES = False ! [Boolean] default = False + ! If true, the values on the intermediate grid used for remapping are forced to + ! be bounded, which might not be the case due to round off. +REMAP_BOUNDARY_EXTRAP = False ! [Boolean] default = False + ! If true, values at the interfaces of boundary cells are extrapolated instead + ! of piecewise constant +REMAPPING_2018_ANSWERS = False ! [Boolean] default = False + ! If true, use the order of arithmetic and expressions that recover the answers + ! from the end of 2018. Otherwise, use updated and more robust forms of the + ! same expressions. +REMAP_AFTER_INITIALIZATION = True ! [Boolean] default = True + ! If true, applies regridding and remapping immediately after initialization so + ! that the state is ALE consistent. This is a legacy step and should not be + ! needed if the initialization is consistent with the coordinate mode. +REGRID_TIME_SCALE = 0.0 ! [s] default = 0.0 + ! The time-scale used in blending between the current (old) grid and the target + ! (new) grid. A short time-scale favors the target grid (0. or anything less + ! than DT_THERM) has no memory of the old grid. A very long time-scale makes the + ! model more Lagrangian. +REGRID_FILTER_SHALLOW_DEPTH = 0.0 ! [m] default = 0.0 + ! The depth above which no time-filtering is applied. Above this depth final + ! grid exactly matches the target (new) grid. +REGRID_FILTER_DEEP_DEPTH = 0.0 ! [m] default = 0.0 + ! The depth below which full time-filtering is applied with time-scale + ! REGRID_TIME_SCALE. Between depths REGRID_FILTER_SHALLOW_DEPTH and + ! REGRID_FILTER_SHALLOW_DEPTH the filter weights adopt a cubic profile. + +! === module MOM_grid === +! Parameters providing information about the lateral grid. +REFERENCE_HEIGHT = 0.0 ! [m] default = 0.0 + ! A reference value for geometric height fields, such as bathyT. + +! === module MOM_state_initialization === +INIT_LAYERS_FROM_Z_FILE = True ! [Boolean] default = False + ! If true, initialize the layer thicknesses, temperatures, and salinities from a + ! Z-space file on a latitude-longitude grid. + +! === module MOM_initialize_layers_from_Z === +TEMP_SALT_Z_INIT_FILE = "WOA05_pottemp_salt.nc" ! default = "temp_salt_z.nc" + ! The name of the z-space input file used to initialize temperatures (T) and + ! salinities (S). If T and S are not in the same file, TEMP_Z_INIT_FILE and + ! SALT_Z_INIT_FILE must be set. +TEMP_Z_INIT_FILE = "WOA05_pottemp_salt.nc" ! default = "WOA05_pottemp_salt.nc" + ! The name of the z-space input file used to initialize temperatures, only. +SALT_Z_INIT_FILE = "WOA05_pottemp_salt.nc" ! default = "WOA05_pottemp_salt.nc" + ! The name of the z-space input file used to initialize temperatures, only. +Z_INIT_FILE_PTEMP_VAR = "PTEMP" ! default = "ptemp" + ! The name of the potential temperature variable in TEMP_Z_INIT_FILE. +Z_INIT_FILE_SALT_VAR = "SALT" ! default = "salt" + ! The name of the salinity variable in SALT_Z_INIT_FILE. +Z_INIT_HOMOGENIZE = False ! [Boolean] default = False + ! If True, then horizontally homogenize the interpolated initial conditions. +Z_INIT_ALE_REMAPPING = True ! [Boolean] default = False + ! If True, then remap straight to model coordinate from file. +Z_INIT_REMAPPING_SCHEME = "PPM_IH4" ! default = "PPM_IH4" + ! The remapping scheme to use if using Z_INIT_ALE_REMAPPING is True. +Z_INIT_REMAP_GENERAL = False ! [Boolean] default = False + ! If false, only initializes to z* coordinates. If true, allows initialization + ! directly to general coordinates. +Z_INIT_REMAP_FULL_COLUMN = False ! [Boolean] default = False + ! If false, only reconstructs profiles for valid data points. If true, inserts + ! vanished layers below the valid data. +Z_INIT_REMAP_OLD_ALG = False ! [Boolean] default = False + ! If false, uses the preferred remapping algorithm for initialization. If true, + ! use an older, less robust algorithm for remapping. +TEMP_SALT_INIT_VERTICAL_REMAP_ONLY = False ! [Boolean] default = False + ! If true, initial conditions are on the model horizontal grid. Extrapolation + ! over missing ocean values is done using an ICE-9 procedure with vertical ALE + ! remapping . +HOR_REGRID_2018_ANSWERS = False ! [Boolean] default = False + ! If true, use the order of arithmetic for horizonal regridding that recovers + ! the answers from the end of 2018. Otherwise, use rotationally symmetric forms + ! of the same expressions. +VELOCITY_CONFIG = "zero" ! default = "zero" + ! A string that determines how the initial velocities are specified for a new + ! run: + ! file - read velocities from the file specified + ! by (VELOCITY_FILE). + ! zero - the fluid is initially at rest. + ! uniform - the flow is uniform (determined by + ! parameters INITIAL_U_CONST and INITIAL_V_CONST). + ! rossby_front - a mixed layer front in thermal wind balance. + ! soliton - Equatorial Rossby soliton. + ! USER - call a user modified routine. +CONVERT_THICKNESS_UNITS = False ! [Boolean] default = False + ! If true, convert the thickness initial conditions from units of m to kg m-2 + ! or vice versa, depending on whether BOUSSINESQ is defined. This does not apply + ! if a restart file is read. +DEPRESS_INITIAL_SURFACE = False ! [Boolean] default = False + ! If true, depress the initial surface to avoid huge tsunamis when a large + ! surface pressure is applied. +TRIM_IC_FOR_P_SURF = False ! [Boolean] default = False + ! If true, cuts way the top of the column for initial conditions at the depth + ! where the hydrostatic pressure matches the imposed surface pressure which is + ! read from file. +REGRID_ACCELERATE_INIT = False ! [Boolean] default = False + ! If true, runs REGRID_ACCELERATE_ITERATIONS iterations of the regridding + ! algorithm to push the initial grid to be consistent with the initial + ! condition. Useful only for state-based and iterative coordinates. +SPONGE = False ! [Boolean] default = False + ! If true, sponges may be applied anywhere in the domain. The exact location and + ! properties of those sponges are specified via SPONGE_CONFIG. + +! === module MOM_diag_mediator === +NUM_DIAG_COORDS = 1 ! default = 1 + ! The number of diagnostic vertical coordinates to use. For each coordinate, an + ! entry in DIAG_COORDS must be provided. +USE_GRID_SPACE_DIAGNOSTIC_AXES = False ! [Boolean] default = False + ! If true, use a grid index coordinate convention for diagnostic axes. +DIAG_COORDS = "z Z ZSTAR" ! default = "z Z ZSTAR" + ! A list of string tuples associating diag_table modules to a coordinate + ! definition used for diagnostics. Each string is of the form "MODULE_SUFFIX + ! PARAMETER_SUFFIX COORDINATE_NAME". +DIAG_MISVAL = 1.0E+20 ! [not defined] default = 1.0E+20 + ! Set the default missing value to use for diagnostics. +DIAG_AS_CHKSUM = False ! [Boolean] default = False + ! Instead of writing diagnostics to the diag manager, write a text file + ! containing the checksum (bitcount) of the array. +AVAILABLE_DIAGS_FILE = "available_diags.000000" ! default = "available_diags.000000" + ! A file into which to write a list of all available ocean diagnostics that can + ! be included in a diag_table. +DIAG_COORD_DEF_Z = "WOA09" ! default = "WOA09" + ! Determines how to specify the coordinate resolution. Valid options are: + ! PARAM - use the vector-parameter DIAG_COORD_RES_Z + ! UNIFORM[:N] - uniformly distributed + ! FILE:string - read from a file. The string specifies + ! the filename and variable name, separated + ! by a comma or space, e.g. FILE:lev.nc,dz + ! or FILE:lev.nc,interfaces=zw + ! WOA09[:N] - the WOA09 vertical grid (approximately) + ! FNC1:string - FNC1:dz_min,H_total,power,precision + ! HYBRID:string - read from a file. The string specifies + ! the filename and two variable names, separated + ! by a comma or space, for sigma-2 and dz. e.g. + ! HYBRID:vgrid.nc,sigma2,dz + +! === module MOM_MEKE === +USE_MEKE = True ! [Boolean] default = False + ! If true, turns on the MEKE scheme which calculates a sub-grid mesoscale eddy + ! kinetic energy budget. +MEKE_DAMPING = 0.0 ! [s-1] default = 0.0 + ! The local depth-independent MEKE dissipation rate. +MEKE_CD_SCALE = 0.0 ! [nondim] default = 0.0 + ! The ratio of the bottom eddy velocity to the column mean eddy velocity, i.e. + ! sqrt(2*MEKE). This should be less than 1 to account for the surface + ! intensification of MEKE. +MEKE_CB = 25.0 ! [nondim] default = 25.0 + ! A coefficient in the expression for the ratio of bottom projected eddy energy + ! and mean column energy (see Jansen et al. 2015). +MEKE_MIN_GAMMA2 = 1.0E-04 ! [nondim] default = 1.0E-04 + ! The minimum allowed value of gamma_b^2. +MEKE_CT = 50.0 ! [nondim] default = 50.0 + ! A coefficient in the expression for the ratio of barotropic eddy energy and + ! mean column energy (see Jansen et al. 2015). +MEKE_GMCOEFF = 1.0 ! [nondim] default = -1.0 + ! The efficiency of the conversion of potential energy into MEKE by the + ! thickness mixing parameterization. If MEKE_GMCOEFF is negative, this + ! conversion is not used or calculated. +MEKE_GEOMETRIC = False ! [Boolean] default = False + ! If MEKE_GEOMETRIC is true, uses the GM coefficient formulation from the + ! GEOMETRIC framework (Marshall et al., 2012). +MEKE_GEOMETRIC_ALPHA = 0.05 ! [nondim] default = 0.05 + ! The nondimensional coefficient governing the efficiency of the GEOMETRIC + ! thickness diffusion. +MEKE_EQUILIBRIUM_ALT = False ! [Boolean] default = False + ! If true, use an alternative formula for computing the (equilibrium)initial + ! value of MEKE. +MEKE_EQUILIBRIUM_RESTORING = False ! [Boolean] default = False + ! If true, restore MEKE back to its equilibrium value, which is calculated at + ! each time step. +MEKE_FRCOEFF = -1.0 ! [nondim] default = -1.0 + ! The efficiency of the conversion of mean energy into MEKE. If MEKE_FRCOEFF is + ! negative, this conversion is not used or calculated. +MEKE_GMECOEFF = -1.0 ! [nondim] default = -1.0 + ! The efficiency of the conversion of MEKE into mean energy by GME. If + ! MEKE_GMECOEFF is negative, this conversion is not used or calculated. +MEKE_BGSRC = 0.0 ! [W kg-1] default = 0.0 + ! A background energy source for MEKE. +MEKE_KH = -1.0 ! [m2 s-1] default = -1.0 + ! A background lateral diffusivity of MEKE. Use a negative value to not apply + ! lateral diffusion to MEKE. +MEKE_K4 = -1.0 ! [m4 s-1] default = -1.0 + ! A lateral bi-harmonic diffusivity of MEKE. Use a negative value to not apply + ! bi-harmonic diffusion to MEKE. +MEKE_DTSCALE = 1.0 ! [nondim] default = 1.0 + ! A scaling factor to accelerate the time evolution of MEKE. +MEKE_KHCOEFF = 1.0 ! [nondim] default = 1.0 + ! A scaling factor in the expression for eddy diffusivity which is otherwise + ! proportional to the MEKE velocity- scale times an eddy mixing-length. This + ! factor must be >0 for MEKE to contribute to the thickness/ and tracer + ! diffusivity in the rest of the model. +MEKE_USCALE = 0.0 ! [m s-1] default = 0.0 + ! The background velocity that is combined with MEKE to calculate the bottom + ! drag. +MEKE_GM_SRC_ALT = False ! [Boolean] default = False + ! If true, use the GM energy conversion form S^2*N^2*kappa rather than the + ! streamfunction for the MEKE GM source term. +MEKE_VISC_DRAG = True ! [Boolean] default = True + ! If true, use the vertvisc_type to calculate the bottom drag acting on MEKE. +MEKE_KHTH_FAC = 0.0 ! [nondim] default = 0.0 + ! A factor that maps MEKE%Kh to KhTh. +MEKE_KHTR_FAC = 0.0 ! [nondim] default = 0.0 + ! A factor that maps MEKE%Kh to KhTr. +MEKE_KHMEKE_FAC = 0.0 ! [nondim] default = 0.0 + ! A factor that maps MEKE%Kh to Kh for MEKE itself. +MEKE_OLD_LSCALE = False ! [Boolean] default = False + ! If true, use the old formula for length scale which is a function of grid + ! spacing and deformation radius. +MEKE_MIN_LSCALE = False ! [Boolean] default = False + ! If true, use a strict minimum of provided length scales rather than harmonic + ! mean. +MEKE_RD_MAX_SCALE = False ! [nondim] default = False + ! If true, the length scale used by MEKE is the minimum of the deformation + ! radius or grid-spacing. Only used if MEKE_OLD_LSCALE=True +MEKE_VISCOSITY_COEFF_KU = 0.0 ! [nondim] default = 0.0 + ! If non-zero, is the scaling coefficient in the expression forviscosity used to + ! parameterize harmonic lateral momentum mixing byunresolved eddies represented + ! by MEKE. Can be negative torepresent backscatter from the unresolved eddies. +MEKE_VISCOSITY_COEFF_AU = 0.0 ! [nondim] default = 0.0 + ! If non-zero, is the scaling coefficient in the expression forviscosity used to + ! parameterize biharmonic lateral momentum mixing byunresolved eddies + ! represented by MEKE. Can be negative torepresent backscatter from the + ! unresolved eddies. +MEKE_FIXED_MIXING_LENGTH = 0.0 ! [m] default = 0.0 + ! If positive, is a fixed length contribution to the expression for mixing + ! length used in MEKE-derived diffusivity. +MEKE_ALPHA_DEFORM = 0.0 ! [nondim] default = 0.0 + ! If positive, is a coefficient weighting the deformation scale in the + ! expression for mixing length used in MEKE-derived diffusivity. +MEKE_ALPHA_RHINES = 0.0 ! [nondim] default = 0.0 + ! If positive, is a coefficient weighting the Rhines scale in the expression for + ! mixing length used in MEKE-derived diffusivity. +MEKE_ALPHA_EADY = 0.0 ! [nondim] default = 0.0 + ! If positive, is a coefficient weighting the Eady length scale in the + ! expression for mixing length used in MEKE-derived diffusivity. +MEKE_ALPHA_FRICT = 0.0 ! [nondim] default = 0.0 + ! If positive, is a coefficient weighting the frictional arrest scale in the + ! expression for mixing length used in MEKE-derived diffusivity. +MEKE_ALPHA_GRID = 0.0 ! [nondim] default = 0.0 + ! If positive, is a coefficient weighting the grid-spacing as a scale in the + ! expression for mixing length used in MEKE-derived diffusivity. +MEKE_COLD_START = False ! [Boolean] default = False + ! If true, initialize EKE to zero. Otherwise a local equilibrium solution is + ! used as an initial condition for EKE. +MEKE_BACKSCAT_RO_C = 0.0 ! [nondim] default = 0.0 + ! The coefficient in the Rossby number function for scaling the biharmonic + ! frictional energy source. Setting to non-zero enables the Rossby number + ! function. +MEKE_BACKSCAT_RO_POW = 0.0 ! [nondim] default = 0.0 + ! The power in the Rossby number function for scaling the biharmonic frictional + ! energy source. +MEKE_ADVECTION_FACTOR = 0.0 ! [nondim] default = 0.0 + ! A scale factor in front of advection of eddy energy. Zero turns advection off. + ! Using unity would be normal but other values could accommodate a mismatch + ! between the advecting barotropic flow and the vertical structure of MEKE. +MEKE_TOPOGRAPHIC_BETA = 0.0 ! [nondim] default = 0.0 + ! A scale factor to determine how much topographic beta is weighed in computing + ! beta in the expression of Rhines scale. Use 1 if full topographic beta effect + ! is considered; use 0 if it's completely ignored. +CDRAG = 0.003 ! [nondim] default = 0.003 + ! CDRAG is the drag coefficient relating the magnitude of the velocity field to + ! the bottom stress. +MEKE_CDRAG = 0.003 ! [nondim] default = 0.003 + ! Drag coefficient relating the magnitude of the velocity field to the bottom + ! stress in MEKE. + +! === module MOM_lateral_mixing_coeffs === +USE_VARIABLE_MIXING = True ! [Boolean] default = False + ! If true, the variable mixing code will be called. This allows diagnostics to + ! be created even if the scheme is not used. If KHTR_SLOPE_CFF>0 or + ! KhTh_Slope_Cff>0, this is set to true regardless of what is in the parameter + ! file. +USE_VISBECK = False ! [Boolean] default = False + ! If true, use the Visbeck et al. (1997) formulation for + ! thickness diffusivity. +RESOLN_SCALED_KH = True ! [Boolean] default = False + ! If true, the Laplacian lateral viscosity is scaled away when the first + ! baroclinic deformation radius is well resolved. +DEPTH_SCALED_KHTH = False ! [Boolean] default = False + ! If true, KHTH is scaled away when the depth is shallowerthan a reference + ! depth: KHTH = MIN(1,H/H0)**N * KHTH, where H0 is a reference depth, controlled + ! via DEPTH_SCALED_KHTH_H0, and the exponent (N) is controlled via + ! DEPTH_SCALED_KHTH_EXP. +RESOLN_SCALED_KHTH = True ! [Boolean] default = False + ! If true, the interface depth diffusivity is scaled away when the first + ! baroclinic deformation radius is well resolved. +RESOLN_SCALED_KHTR = False ! [Boolean] default = False + ! If true, the epipycnal tracer diffusivity is scaled away when the first + ! baroclinic deformation radius is well resolved. +RESOLN_USE_EBT = False ! [Boolean] default = False + ! If true, uses the equivalent barotropic wave speed instead of first baroclinic + ! wave for calculating the resolution fn. +KHTH_USE_EBT_STRUCT = False ! [Boolean] default = False + ! If true, uses the equivalent barotropic structure as the vertical structure of + ! thickness diffusivity. +KHTH_SLOPE_CFF = 0.0 ! [nondim] default = 0.0 + ! The nondimensional coefficient in the Visbeck formula for the interface depth + ! diffusivity +KHTR_SLOPE_CFF = 0.0 ! [nondim] default = 0.0 + ! The nondimensional coefficient in the Visbeck formula for the epipycnal tracer + ! diffusivity +USE_STORED_SLOPES = True ! [Boolean] default = False + ! If true, the isopycnal slopes are calculated once and stored for re-use. This + ! uses more memory but avoids calling the equation of state more times than + ! should be necessary. +VERY_SMALL_FREQUENCY = 1.0E-17 ! [s-1] default = 1.0E-17 + ! A miniscule frequency that is used to avoid division by 0. The default value + ! is roughly (pi / (the age of the universe)). +KD_SMOOTH = 1.0E-06 ! [m2 s-1] default = 1.0E-06 + ! A diapycnal diffusivity that is used to interpolate more sensible values of T + ! & S into thin layers. +VARMIX_KTOP = 2 ! [nondim] default = 2 + ! The layer number at which to start vertical integration of S*N for purposes of + ! finding the Eady growth rate. +KH_RES_SCALE_COEF = 1.0 ! [nondim] default = 1.0 + ! A coefficient that determines how KhTh is scaled away if RESOLN_SCALED_... is + ! true, as F = 1 / (1 + (KH_RES_SCALE_COEF*Rd/dx)^KH_RES_FN_POWER). +KH_RES_FN_POWER = 2 ! [nondim] default = 2 + ! The power of dx/Ld in the Kh resolution function. Any positive integer may be + ! used, although even integers are more efficient to calculate. Setting this + ! greater than 100 results in a step-function being used. +VISC_RES_SCALE_COEF = 1.0 ! [nondim] default = 1.0 + ! A coefficient that determines how Kh is scaled away if RESOLN_SCALED_... is + ! true, as F = 1 / (1 + (KH_RES_SCALE_COEF*Rd/dx)^KH_RES_FN_POWER). This + ! function affects lateral viscosity, Kh, and not KhTh. +VISC_RES_FN_POWER = 2 ! [nondim] default = 2 + ! The power of dx/Ld in the Kh resolution function. Any positive integer may be + ! used, although even integers are more efficient to calculate. Setting this + ! greater than 100 results in a step-function being used. This function affects + ! lateral viscosity, Kh, and not KhTh. +INTERPOLATE_RES_FN = False ! [Boolean] default = False + ! If true, interpolate the resolution function to the velocity points from the + ! thickness points; otherwise interpolate the wave speed and calculate the + ! resolution function independently at each point. +GILL_EQUATORIAL_LD = True ! [Boolean] default = True + ! If true, uses Gill's definition of the baroclinic equatorial deformation + ! radius, otherwise, if false, use Pedlosky's definition. These definitions + ! differ by a factor of 2 in front of the beta term in the denominator. Gill's + ! is the more appropriate definition. +INTERNAL_WAVE_SPEED_TOL = 0.001 ! [nondim] default = 0.001 + ! The fractional tolerance for finding the wave speeds. +INTERNAL_WAVE_SPEED_MIN = 0.0 ! [m s-1] default = 0.0 + ! A floor in the first mode speed below which 0 used instead. +INTERNAL_WAVE_SPEED_BETTER_EST = False ! [Boolean] default = False + ! If true, use a more robust estimate of the first mode wave speed as the + ! starting point for iterations. +USE_QG_LEITH_GM = False ! [Boolean] default = False + ! If true, use the QG Leith viscosity as the GM coefficient. + +! === module MOM_set_visc === +SET_VISC_2018_ANSWERS = False ! [Boolean] default = False + ! If true, use the order of arithmetic and expressions that recover the answers + ! from the end of 2018. Otherwise, use updated and more robust forms of the + ! same expressions. +BOTTOMDRAGLAW = True ! [Boolean] default = True + ! If true, the bottom stress is calculated with a drag law of the form + ! c_drag*|u|*u. The velocity magnitude may be an assumed value or it may be + ! based on the actual velocity in the bottommost HBBL, depending on LINEAR_DRAG. +CHANNEL_DRAG = True ! [Boolean] default = False + ! If true, the bottom drag is exerted directly on each layer proportional to the + ! fraction of the bottom it overlies. +LINEAR_DRAG = False ! [Boolean] default = False + ! If LINEAR_DRAG and BOTTOMDRAGLAW are defined the drag law is + ! cdrag*DRAG_BG_VEL*u. +PRANDTL_TURB = 1.0 ! [nondim] default = 1.0 + ! The turbulent Prandtl number applied to shear instability. +DYNAMIC_VISCOUS_ML = False ! [Boolean] default = False + ! If true, use a bulk Richardson number criterion to determine the mixed layer + ! thickness for viscosity. +HBBL = 10.0 ! [m] + ! The thickness of a bottom boundary layer with a viscosity of KVBBL if + ! BOTTOMDRAGLAW is not defined, or the thickness over which near-bottom + ! velocities are averaged for the drag law if BOTTOMDRAGLAW is defined but + ! LINEAR_DRAG is not. +BBL_USE_TIDAL_BG = False ! [Boolean] default = False + ! Flag to use the tidal RMS amplitude in place of constant background velocity + ! for computing u* in the BBL. This flag is only used when BOTTOMDRAGLAW is true + ! and LINEAR_DRAG is false. +DRAG_BG_VEL = 0.1 ! [m s-1] default = 0.0 + ! DRAG_BG_VEL is either the assumed bottom velocity (with LINEAR_DRAG) or an + ! unresolved velocity that is combined with the resolved velocity to estimate + ! the velocity magnitude. DRAG_BG_VEL is only used when BOTTOMDRAGLAW is + ! defined. +BBL_USE_EOS = True ! [Boolean] default = True + ! If true, use the equation of state in determining the properties of the bottom + ! boundary layer. Otherwise use the layer target potential densities. The + ! default of this is determined by USE_REGRIDDING. +BBL_THICK_MIN = 0.1 ! [m] default = 0.0 + ! The minimum bottom boundary layer thickness that can be used with + ! BOTTOMDRAGLAW. This might be Kv/(cdrag*drag_bg_vel) to give Kv as the minimum + ! near-bottom viscosity. +HTBL_SHELF_MIN = 0.1 ! [m] default = 0.1 + ! The minimum top boundary layer thickness that can be used with BOTTOMDRAGLAW. + ! This might be Kv/(cdrag*drag_bg_vel) to give Kv as the minimum near-top + ! viscosity. +HTBL_SHELF = 10.0 ! [m] default = 10.0 + ! The thickness over which near-surface velocities are averaged for the drag law + ! under an ice shelf. By default this is the same as HBBL +KV = 1.0E-04 ! [m2 s-1] + ! The background kinematic viscosity in the interior. The molecular value, ~1e-6 + ! m2 s-1, may be used. +KV_BBL_MIN = 1.0E-04 ! [m2 s-1] default = 1.0E-04 + ! The minimum viscosities in the bottom boundary layer. +KV_TBL_MIN = 1.0E-04 ! [m2 s-1] default = 1.0E-04 + ! The minimum viscosities in the top boundary layer. +CORRECT_BBL_BOUNDS = False ! [Boolean] default = False + ! If true, uses the correct bounds on the BBL thickness and viscosity so that + ! the bottom layer feels the intended drag. +SMAG_CONST_CHANNEL = 0.15 ! [nondim] default = 0.15 + ! The nondimensional Laplacian Smagorinsky constant used in calculating the + ! channel drag if it is enabled. The default is to use the same value as + ! SMAG_LAP_CONST if it is defined, or 0.15 if it is not. The value used is also + ! 0.15 if the specified value is negative. + +! === module MOM_thickness_diffuse === +KHTH = 600.0 ! [m2 s-1] default = 0.0 + ! The background horizontal thickness diffusivity. +KHTH_MIN = 0.0 ! [m2 s-1] default = 0.0 + ! The minimum horizontal thickness diffusivity. +KHTH_MAX = 900.0 ! [m2 s-1] default = 0.0 + ! The maximum horizontal thickness diffusivity. +KHTH_MAX_CFL = 0.8 ! [nondimensional] default = 0.8 + ! The maximum value of the local diffusive CFL ratio that is permitted for the + ! thickness diffusivity. 1.0 is the marginally unstable value in a pure layered + ! model, but much smaller numbers (e.g. 0.1) seem to work better for ALE-based + ! models. +DETANGLE_INTERFACES = False ! [Boolean] default = False + ! If defined add 3-d structured enhanced interface height diffusivities to + ! horizontally smooth jagged layers. +KHTH_SLOPE_MAX = 0.01 ! [nondim] default = 0.01 + ! A slope beyond which the calculated isopycnal slope is not reliable and is + ! scaled away. +KHTH_USE_FGNV_STREAMFUNCTION = True ! [Boolean] default = False + ! If true, use the streamfunction formulation of Ferrari et al., 2010, which + ! effectively emphasizes graver vertical modes by smoothing in the vertical. +FGNV_FILTER_SCALE = 1.0 ! [nondim] default = 1.0 + ! A coefficient scaling the vertical smoothing term in the Ferrari et al., 2010, + ! streamfunction formulation. +FGNV_C_MIN = 0.01 ! [m s-1] default = 0.0 + ! A minium wave speed used in the Ferrari et al., 2010, streamfunction + ! formulation. +FGNV_STRAT_FLOOR = 1.0E-15 ! [nondim] default = 1.0E-15 + ! A floor for Brunt-Vasaila frequency in the Ferrari et al., 2010, + ! streamfunction formulation, expressed as a fraction of planetary rotation, + ! OMEGA. This should be tiny but non-zero to avoid degeneracy. +STANLEY_PRM_DET_COEFF = -1.0 ! [nondim] default = -1.0 + ! The coefficient correlating SGS temperature variance with the mean temperature + ! gradient in the deterministic part of the Stanley parameterization. Negative + ! values disable the scheme. +USE_KH_IN_MEKE = False ! [Boolean] default = False + ! If true, uses the thickness diffusivity calculated here to diffuse MEKE. +USE_GME = False ! [Boolean] default = False + ! If true, use the GM+E backscatter scheme in association with the Gent and + ! McWilliams parameterization. +USE_GM_WORK_BUG = False ! [Boolean] default = False + ! If true, compute the top-layer work tendency on the u-grid with the incorrect + ! sign, for legacy reproducibility. + +! === module MOM_dynamics_split_RK2 === +TIDES = True ! [Boolean] default = False + ! If true, apply tidal momentum forcing. +BE = 0.6 ! [nondim] default = 0.6 + ! If SPLIT is true, BE determines the relative weighting of a 2nd-order + ! Runga-Kutta baroclinic time stepping scheme (0.5) and a backward Euler scheme + ! (1) that is used for the Coriolis and inertial terms. BE may be from 0.5 to + ! 1, but instability may occur near 0.5. BE is also applicable if SPLIT is false + ! and USE_RK2 is true. +BEGW = 0.0 ! [nondim] default = 0.0 + ! If SPLIT is true, BEGW is a number from 0 to 1 that controls the extent to + ! which the treatment of gravity waves is forward-backward (0) or simulated + ! backward Euler (1). 0 is almost always used. If SPLIT is false and USE_RK2 is + ! true, BEGW can be between 0 and 0.5 to damp gravity waves. +SPLIT_BOTTOM_STRESS = False ! [Boolean] default = False + ! If true, provide the bottom stress calculated by the vertical viscosity to the + ! barotropic solver. +BT_USE_LAYER_FLUXES = True ! [Boolean] default = True + ! If true, use the summed layered fluxes plus an adjustment due to the change in + ! the barotropic velocity in the barotropic continuity equation. + +! === module MOM_continuity === +CONTINUITY_SCHEME = "PPM" ! default = "PPM" + ! CONTINUITY_SCHEME selects the discretization for the continuity solver. The + ! only valid value currently is: + ! PPM - use a positive-definite (or monotonic) + ! piecewise parabolic reconstruction solver. + +! === module MOM_continuity_PPM === +MONOTONIC_CONTINUITY = False ! [Boolean] default = False + ! If true, CONTINUITY_PPM uses the Colella and Woodward monotonic limiter. The + ! default (false) is to use a simple positive definite limiter. +SIMPLE_2ND_PPM_CONTINUITY = False ! [Boolean] default = False + ! If true, CONTINUITY_PPM uses a simple 2nd order (arithmetic mean) + ! interpolation of the edge values. This may give better PV conservation + ! properties. While it formally reduces the accuracy of the continuity solver + ! itself in the strongly advective limit, it does not reduce the overall order + ! of accuracy of the dynamic core. +UPWIND_1ST_CONTINUITY = False ! [Boolean] default = False + ! If true, CONTINUITY_PPM becomes a 1st-order upwind continuity solver. This + ! scheme is highly diffusive but may be useful for debugging or in single-column + ! mode where its minimal stencil is useful. +ETA_TOLERANCE = 1.0E-06 ! [m] default = 2.5E-09 + ! The tolerance for the differences between the barotropic and baroclinic + ! estimates of the sea surface height due to the fluxes through each face. The + ! total tolerance for SSH is 4 times this value. The default is + ! 0.5*NK*ANGSTROM, and this should not be set less than about + ! 10^-15*MAXIMUM_DEPTH. +ETA_TOLERANCE_AUX = 1.0E-06 ! [m] default = 1.0E-06 + ! The tolerance for free-surface height discrepancies between the barotropic + ! solution and the sum of the layer thicknesses when calculating the auxiliary + ! corrected velocities. By default, this is the same as ETA_TOLERANCE, but can + ! be made larger for efficiency. +VELOCITY_TOLERANCE = 1.0E-04 ! [m s-1] default = 3.0E+08 + ! The tolerance for barotropic velocity discrepancies between the barotropic + ! solution and the sum of the layer thicknesses. +CONT_PPM_AGGRESS_ADJUST = False ! [Boolean] default = False + ! If true, allow the adjusted velocities to have a relative CFL change up to + ! 0.5. +CONT_PPM_VOLUME_BASED_CFL = False ! [Boolean] default = False + ! If true, use the ratio of the open face lengths to the tracer cell areas when + ! estimating CFL numbers. The default is set by CONT_PPM_AGGRESS_ADJUST. +CONTINUITY_CFL_LIMIT = 0.5 ! [nondim] default = 0.5 + ! The maximum CFL of the adjusted velocities. +CONT_PPM_BETTER_ITER = True ! [Boolean] default = True + ! If true, stop corrective iterations using a velocity based criterion and only + ! stop if the iteration is better than all predecessors. +CONT_PPM_USE_VISC_REM_MAX = True ! [Boolean] default = True + ! If true, use more appropriate limiting bounds for corrections in strongly + ! viscous columns. +CONT_PPM_MARGINAL_FACE_AREAS = True ! [Boolean] default = True + ! If true, use the marginal face areas from the continuity solver for use as the + ! weights in the barotropic solver. Otherwise use the transport averaged areas. + +! === module MOM_CoriolisAdv === +NOSLIP = False ! [Boolean] default = False + ! If true, no slip boundary conditions are used; otherwise free slip boundary + ! conditions are assumed. The implementation of the free slip BCs on a C-grid is + ! much cleaner than the no slip BCs. The use of free slip BCs is strongly + ! encouraged, and no slip BCs are not used with the biharmonic viscosity. +CORIOLIS_EN_DIS = False ! [Boolean] default = False + ! If true, two estimates of the thickness fluxes are used to estimate the + ! Coriolis term, and the one that dissipates energy relative to the other one is + ! used. +CORIOLIS_SCHEME = "SADOURNY75_ENERGY" ! default = "SADOURNY75_ENERGY" + ! CORIOLIS_SCHEME selects the discretization for the Coriolis terms. Valid + ! values are: + ! SADOURNY75_ENERGY - Sadourny, 1975; energy cons. + ! ARAKAWA_HSU90 - Arakawa & Hsu, 1990 + ! SADOURNY75_ENSTRO - Sadourny, 1975; enstrophy cons. + ! ARAKAWA_LAMB81 - Arakawa & Lamb, 1981; En. + Enst. + ! ARAKAWA_LAMB_BLEND - A blend of Arakawa & Lamb with + ! Arakawa & Hsu and Sadourny energy +BOUND_CORIOLIS = True ! [Boolean] default = False + ! If true, the Coriolis terms at u-points are bounded by the four estimates of + ! (f+rv)v from the four neighboring v-points, and similarly at v-points. This + ! option would have no effect on the SADOURNY Coriolis scheme if it were + ! possible to use centered difference thickness fluxes. +KE_SCHEME = "KE_ARAKAWA" ! default = "KE_ARAKAWA" + ! KE_SCHEME selects the discretization for acceleration due to the kinetic + ! energy gradient. Valid values are: + ! KE_ARAKAWA, KE_SIMPLE_GUDONOV, KE_GUDONOV +PV_ADV_SCHEME = "PV_ADV_CENTERED" ! default = "PV_ADV_CENTERED" + ! PV_ADV_SCHEME selects the discretization for PV advection. Valid values are: + ! PV_ADV_CENTERED - centered (aka Sadourny, 75) + ! PV_ADV_UPWIND1 - upwind, first order + +! === module MOM_tidal_forcing === +TIDE_M2 = True ! [Boolean] default = False + ! If true, apply tidal momentum forcing at the M2 frequency. This is only used + ! if TIDES is true. +TIDE_S2 = False ! [Boolean] default = False + ! If true, apply tidal momentum forcing at the S2 frequency. This is only used + ! if TIDES is true. +TIDE_N2 = False ! [Boolean] default = False + ! If true, apply tidal momentum forcing at the N2 frequency. This is only used + ! if TIDES is true. +TIDE_K2 = False ! [Boolean] default = False + ! If true, apply tidal momentum forcing at the K2 frequency. This is only used + ! if TIDES is true. +TIDE_K1 = False ! [Boolean] default = False + ! If true, apply tidal momentum forcing at the K1 frequency. This is only used + ! if TIDES is true. +TIDE_O1 = False ! [Boolean] default = False + ! If true, apply tidal momentum forcing at the O1 frequency. This is only used + ! if TIDES is true. +TIDE_P1 = False ! [Boolean] default = False + ! If true, apply tidal momentum forcing at the P1 frequency. This is only used + ! if TIDES is true. +TIDE_Q1 = False ! [Boolean] default = False + ! If true, apply tidal momentum forcing at the Q1 frequency. This is only used + ! if TIDES is true. +TIDE_MF = False ! [Boolean] default = False + ! If true, apply tidal momentum forcing at the MF frequency. This is only used + ! if TIDES is true. +TIDE_MM = False ! [Boolean] default = False + ! If true, apply tidal momentum forcing at the MM frequency. This is only used + ! if TIDES is true. +TIDAL_SAL_FROM_FILE = False ! [Boolean] default = False + ! If true, read the tidal self-attraction and loading from input files, + ! specified by TIDAL_INPUT_FILE. This is only used if TIDES is true. +USE_PREVIOUS_TIDES = False ! [Boolean] default = False + ! If true, use the SAL from the previous iteration of the tides to facilitate + ! convergent iteration. This is only used if TIDES is true. +TIDE_USE_SAL_SCALAR = True ! [Boolean] default = True + ! If true and TIDES is true, use the scalar approximation when calculating + ! self-attraction and loading. +TIDE_SAL_SCALAR_VALUE = 0.094 ! [m m-1] + ! The constant of proportionality between sea surface height (really it should + ! be bottom pressure) anomalies and bottom geopotential anomalies. This is only + ! used if TIDES and TIDE_USE_SAL_SCALAR are true. +TIDE_REF_DATE = 0, 0, 0 ! default = 0 + ! Year,month,day to use as reference date for tidal forcing. If not specified, + ! defaults to 0. +TIDE_USE_EQ_PHASE = False ! [Boolean] default = False + ! Correct phases by calculating equilibrium phase arguments for TIDE_REF_DATE. +TIDE_M2_FREQ = 1.405189E-04 ! [s-1] default = 1.405189E-04 + ! Frequency of the M2 tidal constituent. This is only used if TIDES and TIDE_M2 + ! are true, or if OBC_TIDE_N_CONSTITUENTS > 0 and M2 is in + ! OBC_TIDE_CONSTITUENTS. +TIDE_M2_AMP = 0.242334 ! [m] default = 0.242334 + ! Amplitude of the M2 tidal constituent. This is only used if TIDES and TIDE_M2 + ! are true. +TIDE_M2_PHASE_T0 = 0.0 ! [radians] default = 0.0 + ! Phase of the M2 tidal constituent at time 0. This is only used if TIDES and + ! TIDE_M2 are true. + +! === module MOM_PressureForce === +ANALYTIC_FV_PGF = True ! [Boolean] default = True + ! If true the pressure gradient forces are calculated with a finite volume form + ! that analytically integrates the equations of state in pressure to avoid any + ! possibility of numerical thermobaric instability, as described in Adcroft et + ! al., O. Mod. (2008). + +! === module MOM_PressureForce_FV === +MASS_WEIGHT_IN_PRESSURE_GRADIENT = True ! [Boolean] default = False + ! If true, use mass weighting when interpolating T/S for integrals near the + ! bathymetry in FV pressure gradient calculations. +USE_INACCURATE_PGF_RHO_ANOM = False ! [Boolean] default = False + ! If true, use a form of the PGF that uses the reference density in an + ! inaccurate way. This is not recommended. +RECONSTRUCT_FOR_PRESSURE = True ! [Boolean] default = True + ! If True, use vertical reconstruction of T & S within the integrals of the FV + ! pressure gradient calculation. If False, use the constant-by-layer algorithm. + ! The default is set by USE_REGRIDDING. +PRESSURE_RECONSTRUCTION_SCHEME = 1 ! default = 1 + ! Order of vertical reconstruction of T/S to use in the integrals within the FV + ! pressure gradient calculation. + ! 0: PCM or no reconstruction. + ! 1: PLM reconstruction. + ! 2: PPM reconstruction. +BOUNDARY_EXTRAPOLATION_PRESSURE = True ! [Boolean] default = True + ! If true, the reconstruction of T & S for pressure in boundary cells is + ! extrapolated, rather than using PCM in these cells. If true, the same order + ! polynomial is used as is used for the interior cells. +PGF_STANLEY_T2_DET_COEFF = -1.0 ! [nondim] default = -1.0 + ! The coefficient correlating SGS temperature variance with the mean temperature + ! gradient in the deterministic part of the Stanley form of the Brankart + ! correction. Negative values disable the scheme. + +! === module MOM_hor_visc === +HOR_VISC_2018_ANSWERS = False ! [Boolean] default = False + ! If true, use the order of arithmetic and expressions that recover the answers + ! from the end of 2018. Otherwise, use updated and more robust forms of the + ! same expressions. +LAPLACIAN = True ! [Boolean] default = False + ! If true, use a Laplacian horizontal viscosity. +KH = 0.0 ! [m2 s-1] default = 0.0 + ! The background Laplacian horizontal viscosity. +KH_BG_MIN = 0.0 ! [m2 s-1] default = 0.0 + ! The minimum value allowed for Laplacian horizontal viscosity, KH. +KH_VEL_SCALE = 0.01 ! [m s-1] default = 0.0 + ! The velocity scale which is multiplied by the grid spacing to calculate the + ! Laplacian viscosity. The final viscosity is the largest of this scaled + ! viscosity, the Smagorinsky and Leith viscosities, and KH. +KH_SIN_LAT = 0.0 ! [m2 s-1] default = 0.0 + ! The amplitude of a latitudinally-dependent background viscosity of the form + ! KH_SIN_LAT*(SIN(LAT)**KH_PWR_OF_SINE). +SMAGORINSKY_KH = False ! [Boolean] default = False + ! If true, use a Smagorinsky nonlinear eddy viscosity. +LEITH_KH = False ! [Boolean] default = False + ! If true, use a Leith nonlinear eddy viscosity. +MODIFIED_LEITH = False ! [Boolean] default = False + ! If true, add a term to Leith viscosity which is proportional to the gradient + ! of divergence. +RES_SCALE_MEKE_VISC = False ! [Boolean] default = False + ! If true, the viscosity contribution from MEKE is scaled by the resolution + ! function. +BOUND_KH = True ! [Boolean] default = True + ! If true, the Laplacian coefficient is locally limited to be stable. +BETTER_BOUND_KH = True ! [Boolean] default = True + ! If true, the Laplacian coefficient is locally limited to be stable with a + ! better bounding than just BOUND_KH. +ANISOTROPIC_VISCOSITY = False ! [Boolean] default = False + ! If true, allow anistropic viscosity in the Laplacian horizontal viscosity. +ADD_LES_VISCOSITY = False ! [Boolean] default = False + ! If true, adds the viscosity from Smagorinsky and Leith to the background + ! viscosity instead of taking the maximum. +BIHARMONIC = True ! [Boolean] default = True + ! If true, use a biharmonic horizontal viscosity. BIHARMONIC may be used with + ! LAPLACIAN. +AH = 0.0 ! [m4 s-1] default = 0.0 + ! The background biharmonic horizontal viscosity. +AH_VEL_SCALE = 0.05 ! [m s-1] default = 0.0 + ! The velocity scale which is multiplied by the cube of the grid spacing to + ! calculate the biharmonic viscosity. The final viscosity is the largest of this + ! scaled viscosity, the Smagorinsky and Leith viscosities, and AH. +AH_TIME_SCALE = 0.0 ! [s] default = 0.0 + ! A time scale whose inverse is multiplied by the fourth power of the grid + ! spacing to calculate biharmonic viscosity. The final viscosity is the largest + ! of all viscosity formulations in use. 0.0 means that it's not used. +SMAGORINSKY_AH = True ! [Boolean] default = False + ! If true, use a biharmonic Smagorinsky nonlinear eddy viscosity. +LEITH_AH = False ! [Boolean] default = False + ! If true, use a biharmonic Leith nonlinear eddy viscosity. +BOUND_AH = True ! [Boolean] default = True + ! If true, the biharmonic coefficient is locally limited to be stable. +BETTER_BOUND_AH = True ! [Boolean] default = True + ! If true, the biharmonic coefficient is locally limited to be stable with a + ! better bounding than just BOUND_AH. +RE_AH = 0.0 ! [nondim] default = 0.0 + ! If nonzero, the biharmonic coefficient is scaled so that the biharmonic + ! Reynolds number is equal to this. +SMAG_BI_CONST = 0.06 ! [nondim] default = 0.0 + ! The nondimensional biharmonic Smagorinsky constant, typically 0.015 - 0.06. +BOUND_CORIOLIS_BIHARM = True ! [Boolean] default = True + ! If true use a viscosity that increases with the square of the velocity shears, + ! so that the resulting viscous drag is of comparable magnitude to the Coriolis + ! terms when the velocity differences between adjacent grid points is + ! 0.5*BOUND_CORIOLIS_VEL. The default is the value of BOUND_CORIOLIS (or + ! false). +BOUND_CORIOLIS_VEL = 6.0 ! [m s-1] default = 6.0 + ! The velocity scale at which BOUND_CORIOLIS_BIHARM causes the biharmonic drag + ! to have comparable magnitude to the Coriolis acceleration. The default is set + ! by MAXVEL. +USE_LAND_MASK_FOR_HVISC = True ! [Boolean] default = True + ! If true, use Use the land mask for the computation of thicknesses at velocity + ! locations. This eliminates the dependence on arbitrary values over land or + ! outside of the domain. +HORVISC_BOUND_COEF = 0.8 ! [nondim] default = 0.8 + ! The nondimensional coefficient of the ratio of the viscosity bounds to the + ! theoretical maximum for stability without considering other terms. +USE_KH_BG_2D = False ! [Boolean] default = False + ! If true, read a file containing 2-d background harmonic viscosities. The final + ! viscosity is the maximum of the other terms and this background value. + +! === module MOM_vert_friction === +VERT_FRICTION_2018_ANSWERS = False ! [Boolean] default = False + ! If true, use the order of arithmetic and expressions that recover the answers + ! from the end of 2018. Otherwise, use expressions that do not use an arbitrary + ! hard-coded maximum viscous coupling coefficient between layers. +DIRECT_STRESS = False ! [Boolean] default = False + ! If true, the wind stress is distributed over the topmost HMIX_STRESS of fluid + ! (like in HYCOM), and KVML may be set to a very small value. +HARMONIC_VISC = False ! [Boolean] default = False + ! If true, use the harmonic mean thicknesses for calculating the vertical + ! viscosity. +HARMONIC_BL_SCALE = 0.0 ! [nondim] default = 0.0 + ! A scale to determine when water is in the boundary layers based solely on + ! harmonic mean thicknesses for the purpose of determining the extent to which + ! the thicknesses used in the viscosities are upwinded. +HMIX_FIXED = 0.5 ! [m] + ! The prescribed depth over which the near-surface viscosity and diffusivity are + ! elevated when the bulk mixed layer is not used. +KVML = 1.0E-04 ! [m2 s-1] default = 1.0E-04 + ! The kinematic viscosity in the mixed layer. A typical value is ~1e-2 m2 s-1. + ! KVML is not used if BULKMIXEDLAYER is true. The default is set by KV. +MAXVEL = 6.0 ! [m s-1] default = 3.0E+08 + ! The maximum velocity allowed before the velocity components are truncated. +CFL_BASED_TRUNCATIONS = True ! [Boolean] default = True + ! If true, base truncations on the CFL number, and not an absolute speed. +CFL_TRUNCATE = 0.5 ! [nondim] default = 0.5 + ! The value of the CFL number that will cause velocity components to be + ! truncated; instability can occur past 0.5. +CFL_REPORT = 0.5 ! [nondim] default = 0.5 + ! The value of the CFL number that causes accelerations to be reported; the + ! default is CFL_TRUNCATE. +CFL_TRUNCATE_RAMP_TIME = 7200.0 ! [s] default = 0.0 + ! The time over which the CFL truncation value is ramped up at the beginning of + ! the run. +CFL_TRUNCATE_START = 0.0 ! [nondim] default = 0.0 + ! The start value of the truncation CFL number used when ramping up CFL_TRUNC. +STOKES_MIXING_COMBINED = False ! [Boolean] default = False + ! Flag to use Stokes drift Mixing via the Lagrangian current (Eulerian plus + ! Stokes drift). Still needs work and testing, so not recommended for use. +VEL_UNDERFLOW = 0.0 ! [m s-1] default = 0.0 + ! A negligibly small velocity magnitude below which velocity components are set + ! to 0. A reasonable value might be 1e-30 m/s, which is less than an Angstrom + ! divided by the age of the universe. + +! === module MOM_barotropic === +USE_BT_CONT_TYPE = True ! [Boolean] default = True + ! If true, use a structure with elements that describe effective face areas from + ! the summed continuity solver as a function the barotropic flow in coupling + ! between the barotropic and baroclinic flow. This is only used if SPLIT is + ! true. +INTEGRAL_BT_CONTINUITY = False ! [Boolean] default = False + ! If true, use the time-integrated velocity over the barotropic steps to + ! determine the integrated transports used to update the continuity equation. + ! Otherwise the transports are the sum of the transports based on a series of + ! instantaneous velocities and the BT_CONT_TYPE for transports. This is only + ! valid if USE_BT_CONT_TYPE = True. +BOUND_BT_CORRECTION = True ! [Boolean] default = False + ! If true, the corrective pseudo mass-fluxes into the barotropic solver are + ! limited to values that require less than maxCFL_BT_cont to be accommodated. +BT_CONT_CORR_BOUNDS = True ! [Boolean] default = True + ! If true, and BOUND_BT_CORRECTION is true, use the BT_cont_type variables to + ! set limits determined by MAXCFL_BT_CONT on the CFL number of the velocities + ! that are likely to be driven by the corrective mass fluxes. +ADJUST_BT_CONT = False ! [Boolean] default = False + ! If true, adjust the curve fit to the BT_cont type that is used by the + ! barotropic solver to match the transport about which the flow is being + ! linearized. +GRADUAL_BT_ICS = False ! [Boolean] default = False + ! If true, adjust the initial conditions for the barotropic solver to the values + ! from the layered solution over a whole timestep instead of instantly. This is + ! a decent approximation to the inclusion of sum(u dh_dt) while also correcting + ! for truncation errors. +BT_USE_VISC_REM_U_UH0 = False ! [Boolean] default = False + ! If true, use the viscous remnants when estimating the barotropic velocities + ! that were used to calculate uh0 and vh0. False is probably the better choice. +BT_PROJECT_VELOCITY = True ! [Boolean] default = False + ! If true, step the barotropic velocity first and project out the velocity + ! tendency by 1+BEBT when calculating the transport. The default (false) is to + ! use a predictor continuity step to find the pressure field, and then to do a + ! corrector continuity step using a weighted average of the old and new + ! velocities, with weights of (1-BEBT) and BEBT. +BT_NONLIN_STRESS = False ! [Boolean] default = False + ! If true, use the full depth of the ocean at the start of the barotropic step + ! when calculating the surface stress contribution to the barotropic + ! acclerations. Otherwise use the depth based on bathyT. +DYNAMIC_SURFACE_PRESSURE = False ! [Boolean] default = False + ! If true, add a dynamic pressure due to a viscous ice shelf, for instance. +BT_CORIOLIS_SCALE = 1.0 ! [nondim] default = 1.0 + ! A factor by which the barotropic Coriolis anomaly terms are scaled. +BAROTROPIC_2018_ANSWERS = False ! [Boolean] default = False + ! If true, use expressions for the barotropic solver that recover the answers + ! from the end of 2018. Otherwise, use more efficient or general expressions. +SADOURNY = True ! [Boolean] default = True + ! If true, the Coriolis terms are discretized with the Sadourny (1975) energy + ! conserving scheme, otherwise the Arakawa & Hsu scheme is used. If the + ! internal deformation radius is not resolved, the Sadourny scheme should + ! probably be used. +BT_THICK_SCHEME = "FROM_BT_CONT" ! default = "FROM_BT_CONT" + ! A string describing the scheme that is used to set the open face areas used + ! for barotropic transport and the relative weights of the accelerations. Valid + ! values are: + ! ARITHMETIC - arithmetic mean layer thicknesses + ! HARMONIC - harmonic mean layer thicknesses + ! HYBRID (the default) - use arithmetic means for + ! layers above the shallowest bottom, the harmonic + ! mean for layers below, and a weighted average for + ! layers that straddle that depth + ! FROM_BT_CONT - use the average thicknesses kept + ! in the h_u and h_v fields of the BT_cont_type +BT_STRONG_DRAG = False ! [Boolean] default = False + ! If true, use a stronger estimate of the retarding effects of strong bottom + ! drag, by making it implicit with the barotropic time-step instead of implicit + ! with the baroclinic time-step and dividing by the number of barotropic steps. +BT_LINEAR_WAVE_DRAG = False ! [Boolean] default = False + ! If true, apply a linear drag to the barotropic velocities, using rates set by + ! lin_drag_u & _v divided by the depth of the ocean. This was introduced to + ! facilitate tide modeling. +CLIP_BT_VELOCITY = False ! [Boolean] default = False + ! If true, limit any velocity components that exceed CFL_TRUNCATE. This should + ! only be used as a desperate debugging measure. +MAXCFL_BT_CONT = 0.25 ! [nondim] default = 0.25 + ! The maximum permitted CFL number associated with the barotropic accelerations + ! from the summed velocities times the time-derivatives of thicknesses. +DT_BT_FILTER = -0.25 ! [sec or nondim] default = -0.25 + ! A time-scale over which the barotropic mode solutions are filtered, in seconds + ! if positive, or as a fraction of DT if negative. When used this can never be + ! taken to be longer than 2*dt. Set this to 0 to apply no filtering. +G_BT_EXTRA = 0.0 ! [nondim] default = 0.0 + ! A nondimensional factor by which gtot is enhanced. +SSH_EXTRA = 10.0 ! [m] default = 10.0 + ! An estimate of how much higher SSH might get, for use in calculating the safe + ! external wave speed. The default is the minimum of 10 m or 5% of + ! MAXIMUM_DEPTH. +LINEARIZED_BT_CORIOLIS = True ! [Boolean] default = True + ! If true use the bottom depth instead of the total water column thickness in + ! the barotropic Coriolis term calculations. +BEBT = 0.2 ! [nondim] default = 0.1 + ! BEBT determines whether the barotropic time stepping uses the forward-backward + ! time-stepping scheme or a backward Euler scheme. BEBT is valid in the range + ! from 0 (for a forward-backward treatment of nonrotating gravity waves) to 1 + ! (for a backward Euler treatment). In practice, BEBT must be greater than about + ! 0.05. +DTBT = -0.95 ! [s or nondim] default = -0.98 + ! The barotropic time step, in s. DTBT is only used with the split explicit time + ! stepping. To set the time step automatically based the maximum stable value + ! use 0, or a negative value gives the fraction of the stable value. Setting + ! DTBT to 0 is the same as setting it to -0.98. The value of DTBT that will + ! actually be used is an integer fraction of DT, rounding down. +BT_USE_OLD_CORIOLIS_BRACKET_BUG = False ! [Boolean] default = False + ! If True, use an order of operations that is not bitwise rotationally symmetric + ! in the meridional Coriolis term of the barotropic solver. + +! === module MOM_mixed_layer_restrat === +MIXEDLAYER_RESTRAT = False ! [Boolean] default = False + ! If true, a density-gradient dependent re-stratifying flow is imposed in the + ! mixed layer. Can be used in ALE mode without restriction but in layer mode can + ! only be used if BULKMIXEDLAYER is true. + +! === module MOM_diagnostics === +DIAG_EBT_MONO_N2_COLUMN_FRACTION = 0.0 ! [nondim] default = 0.0 + ! The lower fraction of water column over which N2 is limited as monotonic for + ! the purposes of calculating the equivalent barotropic wave speed. +DIAG_EBT_MONO_N2_DEPTH = -1.0 ! [m] default = -1.0 + ! The depth below which N2 is limited as monotonic for the purposes of + ! calculating the equivalent barotropic wave speed. + +! === module MOM_diabatic_driver === +! The following parameters are used for diabatic processes. +USE_LEGACY_DIABATIC_DRIVER = False ! [Boolean] default = True + ! If true, use a legacy version of the diabatic subroutine. This is temporary + ! and is needed to avoid change in answers. +ENERGETICS_SFC_PBL = True ! [Boolean] default = False + ! If true, use an implied energetics planetary boundary layer scheme to + ! determine the diffusivity and viscosity in the surface boundary layer. +EPBL_IS_ADDITIVE = True ! [Boolean] default = True + ! If true, the diffusivity from ePBL is added to all other diffusivities. + ! Otherwise, the larger of kappa-shear and ePBL diffusivities are used. +PRANDTL_EPBL = 1.0 ! [nondim] default = 1.0 + ! The Prandtl number used by ePBL to convert vertical diffusivities into + ! viscosities. +INTERNAL_TIDES = False ! [Boolean] default = False + ! If true, use the code that advances a separate set of equations for the + ! internal tide energy density. +MASSLESS_MATCH_TARGETS = True ! [Boolean] default = True + ! If true, the temperature and salinity of massless layers are kept consistent + ! with their target densities. Otherwise the properties of massless layers + ! evolve diffusively to match massive neighboring layers. +AGGREGATE_FW_FORCING = True ! [Boolean] default = True + ! If true, the net incoming and outgoing fresh water fluxes are combined and + ! applied as either incoming or outgoing depending on the sign of the net. If + ! false, the net incoming fresh water flux is added to the model and thereafter + ! the net outgoing is removed from the topmost non-vanished layers of the + ! updated state. +MIX_BOUNDARY_TRACERS = True ! [Boolean] default = True + ! If true, mix the passive tracers in massless layers at the bottom into the + ! interior as though a diffusivity of KD_MIN_TR were operating. +MIX_BOUNDARY_TRACER_ALE = False ! [Boolean] default = False + ! If true and in ALE mode, mix the passive tracers in massless layers at the + ! bottom into the interior as though a diffusivity of KD_MIN_TR were operating. +KD_MIN_TR = 2.0E-06 ! [m2 s-1] default = 2.0E-06 + ! A minimal diffusivity that should always be applied to tracers, especially in + ! massless layers near the bottom. The default is 0.1*KD. +KD_BBL_TR = 0.0 ! [m2 s-1] default = 0.0 + ! A bottom boundary layer tracer diffusivity that will allow for explicitly + ! specified bottom fluxes. The entrainment at the bottom is at least + ! sqrt(Kd_BBL_tr*dt) over the same distance. +TRACER_TRIDIAG = False ! [Boolean] default = False + ! If true, use the passive tracer tridiagonal solver for T and S +MINIMUM_FORCING_DEPTH = 0.001 ! [m] default = 0.001 + ! The smallest depth over which forcing can be applied. This only takes effect + ! when near-surface layers become thin relative to this scale, in which case the + ! forcing tendencies scaled down by distributing the forcing over this depth + ! scale. +EVAP_CFL_LIMIT = 0.8 ! [nondim] default = 0.8 + ! The largest fraction of a layer than can be lost to forcing (e.g. evaporation, + ! sea-ice formation) in one time-step. The unused mass loss is passed down + ! through the column. +MLD_EN_VALS = 3*0.0 ! [J/m2] default = 0.0 + ! The energy values used to compute MLDs. If not set (or all set to 0.), the + ! default will overwrite to 25., 2500., 250000. +DIAG_MLD_DENSITY_DIFF = 0.1 ! [kg/m3] default = 0.1 + ! The density difference used to determine a diagnostic mixed layer depth, + ! MLD_user, following the definition of Levitus 1982. The MLD is the depth at + ! which the density is larger than the surface density by the specified amount. +DIAG_DEPTH_SUBML_N2 = 50.0 ! [m] default = 50.0 + ! The distance over which to calculate a diagnostic of the stratification at the + ! base of the mixed layer. + +! === module MOM_CVMix_KPP === +! This is the MOM wrapper to CVMix:KPP +! See http://cvmix.github.io/ +USE_KPP = False ! [Boolean] default = False + ! If true, turns on the [CVMix] KPP scheme of Large et al., 1994, to calculate + ! diffusivities and non-local transport in the OBL. + +! === module MOM_CVMix_conv === +! Parameterization of enhanced mixing due to convection via CVMix +USE_CVMix_CONVECTION = False ! [Boolean] default = False + ! If true, turns on the enhanced mixing due to convection via CVMix. This scheme + ! increases diapycnal diffs./viscs. at statically unstable interfaces. Relevant + ! parameters are contained in the CVMix_CONVECTION% parameter block. + +! === module MOM_set_diffusivity === +FLUX_RI_MAX = 0.2 ! [nondim] default = 0.2 + ! The flux Richardson number where the stratification is large enough that N2 > + ! omega2. The full expression for the Flux Richardson number is usually + ! FLUX_RI_MAX*N2/(N2+OMEGA2). +SET_DIFF_2018_ANSWERS = False ! [Boolean] default = False + ! If true, use the order of arithmetic and expressions that recover the answers + ! from the end of 2018. Otherwise, use updated and more robust forms of the + ! same expressions. + +! === module MOM_tidal_mixing === +! Vertical Tidal Mixing Parameterization +USE_CVMix_TIDAL = False ! [Boolean] default = False + ! If true, turns on tidal mixing via CVMix +INT_TIDE_DISSIPATION = False ! [Boolean] default = False + ! If true, use an internal tidal dissipation scheme to drive diapycnal mixing, + ! along the lines of St. Laurent et al. (2002) and Simmons et al. (2004). +ML_RADIATION = False ! [Boolean] default = False + ! If true, allow a fraction of TKE available from wind work to penetrate below + ! the base of the mixed layer with a vertical decay scale determined by the + ! minimum of: (1) The depth of the mixed layer, (2) an Ekman length scale. +BBL_EFFIC = 0.2 ! [nondim] default = 0.2 + ! The efficiency with which the energy extracted by bottom drag drives BBL + ! diffusion. This is only used if BOTTOMDRAGLAW is true. +BBL_MIXING_MAX_DECAY = 200.0 ! [m] default = 200.0 + ! The maximum decay scale for the BBL diffusion, or 0 to allow the mixing to + ! penetrate as far as stratification and rotation permit. The default for now + ! is 200 m. This is only used if BOTTOMDRAGLAW is true. +BBL_MIXING_AS_MAX = False ! [Boolean] default = True + ! If true, take the maximum of the diffusivity from the BBL mixing and the other + ! diffusivities. Otherwise, diffusivity from the BBL_mixing is simply added. +USE_LOTW_BBL_DIFFUSIVITY = True ! [Boolean] default = False + ! If true, uses a simple, imprecise but non-coordinate dependent, model of BBL + ! mixing diffusivity based on Law of the Wall. Otherwise, uses the original BBL + ! scheme. +LOTW_BBL_USE_OMEGA = True ! [Boolean] default = True + ! If true, use the maximum of Omega and N for the TKE to diffusion calculation. + ! Otherwise, N is N. +SIMPLE_TKE_TO_KD = True ! [Boolean] default = False + ! If true, uses a simple estimate of Kd/TKE that will work for arbitrary + ! vertical coordinates. If false, calculates Kd/TKE and bounds based on exact + ! energetics for an isopycnal layer-formulation. + +! === module MOM_bkgnd_mixing === +! Adding static vertical background mixing coefficients +KD = 2.0E-05 ! [m2 s-1] default = 0.0 + ! The background diapycnal diffusivity of density in the interior. Zero or the + ! molecular value, ~1e-7 m2 s-1, may be used. +KD_MIN = 2.0E-06 ! [m2 s-1] default = 2.0E-07 + ! The minimum diapycnal diffusivity. +KDML = 2.0E-05 ! [m2 s-1] default = 2.0E-05 + ! If BULKMIXEDLAYER is false, KDML is the elevated diapycnal diffusivity in the + ! topmost HMIX of fluid. KDML is only used if BULKMIXEDLAYER is false. +BRYAN_LEWIS_DIFFUSIVITY = False ! [Boolean] default = False + ! If true, use a Bryan & Lewis (JGR 1979) like tanh profile of background + ! diapycnal diffusivity with depth. This is done via CVMix. +HORIZ_VARYING_BACKGROUND = False ! [Boolean] default = False + ! If true, apply vertically uniform, latitude-dependent background diffusivity, + ! as described in Danabasoglu et al., 2012 +PRANDTL_BKGND = 1.0 ! [nondim] default = 1.0 + ! Turbulent Prandtl number used to convert vertical background diffusivities + ! into viscosities. +HENYEY_IGW_BACKGROUND = True ! [Boolean] default = False + ! If true, use a latitude-dependent scaling for the near surface background + ! diffusivity, as described in Harrison & Hallberg, JPO 2008. +HENYEY_IGW_BACKGROUND_NEW = False ! [Boolean] default = False + ! If true, use a better latitude-dependent scaling for the background + ! diffusivity, as described in Harrison & Hallberg, JPO 2008. +HENYEY_N0_2OMEGA = 20.0 ! [nondim] default = 20.0 + ! The ratio of the typical Buoyancy frequency to twice the Earth's rotation + ! period, used with the Henyey scaling from the mixing. +KD_TANH_LAT_FN = False ! [Boolean] default = False + ! If true, use a tanh dependence of Kd_sfc on latitude, like CM2.1/CM2M. There + ! is no physical justification for this form, and it can not be used with + ! HENYEY_IGW_BACKGROUND. +KD_MAX = 0.1 ! [m2 s-1] default = -1.0 + ! The maximum permitted increment for the diapycnal diffusivity from TKE-based + ! parameterizations, or a negative value for no limit. +KD_ADD = 0.0 ! [m2 s-1] default = 0.0 + ! A uniform diapycnal diffusivity that is added everywhere without any filtering + ! or scaling. +USER_CHANGE_DIFFUSIVITY = False ! [Boolean] default = False + ! If true, call user-defined code to change the diffusivity. +DISSIPATION_MIN = 0.0 ! [W m-3] default = 0.0 + ! The minimum dissipation by which to determine a lower bound of Kd (a floor). +DISSIPATION_N0 = 0.0 ! [W m-3] default = 0.0 + ! The intercept when N=0 of the N-dependent expression used to set a minimum + ! dissipation by which to determine a lower bound of Kd (a floor): A in eps_min + ! = A + B*N. +DISSIPATION_N1 = 0.0 ! [J m-3] default = 0.0 + ! The coefficient multiplying N, following Gargett, used to set a minimum + ! dissipation by which to determine a lower bound of Kd (a floor): B in eps_min + ! = A + B*N +DISSIPATION_KD_MIN = 0.0 ! [m2 s-1] default = 0.0 + ! The minimum vertical diffusivity applied as a floor. +DOUBLE_DIFFUSION = False ! [Boolean] default = False + ! If true, increase diffusivites for temperature or salinity based on the + ! double-diffusive parameterization described in Large et al. (1994). + +! === module MOM_kappa_shear === +! Parameterization of shear-driven turbulence following Jackson, Hallberg and Legg, JPO 2008 +USE_JACKSON_PARAM = True ! [Boolean] default = False + ! If true, use the Jackson-Hallberg-Legg (JPO 2008) shear mixing + ! parameterization. +VERTEX_SHEAR = False ! [Boolean] default = False + ! If true, do the calculations of the shear-driven mixing at the cell vertices + ! (i.e., the vorticity points). +RINO_CRIT = 0.25 ! [nondim] default = 0.25 + ! The critical Richardson number for shear mixing. +SHEARMIX_RATE = 0.089 ! [nondim] default = 0.089 + ! A nondimensional rate scale for shear-driven entrainment. Jackson et al find + ! values in the range of 0.085-0.089. +MAX_RINO_IT = 25 ! [nondim] default = 50 + ! The maximum number of iterations that may be used to estimate the Richardson + ! number driven mixing. +KD_KAPPA_SHEAR_0 = 2.0E-05 ! [m2 s-1] default = 2.0E-05 + ! The background diffusivity that is used to smooth the density and shear + ! profiles before solving for the diffusivities. The default is the greater of + ! KD and 1e-7 m2 s-1. +KD_TRUNC_KAPPA_SHEAR = 2.0E-07 ! [m2 s-1] default = 2.0E-07 + ! The value of shear-driven diffusivity that is considered negligible and is + ! rounded down to 0. The default is 1% of KD_KAPPA_SHEAR_0. +FRI_CURVATURE = -0.97 ! [nondim] default = -0.97 + ! The nondimensional curvature of the function of the Richardson number in the + ! kappa source term in the Jackson et al. scheme. +TKE_N_DECAY_CONST = 0.24 ! [nondim] default = 0.24 + ! The coefficient for the decay of TKE due to stratification (i.e. proportional + ! to N*tke). The values found by Jackson et al. are 0.24-0.28. +TKE_SHEAR_DECAY_CONST = 0.14 ! [nondim] default = 0.14 + ! The coefficient for the decay of TKE due to shear (i.e. proportional to + ! |S|*tke). The values found by Jackson et al. are 0.14-0.12. +KAPPA_BUOY_SCALE_COEF = 0.82 ! [nondim] default = 0.82 + ! The coefficient for the buoyancy length scale in the kappa equation. The + ! values found by Jackson et al. are in the range of 0.81-0.86. +KAPPA_N_OVER_S_SCALE_COEF2 = 0.0 ! [nondim] default = 0.0 + ! The square of the ratio of the coefficients of the buoyancy and shear scales + ! in the diffusivity equation, Set this to 0 (the default) to eliminate the + ! shear scale. This is only used if USE_JACKSON_PARAM is true. +KAPPA_SHEAR_TOL_ERR = 0.1 ! [nondim] default = 0.1 + ! The fractional error in kappa that is tolerated. Iteration stops when changes + ! between subsequent iterations are smaller than this everywhere in a column. + ! The peak diffusivities usually converge most rapidly, and have much smaller + ! errors than this. +TKE_BACKGROUND = 0.0 ! [m2 s-2] default = 0.0 + ! A background level of TKE used in the first iteration of the kappa equation. + ! TKE_BACKGROUND could be 0. +KAPPA_SHEAR_ELIM_MASSLESS = True ! [Boolean] default = True + ! If true, massless layers are merged with neighboring massive layers in this + ! calculation. The default is true and I can think of no good reason why it + ! should be false. This is only used if USE_JACKSON_PARAM is true. +MAX_KAPPA_SHEAR_IT = 13 ! [nondim] default = 13 + ! The maximum number of iterations that may be used to estimate the + ! time-averaged diffusivity. +KAPPA_SHEAR_MAX_KAP_SRC_CHG = 10.0 ! [nondim] default = 10.0 + ! The maximum permitted increase in the kappa source within an iteration + ! relative to the local source; this must be greater than 1. The lower limit + ! for the permitted fractional decrease is (1 - 0.5/kappa_src_max_chg). These + ! limits could perhaps be made dynamic with an improved iterative solver. +KAPPA_SHEAR_ITER_BUG = False ! [Boolean] default = False + ! If true, use an older, dimensionally inconsistent estimate of the derivative + ! of diffusivity with energy in the Newton's method iteration. The bug causes + ! undercorrections when dz > 1 m. +KAPPA_SHEAR_ALL_LAYER_TKE_BUG = False ! [Boolean] default = False + ! If true, report back the latest estimate of TKE instead of the time average + ! TKE when there is mass in all layers. Otherwise always report the time + ! averaged TKE, as is currently done when there are some massless layers. +USE_RESTRICTIVE_TOLERANCE_CHECK = False ! [Boolean] default = False + ! If true, uses the more restrictive tolerance check to determine if a timestep + ! is acceptable for the KS_it outer iteration loop. False uses the original + ! less restrictive check. + +! === module MOM_CVMix_shear === +! Parameterization of shear-driven turbulence via CVMix (various options) +USE_LMD94 = False ! [Boolean] default = False + ! If true, use the Large-McWilliams-Doney (JGR 1994) shear mixing + ! parameterization. +USE_PP81 = False ! [Boolean] default = False + ! If true, use the Pacanowski and Philander (JPO 1981) shear mixing + ! parameterization. + +! === module MOM_CVMix_ddiff === +! Parameterization of mixing due to double diffusion processes via CVMix +USE_CVMIX_DDIFF = False ! [Boolean] default = False + ! If true, turns on double diffusive processes via CVMix. Note that double + ! diffusive processes on viscosity are ignored in CVMix, see + ! http://cvmix.github.io/ for justification. + +! === module MOM_diabatic_aux === +! The following parameters are used for auxiliary diabatic processes. +RECLAIM_FRAZIL = True ! [Boolean] default = True + ! If true, try to use any frazil heat deficit to cool any overlying layers down + ! to the freezing point, thereby avoiding the creation of thin ice when the SST + ! is above the freezing point. +PRESSURE_DEPENDENT_FRAZIL = False ! [Boolean] default = False + ! If true, use a pressure dependent freezing temperature when making frazil. The + ! default is false, which will be faster but is inappropriate with ice-shelf + ! cavities. +IGNORE_FLUXES_OVER_LAND = False ! [Boolean] default = False + ! If true, the model does not check if fluxes are being applied over land + ! points. This is needed when the ocean is coupled with ice shelves and sea ice, + ! since the sea ice mask needs to be different than the ocean mask to avoid sea + ! ice formation under ice shelves. This flag only works when use_ePBL = True. +DO_RIVERMIX = False ! [Boolean] default = False + ! If true, apply additional mixing wherever there is runoff, so that it is mixed + ! down to RIVERMIX_DEPTH if the ocean is that deep. +USE_RIVER_HEAT_CONTENT = False ! [Boolean] default = False + ! If true, use the fluxes%runoff_Hflx field to set the heat carried by runoff, + ! instead of using SST*CP*liq_runoff. +USE_CALVING_HEAT_CONTENT = False ! [Boolean] default = False + ! If true, use the fluxes%calving_Hflx field to set the heat carried by runoff, + ! instead of using SST*CP*froz_runoff. +VAR_PEN_SW = True ! [Boolean] default = False + ! If true, use one of the CHL_A schemes specified by OPACITY_SCHEME to determine + ! the e-folding depth of incoming short wave radiation. +CHL_FROM_FILE = True ! [Boolean] default = True + ! If true, chl_a is read from a file. +CHL_FILE = "seawifs_1998-2006_GOLD_smoothed_2X_5deg.nc" ! + ! CHL_FILE is the file containing chl_a concentrations in the variable CHL_A. It + ! is used when VAR_PEN_SW and CHL_FROM_FILE are true. +CHL_VARNAME = "CHL_A" ! default = "CHL_A" + ! Name of CHL_A variable in CHL_FILE. + +! === module MOM_energetic_PBL === +ML_OMEGA_FRAC = 0.0 ! [nondim] default = 0.0 + ! When setting the decay scale for turbulence, use this fraction of the absolute + ! rotation rate blended with the local value of f, as sqrt((1-of)*f^2 + + ! of*4*omega^2). +EKMAN_SCALE_COEF = 1.0 ! [nondim] default = 1.0 + ! A nondimensional scaling factor controlling the inhibition of the diffusive + ! length scale by rotation. Making this larger decreases the PBL diffusivity. +EPBL_2018_ANSWERS = False ! [Boolean] default = False + ! If true, use the order of arithmetic and expressions that recover the answers + ! from the end of 2018. Otherwise, use updated and more robust forms of the + ! same expressions. +EPBL_ORIGINAL_PE_CALC = True ! [Boolean] default = True + ! If true, the ePBL code uses the original form of the potential energy change + ! code. Otherwise, the newer version that can work with successive increments + ! to the diffusivity in upward or downward passes is used. +MKE_TO_TKE_EFFIC = 0.0 ! [nondim] default = 0.0 + ! The efficiency with which mean kinetic energy released by mechanically forced + ! entrainment of the mixed layer is converted to turbulent kinetic energy. +TKE_DECAY = 2.5 ! [nondim] default = 2.5 + ! TKE_DECAY relates the vertical rate of decay of the TKE available for + ! mechanical entrainment to the natural Ekman depth. +EPBL_MSTAR_SCHEME = "CONSTANT" ! default = "CONSTANT" + ! EPBL_MSTAR_SCHEME selects the method for setting mstar. Valid values are: + ! CONSTANT - Use a fixed mstar given by MSTAR + ! OM4 - Use L_Ekman/L_Obukhov in the sabilizing limit, as in OM4 + ! REICHL_H18 - Use the scheme documented in Reichl & Hallberg, 2018. +MSTAR = 1.2 ! [nondim] default = 1.2 + ! The ratio of the friction velocity cubed to the TKE input to the mixed layer. + ! This option is used if EPBL_MSTAR_SCHEME = CONSTANT. +NSTAR = 0.2 ! [nondim] default = 0.2 + ! The portion of the buoyant potential energy imparted by surface fluxes that is + ! available to drive entrainment at the base of mixed layer when that energy is + ! positive. +MSTAR_CONV_ADJ = 0.0 ! [nondim] default = 0.0 + ! Coefficient used for reducing mstar during convection due to reduction of + ! stable density gradient. +USE_MLD_ITERATION = False ! [Boolean] default = True + ! A logical that specifies whether or not to use the distance to the bottom of + ! the actively turbulent boundary layer to help set the EPBL length scale. +EPBL_TRANSITION_SCALE = 0.1 ! [nondim] default = 0.1 + ! A scale for the mixing length in the transition layer at the edge of the + ! boundary layer as a fraction of the boundary layer thickness. +EPBL_MIN_MIX_LEN = 0.0 ! [meter] default = 0.0 + ! The minimum mixing length scale that will be used by ePBL. The default (0) + ! does not set a minimum. +MIX_LEN_EXPONENT = 2.0 ! [nondim] default = 2.0 + ! The exponent applied to the ratio of the distance to the MLD and the MLD depth + ! which determines the shape of the mixing length. This is only used if + ! USE_MLD_ITERATION is True. +EPBL_VEL_SCALE_SCHEME = "CUBE_ROOT_TKE" ! default = "CUBE_ROOT_TKE" + ! Selects the method for translating TKE into turbulent velocities. Valid values + ! are: + ! CUBE_ROOT_TKE - A constant times the cube root of remaining TKE. + ! REICHL_H18 - Use the scheme based on a combination of w* and v* as + ! documented in Reichl & Hallberg, 2018. +WSTAR_USTAR_COEF = 1.0 ! [nondim] default = 1.0 + ! A ratio relating the efficiency with which convectively released energy is + ! converted to a turbulent velocity, relative to mechanically forced TKE. Making + ! this larger increases the BL diffusivity +EPBL_VEL_SCALE_FACTOR = 1.0 ! [nondim] default = 1.0 + ! An overall nondimensional scaling factor for wT. Making this larger increases + ! the PBL diffusivity. +VSTAR_SURF_FAC = 1.2 ! [nondim] default = 1.2 + ! The proportionality times ustar to set vstar at the surface. +USE_LA_LI2016 = False ! [nondim] default = False + ! A logical to use the Li et al. 2016 (submitted) formula to determine the + ! Langmuir number. +EPBL_LT = False ! [nondim] default = False + ! A logical to use a LT parameterization. +!EPBL_USTAR_MIN = 1.45842E-18 ! [m s-1] + ! The (tiny) minimum friction velocity used within the ePBL code, derived from + ! OMEGA and ANGSTROM. + +! === module MOM_regularize_layers === +REGULARIZE_SURFACE_LAYERS = False ! [Boolean] default = False + ! If defined, vertically restructure the near-surface layers when they have too + ! much lateral variations to allow for sensible lateral barotropic transports. + +! === module MOM_opacity === +OPACITY_SCHEME = "MANIZZA_05" ! default = "MANIZZA_05" + ! This character string specifies how chlorophyll concentrations are translated + ! into opacities. Currently valid options include: + ! MANIZZA_05 - Use Manizza et al., GRL, 2005. + ! MOREL_88 - Use Morel, JGR, 1988. +BLUE_FRAC_SW = 0.5 ! [nondim] default = 0.5 + ! The fraction of the penetrating shortwave radiation that is in the blue band. +PEN_SW_NBANDS = 3 ! default = 1 + ! The number of bands of penetrating shortwave radiation. +OPTICS_2018_ANSWERS = False ! [Boolean] default = False + ! If true, use the order of arithmetic and expressions that recover the answers + ! from the end of 2018. Otherwise, use updated expressions for handling the + ! absorption of small remaining shortwave fluxes. +PEN_SW_FLUX_ABSORB = 2.5E-11 ! [degC m s-1] default = 2.5E-11 + ! A minimum remaining shortwave heating rate that will be simply absorbed in the + ! next sufficiently thick layers for computational efficiency, instead of + ! continuing to penetrate. The default, 2.5e-11 degC m s-1, is about 1e-4 W m-2 + ! or 0.08 degC m century-1, but 0 is also a valid value. +PEN_SW_ABSORB_MINTHICK = 1.0 ! [m] default = 1.0 + ! A thickness that is used to absorb the remaining penetrating shortwave heat + ! flux when it drops below PEN_SW_FLUX_ABSORB. +OPACITY_LAND_VALUE = 10.0 ! [m-1] default = 10.0 + ! The value to use for opacity over land. The default is 10 m-1 - a value for + ! muddy water. + +! === module MOM_tracer_advect === +TRACER_ADVECTION_SCHEME = "PPM:H3" ! default = "PLM" + ! The horizontal transport scheme for tracers: + ! PLM - Piecewise Linear Method + ! PPM:H3 - Piecewise Parabolic Method (Huyhn 3rd order) + ! PPM - Piecewise Parabolic Method (Colella-Woodward) + +! === module MOM_tracer_hor_diff === +KHTR = 600.0 ! [m2 s-1] default = 0.0 + ! The background along-isopycnal tracer diffusivity. +KHTR_MIN = 50.0 ! [m2 s-1] default = 0.0 + ! The minimum along-isopycnal tracer diffusivity. +KHTR_MAX = 900.0 ! [m2 s-1] default = 0.0 + ! The maximum along-isopycnal tracer diffusivity. +KHTR_PASSIVITY_COEFF = 0.0 ! [nondim] default = 0.0 + ! The coefficient that scales deformation radius over grid-spacing in passivity, + ! where passivity is the ratio between along isopycnal mixing of tracers to + ! thickness mixing. A non-zero value enables this parameterization. +KHTR_PASSIVITY_MIN = 0.5 ! [nondim] default = 0.5 + ! The minimum passivity which is the ratio between along isopycnal mixing of + ! tracers to thickness mixing. +DIFFUSE_ML_TO_INTERIOR = False ! [Boolean] default = False + ! If true, enable epipycnal mixing between the surface boundary layer and the + ! interior. +CHECK_DIFFUSIVE_CFL = False ! [Boolean] default = False + ! If true, use enough iterations the diffusion to ensure that the diffusive + ! equivalent of the CFL limit is not violated. If false, always use the greater + ! of 1 or MAX_TR_DIFFUSION_CFL iteration. +MAX_TR_DIFFUSION_CFL = -1.0 ! [nondim] default = -1.0 + ! If positive, locally limit the along-isopycnal tracer diffusivity to keep the + ! diffusive CFL locally at or below this value. The number of diffusive + ! iterations is often this value or the next greater integer. +RECALC_NEUTRAL_SURF = False ! [Boolean] default = False + ! If true, then recalculate the neutral surfaces if the + ! diffusive CFL is exceeded. If false, assume that the + ! positions of the surfaces do not change + +! === module MOM_neutral_diffusion === +! This module implements neutral diffusion of tracers +USE_NEUTRAL_DIFFUSION = True ! [Boolean] default = False + ! If true, enables the neutral diffusion module. +NDIFF_CONTINUOUS = True ! [Boolean] default = True + ! If true, uses a continuous reconstruction of T and S when finding neutral + ! surfaces along which diffusion will happen. If false, a PPM discontinuous + ! reconstruction of T and S is done which results in a higher order routine but + ! exacts a higher computational cost. +NDIFF_REF_PRES = -1.0 ! [Pa] default = -1.0 + ! The reference pressure (Pa) used for the derivatives of the equation of state. + ! If negative (default), local pressure is used. +NDIFF_INTERIOR_ONLY = False ! [Boolean] default = False + ! If true, only applies neutral diffusion in the ocean interior.That is, the + ! algorithm will exclude the surface and bottomboundary layers. +NDIFF_USE_UNMASKED_TRANSPORT_BUG = False ! [Boolean] default = False + ! If true, use an older form for the accumulation of neutral-diffusion + ! transports that were unmasked, as used prior to Jan 2018. This is not + ! recommended. + +! === module MOM_lateral_boundary_diffusion === +! This module implements lateral diffusion of tracers near boundaries +USE_LATERAL_BOUNDARY_DIFFUSION = False ! [Boolean] default = False + ! If true, enables the lateral boundary tracer's diffusion module. +OBSOLETE_DIAGNOSTIC_IS_FATAL = True ! [Boolean] default = True + ! If an obsolete diagnostic variable appears in the diag_table, cause a FATAL + ! error rather than issue a WARNING. + +! === module MOM_sum_output === +CALCULATE_APE = True ! [Boolean] default = True + ! If true, calculate the available potential energy of the interfaces. Setting + ! this to false reduces the memory footprint of high-PE-count models + ! dramatically. +WRITE_STOCKS = True ! [Boolean] default = True + ! If true, write the integrated tracer amounts to stdout when the energy files + ! are written. +MAXTRUNC = 5000 ! [truncations save_interval-1] default = 0 + ! The run will be stopped, and the day set to a very large value if the velocity + ! is truncated more than MAXTRUNC times between energy saves. Set MAXTRUNC to 0 + ! to stop if there is any truncation of velocities. +MAX_ENERGY = 0.0 ! [m2 s-2] default = 0.0 + ! The maximum permitted average energy per unit mass; the model will be stopped + ! if there is more energy than this. If zero or negative, this is set to + ! 10*MAXVEL^2. +ENERGYFILE = "ocean.stats" ! default = "ocean.stats" + ! The file to use to write the energies and globally summed diagnostics. +DATE_STAMPED_STDOUT = True ! [Boolean] default = True + ! If true, use dates (not times) in messages to stdout +TIMEUNIT = 8.64E+04 ! [s] default = 8.64E+04 + ! The time unit in seconds a number of input fields +READ_DEPTH_LIST = False ! [Boolean] default = False + ! Read the depth list from a file if it exists or create that file otherwise. +DEPTH_LIST_MIN_INC = 1.0E-10 ! [m] default = 1.0E-10 + ! The minimum increment between the depths of the entries in the depth-list + ! file. +ENERGYSAVEDAYS = 0.5 ! [days] default = 1.0 + ! The interval in units of TIMEUNIT between saves of the energies of the run and + ! other globally summed diagnostics. +ENERGYSAVEDAYS_GEOMETRIC = 0.0 ! [days] default = 0.0 + ! The starting interval in units of TIMEUNIT for the first call to save the + ! energies of the run and other globally summed diagnostics. The interval + ! increases by a factor of 2. after each call to write_energy. + +! === module ocean_model_init === +SINGLE_STEPPING_CALL = True ! [Boolean] default = True + ! If true, advance the state of MOM with a single step including both dynamics + ! and thermodynamics. If false, the two phases are advanced with separate + ! calls. +RESTART_CONTROL = 3 ! default = 1 + ! An integer whose bits encode which restart files are written. Add 2 (bit 1) + ! for a time-stamped file, and odd (bit 0) for a non-time-stamped file. A + ! restart file will be saved at the end of the run segment for any non-negative + ! value. +OCEAN_SURFACE_STAGGER = "C" ! default = "C" + ! A case-insensitive character string to indicate the staggering of the surface + ! velocity field that is returned to the coupler. Valid values include 'A', + ! 'B', or 'C'. +ICE_SHELF = False ! [Boolean] default = False + ! If true, enables the ice shelf model. +ICEBERGS_APPLY_RIGID_BOUNDARY = False ! [Boolean] default = False + ! If true, allows icebergs to change boundary condition felt by ocean + +! === module MOM_surface_forcing === +LATENT_HEAT_FUSION = 3.337E+05 ! [J/kg] default = 3.337E+05 + ! The latent heat of fusion. +LATENT_HEAT_VAPORIZATION = 2.4665E+06 ! [J/kg] default = 2.4665E+06 + ! The latent heat of fusion. +MAX_P_SURF = -1.0 ! [Pa] default = -1.0 + ! The maximum surface pressure that can be exerted by the atmosphere and + ! floating sea-ice or ice shelves. This is needed because the FMS coupling + ! structure does not limit the water that can be frozen out of the ocean and the + ! ice-ocean heat fluxes are treated explicitly. No limit is applied if a + ! negative value is used. +RESTORE_SALINITY = False ! [Boolean] default = False + ! If true, the coupled driver will add a globally-balanced fresh-water flux that + ! drives sea-surface salinity toward specified values. +RESTORE_TEMPERATURE = False ! [Boolean] default = False + ! If true, the coupled driver will add a heat flux that drives sea-surface + ! temperature toward specified values. +ADJUST_NET_SRESTORE_TO_ZERO = False ! [Boolean] default = False + ! If true, adjusts the salinity restoring seen to zero whether restoring is via + ! a salt flux or virtual precip. +ADJUST_NET_SRESTORE_BY_SCALING = False ! [Boolean] default = False + ! If true, adjustments to salt restoring to achieve zero net are made by scaling + ! values without moving the zero contour. +ADJUST_NET_FRESH_WATER_TO_ZERO = False ! [Boolean] default = False + ! If true, adjusts the net fresh-water forcing seen by the ocean (including + ! restoring) to zero. +ADJUST_NET_FRESH_WATER_BY_SCALING = False ! [Boolean] default = False + ! If true, adjustments to net fresh water to achieve zero net are made by + ! scaling values without moving the zero contour. +ICE_SALT_CONCENTRATION = 0.005 ! [kg/kg] default = 0.005 + ! The assumed sea-ice salinity needed to reverse engineer the melt flux (or + ! ice-ocean fresh-water flux). +USE_LIMITED_PATM_SSH = True ! [Boolean] default = True + ! If true, return the sea surface height with the correction for the atmospheric + ! (and sea-ice) pressure limited by max_p_surf instead of the full atmospheric + ! pressure. +APPROX_NET_MASS_SRC = False ! [Boolean] default = False + ! If true, use the net mass sources from the ice-ocean boundary type without any + ! further adjustments to drive the ocean dynamics. The actual net mass source + ! may differ due to internal corrections. +WIND_STAGGER = "AGRID" ! + ! The staggering of the input wind stress field from the coupler that is + ! actually used. +WIND_STRESS_MULTIPLIER = 1.0 ! [nondim] default = 1.0 + ! A factor multiplying the wind-stress given to the ocean by the coupler. This + ! is used for testing and should be =1.0 for any production runs. +CD_TIDES = 1.0E-04 ! [nondim] default = 1.0E-04 + ! The drag coefficient that applies to the tides. +READ_TIDEAMP = False ! [Boolean] default = False + ! If true, read a file (given by TIDEAMP_FILE) containing the tidal amplitude + ! with INT_TIDE_DISSIPATION. +UTIDE = 0.0 ! [m s-1] default = 0.0 + ! The constant tidal amplitude used with INT_TIDE_DISSIPATION. +READ_GUST_2D = False ! [Boolean] default = False + ! If true, use a 2-dimensional gustiness supplied from an input file +GUST_CONST = 0.0 ! [Pa] default = 0.0 + ! The background gustiness in the winds. +SURFACE_FORCING_2018_ANSWERS = False ! [Boolean] default = False + ! If true, use the order of arithmetic and expressions that recover the answers + ! from the end of 2018. Otherwise, use a simpler expression to calculate + ! gustiness. +FIX_USTAR_GUSTLESS_BUG = True ! [Boolean] default = True + ! If true correct a bug in the time-averaging of the gustless wind friction + ! velocity +USE_RIGID_SEA_ICE = False ! [Boolean] default = False + ! If true, sea-ice is rigid enough to exert a nonhydrostatic pressure that + ! resist vertical motion. +ALLOW_ICEBERG_FLUX_DIAGNOSTICS = False ! [Boolean] default = False + ! If true, makes available diagnostics of fluxes from icebergs as seen by MOM6. +ALLOW_FLUX_ADJUSTMENTS = False ! [Boolean] default = False + ! If true, allows flux adjustments to specified via the data_table using the + ! component name 'OCN'. + +! === module MOM_restart === +USE_WAVES = False ! [Boolean] default = False + ! If true, enables surface wave modules. +LA_DEPTH_RATIO = 0.04 ! [nondim] default = 0.04 + ! The depth (normalized by BLD) to average Stokes drift over in Langmuir number + ! calculation, where La = sqrt(ust/Stokes). + +! === module MOM_file_parser === +SEND_LOG_TO_STDOUT = False ! [Boolean] default = False + ! If true, all log messages are also sent to stdout. +DOCUMENT_FILE = "MOM_parameter_doc" ! default = "MOM_parameter_doc" + ! The basename for files where run-time parameters, their settings, units and + ! defaults are documented. Blank will disable all parameter documentation. +COMPLETE_DOCUMENTATION = True ! [Boolean] default = True + ! If true, all run-time parameters are documented in MOM_parameter_doc.all . +MINIMAL_DOCUMENTATION = True ! [Boolean] default = True + ! If true, non-default run-time parameters are documented in + ! MOM_parameter_doc.short . diff --git a/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/72x36/README.md b/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/72x36/README.md new file mode 100644 index 000000000..396b87345 --- /dev/null +++ b/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/72x36/README.md @@ -0,0 +1 @@ +This `5x5` degree configuration was generated at NASA [GMAO](https://gmao.gsfc.nasa.gov). diff --git a/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/72x36/data_table b/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/72x36/data_table new file mode 100755 index 000000000..e69de29bb diff --git a/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/72x36/diag_table b/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/72x36/diag_table new file mode 100755 index 000000000..bc2939713 --- /dev/null +++ b/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/72x36/diag_table @@ -0,0 +1,494 @@ +"Global ALE Experiment" +1900 1 1 0 0 0 +#"scalar", 1,"days",1,"days","Time", +#"layer", 1,"days",1,"days","Time", +#"prog", 1,"days",1,"days","Time", +"prog_z", -1,"months",1,"days","Time", +#"ave_prog", 1,"days",1,"days","Time", +#"tracer", 1,"days",1,"days","Time", +#"cont", 1,"days",1,"days","Time", +##"mom", 5,"days",1,"days","Time", +##"bt_mom", 5,"days",1,"days","Time", +#"visc", 1,"days",1,"days","Time", +##"energy", 5,"days",1,"days","Time", +"forcing", -1,"months",1,"days","Time", +#"surface", 1,"months",1,"days","Time", +"sfc_ave", -1,"months",1,"days","Time", +#"ocean_static", -1,"days",1,"days","time", +# +#"cmor", 1,"days",1,"days","Time", +#"cmor2", 1,"days",1,"days","Time", +#"cmor_z", 1,"days",1,"days","Time", +#"cmor_scalar", 1,"days",1,"days","Time", +#"ocean_static_cmor", -1,"days",1,"days","time", +# +##This is the field section of the diag_table. +# +## Layer-Average Diagnostics: +##=========================== +#"ocean_model","temp_layer_ave","temp_layer_ave","layer","all",.true.,"none",2 +#"ocean_model","salt_layer_ave","salt_layer_ave","layer","all",.true.,"none",2 +# +## Prognostic Ocean fields: +##========================= +# +#"ocean_model","u","u","prog","all",.false.,"none",2 +#"ocean_model","v","v","prog","all",.false.,"none",2 +#"ocean_model","h","h","prog","all",.false.,"none",1 +#"ocean_model","e","e","prog","all",.false.,"none",2 +#"ocean_model","temp","temp","prog","all",.false.,"none",2 +#"ocean_model","salt","salt","prog","all",.false.,"none",2 +##"ocean_model","Rml","Rml","prog","all",.false.,"none",2 +# +##"ocean_model","RV","RV","prog","all",.false.,"none",2 +##"ocean_model","PV","PV","prog","all",.false.,"none",2 +##"ocean_model","e_D","e_D","prog","all",.false.,"none",2 +# +#"ocean_model","u","u","ave_prog","all",.true.,"none",2 +#"ocean_model","v","v","ave_prog","all",.true.,"none",2 +#"ocean_model","h","h","ave_prog","all",.true.,"none",1 +#"ocean_model","e","e","ave_prog","all",.true.,"none",2 +##"ocean_model","temp","temp","ave_prog","all",.true.,"none",2 +##"ocean_model","salt","salt","ave_prog","all",.true.,"none",2 +##"ocean_model","Rml","Rml","ave_prog","all",.true.,"none",2 +# +#"ocean_model","mass_wt","mass_wt","surface","all",.false.,"none",1 +#"ocean_model","opottempmint","opottempmint","surface","all",.false.,"none",1 # GFDL name: temp_int +#"ocean_model","somint","somint","surface","all",.false.,"none",1 # GFDL name: salt_int +#"ocean_model","SSH","SSH","surface","all",.false.,"none",2 +#"ocean_model","SST","SST","surface","all",.false.,"none",1 +#"ocean_model","SSS","SSS","surface","all",.false.,"none",2 +#"ocean_model","speed","speed","surface","all",.false.,"none",2 +#"ocean_model","SSU","SSU","surface","all",.false.,"none",2 +#"ocean_model","SSV","SSV","surface","all",.false.,"none",2 +# +"ocean_model","SSH","SSH","sfc_ave","all",.true.,"none",2 +"ocean_model","SST","SST","sfc_ave","all",.true.,"none",2 +"ocean_model","SSS","SSS","sfc_ave","all",.true.,"none",2 +"ocean_model","speed","speed","sfc_ave","all",.true.,"none",2 +"ocean_model","SSU","SSU","sfc_ave","all",.true.,"none",2 +"ocean_model","SSV","SSV","sfc_ave","all",.true.,"none",2 +# +# +## Z-space fields: +##================== +"ocean_model_z","u","u","prog_z","all",.true.,"none",2 +"ocean_model_z","v","v","prog_z","all",.true.,"none",2 +"ocean_model_z","temp","temp","prog_z","all",.true.,"none",2 +"ocean_model_z","temp_xyave","temp_xyave","prog_z","all",.true.,"none",2 +"ocean_model_z","salt","salt","prog_z","all",.true.,"none",2 +"ocean_model_z","thkcello","thkcello","prog_z","all",.true.,"none",2 +# +## Auxilary Tracers: +##================== +##"ocean_model","vintage","vintage","prog","all",.false.,"none",2 +##"ocean_model","agescc","agescc","prog","all",.false.,"none",2 +# +## Continuity Equation Terms: +##=========================== +##"ocean_model","dhdt","dhdt","cont","all",.true.,"none",2 +#"ocean_model","wd","wd","cont","all",.true.,"none",2 +#"ocean_model","uh","uh","cont","all",.true.,"none",2 +#"ocean_model","vh","vh","cont","all",.true.,"none",2 +##"ocean_model","uhGM","uhGM","cont","all",.true.,"none",2 +##"ocean_model","vhGM","vhGM","cont","all",.true.,"none",2 +##"ocean_model","uhbt","uhbt","cont","all",.true.,"none",2 +##"ocean_model","vhbt","vhbt","cont","all",.true.,"none",2 +#"ocean_model","h_rho","h_rho","cont","all",.true.,"none",2 +#"ocean_model","uh_rho","uh_rho","cont","all",.true.,"none",2 +#"ocean_model","vh_rho","vh_rho","cont","all",.true.,"none",2 +#"ocean_model","uhGM_rho","uhGM_rho","cont","all",.true.,"none",2 +#"ocean_model","vhGM_rho","vhGM_rho","cont","all",.true.,"none",2 +#"ocean_model","KHth_u","KHth_u","cont","all",.true.,"none",2 +#"ocean_model","KHth_v","KHth_v","cont","all",.true.,"none",2 +#"ocean_model","diftrblo","diftrblo","cont","all",.true.,"none",2 +#"ocean_model","diftrelo","difteblo","cont","all",.true.,"none",2 +#"ocean_model","KHTR_u","KHTR_u","cont","all",.true.,"none",2 +#"ocean_model","KHTR_v","KHTR_v","cont","all",.true.,"none",2 +#"ocean_model","GMwork","GMwork","cont","all",.true.,"none",2 +#"ocean_model","umo","umo","cont","all",.true.,"none",2 +#"ocean_model","vmo","vmo","cont","all",.true.,"none",2 +#"ocean_model","umo_2d","umo_2d","cont","all",.true.,"none",2 +#"ocean_model","vmo_2d","vmo_2d","cont","all",.true.,"none",2 +# +## Continuity Equation Terms In Pure Potential Density Coordiantes: +##================================================================= +##"ocean_model","h_rho","h_rho","cont","all",.true.,"none",2 +##"ocean_model","uh_rho","uh_rho","cont","all",.true.,"none",2 +##"ocean_model","vh_rho","vh_rho","cont","all",.true.,"none",2 +##"ocean_model","uhGM_rho","uhGM_rho","cont","all",.true.,"none",2 +##"ocean_model","vhGM_rho","vhGM_rho","cont","all",.true.,"none",2 +# +## +## Tracer Fluxes: +##================== +#"ocean_model","T_adx", "T_adx", "tracer","all",.true.,"none",2 +#"ocean_model","T_ady", "T_ady", "tracer","all",.true.,"none",2 +#"ocean_model","T_diffx","T_diffx","tracer","all",.true.,"none",2 +#"ocean_model","T_diffy","T_diffy","tracer","all",.true.,"none",2 +#"ocean_model","S_adx", "S_adx", "tracer","all",.true.,"none",2 +#"ocean_model","S_ady", "S_ady", "tracer","all",.true.,"none",2 +#"ocean_model","S_diffx","S_diffx","tracer","all",.true.,"none",2 +#"ocean_model","S_diffy","S_diffy","tracer","all",.true.,"none",2 +# +## T/S net tendency, lateral advection, and vertical remapping budget terms +##================== +## hfds-hfsifrazil = boundary_forcing_heat_tendency_2d +##"ocean_model","rsdoabsorb" ,"rsdoabsorb", "tracer","all",.true.,"none",2 +##"ocean_model","boundary_forcing_temp_tendency" ,"boundary_forcing_temp_tendency", "tracer","all",.true.,"none",2 +##"ocean_model","boundary_forcing_saln_tendency" ,"boundary_forcing_saln_tendency", "tracer","all",.true.,"none",2 +##"ocean_model","boundary_forcing_heat_tendency" ,"boundary_forcing_heat_tendency", "tracer","all",.true.,"none",2 +##"ocean_model","boundary_forcing_salt_tendency" ,"boundary_forcing_salt_tendency", "tracer","all",.true.,"none",2 +##"ocean_model","boundary_forcing_heat_tendency_2d" ,"boundary_forcing_heat_tendency_2d", "tracer","all",.true.,"none",2 +##"ocean_model","boundary_forcing_salt_tendency_2d" ,"boundary_forcing_salt_tendency_2d", "tracer","all",.true.,"none",2 +# +## opottemptend_2d = T_advection_xy_2d + hfds + hfgeo + opottemppmdiff_2d +## note: Th_tendency_vert_remap_2d = 0 +#"ocean_model","T_tendency" ,"T_tendency", "tracer","all",.true.,"none",2 +#"ocean_model","S_tendency" ,"S_tendency", "tracer","all",.true.,"none",2 +#"ocean_model","opottemptend" ,"opottemptend", "tracer","all",.true.,"none",2 +#"ocean_model","osalttend" ,"osalttend", "tracer","all",.true.,"none",2 +#"ocean_model","opottemptend_2d" ,"opottemptend_2d", "tracer","all",.true.,"none",2 +#"ocean_model","osalttend_2d" ,"osalttend_2d", "tracer","all",.true.,"none",2 +#"ocean_model","T_advection_xy" ,"T_advection_xy", "tracer","all",.true.,"none",2 +#"ocean_model","S_advection_xy" ,"S_advection_xy", "tracer","all",.true.,"none",2 +#"ocean_model","T_advection_xy_2d" ,"T_advection_xy_2d", "tracer","all",.true.,"none",2 +#"ocean_model","S_advection_xy_2d" ,"S_advection_xy_2d", "tracer","all",.true.,"none",2 +##"ocean_model","T_tendency_vert_remap","T_tendency_vert_remap", "tracer","all",.true.,"none",2 +##"ocean_model","S_tendency_vert_remap","S_tendency_vert_remap", "tracer","all",.true.,"none",2 +##"ocean_model","Th_tendency_vert_remap","Th_tendency_vert_remap", "tracer","all",.true.,"none",2 +##"ocean_model","Sh_tendency_vert_remap","Sh_tendency_vert_remap", "tracer","all",.true.,"none",2 +##"ocean_model","Th_tendency_vert_remap_2d","Th_tendency_vert_remap_2d", "tracer","all",.true.,"none",2 +##"ocean_model","Sh_tendency_vert_remap_2d","Sh_tendency_vert_remap_2d", "tracer","all",.true.,"none",2 +#"ocean_model","frazil_heat_tendency","frazil_heat_tendency", "tracer","all",.true.,"none",2 +#"ocean_model","frazil_heat_tendency_2d","frazil_heat_tendency_2d", "tracer","all",.true.,"none",2 +#"ocean_model","frazil_temp_tendency","frazil_temp_tendency", "tracer","all",.true.,"none",2 +# +## neutral diffusion tendencies for T and S +##================== +##"ocean_model","opottemppmdiff","opottemppmdiff", "tracer","all",.true.,"none",2 +##"ocean_model","osaltpmdiff","osaltpmdiff", "tracer","all",.true.,"none",2 +##"ocean_model","opottemppmdiff_2d","opottemppmdiff_2d", "tracer","all",.true.,"none",2 +##"ocean_model","osaltpmdiff_2d","osaltpmdiff_2d", "tracer","all",.true.,"none",2 +##"ocean_model","ndiff_tracer_conc_tendency_T","ndiff_tracer_conc_tendency_T","tracer","all",.true.,"none",2 +##"ocean_model","ndiff_tracer_conc_tendency_S","ndiff_tracer_conc_tendency_S","tracer","all",.true.,"none",2 +# +## diabatic diffusion tendencies for T and S +## note: opottempdiff_2d = 0 +##================== +##"ocean_model","opottempdiff" ,"opottempdiff", "tracer","all",.true.,"none",2 +##"ocean_model","osaltdiff" ,"osaltdiff", "tracer","all",.true.,"none",2 +##"ocean_model","opottempdiff_2d" ,"opottempdiff_2d", "tracer","all",.true.,"none",2 +##"ocean_model","osaltdiff_2d" ,"osaltdiff_2d", "tracer","all",.true.,"none",2 +##"ocean_model","diabatic_diff_temp_tendency","diabatic_diff_temp_tendency","tracer","all",.true.,"none",2 +##"ocean_model","diabatic_diff_saln_tendency","diabatic_diff_saln_tendency","tracer","all",.true.,"none",2 +# +# +# +## Momentum Balance Terms: +##======================= +##"ocean_model","dudt","dudt","mom","all",.true.,"none",2 +##"ocean_model","dvdt","dvdt","mom","all",.true.,"none",2 +##"ocean_model","CAu","CAu","mom","all",.true.,"none",2 +##"ocean_model","CAv","CAv","mom","all",.true.,"none",2 +##"ocean_model","PFu","PFu","mom","all",.true.,"none",2 +##"ocean_model","PFv","PFv","mom","all",.true.,"none",2 +##"ocean_model","du_dt_visc","du_dt_visc","mom","all",.true.,"none",2 +##"ocean_model","dv_dt_visc","dv_dt_visc","mom","all",.true.,"none",2 +##"ocean_model","diffu","diffu","mom","all",.true.,"none",2 +##"ocean_model","diffv","diffv","mom","all",.true.,"none",2 +##"ocean_model","dudt_dia","dudt_dia","mom","all",.true.,"none",2 +##"ocean_model","dvdt_dia","dvdt_dia","mom","all",.true.,"none",2 +## Subterms that should not be added to a closed budget. +##"ocean_model","gKEu","gKEu","mom","all",.true.,"none",2 +##"ocean_model","gKEv","gKEv","mom","all",.true.,"none",2 +##"ocean_model","rvxu","rvxu","mom","all",.true.,"none",2 +##"ocean_model","rvxv","rvxv","mom","all",.true.,"none",2 +##"ocean_model","PFu_bc","PFu_bc","mom","all",.true.,"none",2 +##"ocean_model","PFv_bc","PFv_bc","mom","all",.true.,"none",2 +# +## Barotropic Momentum Balance Terms: +## (only available with split time stepping.) +##=========================================== +##"ocean_model","PFuBT","PFuBT","bt_mom","all",.true.,"none",2 +##"ocean_model","PFvBT","PFvBT","bt_mom","all",.true.,"none",2 +##"ocean_model","CoruBT","CoruBT","bt_mom","all",.true.,"none",2 +##"ocean_model","CorvBT","CorvBT","bt_mom","all",.true.,"none",2 +##"ocean_model","NluBT","NluBT","bt_mom","all",.true.,"none",2 +##"ocean_model","NlvBT","NlvBT","bt_mom","all",.true.,"none",2 +##"ocean_model","ubtforce","ubtforce","bt_mom","all",.true.,"none",2 +##"ocean_model","vbtforce","vbtforce","bt_mom","all",.true.,"none",2 +##"ocean_model","u_accel_bt","u_accel_bt","bt_mom","all",.true.,"none",2 +##"ocean_model","v_accel_bt","v_accel_bt","bt_mom","all",.true.,"none",2 +## +## Viscosities and diffusivities: +##=============================== +#"ocean_model","Kd_interface","Kd_interface","visc","all",.true.,"none",2 +#"ocean_model","Kd_layer","Kd_layer","visc","all",.true.,"none",2 +#"ocean_model","Kd_effective","Kd_effective","visc","all",.true.,"none",2 +#"ocean_model","Kd_itides","Kd_itides","visc","all",.true.,"none",2 +#"ocean_model","Kd_shear","Kd_shear","visc","all",.true.,"none",2 +#"ocean_model","Kd_BBL","Kd_BBL","visc","all",.true.,"none",2 +##"ocean_model","Ahh","Ahh","visc","all",.true.,"none",2 +##"ocean_model","Ahq","Ahq","visc","all",.true.,"none",2 +##"ocean_model","Khh","Khh","visc","all",.true.,"none",2 +##"ocean_model","Khq","Khq","visc","all",.true.,"none",2 +##"ocean_model","bbl_thick_u","bbl_thick_u","visc","all",.true.,"none",2 +##"ocean_model","kv_bbl_u","kv_bbl_u","visc","all",.true.,"none",2 +##"ocean_model","bbl_thick_v","bbl_thick_v","visc","all",.true.,"none",2 +##"ocean_model","kv_bbl_v","kv_bbl_v","visc","all",.true.,"none",2 +##"ocean_model","av_visc","av_visc","visc","all",.true.,"none",2 +##"ocean_model","au_visc","au_visc","visc","all",.true.,"none",2 +##"ocean_model","FrictWork","FrictWork","visc","all",.true.,"none",2 +#"ocean_model","MLD_003","MLD_003","visc","all",.true.,"none",2 +#"ocean_model","subML_N2","subML_N2","visc","all",.true.,"none",2 +#"ocean_model","MEKE","MEKE","visc","all",.true.,"none",2 +#"ocean_model","MEKE_KH","MEKE_KH","visc","all",.true.,"none",2 +#"ocean_model","SN_u","SN_u","visc","all",.true.,"none",2 +# +## +## Kinetic Energy Balance Terms: +##============================= +##"ocean_model","KE","KE","energy","all",.true.,"none",2 +##"ocean_model","dKE_dt","dKE_dt","energy","all",.true.,"none",2 +##"ocean_model","PE_to_KE","PE_to_KE","energy","all",.true.,"none",2 +##"ocean_model","KE_Coradv","KE_Coradv","energy","all",.true.,"none",2 +##"ocean_model","KE_adv","KE_adv","energy","all",.true.,"none",2 +##"ocean_model","KE_visc","KE_visc","energy","all",.true.,"none",2 +##"ocean_model","KE_horvisc","KE_horvisc","energy","all",.true.,"none",2 +##"ocean_model","KE_dia","KE_dia","energy","all",.true.,"none",2 +# +## Surface Forcing: +##================= +#"ocean_model","taux","taux", "forcing","all",.true.,"none",2 +#"ocean_model","tauy","tauy", "forcing","all",.true.,"none",2 +#"ocean_model","ustar","ustar", "forcing","all",.true.,"none",2 +#"ocean_model","p_surf","p_surf", "forcing","all",.true.,"none",2 +## +#"ocean_model","PRCmE","PRCmE", "forcing","all",.true.,"none",1 +#"ocean_model","net_massin","net_massin", "forcing","all",.true.,"none",1 +#"ocean_model","net_massout","net_massout", "forcing","all",.true.,"none",1 +#"ocean_model","lrunoff","lrunoff", "forcing","all",.true.,"none",1 +#"ocean_model","frunoff","frunoff", "forcing","all",.true.,"none",1 +#"ocean_model","lprec","lprec", "forcing","all",.true.,"none",1 +#"ocean_model","fprec","fprec", "forcing","all",.true.,"none",1 +#"ocean_model","vprec","vprec", "forcing","all",.true.,"none",1 +#"ocean_model","evap","evap", "forcing","all",.true.,"none",1 +## +#"ocean_model","net_heat_coupler","net_heat_coupler", "forcing","all",.true.,"none",1 +#"ocean_model","net_heat_surface","net_heat_surface", "forcing","all",.true.,"none",1 +#"ocean_model","SW","SW", "forcing","all",.true.,"none",1 +#"ocean_model","LW","LW", "forcing","all",.true.,"none",1 +#"ocean_model","LwLatSens","LwLatSens", "forcing","all",.true.,"none",1 +#"ocean_model","salt_flux","salt_flux", "forcing","all",.true.,"none",1 +#"ocean_model","Heat_PmE","Heat_PmE", "forcing","all",.true.,"none",1 +"ocean_model","frazil","frazil", "forcing","all",.true.,"none",1 +#"ocean_model","internal_heat","internal_heat", "forcing","all",.true.,"none",1 +#"ocean_model","heat_added","heat_added", "forcing","all",.true.,"none",1 +## +#"ocean_model","heat_content_cond","heat_content_cond", "forcing","all",.true.,"none",1 +#"ocean_model","heat_content_lprec","heat_content_lprec", "forcing","all",.true.,"none",1 +#"ocean_model","heat_content_fprec","heat_content_fprec", "forcing","all",.true.,"none",1 +#"ocean_model","heat_content_vprec","heat_content_vprec", "forcing","all",.true.,"none",1 +#"ocean_model","heat_content_lrunoff","heat_content_lrunoff", "forcing","all",.true.,"none",1 +#"ocean_model","heat_content_frunoff","heat_content_frunoff", "forcing","all",.true.,"none",1 +#"ocean_model","heat_content_surfwater","heat_content_surfwater","forcing","all",.true.,"none",1 +#"ocean_model","heat_content_massout","heat_content_massout", "forcing","all",.true.,"none",1 +#"ocean_model","heat_content_massin","heat_content_massin", "forcing","all",.true.,"none",1 +## +#"ocean_model","total_prcme","total_prcme", "forcing","all",.true.,"none",2 +#"ocean_model","total_evap","total_evap", "forcing","all",.true.,"none",2 +#"ocean_model","total_lprec","total_lprec", "forcing","all",.true.,"none",2 +#"ocean_model","total_fprec","total_fprec", "forcing","all",.true.,"none",2 +#"ocean_model","total_vprec","total_vprec", "forcing","all",.true.,"none",2 +#"ocean_model","total_precip","total_precip", "forcing","all",.true.,"none",2 +#"ocean_model","total_lrunoff","total_lrunoff", "forcing","all",.true.,"none",2 +#"ocean_model","total_frunoff","total_frunoff", "forcing","all",.true.,"none",2 +#"ocean_model","total_net_massin","total_net_massin" , "forcing","all",.true.,"none",2 +#"ocean_model","total_net_massout","total_net_massout", "forcing","all",.true.,"none",2 +## +#"ocean_model","total_heat_content_frunoff" ,"total_heat_content_frunoff", "forcing","all",.true.,"none",2 +#"ocean_model","total_heat_content_lrunoff" ,"total_heat_content_lrunoff", "forcing","all",.true.,"none",2 +#"ocean_model","total_heat_content_lprec" ,"total_heat_content_lprec", "forcing","all",.true.,"none",2 +#"ocean_model","total_heat_content_fprec" ,"total_heat_content_fprec", "forcing","all",.true.,"none",2 +#"ocean_model","total_heat_content_vprec" ,"total_heat_content_vprec", "forcing","all",.true.,"none",2 +#"ocean_model","total_heat_content_cond" ,"total_heat_content_cond", "forcing","all",.true.,"none",2 +#"ocean_model","total_heat_content_surfwater" ,"total_heat_content_surfwater", "forcing","all",.true.,"none",2 +#"ocean_model","total_heat_content_massin" ,"total_heat_content_massin", "forcing","all",.true.,"none",2 +#"ocean_model","total_heat_content_massout" ,"total_heat_content_massout", "forcing","all",.true.,"none",2 +#"ocean_model","total_net_heat_coupler" ,"total_net_heat_coupler", "forcing","all",.true.,"none",2 +#"ocean_model","total_net_heat_surface" ,"total_net_heat_surface", "forcing","all",.true.,"none",2 +#"ocean_model","total_sw" ,"total_sw", "forcing","all",.true.,"none",2 +#"ocean_model","total_LwLatSens" ,"total_LwLatSens", "forcing","all",.true.,"none",2 +#"ocean_model","total_lw" ,"total_lw", "forcing","all",.true.,"none",2 +#"ocean_model","total_lat" ,"total_lat", "forcing","all",.true.,"none",2 +#"ocean_model","total_lat_evap" ,"total_lat_evap", "forcing","all",.true.,"none",2 +#"ocean_model","total_lat_fprec" ,"total_lat_fprec", "forcing","all",.true.,"none",2 +#"ocean_model","total_lat_frunoff" ,"total_lat_frunoff", "forcing","all",.true.,"none",2 +#"ocean_model","total_sens" ,"total_sens", "forcing","all",.true.,"none",2 +##"ocean_model","total_heat_added" ,"total_heat_added", "forcing","all",.true.,"none",2 +#"ocean_model","total_salt_flux" ,"total_salt_flux", "forcing","all",.true.,"none",2 +#"ocean_model","total_salt_flux_in" ,"total_salt_flux_in", "forcing","all",.true.,"none",2 +##"ocean_model","total_salt_flux_added" ,"total_salt_flux_added", "forcing","all",.true.,"none",2 +## +## +# "ocean_model", "hfgeou", "hfgeou", "cmor2", "all", "none", "none",2 # geothermal heat flux +# "ocean_model", "hfrainds", "hfrainds", "cmor2", "all", "mean", "none",2 +# "ocean_model", "hfevapds", "hfevapds", "cmor2", "all", "mean", "none",2 +# "ocean_model", "hfrunoffds", "hfrunoffds", "cmor2", "all", "mean", "none",2 +# "ocean_model", "hfsnthermds", "hfsnthermds", "cmor2", "all", "mean", "none",2 +# "ocean_model", "hfsifrazil", "hfsifrazil", "cmor2", "all", "mean", "none",2 +##"ocean_model", "hfsithermds", "hfsithermds", "cmor2", "all", "mean", "none",2 # computed in SIS2 +# "ocean_model", "hfibthermds", "hfibthermds", "cmor2", "all", "mean", "none",2 +##"ocean_model", "hfsolidrunoffds", "hfsolidrunoffds", "cmor2", "all", "mean", "none",2 # =0 if ice = 0C +# "ocean_model", "rlntds", "rlntds", "cmor2", "all", "mean", "none",2 +# "ocean_model", "hflso", "hflso", "cmor2", "all", "mean", "none",2 +# "ocean_model", "hfsso", "hfsso", "cmor2", "all", "mean", "none",2 +# "ocean_model", "rsntds", "rsntds" "cmor2", "all", "mean", "none",2 +##"ocean_model", "rsdoabsorb", "rsdoabsorb" "cmor2", "all", "mean", "none",2 +##"ocean_model", "rsdo", "rsdo" "cmor2", "all", "mean", "none",2 +# "ocean_model", "hfds", "hfds" "cmor2", "all", "mean", "none",2 +## +## +## Fields for CMIP6 (CMOR Names): +##======================================= +#"ocean_model","pso","pso" ,"cmor","all",.true.,"none",2 # GFDL Name: p_surf +#"ocean_model","tauuo","tauuo" ,"cmor","all",.true.,"none",2 # surface i-stress +#"ocean_model","tauvo","tauvo" ,"cmor","all",.true.,"none",2 # surface j-stress +#"ocean_model","wfo","wfo" ,"cmor","all",.true.,"none",2 # GFDL Name: PRCmE +#"ocean_model","rsntds","rsntds" ,"cmor","all",.true.,"none",2 # GFDL Name: SW +#"ocean_model","rlntds","rlntds" ,"cmor","all",.true.,"none",2 # GFDL Name: SW +#"ocean_model","hfibthermds","hfibthermds" ,"cmor","all",.true.,"none",2 # GFDL Name: heat_content_frunoff +#"ocean_model","hfrunoffds","hfrunoffds" ,"cmor","all",.true.,"none",2 # GFDL Name: runoff_heat_content +#"ocean_model","hfsifrazil","hfsifrazil" ,"cmor","all",.true.,"none",2 # GFDL Name: frazil +#"ocean_model","evs","evs" ,"cmor","all",.true.,"none",2 # GFDL Name: evap +#"ocean_model","prlq","prlq" ,"cmor","all",.true.,"none",2 # GFDL Name: fprec +#"ocean_model","prsn","prsn" ,"cmor","all",.true.,"none",2 # GFDL Name: fprec +#"ocean_model","hflso","hflso" ,"cmor","all",.true.,"none",2 # GFDL Name: latent +#"ocean_model","friver","friver" ,"cmor","all",.true.,"none",2 # GFDL Name: lrunoff +##"ocean_model","rlds","rlds" ,"cmor","all",.true.,"none",2 # GFDL Name: LW +##"ocean_model","hfss","hfss" ,"cmor","all",.true.,"none",2 # GFDL Name: sensible +#"ocean_model","hfds","hfds" ,"cmor","all",.true.,"none",2 # GFDL Name: net_heat_surface +#"ocean_model","sfdsi","sfdsi" ,"cmor","all",.true.,"none",2 # GFDL Name: salt_flux +#"ocean_model","uo","uo" ,"cmor","all",.true.,"none",2 # GFDL Name: u +#"ocean_model","vo","vo" ,"cmor","all",.true.,"none",2 # GFDL Name: v +#"ocean_model","so","so" ,"cmor","all",.true.,"none",2 # GFDL Name: salinity +#"ocean_model","masscello","masscello" ,"cmor","all",.true.,"none",2 # mass of ocean cells +#"ocean_model","pbo","pbo" ,"cmor","all",.true.,"none",2 # GFDL Name: n/a +#"ocean_model","mlotst","mlotst" ,"cmor","all",.true.,"none",2 # GFDL Name: MLD_003 +#"ocean_model","mlotstsq","mlotstsq" ,"cmor","all",.true.,"none",2 # GFDL Name: n/a +#"ocean_model","zos","zos" ,"cmor","all",.true.,"none",2 # dynamic sealevel +#"ocean_model","zossq","zossq" ,"cmor","all",.true.,"none",2 # squared zos +#"ocean_model","hfgeou","hfgeou" ,"cmor","all",.false.,"none",2 # GFDL name: geo_heat +#"ocean_model","thkcello","thkcello" ,"cmor","all",.true.,"none",2 # GFDL name: h if Bouss +#"ocean_model","opottempmint","opottempmint" ,"cmor","all",.true.,"none",2 # GFDL name: temp_int +#"ocean_model","somint","somint" ,"cmor","all",.true.,"none",2 # GFDL name: salt_int +#"ocean_model","obvfsq","obvfsq" ,"cmor","all",.true.,"none",2 # GFDL name: N2 +#"ocean_model","difvho","difvho" ,"cmor","all",.true.,"none",2 # GFDL name: N2 +#"ocean_model","difvso","difvso" ,"cmor","all",.true.,"none",2 # GFDL name: N2 +#"ocean_model","difmxylo","difmxylo" ,"cmor","all",.true.,"none",2 # GFDL name: N2 +#"ocean_model","difmxybo","difmxybo" ,"cmor","all",.true.,"none",2 # GFDL name: N2 +#"ocean_model","dispkexyfo","dispkexyfo" ,"cmor","all",.true.,"none",2 # GFDL name: N2 +## +## +## Z-Space Fields Provided for CMIP6 (CMOR Names): +##=============================================== +#"ocean_model_z","uo", "uo", "cmor_z","all",.true.,"none",2 #GFDL Name: u_z +#"ocean_model_z","vo", "vo", "cmor_z","all",.true.,"none",2 #GFDL Name: v_z +#"ocean_model_z","so", "so", "cmor_z","all",.true.,"none",2 #GFDL Name: salt_z +#"ocean_model_z","thetao","thetao","cmor_z","all",.true.,"none",2 #GFDL Name: temp_z +#"ocean_model_z","umo", "umo", "cmor_z","all",.true.,"none",2 #GFDL Name: uh_z +#"ocean_model_z","vmo", "vmo", "cmor_z","all",.true.,"none",2 #GFDL Name: vh_z +## +## Scalar ocean fields for CMIP6 (CMOR Names): +##===================== +#"ocean_model", "masso", "masso", "cmor_scalar", "all", .true., "none",2 # global mean masscello +#"ocean_model", "thetaoga", "thetaoga", "cmor_scalar", "all", .true., "none",2 # global mean theta +#"ocean_model", "soga", "soga", "cmor_scalar", "all", .true., "none",2 # global mean saln +#"ocean_model", "tosga", "tosga", "cmor_scalar", "all", .true., "none",2 # area mean SST +#"ocean_model", "sosga", "sosga", "cmor_scalar", "all", .true., "none",2 # area mean SSS +#"ocean_model", "volo", "volo", "cmor_scalar", "all", .true., "none",2 # ocean volume +# +## Scalar fields for run-time monitoring: +##======================================= +#"ocean_model", "masso", "masso", "scalar", "all", .true., "none",2 # global mean masscello +#"ocean_model", "thetaoga", "thetaoga", "scalar", "all", .true., "none",2 # global mean theta +#"ocean_model", "soga", "soga", "scalar", "all", .true., "none",2 # global mean salinity +#"ocean_model", "tosga", "tosga", "scalar", "all", .true., "none",2 # area mean SST +#"ocean_model", "sosga", "sosga", "scalar", "all", .true., "none",2 # area mean SSS +#"ocean_model", "volo", "volo", "scalar", "all", .true., "none",2 # ocean volume +#"ocean_model", "ssh_ga", "ssh_ga", "scalar", "all", .true., "none",2 # global mean ssh +#"ocean_model", "prcme_ga", "prcme_ga", "scalar", "all", .true., "none",2 # global mean prcme +#"ocean_model", "precip_ga", "precip_ga", "scalar", "all", .true., "none",2 # global mean precip +#"ocean_model", "evap_ga", "evap_ga", "scalar", "all", .true., "none",2 # global mean evaporation +#"ocean_model", "net_heat_coupler_ga", "net_heat_coupler_ga", "scalar", "all", .true., "none",2 # global mean net heat coupler +#"ocean_model", "net_heat_surface_ga", "net_heat_surface_ga", "scalar", "all", .true., "none",2 # global mean net heat surface +#"ocean_model", "sens_ga", "sens_ga", "scalar", "all", .true., "none",2 # global mean sensible heat +#"ocean_model", "LwLatSens_ga", "LwLatSens_ga", "scalar", "all", .true., "none",2 # global mean LW + latent + sensible +#"ocean_model", "sw_ga", "sw_ga", "scalar", "all", .true., "none",2 # global mean SW +#"ocean_model", "lw_ga", "lw_ga", "scalar", "all", .true., "none",2 # global mean LW +#"ocean_model", "lat_ga", "lat_ga", "scalar", "all", .true., "none",2 # global mean latent +# +## Static ocean fields: +##===================== +#"ocean_model", "geolon", "geolon", "ocean_static", "all", .false., "none", 1 +#"ocean_model", "geolat", "geolat", "ocean_static", "all", .false., "none", 1 +#"ocean_model", "geolon_c", "geolon_c", "ocean_static", "all", .false., "none", 2 +#"ocean_model", "geolat_c", "geolat_c", "ocean_static", "all", .false., "none", 2 +#"ocean_model", "geolon_u", "geolon_u", "ocean_static", "all", .false., "none", 2 +#"ocean_model", "geolat_u", "geolat_u", "ocean_static", "all", .false., "none", 2 +#"ocean_model", "geolon_v", "geolon_v", "ocean_static", "all", .false., "none", 2 +#"ocean_model", "geolat_v", "geolat_v", "ocean_static", "all", .false., "none", 2 +#"ocean_model", "area_t", "area_t", "ocean_static", "all", .false., "none", 1 +#"ocean_model", "depth_ocean", "depth_ocean", "ocean_static", "all", .false., "none", 2 +#"ocean_model", "wet", "wet", "ocean_static", "all", .false., "none", 1 +#"ocean_model", "wet_c", "wet_c", "ocean_static", "all", .false., "none", 2 +#"ocean_model", "wet_u", "wet_u", "ocean_static", "all", .false., "none", 2 +#"ocean_model", "wet_v", "wet_v", "ocean_static", "all", .false., "none", 2 +#"ocean_model", "Coriolis", "Coriolis", "ocean_static", "all", .false., "none", 2 +#"ocean_model", "dxt", "dxt", "ocean_static", "all", .false., "none", 2 +#"ocean_model", "dyt", "dyt", "ocean_static", "all", .false., "none", 2 +#"ocean_model", "dxCu", "dxCu", "ocean_static", "all", .false., "none", 2 +#"ocean_model", "dyCu", "dyCu", "ocean_static", "all", .false., "none", 2 +#"ocean_model", "dxCv", "dxCv", "ocean_static", "all", .false., "none", 2 +#"ocean_model", "dyCv", "dyCv", "ocean_static", "all", .false., "none", 2 + +# +## Static ocean fields: +##===================== +#"ocean_model", "areacello", "areacello", "ocean_static_cmor", "all", .false., "none", 2 + +#============================================================================================= +# +#====> This file can be used with diag_manager/v2.0a (or higher) <==== +# +# +# FORMATS FOR FILE ENTRIES (not all input values are used) +# ------------------------ +# +#"file_name", output_freq, "output_units", format, "time_units", "time_long_name", ... +# (opt) new_file_frequecy, (opt) "new_file_freq_units", "new_file_start_date" +# +# +#output_freq: > 0 output frequency in "output_units" +# = 0 output frequency every time step +# =-1 output frequency at end of run +# +#output_units = units used for output frequency +# (years, months, days, minutes, hours, seconds) +# +#time_units = units used to label the time axis +# (days, minutes, hours, seconds) +# +# +# FORMAT FOR FIELD ENTRIES (not all input values are used) +# ------------------------ +# +#"module_name", "field_name", "output_name", "file_name" "time_sampling", time_avg, "other_opts", packing +# +#time_avg = .true. or .false. +# +#packing = 1 double precision +# = 2 float +# = 4 packed 16-bit integers +# = 8 packed 1-byte (not tested?) diff --git a/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/72x36/g5aodas_diag_table b/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/72x36/g5aodas_diag_table new file mode 100755 index 000000000..bc2939713 --- /dev/null +++ b/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/72x36/g5aodas_diag_table @@ -0,0 +1,494 @@ +"Global ALE Experiment" +1900 1 1 0 0 0 +#"scalar", 1,"days",1,"days","Time", +#"layer", 1,"days",1,"days","Time", +#"prog", 1,"days",1,"days","Time", +"prog_z", -1,"months",1,"days","Time", +#"ave_prog", 1,"days",1,"days","Time", +#"tracer", 1,"days",1,"days","Time", +#"cont", 1,"days",1,"days","Time", +##"mom", 5,"days",1,"days","Time", +##"bt_mom", 5,"days",1,"days","Time", +#"visc", 1,"days",1,"days","Time", +##"energy", 5,"days",1,"days","Time", +"forcing", -1,"months",1,"days","Time", +#"surface", 1,"months",1,"days","Time", +"sfc_ave", -1,"months",1,"days","Time", +#"ocean_static", -1,"days",1,"days","time", +# +#"cmor", 1,"days",1,"days","Time", +#"cmor2", 1,"days",1,"days","Time", +#"cmor_z", 1,"days",1,"days","Time", +#"cmor_scalar", 1,"days",1,"days","Time", +#"ocean_static_cmor", -1,"days",1,"days","time", +# +##This is the field section of the diag_table. +# +## Layer-Average Diagnostics: +##=========================== +#"ocean_model","temp_layer_ave","temp_layer_ave","layer","all",.true.,"none",2 +#"ocean_model","salt_layer_ave","salt_layer_ave","layer","all",.true.,"none",2 +# +## Prognostic Ocean fields: +##========================= +# +#"ocean_model","u","u","prog","all",.false.,"none",2 +#"ocean_model","v","v","prog","all",.false.,"none",2 +#"ocean_model","h","h","prog","all",.false.,"none",1 +#"ocean_model","e","e","prog","all",.false.,"none",2 +#"ocean_model","temp","temp","prog","all",.false.,"none",2 +#"ocean_model","salt","salt","prog","all",.false.,"none",2 +##"ocean_model","Rml","Rml","prog","all",.false.,"none",2 +# +##"ocean_model","RV","RV","prog","all",.false.,"none",2 +##"ocean_model","PV","PV","prog","all",.false.,"none",2 +##"ocean_model","e_D","e_D","prog","all",.false.,"none",2 +# +#"ocean_model","u","u","ave_prog","all",.true.,"none",2 +#"ocean_model","v","v","ave_prog","all",.true.,"none",2 +#"ocean_model","h","h","ave_prog","all",.true.,"none",1 +#"ocean_model","e","e","ave_prog","all",.true.,"none",2 +##"ocean_model","temp","temp","ave_prog","all",.true.,"none",2 +##"ocean_model","salt","salt","ave_prog","all",.true.,"none",2 +##"ocean_model","Rml","Rml","ave_prog","all",.true.,"none",2 +# +#"ocean_model","mass_wt","mass_wt","surface","all",.false.,"none",1 +#"ocean_model","opottempmint","opottempmint","surface","all",.false.,"none",1 # GFDL name: temp_int +#"ocean_model","somint","somint","surface","all",.false.,"none",1 # GFDL name: salt_int +#"ocean_model","SSH","SSH","surface","all",.false.,"none",2 +#"ocean_model","SST","SST","surface","all",.false.,"none",1 +#"ocean_model","SSS","SSS","surface","all",.false.,"none",2 +#"ocean_model","speed","speed","surface","all",.false.,"none",2 +#"ocean_model","SSU","SSU","surface","all",.false.,"none",2 +#"ocean_model","SSV","SSV","surface","all",.false.,"none",2 +# +"ocean_model","SSH","SSH","sfc_ave","all",.true.,"none",2 +"ocean_model","SST","SST","sfc_ave","all",.true.,"none",2 +"ocean_model","SSS","SSS","sfc_ave","all",.true.,"none",2 +"ocean_model","speed","speed","sfc_ave","all",.true.,"none",2 +"ocean_model","SSU","SSU","sfc_ave","all",.true.,"none",2 +"ocean_model","SSV","SSV","sfc_ave","all",.true.,"none",2 +# +# +## Z-space fields: +##================== +"ocean_model_z","u","u","prog_z","all",.true.,"none",2 +"ocean_model_z","v","v","prog_z","all",.true.,"none",2 +"ocean_model_z","temp","temp","prog_z","all",.true.,"none",2 +"ocean_model_z","temp_xyave","temp_xyave","prog_z","all",.true.,"none",2 +"ocean_model_z","salt","salt","prog_z","all",.true.,"none",2 +"ocean_model_z","thkcello","thkcello","prog_z","all",.true.,"none",2 +# +## Auxilary Tracers: +##================== +##"ocean_model","vintage","vintage","prog","all",.false.,"none",2 +##"ocean_model","agescc","agescc","prog","all",.false.,"none",2 +# +## Continuity Equation Terms: +##=========================== +##"ocean_model","dhdt","dhdt","cont","all",.true.,"none",2 +#"ocean_model","wd","wd","cont","all",.true.,"none",2 +#"ocean_model","uh","uh","cont","all",.true.,"none",2 +#"ocean_model","vh","vh","cont","all",.true.,"none",2 +##"ocean_model","uhGM","uhGM","cont","all",.true.,"none",2 +##"ocean_model","vhGM","vhGM","cont","all",.true.,"none",2 +##"ocean_model","uhbt","uhbt","cont","all",.true.,"none",2 +##"ocean_model","vhbt","vhbt","cont","all",.true.,"none",2 +#"ocean_model","h_rho","h_rho","cont","all",.true.,"none",2 +#"ocean_model","uh_rho","uh_rho","cont","all",.true.,"none",2 +#"ocean_model","vh_rho","vh_rho","cont","all",.true.,"none",2 +#"ocean_model","uhGM_rho","uhGM_rho","cont","all",.true.,"none",2 +#"ocean_model","vhGM_rho","vhGM_rho","cont","all",.true.,"none",2 +#"ocean_model","KHth_u","KHth_u","cont","all",.true.,"none",2 +#"ocean_model","KHth_v","KHth_v","cont","all",.true.,"none",2 +#"ocean_model","diftrblo","diftrblo","cont","all",.true.,"none",2 +#"ocean_model","diftrelo","difteblo","cont","all",.true.,"none",2 +#"ocean_model","KHTR_u","KHTR_u","cont","all",.true.,"none",2 +#"ocean_model","KHTR_v","KHTR_v","cont","all",.true.,"none",2 +#"ocean_model","GMwork","GMwork","cont","all",.true.,"none",2 +#"ocean_model","umo","umo","cont","all",.true.,"none",2 +#"ocean_model","vmo","vmo","cont","all",.true.,"none",2 +#"ocean_model","umo_2d","umo_2d","cont","all",.true.,"none",2 +#"ocean_model","vmo_2d","vmo_2d","cont","all",.true.,"none",2 +# +## Continuity Equation Terms In Pure Potential Density Coordiantes: +##================================================================= +##"ocean_model","h_rho","h_rho","cont","all",.true.,"none",2 +##"ocean_model","uh_rho","uh_rho","cont","all",.true.,"none",2 +##"ocean_model","vh_rho","vh_rho","cont","all",.true.,"none",2 +##"ocean_model","uhGM_rho","uhGM_rho","cont","all",.true.,"none",2 +##"ocean_model","vhGM_rho","vhGM_rho","cont","all",.true.,"none",2 +# +## +## Tracer Fluxes: +##================== +#"ocean_model","T_adx", "T_adx", "tracer","all",.true.,"none",2 +#"ocean_model","T_ady", "T_ady", "tracer","all",.true.,"none",2 +#"ocean_model","T_diffx","T_diffx","tracer","all",.true.,"none",2 +#"ocean_model","T_diffy","T_diffy","tracer","all",.true.,"none",2 +#"ocean_model","S_adx", "S_adx", "tracer","all",.true.,"none",2 +#"ocean_model","S_ady", "S_ady", "tracer","all",.true.,"none",2 +#"ocean_model","S_diffx","S_diffx","tracer","all",.true.,"none",2 +#"ocean_model","S_diffy","S_diffy","tracer","all",.true.,"none",2 +# +## T/S net tendency, lateral advection, and vertical remapping budget terms +##================== +## hfds-hfsifrazil = boundary_forcing_heat_tendency_2d +##"ocean_model","rsdoabsorb" ,"rsdoabsorb", "tracer","all",.true.,"none",2 +##"ocean_model","boundary_forcing_temp_tendency" ,"boundary_forcing_temp_tendency", "tracer","all",.true.,"none",2 +##"ocean_model","boundary_forcing_saln_tendency" ,"boundary_forcing_saln_tendency", "tracer","all",.true.,"none",2 +##"ocean_model","boundary_forcing_heat_tendency" ,"boundary_forcing_heat_tendency", "tracer","all",.true.,"none",2 +##"ocean_model","boundary_forcing_salt_tendency" ,"boundary_forcing_salt_tendency", "tracer","all",.true.,"none",2 +##"ocean_model","boundary_forcing_heat_tendency_2d" ,"boundary_forcing_heat_tendency_2d", "tracer","all",.true.,"none",2 +##"ocean_model","boundary_forcing_salt_tendency_2d" ,"boundary_forcing_salt_tendency_2d", "tracer","all",.true.,"none",2 +# +## opottemptend_2d = T_advection_xy_2d + hfds + hfgeo + opottemppmdiff_2d +## note: Th_tendency_vert_remap_2d = 0 +#"ocean_model","T_tendency" ,"T_tendency", "tracer","all",.true.,"none",2 +#"ocean_model","S_tendency" ,"S_tendency", "tracer","all",.true.,"none",2 +#"ocean_model","opottemptend" ,"opottemptend", "tracer","all",.true.,"none",2 +#"ocean_model","osalttend" ,"osalttend", "tracer","all",.true.,"none",2 +#"ocean_model","opottemptend_2d" ,"opottemptend_2d", "tracer","all",.true.,"none",2 +#"ocean_model","osalttend_2d" ,"osalttend_2d", "tracer","all",.true.,"none",2 +#"ocean_model","T_advection_xy" ,"T_advection_xy", "tracer","all",.true.,"none",2 +#"ocean_model","S_advection_xy" ,"S_advection_xy", "tracer","all",.true.,"none",2 +#"ocean_model","T_advection_xy_2d" ,"T_advection_xy_2d", "tracer","all",.true.,"none",2 +#"ocean_model","S_advection_xy_2d" ,"S_advection_xy_2d", "tracer","all",.true.,"none",2 +##"ocean_model","T_tendency_vert_remap","T_tendency_vert_remap", "tracer","all",.true.,"none",2 +##"ocean_model","S_tendency_vert_remap","S_tendency_vert_remap", "tracer","all",.true.,"none",2 +##"ocean_model","Th_tendency_vert_remap","Th_tendency_vert_remap", "tracer","all",.true.,"none",2 +##"ocean_model","Sh_tendency_vert_remap","Sh_tendency_vert_remap", "tracer","all",.true.,"none",2 +##"ocean_model","Th_tendency_vert_remap_2d","Th_tendency_vert_remap_2d", "tracer","all",.true.,"none",2 +##"ocean_model","Sh_tendency_vert_remap_2d","Sh_tendency_vert_remap_2d", "tracer","all",.true.,"none",2 +#"ocean_model","frazil_heat_tendency","frazil_heat_tendency", "tracer","all",.true.,"none",2 +#"ocean_model","frazil_heat_tendency_2d","frazil_heat_tendency_2d", "tracer","all",.true.,"none",2 +#"ocean_model","frazil_temp_tendency","frazil_temp_tendency", "tracer","all",.true.,"none",2 +# +## neutral diffusion tendencies for T and S +##================== +##"ocean_model","opottemppmdiff","opottemppmdiff", "tracer","all",.true.,"none",2 +##"ocean_model","osaltpmdiff","osaltpmdiff", "tracer","all",.true.,"none",2 +##"ocean_model","opottemppmdiff_2d","opottemppmdiff_2d", "tracer","all",.true.,"none",2 +##"ocean_model","osaltpmdiff_2d","osaltpmdiff_2d", "tracer","all",.true.,"none",2 +##"ocean_model","ndiff_tracer_conc_tendency_T","ndiff_tracer_conc_tendency_T","tracer","all",.true.,"none",2 +##"ocean_model","ndiff_tracer_conc_tendency_S","ndiff_tracer_conc_tendency_S","tracer","all",.true.,"none",2 +# +## diabatic diffusion tendencies for T and S +## note: opottempdiff_2d = 0 +##================== +##"ocean_model","opottempdiff" ,"opottempdiff", "tracer","all",.true.,"none",2 +##"ocean_model","osaltdiff" ,"osaltdiff", "tracer","all",.true.,"none",2 +##"ocean_model","opottempdiff_2d" ,"opottempdiff_2d", "tracer","all",.true.,"none",2 +##"ocean_model","osaltdiff_2d" ,"osaltdiff_2d", "tracer","all",.true.,"none",2 +##"ocean_model","diabatic_diff_temp_tendency","diabatic_diff_temp_tendency","tracer","all",.true.,"none",2 +##"ocean_model","diabatic_diff_saln_tendency","diabatic_diff_saln_tendency","tracer","all",.true.,"none",2 +# +# +# +## Momentum Balance Terms: +##======================= +##"ocean_model","dudt","dudt","mom","all",.true.,"none",2 +##"ocean_model","dvdt","dvdt","mom","all",.true.,"none",2 +##"ocean_model","CAu","CAu","mom","all",.true.,"none",2 +##"ocean_model","CAv","CAv","mom","all",.true.,"none",2 +##"ocean_model","PFu","PFu","mom","all",.true.,"none",2 +##"ocean_model","PFv","PFv","mom","all",.true.,"none",2 +##"ocean_model","du_dt_visc","du_dt_visc","mom","all",.true.,"none",2 +##"ocean_model","dv_dt_visc","dv_dt_visc","mom","all",.true.,"none",2 +##"ocean_model","diffu","diffu","mom","all",.true.,"none",2 +##"ocean_model","diffv","diffv","mom","all",.true.,"none",2 +##"ocean_model","dudt_dia","dudt_dia","mom","all",.true.,"none",2 +##"ocean_model","dvdt_dia","dvdt_dia","mom","all",.true.,"none",2 +## Subterms that should not be added to a closed budget. +##"ocean_model","gKEu","gKEu","mom","all",.true.,"none",2 +##"ocean_model","gKEv","gKEv","mom","all",.true.,"none",2 +##"ocean_model","rvxu","rvxu","mom","all",.true.,"none",2 +##"ocean_model","rvxv","rvxv","mom","all",.true.,"none",2 +##"ocean_model","PFu_bc","PFu_bc","mom","all",.true.,"none",2 +##"ocean_model","PFv_bc","PFv_bc","mom","all",.true.,"none",2 +# +## Barotropic Momentum Balance Terms: +## (only available with split time stepping.) +##=========================================== +##"ocean_model","PFuBT","PFuBT","bt_mom","all",.true.,"none",2 +##"ocean_model","PFvBT","PFvBT","bt_mom","all",.true.,"none",2 +##"ocean_model","CoruBT","CoruBT","bt_mom","all",.true.,"none",2 +##"ocean_model","CorvBT","CorvBT","bt_mom","all",.true.,"none",2 +##"ocean_model","NluBT","NluBT","bt_mom","all",.true.,"none",2 +##"ocean_model","NlvBT","NlvBT","bt_mom","all",.true.,"none",2 +##"ocean_model","ubtforce","ubtforce","bt_mom","all",.true.,"none",2 +##"ocean_model","vbtforce","vbtforce","bt_mom","all",.true.,"none",2 +##"ocean_model","u_accel_bt","u_accel_bt","bt_mom","all",.true.,"none",2 +##"ocean_model","v_accel_bt","v_accel_bt","bt_mom","all",.true.,"none",2 +## +## Viscosities and diffusivities: +##=============================== +#"ocean_model","Kd_interface","Kd_interface","visc","all",.true.,"none",2 +#"ocean_model","Kd_layer","Kd_layer","visc","all",.true.,"none",2 +#"ocean_model","Kd_effective","Kd_effective","visc","all",.true.,"none",2 +#"ocean_model","Kd_itides","Kd_itides","visc","all",.true.,"none",2 +#"ocean_model","Kd_shear","Kd_shear","visc","all",.true.,"none",2 +#"ocean_model","Kd_BBL","Kd_BBL","visc","all",.true.,"none",2 +##"ocean_model","Ahh","Ahh","visc","all",.true.,"none",2 +##"ocean_model","Ahq","Ahq","visc","all",.true.,"none",2 +##"ocean_model","Khh","Khh","visc","all",.true.,"none",2 +##"ocean_model","Khq","Khq","visc","all",.true.,"none",2 +##"ocean_model","bbl_thick_u","bbl_thick_u","visc","all",.true.,"none",2 +##"ocean_model","kv_bbl_u","kv_bbl_u","visc","all",.true.,"none",2 +##"ocean_model","bbl_thick_v","bbl_thick_v","visc","all",.true.,"none",2 +##"ocean_model","kv_bbl_v","kv_bbl_v","visc","all",.true.,"none",2 +##"ocean_model","av_visc","av_visc","visc","all",.true.,"none",2 +##"ocean_model","au_visc","au_visc","visc","all",.true.,"none",2 +##"ocean_model","FrictWork","FrictWork","visc","all",.true.,"none",2 +#"ocean_model","MLD_003","MLD_003","visc","all",.true.,"none",2 +#"ocean_model","subML_N2","subML_N2","visc","all",.true.,"none",2 +#"ocean_model","MEKE","MEKE","visc","all",.true.,"none",2 +#"ocean_model","MEKE_KH","MEKE_KH","visc","all",.true.,"none",2 +#"ocean_model","SN_u","SN_u","visc","all",.true.,"none",2 +# +## +## Kinetic Energy Balance Terms: +##============================= +##"ocean_model","KE","KE","energy","all",.true.,"none",2 +##"ocean_model","dKE_dt","dKE_dt","energy","all",.true.,"none",2 +##"ocean_model","PE_to_KE","PE_to_KE","energy","all",.true.,"none",2 +##"ocean_model","KE_Coradv","KE_Coradv","energy","all",.true.,"none",2 +##"ocean_model","KE_adv","KE_adv","energy","all",.true.,"none",2 +##"ocean_model","KE_visc","KE_visc","energy","all",.true.,"none",2 +##"ocean_model","KE_horvisc","KE_horvisc","energy","all",.true.,"none",2 +##"ocean_model","KE_dia","KE_dia","energy","all",.true.,"none",2 +# +## Surface Forcing: +##================= +#"ocean_model","taux","taux", "forcing","all",.true.,"none",2 +#"ocean_model","tauy","tauy", "forcing","all",.true.,"none",2 +#"ocean_model","ustar","ustar", "forcing","all",.true.,"none",2 +#"ocean_model","p_surf","p_surf", "forcing","all",.true.,"none",2 +## +#"ocean_model","PRCmE","PRCmE", "forcing","all",.true.,"none",1 +#"ocean_model","net_massin","net_massin", "forcing","all",.true.,"none",1 +#"ocean_model","net_massout","net_massout", "forcing","all",.true.,"none",1 +#"ocean_model","lrunoff","lrunoff", "forcing","all",.true.,"none",1 +#"ocean_model","frunoff","frunoff", "forcing","all",.true.,"none",1 +#"ocean_model","lprec","lprec", "forcing","all",.true.,"none",1 +#"ocean_model","fprec","fprec", "forcing","all",.true.,"none",1 +#"ocean_model","vprec","vprec", "forcing","all",.true.,"none",1 +#"ocean_model","evap","evap", "forcing","all",.true.,"none",1 +## +#"ocean_model","net_heat_coupler","net_heat_coupler", "forcing","all",.true.,"none",1 +#"ocean_model","net_heat_surface","net_heat_surface", "forcing","all",.true.,"none",1 +#"ocean_model","SW","SW", "forcing","all",.true.,"none",1 +#"ocean_model","LW","LW", "forcing","all",.true.,"none",1 +#"ocean_model","LwLatSens","LwLatSens", "forcing","all",.true.,"none",1 +#"ocean_model","salt_flux","salt_flux", "forcing","all",.true.,"none",1 +#"ocean_model","Heat_PmE","Heat_PmE", "forcing","all",.true.,"none",1 +"ocean_model","frazil","frazil", "forcing","all",.true.,"none",1 +#"ocean_model","internal_heat","internal_heat", "forcing","all",.true.,"none",1 +#"ocean_model","heat_added","heat_added", "forcing","all",.true.,"none",1 +## +#"ocean_model","heat_content_cond","heat_content_cond", "forcing","all",.true.,"none",1 +#"ocean_model","heat_content_lprec","heat_content_lprec", "forcing","all",.true.,"none",1 +#"ocean_model","heat_content_fprec","heat_content_fprec", "forcing","all",.true.,"none",1 +#"ocean_model","heat_content_vprec","heat_content_vprec", "forcing","all",.true.,"none",1 +#"ocean_model","heat_content_lrunoff","heat_content_lrunoff", "forcing","all",.true.,"none",1 +#"ocean_model","heat_content_frunoff","heat_content_frunoff", "forcing","all",.true.,"none",1 +#"ocean_model","heat_content_surfwater","heat_content_surfwater","forcing","all",.true.,"none",1 +#"ocean_model","heat_content_massout","heat_content_massout", "forcing","all",.true.,"none",1 +#"ocean_model","heat_content_massin","heat_content_massin", "forcing","all",.true.,"none",1 +## +#"ocean_model","total_prcme","total_prcme", "forcing","all",.true.,"none",2 +#"ocean_model","total_evap","total_evap", "forcing","all",.true.,"none",2 +#"ocean_model","total_lprec","total_lprec", "forcing","all",.true.,"none",2 +#"ocean_model","total_fprec","total_fprec", "forcing","all",.true.,"none",2 +#"ocean_model","total_vprec","total_vprec", "forcing","all",.true.,"none",2 +#"ocean_model","total_precip","total_precip", "forcing","all",.true.,"none",2 +#"ocean_model","total_lrunoff","total_lrunoff", "forcing","all",.true.,"none",2 +#"ocean_model","total_frunoff","total_frunoff", "forcing","all",.true.,"none",2 +#"ocean_model","total_net_massin","total_net_massin" , "forcing","all",.true.,"none",2 +#"ocean_model","total_net_massout","total_net_massout", "forcing","all",.true.,"none",2 +## +#"ocean_model","total_heat_content_frunoff" ,"total_heat_content_frunoff", "forcing","all",.true.,"none",2 +#"ocean_model","total_heat_content_lrunoff" ,"total_heat_content_lrunoff", "forcing","all",.true.,"none",2 +#"ocean_model","total_heat_content_lprec" ,"total_heat_content_lprec", "forcing","all",.true.,"none",2 +#"ocean_model","total_heat_content_fprec" ,"total_heat_content_fprec", "forcing","all",.true.,"none",2 +#"ocean_model","total_heat_content_vprec" ,"total_heat_content_vprec", "forcing","all",.true.,"none",2 +#"ocean_model","total_heat_content_cond" ,"total_heat_content_cond", "forcing","all",.true.,"none",2 +#"ocean_model","total_heat_content_surfwater" ,"total_heat_content_surfwater", "forcing","all",.true.,"none",2 +#"ocean_model","total_heat_content_massin" ,"total_heat_content_massin", "forcing","all",.true.,"none",2 +#"ocean_model","total_heat_content_massout" ,"total_heat_content_massout", "forcing","all",.true.,"none",2 +#"ocean_model","total_net_heat_coupler" ,"total_net_heat_coupler", "forcing","all",.true.,"none",2 +#"ocean_model","total_net_heat_surface" ,"total_net_heat_surface", "forcing","all",.true.,"none",2 +#"ocean_model","total_sw" ,"total_sw", "forcing","all",.true.,"none",2 +#"ocean_model","total_LwLatSens" ,"total_LwLatSens", "forcing","all",.true.,"none",2 +#"ocean_model","total_lw" ,"total_lw", "forcing","all",.true.,"none",2 +#"ocean_model","total_lat" ,"total_lat", "forcing","all",.true.,"none",2 +#"ocean_model","total_lat_evap" ,"total_lat_evap", "forcing","all",.true.,"none",2 +#"ocean_model","total_lat_fprec" ,"total_lat_fprec", "forcing","all",.true.,"none",2 +#"ocean_model","total_lat_frunoff" ,"total_lat_frunoff", "forcing","all",.true.,"none",2 +#"ocean_model","total_sens" ,"total_sens", "forcing","all",.true.,"none",2 +##"ocean_model","total_heat_added" ,"total_heat_added", "forcing","all",.true.,"none",2 +#"ocean_model","total_salt_flux" ,"total_salt_flux", "forcing","all",.true.,"none",2 +#"ocean_model","total_salt_flux_in" ,"total_salt_flux_in", "forcing","all",.true.,"none",2 +##"ocean_model","total_salt_flux_added" ,"total_salt_flux_added", "forcing","all",.true.,"none",2 +## +## +# "ocean_model", "hfgeou", "hfgeou", "cmor2", "all", "none", "none",2 # geothermal heat flux +# "ocean_model", "hfrainds", "hfrainds", "cmor2", "all", "mean", "none",2 +# "ocean_model", "hfevapds", "hfevapds", "cmor2", "all", "mean", "none",2 +# "ocean_model", "hfrunoffds", "hfrunoffds", "cmor2", "all", "mean", "none",2 +# "ocean_model", "hfsnthermds", "hfsnthermds", "cmor2", "all", "mean", "none",2 +# "ocean_model", "hfsifrazil", "hfsifrazil", "cmor2", "all", "mean", "none",2 +##"ocean_model", "hfsithermds", "hfsithermds", "cmor2", "all", "mean", "none",2 # computed in SIS2 +# "ocean_model", "hfibthermds", "hfibthermds", "cmor2", "all", "mean", "none",2 +##"ocean_model", "hfsolidrunoffds", "hfsolidrunoffds", "cmor2", "all", "mean", "none",2 # =0 if ice = 0C +# "ocean_model", "rlntds", "rlntds", "cmor2", "all", "mean", "none",2 +# "ocean_model", "hflso", "hflso", "cmor2", "all", "mean", "none",2 +# "ocean_model", "hfsso", "hfsso", "cmor2", "all", "mean", "none",2 +# "ocean_model", "rsntds", "rsntds" "cmor2", "all", "mean", "none",2 +##"ocean_model", "rsdoabsorb", "rsdoabsorb" "cmor2", "all", "mean", "none",2 +##"ocean_model", "rsdo", "rsdo" "cmor2", "all", "mean", "none",2 +# "ocean_model", "hfds", "hfds" "cmor2", "all", "mean", "none",2 +## +## +## Fields for CMIP6 (CMOR Names): +##======================================= +#"ocean_model","pso","pso" ,"cmor","all",.true.,"none",2 # GFDL Name: p_surf +#"ocean_model","tauuo","tauuo" ,"cmor","all",.true.,"none",2 # surface i-stress +#"ocean_model","tauvo","tauvo" ,"cmor","all",.true.,"none",2 # surface j-stress +#"ocean_model","wfo","wfo" ,"cmor","all",.true.,"none",2 # GFDL Name: PRCmE +#"ocean_model","rsntds","rsntds" ,"cmor","all",.true.,"none",2 # GFDL Name: SW +#"ocean_model","rlntds","rlntds" ,"cmor","all",.true.,"none",2 # GFDL Name: SW +#"ocean_model","hfibthermds","hfibthermds" ,"cmor","all",.true.,"none",2 # GFDL Name: heat_content_frunoff +#"ocean_model","hfrunoffds","hfrunoffds" ,"cmor","all",.true.,"none",2 # GFDL Name: runoff_heat_content +#"ocean_model","hfsifrazil","hfsifrazil" ,"cmor","all",.true.,"none",2 # GFDL Name: frazil +#"ocean_model","evs","evs" ,"cmor","all",.true.,"none",2 # GFDL Name: evap +#"ocean_model","prlq","prlq" ,"cmor","all",.true.,"none",2 # GFDL Name: fprec +#"ocean_model","prsn","prsn" ,"cmor","all",.true.,"none",2 # GFDL Name: fprec +#"ocean_model","hflso","hflso" ,"cmor","all",.true.,"none",2 # GFDL Name: latent +#"ocean_model","friver","friver" ,"cmor","all",.true.,"none",2 # GFDL Name: lrunoff +##"ocean_model","rlds","rlds" ,"cmor","all",.true.,"none",2 # GFDL Name: LW +##"ocean_model","hfss","hfss" ,"cmor","all",.true.,"none",2 # GFDL Name: sensible +#"ocean_model","hfds","hfds" ,"cmor","all",.true.,"none",2 # GFDL Name: net_heat_surface +#"ocean_model","sfdsi","sfdsi" ,"cmor","all",.true.,"none",2 # GFDL Name: salt_flux +#"ocean_model","uo","uo" ,"cmor","all",.true.,"none",2 # GFDL Name: u +#"ocean_model","vo","vo" ,"cmor","all",.true.,"none",2 # GFDL Name: v +#"ocean_model","so","so" ,"cmor","all",.true.,"none",2 # GFDL Name: salinity +#"ocean_model","masscello","masscello" ,"cmor","all",.true.,"none",2 # mass of ocean cells +#"ocean_model","pbo","pbo" ,"cmor","all",.true.,"none",2 # GFDL Name: n/a +#"ocean_model","mlotst","mlotst" ,"cmor","all",.true.,"none",2 # GFDL Name: MLD_003 +#"ocean_model","mlotstsq","mlotstsq" ,"cmor","all",.true.,"none",2 # GFDL Name: n/a +#"ocean_model","zos","zos" ,"cmor","all",.true.,"none",2 # dynamic sealevel +#"ocean_model","zossq","zossq" ,"cmor","all",.true.,"none",2 # squared zos +#"ocean_model","hfgeou","hfgeou" ,"cmor","all",.false.,"none",2 # GFDL name: geo_heat +#"ocean_model","thkcello","thkcello" ,"cmor","all",.true.,"none",2 # GFDL name: h if Bouss +#"ocean_model","opottempmint","opottempmint" ,"cmor","all",.true.,"none",2 # GFDL name: temp_int +#"ocean_model","somint","somint" ,"cmor","all",.true.,"none",2 # GFDL name: salt_int +#"ocean_model","obvfsq","obvfsq" ,"cmor","all",.true.,"none",2 # GFDL name: N2 +#"ocean_model","difvho","difvho" ,"cmor","all",.true.,"none",2 # GFDL name: N2 +#"ocean_model","difvso","difvso" ,"cmor","all",.true.,"none",2 # GFDL name: N2 +#"ocean_model","difmxylo","difmxylo" ,"cmor","all",.true.,"none",2 # GFDL name: N2 +#"ocean_model","difmxybo","difmxybo" ,"cmor","all",.true.,"none",2 # GFDL name: N2 +#"ocean_model","dispkexyfo","dispkexyfo" ,"cmor","all",.true.,"none",2 # GFDL name: N2 +## +## +## Z-Space Fields Provided for CMIP6 (CMOR Names): +##=============================================== +#"ocean_model_z","uo", "uo", "cmor_z","all",.true.,"none",2 #GFDL Name: u_z +#"ocean_model_z","vo", "vo", "cmor_z","all",.true.,"none",2 #GFDL Name: v_z +#"ocean_model_z","so", "so", "cmor_z","all",.true.,"none",2 #GFDL Name: salt_z +#"ocean_model_z","thetao","thetao","cmor_z","all",.true.,"none",2 #GFDL Name: temp_z +#"ocean_model_z","umo", "umo", "cmor_z","all",.true.,"none",2 #GFDL Name: uh_z +#"ocean_model_z","vmo", "vmo", "cmor_z","all",.true.,"none",2 #GFDL Name: vh_z +## +## Scalar ocean fields for CMIP6 (CMOR Names): +##===================== +#"ocean_model", "masso", "masso", "cmor_scalar", "all", .true., "none",2 # global mean masscello +#"ocean_model", "thetaoga", "thetaoga", "cmor_scalar", "all", .true., "none",2 # global mean theta +#"ocean_model", "soga", "soga", "cmor_scalar", "all", .true., "none",2 # global mean saln +#"ocean_model", "tosga", "tosga", "cmor_scalar", "all", .true., "none",2 # area mean SST +#"ocean_model", "sosga", "sosga", "cmor_scalar", "all", .true., "none",2 # area mean SSS +#"ocean_model", "volo", "volo", "cmor_scalar", "all", .true., "none",2 # ocean volume +# +## Scalar fields for run-time monitoring: +##======================================= +#"ocean_model", "masso", "masso", "scalar", "all", .true., "none",2 # global mean masscello +#"ocean_model", "thetaoga", "thetaoga", "scalar", "all", .true., "none",2 # global mean theta +#"ocean_model", "soga", "soga", "scalar", "all", .true., "none",2 # global mean salinity +#"ocean_model", "tosga", "tosga", "scalar", "all", .true., "none",2 # area mean SST +#"ocean_model", "sosga", "sosga", "scalar", "all", .true., "none",2 # area mean SSS +#"ocean_model", "volo", "volo", "scalar", "all", .true., "none",2 # ocean volume +#"ocean_model", "ssh_ga", "ssh_ga", "scalar", "all", .true., "none",2 # global mean ssh +#"ocean_model", "prcme_ga", "prcme_ga", "scalar", "all", .true., "none",2 # global mean prcme +#"ocean_model", "precip_ga", "precip_ga", "scalar", "all", .true., "none",2 # global mean precip +#"ocean_model", "evap_ga", "evap_ga", "scalar", "all", .true., "none",2 # global mean evaporation +#"ocean_model", "net_heat_coupler_ga", "net_heat_coupler_ga", "scalar", "all", .true., "none",2 # global mean net heat coupler +#"ocean_model", "net_heat_surface_ga", "net_heat_surface_ga", "scalar", "all", .true., "none",2 # global mean net heat surface +#"ocean_model", "sens_ga", "sens_ga", "scalar", "all", .true., "none",2 # global mean sensible heat +#"ocean_model", "LwLatSens_ga", "LwLatSens_ga", "scalar", "all", .true., "none",2 # global mean LW + latent + sensible +#"ocean_model", "sw_ga", "sw_ga", "scalar", "all", .true., "none",2 # global mean SW +#"ocean_model", "lw_ga", "lw_ga", "scalar", "all", .true., "none",2 # global mean LW +#"ocean_model", "lat_ga", "lat_ga", "scalar", "all", .true., "none",2 # global mean latent +# +## Static ocean fields: +##===================== +#"ocean_model", "geolon", "geolon", "ocean_static", "all", .false., "none", 1 +#"ocean_model", "geolat", "geolat", "ocean_static", "all", .false., "none", 1 +#"ocean_model", "geolon_c", "geolon_c", "ocean_static", "all", .false., "none", 2 +#"ocean_model", "geolat_c", "geolat_c", "ocean_static", "all", .false., "none", 2 +#"ocean_model", "geolon_u", "geolon_u", "ocean_static", "all", .false., "none", 2 +#"ocean_model", "geolat_u", "geolat_u", "ocean_static", "all", .false., "none", 2 +#"ocean_model", "geolon_v", "geolon_v", "ocean_static", "all", .false., "none", 2 +#"ocean_model", "geolat_v", "geolat_v", "ocean_static", "all", .false., "none", 2 +#"ocean_model", "area_t", "area_t", "ocean_static", "all", .false., "none", 1 +#"ocean_model", "depth_ocean", "depth_ocean", "ocean_static", "all", .false., "none", 2 +#"ocean_model", "wet", "wet", "ocean_static", "all", .false., "none", 1 +#"ocean_model", "wet_c", "wet_c", "ocean_static", "all", .false., "none", 2 +#"ocean_model", "wet_u", "wet_u", "ocean_static", "all", .false., "none", 2 +#"ocean_model", "wet_v", "wet_v", "ocean_static", "all", .false., "none", 2 +#"ocean_model", "Coriolis", "Coriolis", "ocean_static", "all", .false., "none", 2 +#"ocean_model", "dxt", "dxt", "ocean_static", "all", .false., "none", 2 +#"ocean_model", "dyt", "dyt", "ocean_static", "all", .false., "none", 2 +#"ocean_model", "dxCu", "dxCu", "ocean_static", "all", .false., "none", 2 +#"ocean_model", "dyCu", "dyCu", "ocean_static", "all", .false., "none", 2 +#"ocean_model", "dxCv", "dxCv", "ocean_static", "all", .false., "none", 2 +#"ocean_model", "dyCv", "dyCv", "ocean_static", "all", .false., "none", 2 + +# +## Static ocean fields: +##===================== +#"ocean_model", "areacello", "areacello", "ocean_static_cmor", "all", .false., "none", 2 + +#============================================================================================= +# +#====> This file can be used with diag_manager/v2.0a (or higher) <==== +# +# +# FORMATS FOR FILE ENTRIES (not all input values are used) +# ------------------------ +# +#"file_name", output_freq, "output_units", format, "time_units", "time_long_name", ... +# (opt) new_file_frequecy, (opt) "new_file_freq_units", "new_file_start_date" +# +# +#output_freq: > 0 output frequency in "output_units" +# = 0 output frequency every time step +# =-1 output frequency at end of run +# +#output_units = units used for output frequency +# (years, months, days, minutes, hours, seconds) +# +#time_units = units used to label the time axis +# (days, minutes, hours, seconds) +# +# +# FORMAT FOR FIELD ENTRIES (not all input values are used) +# ------------------------ +# +#"module_name", "field_name", "output_name", "file_name" "time_sampling", time_avg, "other_opts", packing +# +#time_avg = .true. or .false. +# +#packing = 1 double precision +# = 2 float +# = 4 packed 16-bit integers +# = 8 packed 1-byte (not tested?) diff --git a/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/72x36/g5aodas_input.nml b/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/72x36/g5aodas_input.nml new file mode 100755 index 000000000..3c31f4856 --- /dev/null +++ b/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/72x36/g5aodas_input.nml @@ -0,0 +1,11 @@ + &MOM_input_nml + output_directory = './', + input_filename = 'n' + restart_input_dir = 'INPUT/', + restart_output_dir = 'RESTART/', + parameter_filename = 'MOM_input', + 'MOM_override' / + + &diag_manager_nml + / + diff --git a/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/72x36/input.nml b/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/72x36/input.nml new file mode 100755 index 000000000..3c31f4856 --- /dev/null +++ b/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/72x36/input.nml @@ -0,0 +1,11 @@ + &MOM_input_nml + output_directory = './', + input_filename = 'n' + restart_input_dir = 'INPUT/', + restart_output_dir = 'RESTART/', + parameter_filename = 'MOM_input', + 'MOM_override' / + + &diag_manager_nml + / + diff --git a/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/README b/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/README deleted file mode 100644 index 5b2497682..000000000 --- a/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/README +++ /dev/null @@ -1,3 +0,0 @@ -MOM6 configs - -for whatever comes from GFDL, this file (README) should say where it came from: MOM6_examples location so we know where we got what! diff --git a/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/README.md b/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/README.md new file mode 100644 index 000000000..0d2c29f4a --- /dev/null +++ b/GEOSogcm_GridComp/GEOS_OceanGridComp/MOM6_GEOSPlug/mom6_app/README.md @@ -0,0 +1,3 @@ +## MOM6 configurations + +For whatever comes from NOAA GFDL, this file (README) spells where it came from: [MOM6_examples](https://github.com/NOAA-GFDL/MOM6-examples) location so we know where we got what!