diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ff919a9..b7adb177 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -- Added ntasks-per-node +- Support for CatchmentCNCLM51. +- Added ntasks-per-node ### Changed @@ -21,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Fixed zoom value when there is landice. It will be determined by input tilefile - Fixed Restart=1 when the domain is not global. ### Removed diff --git a/GEOSens_GridComp/GEOS_EnsGridComp.F90 b/GEOSens_GridComp/GEOS_EnsGridComp.F90 index 7dd65533..d2a81253 100644 --- a/GEOSens_GridComp/GEOS_EnsGridComp.F90 +++ b/GEOSens_GridComp/GEOS_EnsGridComp.F90 @@ -1604,6 +1604,24 @@ subroutine SetServices(gc, rc) RC=STATUS ) VERIFY_(STATUS) + call MAPL_AddExportSpec(GC ,& + LONG_NAME = 'CN_total_autotrophic_respiration' ,& + UNITS = 'kg m-2 s-1' ,& + SHORT_NAME = 'CNAR' ,& + DIMS = MAPL_DimsTileOnly ,& + VLOCATION = MAPL_VLocationNone ,& + RC=STATUS ) + VERIFY_(STATUS) + + call MAPL_AddExportSpec(GC ,& + LONG_NAME = 'CN_total_heterotrophic_respiration' ,& + UNITS = 'kg m-2 s-1' ,& + SHORT_NAME = 'CNHR' ,& + DIMS = MAPL_DimsTileOnly ,& + VLOCATION = MAPL_VLocationNone ,& + RC=STATUS ) + VERIFY_(STATUS) + call MAPL_AddExportSpec(GC ,& LONG_NAME = 'CN_net_ecosystem_exchange' ,& UNITS = 'kg m-2 s-1' ,& @@ -2438,28 +2456,30 @@ subroutine Collect_land_ens(gc, import, export, clock, rc) real, dimension(:),pointer :: PEATCLSM_WATERLEVEL,PEATCLSM_WATERLEVEL_enavg real, dimension(:),pointer :: PEATCLSM_FSWCHANGE, PEATCLSM_FSWCHANGE_enavg - real, dimension(:), pointer :: CNLAI, CNLAI_enavg - real, dimension(:), pointer :: CNTLAI, CNTLAI_enavg - real, dimension(:), pointer :: CNSAI, CNSAI_enavg - real, dimension(:), pointer :: CNTOTC, CNTOTC_enavg - real, dimension(:), pointer :: CNVEGC, CNVEGC_enavg - real, dimension(:), pointer :: CNROOT, CNROOT_enavg - real, dimension(:), pointer :: CNFROOTC, CNFROOTC_enavg - real, dimension(:), pointer :: CNNPP, CNNPP_enavg - real, dimension(:), pointer :: CNGPP, CNGPP_enavg - real, dimension(:), pointer :: CNSR, CNSR_enavg - real, dimension(:), pointer :: CNNEE, CNNEE_enavg - real, dimension(:), pointer :: CNXSMR, CNXSMR_enavg - real, dimension(:), pointer :: CNADD, CNADD_enavg - real, dimension(:), pointer :: PARABS, PARABS_enavg - real, dimension(:), pointer :: PARINC, PARINC_enavg - real, dimension(:), pointer :: SCSAT, SCSAT_enavg - real, dimension(:), pointer :: SCUNS, SCUNS_enavg - real, dimension(:), pointer :: BTRANT, BTRANT_enavg - real, dimension(:), pointer :: SIF, SIF_enavg - real, dimension(:), pointer :: CNLOSS, CNLOSS_enavg - real, dimension(:), pointer :: CNBURN, CNBURN_enavg - real, dimension(:), pointer :: CNFSEL, CNFSEL_enavg + real, dimension(:), pointer :: CNLAI, CNLAI_enavg + real, dimension(:), pointer :: CNTLAI, CNTLAI_enavg + real, dimension(:), pointer :: CNSAI, CNSAI_enavg + real, dimension(:), pointer :: CNTOTC, CNTOTC_enavg + real, dimension(:), pointer :: CNVEGC, CNVEGC_enavg + real, dimension(:), pointer :: CNROOT, CNROOT_enavg + real, dimension(:), pointer :: CNFROOTC, CNFROOTC_enavg + real, dimension(:), pointer :: CNNPP, CNNPP_enavg + real, dimension(:), pointer :: CNGPP, CNGPP_enavg + real, dimension(:), pointer :: CNSR, CNSR_enavg + real, dimension(:), pointer :: CNAR, CNAR_enavg + real, dimension(:), pointer :: CNHR, CNHR_enavg + real, dimension(:), pointer :: CNNEE, CNNEE_enavg + real, dimension(:), pointer :: CNXSMR, CNXSMR_enavg + real, dimension(:), pointer :: CNADD, CNADD_enavg + real, dimension(:), pointer :: PARABS, PARABS_enavg + real, dimension(:), pointer :: PARINC, PARINC_enavg + real, dimension(:), pointer :: SCSAT, SCSAT_enavg + real, dimension(:), pointer :: SCUNS, SCUNS_enavg + real, dimension(:), pointer :: BTRANT, BTRANT_enavg + real, dimension(:), pointer :: SIF, SIF_enavg + real, dimension(:), pointer :: CNLOSS, CNLOSS_enavg + real, dimension(:), pointer :: CNBURN, CNBURN_enavg + real, dimension(:), pointer :: CNFSEL, CNFSEL_enavg real :: Nm1, NdivNm1 @@ -2811,28 +2831,30 @@ subroutine Collect_land_ens(gc, import, export, clock, rc) ! CatchCN-specific variables (not available in standard Catch) - call MAPL_GetPointer(import, CNLAI , 'CNLAI' , notFoundOK=.true., _RC) - call MAPL_GetPointer(import, CNTLAI , 'CNTLAI', notFoundOK=.true., _RC) - call MAPL_GetPointer(import, CNSAI , 'CNSAI' , notFoundOK=.true., _RC) - call MAPL_GetPointer(import, CNTOTC , 'CNTOTC', notFoundOK=.true., _RC) - call MAPL_GetPointer(import, CNVEGC , 'CNVEGC', notFoundOK=.true., _RC) - call MAPL_GetPointer(import, CNROOT , 'CNROOT', notFoundOK=.true., _RC) ! CatchCNCLM45 only - call MAPL_GetPointer(import, CNFROOTC , 'CNFROOTC', notFoundOK=.true., _RC) - call MAPL_GetPointer(import, CNNPP , 'CNNPP' , notFoundOK=.true., _RC) - call MAPL_GetPointer(import, CNGPP , 'CNGPP' , notFoundOK=.true., _RC) - call MAPL_GetPointer(import, CNSR , 'CNSR' , notFoundOK=.true., _RC) - call MAPL_GetPointer(import, CNNEE , 'CNNEE' , notFoundOK=.true., _RC) - call MAPL_GetPointer(import, CNXSMR , 'CNXSMR', notFoundOK=.true., _RC) - call MAPL_GetPointer(import, CNADD , 'CNADD' , notFoundOK=.true., _RC) - call MAPL_GetPointer(import, PARABS , 'PARABS', notFoundOK=.true., _RC) - call MAPL_GetPointer(import, PARINC , 'PARINC', notFoundOK=.true., _RC) - call MAPL_GetPointer(import, SCSAT , 'SCSAT' , notFoundOK=.true., _RC) - call MAPL_GetPointer(import, SCUNS , 'SCUNS' , notFoundOK=.true., _RC) - call MAPL_GetPointer(import, BTRANT , 'BTRANT', notFoundOK=.true., _RC) - call MAPL_GetPointer(import, SIF , 'SIF' , notFoundOK=.true., _RC) - call MAPL_GetPointer(import, CNLOSS , 'CNLOSS', notFoundOK=.true., _RC) - call MAPL_GetPointer(import, CNBURN , 'CNBURN', notFoundOK=.true., _RC) - call MAPL_GetPointer(import, CNFSEL , 'CNFSEL', notFoundOK=.true., _RC) + call MAPL_GetPointer(import, CNLAI , 'CNLAI' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, CNTLAI , 'CNTLAI' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, CNSAI , 'CNSAI' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, CNTOTC , 'CNTOTC' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, CNVEGC , 'CNVEGC' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, CNROOT , 'CNROOT' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, CNFROOTC , 'CNFROOTC', notFoundOK=.true., _RC) ! CatchCNCLM51 only + call MAPL_GetPointer(import, CNNPP , 'CNNPP' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, CNGPP , 'CNGPP' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, CNSR , 'CNSR' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, CNAR , 'CNAR' , notFoundOK=.true., _RC) ! CatchCNCLM51 only + call MAPL_GetPointer(import, CNHR , 'CNHR' , notFoundOK=.true., _RC) ! CatchCNCLM51 only + call MAPL_GetPointer(import, CNNEE , 'CNNEE' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, CNXSMR , 'CNXSMR' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, CNADD , 'CNADD' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, PARABS , 'PARABS' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, PARINC , 'PARINC' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, SCSAT , 'SCSAT' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, SCUNS , 'SCUNS' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, BTRANT , 'BTRANT' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, SIF , 'SIF' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, CNLOSS , 'CNLOSS' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, CNBURN , 'CNBURN' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, CNFSEL , 'CNFSEL' , notFoundOK=.true., _RC) @@ -3113,28 +3135,30 @@ subroutine Collect_land_ens(gc, import, export, clock, rc) call MAPL_GetPointer(export, out_lai, 'LAI' , alloc=.true., rc=status) VERIFY_(status) - call MAPL_GetPointer(export, CNLAI_enavg , 'CNLAI' , _RC) - call MAPL_GetPointer(export, CNTLAI_enavg , 'CNTLAI', _RC) - call MAPL_GetPointer(export, CNSAI_enavg , 'CNSAI' , _RC) - call MAPL_GetPointer(export, CNTOTC_enavg , 'CNTOTC', _RC) - call MAPL_GetPointer(export, CNVEGC_enavg , 'CNVEGC', _RC) - call MAPL_GetPointer(export, CNROOT_enavg , 'CNROOT', _RC) - call MAPL_GetPointer(export, CNFROOTC_enavg, 'CNFROOTC', _RC) - call MAPL_GetPointer(export, CNNPP_enavg , 'CNNPP' , _RC) - call MAPL_GetPointer(export, CNGPP_enavg , 'CNGPP' , _RC) - call MAPL_GetPointer(export, CNSR_enavg , 'CNSR' , _RC) - call MAPL_GetPointer(export, CNNEE_enavg , 'CNNEE' , _RC) - call MAPL_GetPointer(export, CNXSMR_enavg , 'CNXSMR', _RC) - call MAPL_GetPointer(export, CNADD_enavg , 'CNADD' , _RC) - call MAPL_GetPointer(export, PARABS_enavg , 'PARABS', _RC) - call MAPL_GetPointer(export, PARINC_enavg , 'PARINC', _RC) - call MAPL_GetPointer(export, SCSAT_enavg , 'SCSAT' , _RC) - call MAPL_GetPointer(export, SCUNS_enavg , 'SCUNS' , _RC) - call MAPL_GetPointer(export, BTRANT_enavg , 'BTRANT', _RC) - call MAPL_GetPointer(export, SIF_enavg , 'SIF' , _RC) - call MAPL_GetPointer(export, CNLOSS_enavg , 'CNLOSS', _RC) - call MAPL_GetPointer(export, CNBURN_enavg , 'CNBURN', _RC) - call MAPL_GetPointer(export, CNFSEL_enavg , 'CNFSEL', _RC) + call MAPL_GetPointer(export, CNLAI_enavg , 'CNLAI' , _RC) + call MAPL_GetPointer(export, CNTLAI_enavg , 'CNTLAI' , _RC) + call MAPL_GetPointer(export, CNSAI_enavg , 'CNSAI' , _RC) + call MAPL_GetPointer(export, CNTOTC_enavg , 'CNTOTC' , _RC) + call MAPL_GetPointer(export, CNVEGC_enavg , 'CNVEGC' , _RC) + call MAPL_GetPointer(export, CNROOT_enavg , 'CNROOT' , _RC) + call MAPL_GetPointer(export, CNFROOTC_enavg , 'CNFROOTC', _RC) + call MAPL_GetPointer(export, CNNPP_enavg , 'CNNPP' , _RC) + call MAPL_GetPointer(export, CNGPP_enavg , 'CNGPP' , _RC) + call MAPL_GetPointer(export, CNSR_enavg , 'CNSR' , _RC) + call MAPL_GetPointer(export, CNAR_enavg , 'CNAR' , _RC) + call MAPL_GetPointer(export, CNHR_enavg , 'CNHR' , _RC) + call MAPL_GetPointer(export, CNNEE_enavg , 'CNNEE' , _RC) + call MAPL_GetPointer(export, CNXSMR_enavg , 'CNXSMR' , _RC) + call MAPL_GetPointer(export, CNADD_enavg , 'CNADD' , _RC) + call MAPL_GetPointer(export, PARABS_enavg , 'PARABS' , _RC) + call MAPL_GetPointer(export, PARINC_enavg , 'PARINC' , _RC) + call MAPL_GetPointer(export, SCSAT_enavg , 'SCSAT' , _RC) + call MAPL_GetPointer(export, SCUNS_enavg , 'SCUNS' , _RC) + call MAPL_GetPointer(export, BTRANT_enavg , 'BTRANT' , _RC) + call MAPL_GetPointer(export, SIF_enavg , 'SIF' , _RC) + call MAPL_GetPointer(export, CNLOSS_enavg , 'CNLOSS' , _RC) + call MAPL_GetPointer(export, CNBURN_enavg , 'CNBURN' , _RC) + call MAPL_GetPointer(export, CNFSEL_enavg , 'CNFSEL' , _RC) out_lai = in_lai if (collect_land_counter == 0) then @@ -3283,12 +3307,14 @@ subroutine Collect_land_ens(gc, import, export, clock, rc) if(associated( CNTOTC_enavg)) CNTOTC_enavg = 0.0 if(associated( CNVEGC_enavg)) CNVEGC_enavg = 0.0 if(associated( CNROOT_enavg)) CNROOT_enavg = 0.0 - if(associated( CNFROOTC_enavg)) CNFROOTC_enavg = 0.0 + if(associated( CNFROOTC_enavg)) CNFROOTC_enavg = 0.0 if(associated( CNNPP_enavg)) CNNPP_enavg = 0.0 if(associated( CNGPP_enavg)) CNGPP_enavg = 0.0 if(associated( CNSR_enavg)) CNSR_enavg = 0.0 + if(associated( CNAR_enavg)) CNAR_enavg = 0.0 + if(associated( CNHR_enavg)) CNHR_enavg = 0.0 if(associated( CNNEE_enavg)) CNNEE_enavg = 0.0 - if(associated( CNXSMR_enavg)) CNXSMR_enavg = 0.0 + if(associated( CNXSMR_enavg)) CNXSMR_enavg = 0.0 if(associated( CNADD_enavg)) CNADD_enavg = 0.0 if(associated( PARABS_enavg)) PARABS_enavg = 0.0 if(associated( PARINC_enavg)) PARINC_enavg = 0.0 @@ -3576,28 +3602,30 @@ subroutine Collect_land_ens(gc, import, export, clock, rc) if(associated(PEATCLSM_FSWCHANGE_enavg) .and. associated(PEATCLSM_FSWCHANGE)) & PEATCLSM_FSWCHANGE_enavg = PEATCLSM_FSWCHANGE_enavg + PEATCLSM_FSWCHANGE - if(associated( CNLAI_enavg) .and. associated( CNLAI)) CNLAI_enavg = CNLAI_enavg + CNLAI - if(associated( CNTLAI_enavg) .and. associated(CNTLAI)) CNTLAI_enavg = CNTLAI_enavg + CNTLAI - if(associated( CNSAI_enavg) .and. associated( CNSAI)) CNSAI_enavg = CNSAI_enavg + CNSAI - if(associated( CNTOTC_enavg) .and. associated(CNTOTC)) CNTOTC_enavg = CNTOTC_enavg + CNTOTC - if(associated( CNVEGC_enavg) .and. associated(CNVEGC)) CNVEGC_enavg = CNVEGC_enavg + CNVEGC - if(associated( CNROOT_enavg) .and. associated(CNROOT)) CNROOT_enavg = CNROOT_enavg + CNROOT - if(associated( CNFROOTC_enavg) .and. associated(CNFROOTC)) CNFROOTC_enavg = CNFROOTC_enavg + CNFROOTC - if(associated( CNNPP_enavg) .and. associated( CNNPP)) CNNPP_enavg = CNNPP_enavg + CNNPP - if(associated( CNGPP_enavg) .and. associated( CNGPP)) CNGPP_enavg = CNGPP_enavg + CNGPP - if(associated( CNSR_enavg) .and. associated( CNSR)) CNSR_enavg = CNSR_enavg + CNSR - if(associated( CNNEE_enavg) .and. associated( CNNEE)) CNNEE_enavg = CNNEE_enavg + CNNEE - if(associated( CNXSMR_enavg).and. associated( CNXSMR))CNXSMR_enavg = CNXSMR_enavg+ CNXSMR - if(associated( CNADD_enavg) .and. associated( CNADD)) CNADD_enavg = CNADD_enavg + CNADD - if(associated( PARABS_enavg) .and. associated(PARABS)) PARABS_enavg = PARABS_enavg + PARABS - if(associated( PARINC_enavg) .and. associated(PARINC)) PARINC_enavg = PARINC_enavg + PARINC - if(associated( SCSAT_enavg) .and. associated( SCSAT)) SCSAT_enavg = SCSAT_enavg + SCSAT - if(associated( SCUNS_enavg) .and. associated( SCUNS)) SCUNS_enavg = SCUNS_enavg + SCUNS - if(associated( BTRANT_enavg) .and. associated(BTRANT)) BTRANT_enavg = BTRANT_enavg + BTRANT - if(associated( SIF_enavg) .and. associated( SIF)) SIF_enavg = SIF_enavg + SIF - if(associated( CNLOSS_enavg) .and. associated(CNLOSS)) CNLOSS_enavg = CNLOSS_enavg + CNLOSS - if(associated( CNBURN_enavg) .and. associated(CNBURN)) CNBURN_enavg = CNBURN_enavg + CNBURN - if(associated( CNFSEL_enavg) .and. associated(CNFSEL)) CNFSEL_enavg = CNFSEL_enavg + CNFSEL + if(associated( CNLAI_enavg) .and. associated( CNLAI)) CNLAI_enavg = CNLAI_enavg + CNLAI + if(associated( CNTLAI_enavg) .and. associated( CNTLAI)) CNTLAI_enavg = CNTLAI_enavg + CNTLAI + if(associated( CNSAI_enavg) .and. associated( CNSAI)) CNSAI_enavg = CNSAI_enavg + CNSAI + if(associated( CNTOTC_enavg) .and. associated( CNTOTC)) CNTOTC_enavg = CNTOTC_enavg + CNTOTC + if(associated( CNVEGC_enavg) .and. associated( CNVEGC)) CNVEGC_enavg = CNVEGC_enavg + CNVEGC + if(associated( CNROOT_enavg) .and. associated( CNROOT)) CNROOT_enavg = CNROOT_enavg + CNROOT + if(associated( CNFROOTC_enavg) .and. associated( CNFROOTC)) CNFROOTC_enavg = CNFROOTC_enavg + CNFROOTC + if(associated( CNNPP_enavg) .and. associated( CNNPP)) CNNPP_enavg = CNNPP_enavg + CNNPP + if(associated( CNGPP_enavg) .and. associated( CNGPP)) CNGPP_enavg = CNGPP_enavg + CNGPP + if(associated( CNSR_enavg) .and. associated( CNSR)) CNSR_enavg = CNSR_enavg + CNSR + if(associated( CNAR_enavg) .and. associated( CNAR)) CNAR_enavg = CNAR_enavg + CNAR + if(associated( CNHR_enavg) .and. associated( CNHR)) CNHR_enavg = CNHR_enavg + CNHR + if(associated( CNNEE_enavg) .and. associated( CNNEE)) CNNEE_enavg = CNNEE_enavg + CNNEE + if(associated( CNXSMR_enavg) .and. associated( CNXSMR)) CNXSMR_enavg = CNXSMR_enavg + CNXSMR + if(associated( CNADD_enavg) .and. associated( CNADD)) CNADD_enavg = CNADD_enavg + CNADD + if(associated( PARABS_enavg) .and. associated( PARABS)) PARABS_enavg = PARABS_enavg + PARABS + if(associated( PARINC_enavg) .and. associated( PARINC)) PARINC_enavg = PARINC_enavg + PARINC + if(associated( SCSAT_enavg) .and. associated( SCSAT)) SCSAT_enavg = SCSAT_enavg + SCSAT + if(associated( SCUNS_enavg) .and. associated( SCUNS)) SCUNS_enavg = SCUNS_enavg + SCUNS + if(associated( BTRANT_enavg) .and. associated( BTRANT)) BTRANT_enavg = BTRANT_enavg + BTRANT + if(associated( SIF_enavg) .and. associated( SIF)) SIF_enavg = SIF_enavg + SIF + if(associated( CNLOSS_enavg) .and. associated( CNLOSS)) CNLOSS_enavg = CNLOSS_enavg + CNLOSS + if(associated( CNBURN_enavg) .and. associated( CNBURN)) CNBURN_enavg = CNBURN_enavg + CNBURN + if(associated( CNFSEL_enavg) .and. associated( CNFSEL)) CNFSEL_enavg = CNFSEL_enavg + CNFSEL ! This counter is relative to ens_id collect_land_counter = collect_land_counter + 1 @@ -3813,28 +3841,30 @@ subroutine Collect_land_ens(gc, import, export, clock, rc) if(associated(PEATCLSM_WATERLEVEL_enavg)) PEATCLSM_WATERLEVEL_enavg = PEATCLSM_WATERLEVEL_enavg/NUM_ENSEMBLE if(associated(PEATCLSM_FSWCHANGE_enavg)) PEATCLSM_FSWCHANGE_enavg = PEATCLSM_FSWCHANGE_enavg /NUM_ENSEMBLE - if(associated( CNLAI_enavg)) CNLAI_enavg = CNLAI_enavg/NUM_ENSEMBLE - if(associated( CNTLAI_enavg)) CNTLAI_enavg = CNTLAI_enavg/NUM_ENSEMBLE - if(associated( CNSAI_enavg)) CNSAI_enavg = CNSAI_enavg/NUM_ENSEMBLE - if(associated( CNTOTC_enavg)) CNTOTC_enavg = CNTOTC_enavg/NUM_ENSEMBLE - if(associated( CNVEGC_enavg)) CNVEGC_enavg = CNVEGC_enavg/NUM_ENSEMBLE - if(associated( CNROOT_enavg)) CNROOT_enavg = CNROOT_enavg/NUM_ENSEMBLE - if(associated( CNFROOTC_enavg)) CNFROOTC_enavg = CNFROOTC_enavg/NUM_ENSEMBLE - if(associated( CNNPP_enavg)) CNNPP_enavg = CNNPP_enavg/NUM_ENSEMBLE - if(associated( CNGPP_enavg)) CNGPP_enavg = CNGPP_enavg/NUM_ENSEMBLE - if(associated( CNSR_enavg)) CNSR_enavg = CNSR_enavg/NUM_ENSEMBLE - if(associated( CNNEE_enavg)) CNNEE_enavg = CNNEE_enavg/NUM_ENSEMBLE - if(associated( CNXSMR_enavg)) CNXSMR_enavg = CNXSMR_enavg/NUM_ENSEMBLE - if(associated( CNADD_enavg)) CNADD_enavg = CNADD_enavg/NUM_ENSEMBLE - if(associated( PARABS_enavg)) PARABS_enavg = PARABS_enavg/NUM_ENSEMBLE - if(associated( PARINC_enavg)) PARINC_enavg = PARINC_enavg/NUM_ENSEMBLE - if(associated( SCSAT_enavg)) SCSAT_enavg = SCSAT_enavg/NUM_ENSEMBLE - if(associated( SCUNS_enavg)) SCUNS_enavg = SCUNS_enavg/NUM_ENSEMBLE - if(associated( BTRANT_enavg)) BTRANT_enavg = BTRANT_enavg/NUM_ENSEMBLE - if(associated( SIF_enavg)) SIF_enavg = SIF_enavg/NUM_ENSEMBLE - if(associated( CNLOSS_enavg)) CNLOSS_enavg = CNLOSS_enavg/NUM_ENSEMBLE - if(associated( CNBURN_enavg)) CNBURN_enavg = CNBURN_enavg/NUM_ENSEMBLE - if(associated( CNFSEL_enavg)) CNFSEL_enavg = CNFSEL_enavg/NUM_ENSEMBLE + if(associated( CNLAI_enavg)) CNLAI_enavg = CNLAI_enavg/NUM_ENSEMBLE + if(associated( CNTLAI_enavg)) CNTLAI_enavg = CNTLAI_enavg/NUM_ENSEMBLE + if(associated( CNSAI_enavg)) CNSAI_enavg = CNSAI_enavg/NUM_ENSEMBLE + if(associated( CNTOTC_enavg)) CNTOTC_enavg = CNTOTC_enavg/NUM_ENSEMBLE + if(associated( CNVEGC_enavg)) CNVEGC_enavg = CNVEGC_enavg/NUM_ENSEMBLE + if(associated( CNROOT_enavg)) CNROOT_enavg = CNROOT_enavg/NUM_ENSEMBLE + if(associated( CNFROOTC_enavg)) CNFROOTC_enavg = CNFROOTC_enavg/NUM_ENSEMBLE + if(associated( CNNPP_enavg)) CNNPP_enavg = CNNPP_enavg/NUM_ENSEMBLE + if(associated( CNGPP_enavg)) CNGPP_enavg = CNGPP_enavg/NUM_ENSEMBLE + if(associated( CNSR_enavg)) CNSR_enavg = CNSR_enavg/NUM_ENSEMBLE + if(associated( CNAR_enavg)) CNAR_enavg = CNAR_enavg/NUM_ENSEMBLE + if(associated( CNHR_enavg)) CNHR_enavg = CNHR_enavg/NUM_ENSEMBLE + if(associated( CNNEE_enavg)) CNNEE_enavg = CNNEE_enavg/NUM_ENSEMBLE + if(associated( CNXSMR_enavg)) CNXSMR_enavg = CNXSMR_enavg/NUM_ENSEMBLE + if(associated( CNADD_enavg)) CNADD_enavg = CNADD_enavg/NUM_ENSEMBLE + if(associated( PARABS_enavg)) PARABS_enavg = PARABS_enavg/NUM_ENSEMBLE + if(associated( PARINC_enavg)) PARINC_enavg = PARINC_enavg/NUM_ENSEMBLE + if(associated( SCSAT_enavg)) SCSAT_enavg = SCSAT_enavg/NUM_ENSEMBLE + if(associated( SCUNS_enavg)) SCUNS_enavg = SCUNS_enavg/NUM_ENSEMBLE + if(associated( BTRANT_enavg)) BTRANT_enavg = BTRANT_enavg/NUM_ENSEMBLE + if(associated( SIF_enavg)) SIF_enavg = SIF_enavg/NUM_ENSEMBLE + if(associated( CNLOSS_enavg)) CNLOSS_enavg = CNLOSS_enavg/NUM_ENSEMBLE + if(associated( CNBURN_enavg)) CNBURN_enavg = CNBURN_enavg/NUM_ENSEMBLE + if(associated( CNFSEL_enavg)) CNFSEL_enavg = CNFSEL_enavg/NUM_ENSEMBLE ! Deal with no-data-values ! diff --git a/GEOSldas_App/GEOSldas_HIST.rc b/GEOSldas_App/GEOSldas_HIST.rc index 37ce4b59..db96cdcb 100644 --- a/GEOSldas_App/GEOSldas_HIST.rc +++ b/GEOSldas_App/GEOSldas_HIST.rc @@ -202,10 +202,12 @@ EASEv2_M36.LM: 1 >>>HIST_CATCHCN<<< 'CNTOTC' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNVEGC' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNROOT' , 'GridComp' , ->>>HIST_CATCHCNCLM45<<< 'CNFROOTC' , 'GridComp' , +>>>HIST_CATCHCNCLM51<<< 'CNFROOTC' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNNPP' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNGPP' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNSR' , 'GridComp' , +>>>HIST_CATCHCNCLM51<<< 'CNAR' , 'GridComp' , +>>>HIST_CATCHCNCLM51<<< 'CNHR' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNNEE' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNXSMR' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNADD' , 'GridComp' , @@ -308,10 +310,12 @@ EASEv2_M36.LM: 1 >>>HIST_CATCHCN<<< 'CNTOTC' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNVEGC' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNROOT' , 'GridComp' , ->>>HIST_CATCHCNCLM45<<< 'CNFROOTC' , 'GridComp' , +>>>HIST_CATCHCNCLM51<<< 'CNFROOTC' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNNPP' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNGPP' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNSR' , 'GridComp' , +>>>HIST_CATCHCNCLM51<<< 'CNAR' , 'GridComp' , +>>>HIST_CATCHCNCLM51<<< 'CNHR' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNNEE' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNXSMR' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNADD' , 'GridComp' , diff --git a/GEOSldas_App/GEOSldas_LDAS.rc b/GEOSldas_App/GEOSldas_LDAS.rc index 8ca6018c..0f1d0430 100644 --- a/GEOSldas_App/GEOSldas_LDAS.rc +++ b/GEOSldas_App/GEOSldas_LDAS.rc @@ -31,8 +31,9 @@ CATCHMENT_SPINUP: 0 # ---- Choice of land surface model (for LAND tiles) # -# 1 : Catchment model (default) +# 1 : Catchment model (default) # 2 : CatchmentCN-CLM4.0 +# 4 : CatchmentCN-CLM5.1 (edit "ntasks-per-node" in batinp file to increase memory unless on EASEv2_M36) # LSM_CHOICE: 1 diff --git a/GEOSldas_App/ldas.py b/GEOSldas_App/ldas.py index e49b395a..689d3a09 100644 --- a/GEOSldas_App/ldas.py +++ b/GEOSldas_App/ldas.py @@ -3,7 +3,6 @@ import os import sys import glob -import linecache import shutil import fileinput import time @@ -222,8 +221,6 @@ def __init__(self, cmdLineArgs): self.catch = 'catch' elif _lsm_choice_int == 2 : self.catch = 'catchcnclm40' - elif _lsm_choice_int == 3 : - self.catch = 'catchcnclm45' elif _lsm_choice_int == 4 : self.catch = 'catchcnclm51' _lsm_choice_int = None @@ -312,18 +309,7 @@ def __init__(self, cmdLineArgs): inpgeom_= None # assigning Gridname if 'GRIDNAME' not in self.ExeInputs : - tmptile = os.path.realpath(self.ExeInputs['TILING_FILE']) - extension = os.path.splitext(tmptile)[1] - if extension == '.domain': - extension = os.path.splitext(tmptile)[0] - gridname_ ='' - if extension == '.til': - gridname_ = linecache.getline(tmptile, 3).strip() - else: - nc_file = netCDF4.Dataset(tmptile,'r') - gridname_ = nc_file.getncattr('Grid_Name') - # in case it is an old name: SMAP-EASEvx-Mxx - gridname_ = gridname_.replace('SMAP-','').replace('-M','_M') + gridname_ = get_gridname(self.ExeInputs['TILING_FILE']) self.ExeInputs['GRIDNAME'] = gridname_ if 'POSTPROC_HIST' not in self.ExeInputs: @@ -374,7 +360,8 @@ def __init__(self, cmdLineArgs): self.in_tilefile =os.path.realpath(in_tilefiles_[0]) if self.with_land: - assert int(self.ExeInputs['LSM_CHOICE']) <= 2, "\nLSM_CHOICE=3 (Catchment-CN4.5) is no longer supported. Please set LSM_CHOICE to 1 (Catchment) or 2 (Catchment-CN4.0)" + assert int(self.ExeInputs['LSM_CHOICE']) <= 2 or int(self.ExeInputs['LSM_CHOICE']) == 4, \ + "\nLSM_CHOICE=3 (Catchment-CN4.5) is no longer supported. Please set LSM_CHOICE to 1 (Catchment), 2 (Catchment-CN4.0), or 4 (Catchment-CN5.1)." if RESTART_str in ['1', '2']: y4m2='Y%4d/M%02d' % (self.begDates[0].year, self.begDates[0].month) y4m2d2_h2m2='%4d%02d%02d_%02d%02d' % (self.begDates[0].year, self.begDates[0].month, @@ -412,12 +399,10 @@ def __init__(self, cmdLineArgs): self.in_rstfile = '/discover/nobackup/projects/gmao/ssd/land/l_data/LandRestarts_for_Regridding' \ '/CatchCN/M36/20150301_0000/catchcnclm40_internal_dummy' self.in_tilefile = '/discover/nobackup/projects/gmao/bcs_shared/legacy_bcs/Heracles-NL/SMAP_EASEv2_M36/SMAP_EASEv2_M36_964x406.til' - elif (self.catch == 'catchcnclm45'): - self.in_rstfile = '/discover/nobackup/projects/gmao/ssd/land/l_data/LandRestarts_for_Regridding' \ - '/CatchCN/M36/19800101_0000/catchcnclm45_internal_dummy' - self.in_tilefile = '/discover/nobackup/projects/gmao/bcs_shared/legacy_bcs/Icarus-NLv3/Icarus-NLv3_EASE/SMAP_EASEv2_M36/SMAP_EASEv2_M36_964x406.til' + elif (self.catch == 'catchcnclm51'): + sys.exit('Error. RESTART=0 not (yet) available for Catchment-CN5.1.\n') else: - sys.exit('need to provide at least dummy files') + sys.exit('Error. Unknown model version.') # DEAL WITH mwRTM input from exec self.assim = True if self.ExeInputs.get('LAND_ASSIM', 'NO').upper() == 'YES' and self.with_land else False @@ -797,6 +782,9 @@ def createLnRstBc(self) : if ("catchcn" in self.catch): os.symlink(self.bcs_dir_landshared + 'CO2_MonthlyMean_DiurnalCycle.nc4', \ self.inpdir+'/CO2_MonthlyMean_DiurnalCycle.nc4') + if (self.catch=="catchcnclm51"): + os.symlink(self.bcs_dir_landshared + 'ctsm51_params.c210923_forCNCLM.nc', \ + self.inpdir+'/ctsm51_params.c210923_forCNCLM.nc') # create and link restart print ("Creating and linking restart...") @@ -867,6 +855,7 @@ def createLnRstBc(self) : config['output']['surface']['wemin'] = wemin_out if RESTART_str == "M" : # restart from merra2 + config['input']['surface']['zoom'] = '2' yyyymm = int(YYYYMMDDHH[0:6]) merra2_expid = "d5124_m2_jan10" if yyyymm < 197901 : @@ -898,7 +887,6 @@ def createLnRstBc(self) : catch_obj.remap() if self.with_landice: config['output']['surface']['remap_water'] = True - config['input']['surface']['zoom'] = '2' landice_obj = lake_landice_saltwater(config_obj = config) landice_obj.remap() @@ -1104,6 +1092,13 @@ def createRCFiles(self): if self.ladas_cpl > 0: # edit resolution info in ensupd nml file sp.run(['sed', '-i', 's//'+self.agcm_res+'/g', self.rundir+'/LDASsa_SPECIAL_inputs_ensupd.nml']) + + #CN_CLM51 nml + if (self.catch=="catchcnclm51"): + cnclm51_nml = glob.glob(etcdir+'/CN_CLM51.nml') + for nmlfile in cnclm51_nml: + shortfile=self.rundir+'/'+nmlfile.split('/')[-1] + shutil.copy2(nmlfile, shortfile) # get optimzed NX and IMS optimized_distribution_file = tempfile.NamedTemporaryFile(delete=False) @@ -1230,6 +1225,8 @@ def createRCFiles(self): ldasrcInp[keyn]= valn if('catchcn' in self.catch): ldasrcInp['CO2_MonthlyMean_DiurnalCycle_FILE']= '../input/CO2_MonthlyMean_DiurnalCycle.nc4' + if (self.catch=="catchcnclm51"): + ldasrcInp['CNCLM51_PARAM_FILE']= '../input/ctsm51_params.c210923_forCNCLM.nc' else: # remove catchcn-specific entries that do not apply to catch model ldasrcInp.pop('DTCN',None) diff --git a/GEOSldas_App/process_hist.csh b/GEOSldas_App/process_hist.csh index 6156e736..22fa9926 100644 --- a/GEOSldas_App/process_hist.csh +++ b/GEOSldas_App/process_hist.csh @@ -40,19 +40,19 @@ sed -i -e s/\'GRIDNAME\'/$GRIDNAME/g $HISTRC if($LSM_CHOICE == 1) then set GridComp = CATCH sed -i '/^>>>HIST_CATCHCN<<>>HIST_CATCHCNCLM45<<>>HIST_CATCHCNCLM51<<>>HIST_CATCHCNCLM45<<>>HIST_CATCHCNCLM51<<>>HIST_CATCHCN<<>>HIST_CATCHCN<<>>HIST_CATCHCNCLM45<<>>HIST_CATCHCNCLM51<<". """ if ladas_cpl == 0 : use_rc_defaults = 'GEOSldas=>' # use defaults for LDAS @@ -267,7 +269,9 @@ def printResourceInputSampleFile(): print ('# IMPORTANT REQUIREMENT: total #writers = writers-per-node * oserver_nodes >= 2;') print ('# jobs will hang when oserver_nodes = writers-per-node = 1.') print ('# - ntasks-per-node = requesting fewer ntasks-per-node than total number of cores per node increases allocated memory;') - print ('# ntasks_model should be a multiple of ntasks-per-node') + print ('# defaults to number of cores per node;') + print ('# ntasks_model should be a multiple of ntasks-per-node;') + print ('# edit ntasks-per-node when running CatchCNCLM51 on resolution other than EASEv2_M36') print ('# - constraint = name of chip set(s) (NCCS default is "[mil|cas]", NAS default is "cas_ait")') print ('#') for key in optionalKeys: @@ -310,3 +314,23 @@ def hours_to_hhmmss(hours): # Format as HHMMSS return f"{hours:02d}{minutes:02d}{seconds:02d}" + +def get_gridname(tilefile): + """ + get name of atmospheric grid from header/attributes of tile file (*.til) + """ + + gridname_ ='' + tmptile = os.path.realpath(tilefile) + extension = os.path.splitext(tmptile)[1] + if extension == '.domain': + extension = os.path.splitext(tmptile)[0] + if extension == '.til': + gridname_ = linecache.getline(tmptile, 3).strip() + else: + nc_file = netCDF4.Dataset(tmptile,'r') + gridname_ = nc_file.getncattr('Grid_Name') + # in case it is an old name: SMAP-EASEvx-Mxx: change to EASEvx_Mxx + gridname_ = gridname_.replace('SMAP-','').replace('-M','_M') + return gridname_ + diff --git a/GEOSldas_App/tile_bin2nc4.F90 b/GEOSldas_App/tile_bin2nc4.F90 index 890bfd82..a79e6490 100644 --- a/GEOSldas_App/tile_bin2nc4.F90 +++ b/GEOSldas_App/tile_bin2nc4.F90 @@ -365,6 +365,8 @@ FUNCTION getAttribute (SHORT_NAME, LNAME, UNT) result (str_atr) case ('CNNPP'); LONG_NAME = 'CN_net_primary_production'; UNITS = 'kg m-2 s-1' case ('CNGPP'); LONG_NAME = 'CN_gross_primary_production'; UNITS = 'kg m-2 s-1' case ('CNSR'); LONG_NAME = 'CN_total_soil_respiration'; UNITS = 'kg m-2 s-1' + case ('CNAR'); LONG_NAME = 'CN_total_autotrophic_respiration'; UNITS = 'kg m-2 s-1' + case ('CNHR'); LONG_NAME = 'CN_total_heterotrophic_respiration'; UNITS = 'kg m-2 s-1' case ('CNNEE'); LONG_NAME = 'CN_net_ecosystem_exchange'; UNITS = 'kg m-2 s-1' case ('CNXSMR'); LONG_NAME = 'abstract_C_pool_to_meet_excess_MR_demand'; UNITS = 'kg m-2' case ('CNADD'); LONG_NAME = 'CN_added_to_maintain_positive_C'; UNITS = 'kg m-2 s-1'