From f5b5a1dfeab179179d9de27f947fe25009e6dee6 Mon Sep 17 00:00:00 2001 From: cenlinhe Date: Thu, 13 Jul 2023 17:10:10 -0600 Subject: [PATCH 01/27] coupling with NoahMP refactor 1 --- .gitmodules | 4 + lis/make/default.cfg | 25 + lis/plugins/LIS_lsm_pluginMod.F90 | 32 + lis/plugins/LIS_lsmcpl_pluginMod.F90 | 16 + lis/plugins/LIS_lsmda_pluginMod.F90 | 521 ++++++ lis/plugins/LIS_lsmirrigation_pluginMod.F90 | 19 + lis/plugins/LIS_lsmoptue_pluginMod.F90 | 30 + lis/plugins/LIS_lsmrouting_pluginMod.F90 | 37 +- lis/plugins/LIS_pluginIndices.F90 | 1 + lis/plugins/LIS_sublsm_pluginMod.F90 | 29 +- .../nuopc_cpl_mode/LIS_NUOPC_DataCopy.F90 | 565 +++++++ .../land/noahmp.new/.NoahMPnew_setup.F90.swp | Bin 0 -> 16384 bytes .../land/noahmp.new/NoahMP401_dynsetup.F90 | 83 + .../land/noahmp.new/NoahMP401_f2t.F90 | 197 +++ .../land/noahmp.new/NoahMP401_finalize.F90 | 70 + .../land/noahmp.new/NoahMP401_main.F90 | 1447 +++++++++++++++++ .../NoahMP401_read_OPT_parameters.F90 | 444 +++++ .../land/noahmp.new/NoahMP401_readrst.F90 | 453 ++++++ .../land/noahmp.new/NoahMP401_reset.F90 | 55 + .../land/noahmp.new/NoahMP401_writerst.F90 | 788 +++++++++ .../land/noahmp.new/NoahMPnew_coldstart.F90 | 480 ++++++ .../land/noahmp.new/NoahMPnew_lsmMod.F90 | 382 +++++ .../land/noahmp.new/NoahMPnew_module.F90 | 532 ++++++ .../land/noahmp.new/NoahMPnew_readcrd.F90 | 600 +++++++ .../land/noahmp.new/NoahMPnew_setup.F90 | 657 ++++++++ .../cpl_wrf_noesmf/noahMP401_setwrfexport.F90 | 125 ++ .../cplsubLSM/noahmp401_getCROCUSexport.F90 | 74 + .../noahmp401_getSnowModelexport.F90 | 75 + .../cplsubLSM/noahmp401_setCROCUSimport.F90 | 61 + .../noahmp401_setSnowModelimport.F90 | 68 + .../noahmp.new/da_LAI/noahmp401_daveg_Mod.F90 | 53 + .../da_LAI/noahmp401_descale_veg.F90 | 46 + .../da_LAI/noahmp401_getLAIpred.F90 | 62 + .../da_LAI/noahmp401_getvegvars.F90 | 63 + .../noahmp.new/da_LAI/noahmp401_qc_LAIobs.F90 | 54 + .../noahmp.new/da_LAI/noahmp401_qcveg.F90 | 169 ++ .../noahmp.new/da_LAI/noahmp401_scale_veg.F90 | 45 + .../da_LAI/noahmp401_setvegvars.F90 | 91 ++ .../da_LAI/noahmp401_updatevegvars.F90 | 148 ++ .../noahmp.new/da_LAI/noahmp401_veg_DAlog.F90 | 25 + .../noahmp.new/da_LAI/noahmp401_write_veg.F90 | 69 + .../da_snodep/noahmp401_dasnodep_Mod.F90 | 49 + .../da_snodep/noahmp401_descale_snodep.F90 | 72 + .../da_snodep/noahmp401_getsnodeppred.F90 | 58 + .../da_snodep/noahmp401_getsnodepvars.F90 | 69 + .../da_snodep/noahmp401_map_snodep.F90 | 135 ++ .../da_snodep/noahmp401_qc_snodepobs.F90 | 105 ++ .../da_snodep/noahmp401_qcsnodep.F90 | 124 ++ .../da_snodep/noahmp401_scale_snodep.F90 | 72 + .../da_snodep/noahmp401_setsnodepvars.F90 | 111 ++ .../da_snodep/noahmp401_snodep_update.F90 | 355 ++++ .../da_snodep/noahmp401_transform_snodep.F90 | 74 + .../da_snodep/noahmp401_updatesnodepvars.F90 | 173 ++ .../da_snow/noahmp401_dasnow_Mod.F90 | 49 + .../da_snow/noahmp401_descale_snow.F90 | 59 + .../da_snow/noahmp401_getsnowpred.F90 | 59 + .../da_snow/noahmp401_getsnowvars.F90 | 72 + .../da_snow/noahmp401_getswepred.F90 | 48 + .../da_snow/noahmp401_qc_snowobs.F90 | 109 ++ .../noahmp.new/da_snow/noahmp401_qcsnow.F90 | 126 ++ .../da_snow/noahmp401_scale_snow.F90 | 58 + .../da_snow/noahmp401_setsnowvars.F90 | 78 + .../da_snow/noahmp401_snow_update.F90 | 348 ++++ .../da_snow/noahmp401_updatesnowvars.F90 | 176 ++ .../da_soilm/noahmp401_dasoilm_Mod.F90 | 118 ++ .../da_soilm/noahmp401_descale_soilm.F90 | 48 + .../da_soilm/noahmp401_getsmpred.F90 | 122 ++ .../da_soilm/noahmp401_getsoilm.F90 | 83 + .../da_soilm/noahmp401_qc_soilmobs.F90 | 279 ++++ .../noahmp.new/da_soilm/noahmp401_qcsoilm.F90 | 80 + .../da_soilm/noahmp401_scale_soilm.F90 | 47 + .../da_soilm/noahmp401_setsoilm.F90 | 515 ++++++ .../da_soilm/noahmp401_updatesoilm.F90 | 119 ++ .../da_soilm/noahmp401_write_soilm.F90 | 71 + .../noahmp.new/da_tws/noahmp401_datws_Mod.F90 | 81 + .../da_tws/noahmp401_descale_tws.F90 | 179 ++ .../noahmp.new/da_tws/noahmp401_gettws.F90 | 103 ++ .../da_tws/noahmp401_gettwspred.F90 | 59 + .../noahmp.new/da_tws/noahmp401_qc_twsobs.F90 | 50 + .../noahmp.new/da_tws/noahmp401_qctws.F90 | 234 +++ .../noahmp.new/da_tws/noahmp401_scale_tws.F90 | 106 ++ .../noahmp.new/da_tws/noahmp401_settws.F90 | 346 ++++ .../da_tws/noahmp401_tws_DAlogMod.F90 | 186 +++ .../noahmp.new/da_tws/noahmp401_updatetws.F90 | 261 +++ .../noahmp.new/da_tws/noahmp401_write_tws.F90 | 75 + .../da_usafsi/noahmpnew_dausafsi_Mod.F90 | 50 + .../da_usafsi/noahmpnew_descale_usafsi.F90 | 75 + .../da_usafsi/noahmpnew_getusafsipred.F90 | 60 + .../da_usafsi/noahmpnew_getusafsivars.F90 | 73 + .../da_usafsi/noahmpnew_map_usafsi.F90 | 137 ++ .../da_usafsi/noahmpnew_qc_usafsiobs.F90 | 108 ++ .../da_usafsi/noahmpnew_qcusafsi.F90 | 127 ++ .../da_usafsi/noahmpnew_scale_usafsi.F90 | 75 + .../da_usafsi/noahmpnew_setusafsivars.F90 | 112 ++ .../da_usafsi/noahmpnew_transform_usafsi.F90 | 52 + .../da_usafsi/noahmpnew_updateusafsivars.F90 | 177 ++ .../da_usafsi/noahmpnew_usafsi_update.F90 | 372 +++++ .../noahmpnew_getirrigationstates.F90 | 517 ++++++ .../noahmp.new/kwm_date_utilities_401.F90 | 822 ++++++++++ .../land/noahmp.new/noahmp_driver_401.F90 | 1149 +++++++++++++ .../land/noahmp.new/pe/NoahMP401_peMod.F90 | 713 ++++++++ .../noahmp.new/pe/NoahMP401_set_pedecvars.F90 | 523 ++++++ .../NoahMP401_getpeobspred_UAsnowobs.F90 | 69 + .../NoahMP401_setupobspred_UAsnowobs.F90 | 62 + lis/surfacemodels/land/noahmp.new/phys/noahmp | 1 + .../routing/noahmp401_getrunoffs.F90 | 149 ++ .../routing/noahmp401_getrunoffs_hymap2.F90 | 132 ++ .../routing/noahmp401_getrunoffs_mm.F90 | 151 ++ .../routing/noahmp401_getrunoffs_rapid.F90 | 89 + .../routing/noahmp401_getsws_hymap2.F90 | 78 + .../land/noahmp.new/wrf_debug.F90 | 17 + 111 files changed, 20324 insertions(+), 2 deletions(-) create mode 100644 .gitmodules create mode 100644 lis/surfacemodels/land/noahmp.new/.NoahMPnew_setup.F90.swp create mode 100644 lis/surfacemodels/land/noahmp.new/NoahMP401_dynsetup.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/NoahMP401_f2t.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/NoahMP401_finalize.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/NoahMP401_main.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/NoahMP401_read_OPT_parameters.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/NoahMP401_readrst.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/NoahMP401_reset.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/NoahMP401_writerst.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/NoahMPnew_coldstart.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/NoahMPnew_lsmMod.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/NoahMPnew_module.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/NoahMPnew_readcrd.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/NoahMPnew_setup.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/cpl_wrf_noesmf/noahMP401_setwrfexport.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmp401_getCROCUSexport.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmp401_getSnowModelexport.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmp401_setCROCUSimport.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmp401_setSnowModelimport.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_daveg_Mod.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_descale_veg.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_getLAIpred.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_getvegvars.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_qc_LAIobs.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_qcveg.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_scale_veg.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_setvegvars.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_updatevegvars.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_veg_DAlog.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_write_veg.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_dasnodep_Mod.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_descale_snodep.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_getsnodeppred.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_getsnodepvars.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_map_snodep.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_qc_snodepobs.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_qcsnodep.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_scale_snodep.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_setsnodepvars.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_snodep_update.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_transform_snodep.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_updatesnodepvars.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_dasnow_Mod.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_descale_snow.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_getsnowpred.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_getsnowvars.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_getswepred.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_qc_snowobs.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_qcsnow.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_scale_snow.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_setsnowvars.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_snow_update.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_updatesnowvars.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_dasoilm_Mod.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_descale_soilm.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_getsmpred.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_getsoilm.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_qc_soilmobs.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_qcsoilm.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_scale_soilm.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_setsoilm.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_updatesoilm.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_write_soilm.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_datws_Mod.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_descale_tws.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_gettws.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_gettwspred.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_qc_twsobs.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_qctws.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_scale_tws.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_settws.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_tws_DAlogMod.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_updatetws.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_write_tws.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_dausafsi_Mod.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_descale_usafsi.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_getusafsipred.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_getusafsivars.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_map_usafsi.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_qc_usafsiobs.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_qcusafsi.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_scale_usafsi.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_setusafsivars.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_transform_usafsi.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_updateusafsivars.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_usafsi_update.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/irrigation/noahmpnew_getirrigationstates.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/kwm_date_utilities_401.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/noahmp_driver_401.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/pe/NoahMP401_peMod.F90 create mode 100755 lis/surfacemodels/land/noahmp.new/pe/NoahMP401_set_pedecvars.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/pe/obspred/UAsnow/NoahMP401_getpeobspred_UAsnowobs.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/pe/obspred/UAsnow/NoahMP401_setupobspred_UAsnowobs.F90 create mode 160000 lis/surfacemodels/land/noahmp.new/phys/noahmp create mode 100644 lis/surfacemodels/land/noahmp.new/routing/noahmp401_getrunoffs.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/routing/noahmp401_getrunoffs_hymap2.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/routing/noahmp401_getrunoffs_mm.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/routing/noahmp401_getrunoffs_rapid.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/routing/noahmp401_getsws_hymap2.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/wrf_debug.F90 diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..925a7c91b --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "lis/surfacemodels/land/noahmp.new/phys/noahmp"] + path = lis/surfacemodels/land/noahmp.new/phys/noahmp + url = https://github.com/cenlinhe/noahmp + branch = release-v5.0-LIS diff --git a/lis/make/default.cfg b/lis/make/default.cfg index e62461e53..4c6582593 100644 --- a/lis/make/default.cfg +++ b/lis/make/default.cfg @@ -1179,6 +1179,31 @@ virtual_optue path: surfacemodels/land/noahmp.4.0.1/pe, virtual_routing path: surfacemodels/land/noahmp.4.0.1/routing virtual_irrigation path: surfacemodels/land/noahmp.4.0.1/irrigation +[NoahMP.New] +enabled: True +macro: SM_NOAHMP_NEW +path: surfacemodels/land/noahmp.new, + surfacemodels/land/noahmp.new/phys/noahmp/drivers/lis, + surfacemodels/land/noahmp.new/phys/noahmp/src, + surfacemodels/land/noahmp.new/phys/noahmp/utility, + surfacemodels/land/noahmp.new/cplsubLSM +dependent_comps: WRF coupling, + virtual_da, + virtual_optue, + virtual_routing, + virtual_irrigation +WRF coupling path: surfacemodels/land/noahmp.new/cpl_wrf_noesmf +virtual_da path: surfacemodels/land/noahmp.new/da_soilm, + surfacemodels/land/noahmp.new/da_snow, + surfacemodels/land/noahmp.new/da_LAI, + surfacemodels/land/noahmp.new/da_tws, + surfacemodels/land/noahmp.new/da_snodep, + surfacemodels/land/noahmp.new/da_usafsi +virtual_optue path: surfacemodels/land/noahmp.new/pe, + surfacemodels/land/noahmp.new/pe/obspred/UAsnow +virtual_routing path: surfacemodels/land/noahmp.new/routing +virtual_irrigation path: surfacemodels/land/noahmp.new/irrigation + [RUC.3.7] enabled: True macro: SM_RUC_3_7 diff --git a/lis/plugins/LIS_lsm_pluginMod.F90 b/lis/plugins/LIS_lsm_pluginMod.F90 index ef2bcea66..cb43447da 100644 --- a/lis/plugins/LIS_lsm_pluginMod.F90 +++ b/lis/plugins/LIS_lsm_pluginMod.F90 @@ -151,6 +151,10 @@ subroutine LIS_lsm_plugin use NoahMP401_lsmMod, only : noahmp401_ini #endif +#if ( defined SM_NOAHMP_NEW ) + use NoahMPnew_lsmMod, only : noahmpnew_ini +#endif + #if ( defined SM_RUC_3_7 ) use RUC37_lsmMod, only : ruc37_ini #endif @@ -381,6 +385,17 @@ subroutine LIS_lsm_plugin external noahmp401_reset #endif +#if ( defined SM_NOAHMP_NEW ) + external noahmpnew_main + external noahmpnew_setup + external noahmpnew_readrst + external noahmpnew_dynsetup + external noahmpnew_f2t + external noahmpnew_writerst + external noahmpnew_finalize + external noahmpnew_reset +#endif + #if ( defined SM_RUC_3_7 ) external ruc37_main external ruc37_setup @@ -714,6 +729,23 @@ subroutine LIS_lsm_plugin call registerlsmreset(trim(LIS_noahmp401Id)//char(0),noahmp401_reset) #endif +#if ( defined SM_NOAHMP_NEW ) + call registerlsminit(trim(LIS_noahmpnewId)//char(0),noahmpnew_ini) + call registerlsmsetup(trim(LIS_noahmpnewId)//char(0),noahmpnew_setup) + call registerlsmf2t(trim(LIS_noahmpnewId)//"+"& + //trim(LIS_retroId)//char(0),noahmpnew_f2t) + call registerlsmf2t(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_agrmetrunId)//char(0),noahmpnew_f2t) + call registerlsmf2t(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_smootherDAId)//char(0),noahmpnew_f2t) + call registerlsmrun(trim(LIS_noahmpnewId)//char(0),noahmpnew_main) + call registerlsmrestart(trim(LIS_noahmpnewId)//char(0),noahmpnew_readrst) + call registerlsmdynsetup(trim(LIS_noahmpnewId)//char(0),noahmpnew_dynsetup) + call registerlsmwrst(trim(LIS_noahmpnewId)//char(0),noahmpnew_writerst) + call registerlsmfinalize(trim(LIS_noahmpnewId)//char(0),noahmpnew_finalize) + call registerlsmreset(trim(LIS_noahmpnewId)//char(0),noahmpnew_reset) +#endif + #if ( defined SM_RUC_3_7 ) call registerlsminit(trim(LIS_ruc37Id)//char(0),ruc37_ini) call registerlsmsetup(trim(LIS_ruc37Id)//char(0),ruc37_setup) diff --git a/lis/plugins/LIS_lsmcpl_pluginMod.F90 b/lis/plugins/LIS_lsmcpl_pluginMod.F90 index b363ad517..f3cf366d0 100644 --- a/lis/plugins/LIS_lsmcpl_pluginMod.F90 +++ b/lis/plugins/LIS_lsmcpl_pluginMod.F90 @@ -109,6 +109,10 @@ subroutine LIS_lsmcpl_plugin external noahMP401_setwrfexport #endif +#if ( defined SM_NOAHMP_NEW ) + external noahmpnew_setwrfexport +#endif + #if 0 !tight coupling interfaces: no ESMF external noah271_wrf_f2t @@ -242,6 +246,18 @@ subroutine LIS_lsmcpl_plugin noahMP401_setwrfexport) #endif +#if ( defined SM_NOAHMP_NEW ) + call registerlsmcplsetexport(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_wrfcplId)//char(0), & + noahmpnew_setwrfexport) + call registerlsmcplsetexport(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_nuopccplId)//char(0), & + noahmpnew_setwrfexport) + call registerlsmcplsetexport(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_retroId)//char(0), & + noahmpnew_setwrfexport) +#endif + #if ( defined SM_NOAH_3_6 ) call registerlsmf2t(trim(LIS_noah36Id)//"+"//& trim(LIS_wrfcplId)//char(0), & diff --git a/lis/plugins/LIS_lsmda_pluginMod.F90 b/lis/plugins/LIS_lsmda_pluginMod.F90 index d7915469e..2649987f3 100644 --- a/lis/plugins/LIS_lsmda_pluginMod.F90 +++ b/lis/plugins/LIS_lsmda_pluginMod.F90 @@ -207,6 +207,15 @@ subroutine LIS_lsmda_plugin use noahmp401_daveg_Mod #endif +#if ( defined SM_NOAHMP_NEW ) + use noahmpnew_dasoilm_Mod + use noahmpnew_dasnow_Mod + use noahmpnew_dasnodep_Mod + use noahmpnew_dausafsi_Mod + use noahmpnew_tws_DAlogMod, only : noahmpnew_tws_DAlog + use noahmpnew_datws_Mod + use noahmpnew_daveg_Mod +#endif #if ( defined SM_CLSM_F2_5 ) use clsmf25_tws_DAlogMod, only : clsmf25_tws_DAlog @@ -537,6 +546,76 @@ subroutine LIS_lsmda_plugin #endif +#if ( defined SM_NOAHMP_NEW ) +! MN NoahMP.New Soil moisture DA + external NoahMPnew_getsoilm + external NoahMPnew_setsoilm + external NoahMPnew_getsmpred + external NoahMPnew_qcsoilm + external NoahMPnew_qc_soilmobs + external NoahMPnew_scale_soilm + external NoahMPnew_descale_soilm + external NoahMPnew_updatesoilm + + external NoahMPnew_getsnowvars + external NoahMPnew_setsnowvars + external NoahMPnew_getsnowpred + external NoahMPnew_getswepred + external NoahMPnew_qcsnow + external NoahMPnew_qc_snowobs + external NoahMPnew_scale_snow + external NoahMPnew_descale_snow + external NoahMPnew_updatesnowvars + + external noahmpnew_getvegvars + external noahmpnew_setvegvars + external noahmpnew_updatevegvars + external noahmpnew_qcveg + external noahmpnew_getLAIpred + external noahmpnew_qc_LAIobs + external noahmpnew_scale_veg + external noahmpnew_descale_veg + external noahmpnew_veg_DAlog + +!BL:NOAHMP.NEW TWS + external noahmpnew_gettws + external noahmpnew_settws + external noahmpnew_qctws + external noahmpnew_gettwspred + external noahmpnew_scale_tws + external noahmpnew_descale_tws + external noahmpnew_updatetws + +#if ( defined DA_OBS_SNODEP ) +! NoahMP-New SNODEP + external noahmpnew_getsnodepvars + external noahmpnew_transform_snodep + external noahmpnew_map_snodep + external noahmpnew_updatesnodepvars + external noahmpnew_qcsnodep + external noahmpnew_setsnodepvars + external noahmpnew_getsnodeppred + external noahmpnew_scale_snodep + external noahmpnew_descale_snodep + external noahmpnew_qc_snodepobs +#endif + +#if ( defined DA_OBS_USAFSI ) +! NoahMP-New_USAFSI + external noahmpnew_getusafsivars + external noahmpnew_transform_usafsi + external noahmpnew_map_usafsi + external noahmpnew_updateusafsivars + external noahmpnew_qcusafsi + external noahmpnew_setusafsivars + external noahmpnew_getusafsipred + external noahmpnew_scale_usafsi + external noahmpnew_descale_usafsi + external noahmpnew_qc_usafsiobs +#endif + +#endif + #if ( defined SM_CLSM_F2_5 ) ! CLSM-F2.5 soil moisture external clsmf25_getsoilm @@ -3072,6 +3151,448 @@ subroutine LIS_lsmda_plugin ! end NoahMP.4.0.1 #endif +#if ( defined SM_NOAHMP_NEW ) +! MN +! Noah-MP.New RT SMOPS ASCAT soil moisture + call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SMOPS_ASCATsmobsId)//char(0),NoahMPnew_dasoilm_init) + call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SMOPS_ASCATsmobsId)//char(0),NoahMPnew_getsoilm) + call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SMOPS_ASCATsmobsId)//char(0),NoahMPnew_setsoilm) + call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SMOPS_ASCATsmobsId)//char(0),NoahMPnew_getsmpred) + call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SMOPS_ASCATsmobsId)//char(0),NoahMPnew_qcsoilm) + call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SMOPS_ASCATsmobsId)//char(0),NoahMPnew_qc_soilmobs) + call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SMOPS_ASCATsmobsId)//char(0),NoahMPnew_scale_soilm) + call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SMOPS_ASCATsmobsId)//char(0),NoahMPnew_descale_soilm) + call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SMOPS_ASCATsmobsId)//char(0),NoahMPnew_updatesoilm) + +! Noah-MP.New SMAP(NRT) soil moisture + call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SMAPNRTsmobsId)//char(0),NoahMPnew_dasoilm_init) + call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SMAPNRTsmobsId)//char(0),NoahMPnew_getsoilm) + call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SMAPNRTsmobsId)//char(0),NoahMPnew_setsoilm) + call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SMAPNRTsmobsId)//char(0),NoahMPnew_getsmpred) + call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SMAPNRTsmobsId)//char(0),NoahMPnew_qcsoilm) + call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SMAPNRTsmobsId)//char(0),NoahMPnew_qc_soilmobs) + call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SMAPNRTsmobsId)//char(0),NoahMPnew_scale_soilm) + call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SMAPNRTsmobsId)//char(0),NoahMPnew_descale_soilm) + call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SMAPNRTsmobsId)//char(0),NoahMPnew_updatesoilm) +!MN +! Noah-MP.New SMAP(NASA) soil moisture + call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_NASASMAPsmobsId )//char(0),NoahMPnew_dasoilm_init) + call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_NASASMAPsmobsId )//char(0),NoahMPnew_getsoilm) + call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_NASASMAPsmobsId )//char(0),NoahMPnew_setsoilm) + call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_NASASMAPsmobsId )//char(0),NoahMPnew_getsmpred) + call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_NASASMAPsmobsId )//char(0),NoahMPnew_qcsoilm) + call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_NASASMAPsmobsId )//char(0),NoahMPnew_qc_soilmobs) + call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_NASASMAPsmobsId )//char(0),NoahMPnew_scale_soilm) + call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_NASASMAPsmobsId )//char(0),NoahMPnew_descale_soilm) + call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_NASASMAPsmobsId )//char(0),NoahMPnew_updatesoilm) + +!YK +! Noah-MP.New SMOS NRT NN soil moisture + call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SMOSNRTNNL2smobsId )//char(0),NoahMPnew_dasoilm_init) + call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SMOSNRTNNL2smobsId )//char(0),NoahMPnew_getsoilm) + call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SMOSNRTNNL2smobsId )//char(0),NoahMPnew_setsoilm) + call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SMOSNRTNNL2smobsId )//char(0),NoahMPnew_getsmpred) + call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SMOSNRTNNL2smobsId )//char(0),NoahMPnew_qcsoilm) + call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SMOSNRTNNL2smobsId )//char(0),NoahMPnew_qc_soilmobs) + call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SMOSNRTNNL2smobsId )//char(0),NoahMPnew_scale_soilm) + call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SMOSNRTNNL2smobsId )//char(0),NoahMPnew_descale_soilm) + call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SMOSNRTNNL2smobsId )//char(0),NoahMPnew_updatesoilm) + +!YK +! Noah-MP.New SMAP E OPL soil moisture + call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SMAPEOPLsmobsId )//char(0),NoahMPnew_dasoilm_init) + call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SMAPEOPLsmobsId )//char(0),NoahMPnew_getsoilm) + call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SMAPEOPLsmobsId )//char(0),NoahMPnew_setsoilm) + call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SMAPEOPLsmobsId )//char(0),NoahMPnew_getsmpred) + call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SMAPEOPLsmobsId )//char(0),NoahMPnew_qcsoilm) + call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SMAPEOPLsmobsId )//char(0),NoahMPnew_qc_soilmobs) + call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SMAPEOPLsmobsId )//char(0),NoahMPnew_scale_soilm) + call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SMAPEOPLsmobsId )//char(0),NoahMPnew_descale_soilm) + call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SMAPEOPLsmobsId )//char(0),NoahMPnew_updatesoilm) + + call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_THySMId)//char(0),NoahMPnew_dasoilm_init) + call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_THySMId)//char(0),NoahMPnew_getsoilm) + call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_THySMId)//char(0),NoahMPnew_setsoilm) + call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_THySMId)//char(0),NoahMPnew_getsmpred) + call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_THySMId)//char(0),NoahMPnew_qcsoilm) + call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_THySMId)//char(0),NoahMPnew_qc_soilmobs) + call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_THySMId)//char(0),NoahMPnew_scale_soilm) + call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_THySMId)//char(0),NoahMPnew_descale_soilm) + call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_THySMId)//char(0),NoahMPnew_updatesoilm) + call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_synsndId)//char(0),noahmpnew_dasnow_init) + call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_synsndId)//char(0),noahmpnew_getsnowvars) + call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_synsndId)//char(0),noahmpnew_setsnowvars) + call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_synsndId)//char(0),noahmpnew_getsnowpred) + call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_synsndId)//char(0),noahmpnew_qcsnow) + call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_synsndId)//char(0),noahmpnew_qc_snowobs) + call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_synsndId)//char(0),noahmpnew_scale_snow) + call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_synsndId)//char(0),noahmpnew_descale_snow) + call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_synsndId)//char(0),noahmpnew_updatesnowvars) + call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_synsndId)//char(0),noahmpnew_qc_snowobs) + +! NoahMP-New ESACCI soil moisture !2022.06.29 Pang + call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_ESACCIsmobsId)//char(0),noahmpnew_dasoilm_init) + call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_ESACCIsmobsId)//char(0),noahmpnew_getsoilm) + call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_ESACCIsmobsId)//char(0),noahmpnew_setsoilm) + call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_ESACCIsmobsId)//char(0),noahmpnew_getsmpred) + call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_ESACCIsmobsId)//char(0),noahmpnew_qcsoilm) + call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_ESACCIsmobsId)//char(0),noahmpnew_qc_soilmobs) + call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_ESACCIsmobsId)//char(0),noahmpnew_scale_soilm) + call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_ESACCIsmobsId)//char(0),noahmpnew_descale_soilm) + call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_ESACCIsmobsId)//char(0),noahmpnew_updatesoilm) + + call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_wusUCLAobsId)//char(0),noahmpnew_dasnow_init) + call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_wusUCLAobsId)//char(0),noahmpnew_getsnowvars) + call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_wusUCLAobsId)//char(0),noahmpnew_setsnowvars) + call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_wusUCLAobsId)//char(0),noahmpnew_getsnowpred) + call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_wusUCLAobsId)//char(0),noahmpnew_qcsnow) + call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_wusUCLAobsId)//char(0),noahmpnew_qc_snowobs) + call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_wusUCLAobsId)//char(0),noahmpnew_scale_snow) + call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_wusUCLAobsId)//char(0),noahmpnew_descale_snow) + call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_wusUCLAobsId)//char(0),noahmpnew_updatesnowvars) + call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_wusUCLAobsId)//char(0),noahmpnew_qc_snowobs) + +!BL:Noahmp.New TWS + call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_GRACEtwsobsId)//char(0),noahmpnew_datws_init) + call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_GRACEtwsobsId)//char(0),noahmpnew_gettws) + call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_GRACEtwsobsId)//char(0),noahmpnew_settws) + call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_GRACEtwsobsId)//char(0),noahmpnew_gettwspred) + call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_GRACEtwsobsId)//char(0),noahmpnew_qctws) + call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_GRACEtwsobsId)//char(0),noahmpnew_scale_tws) + call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_GRACEtwsobsId)//char(0),noahmpnew_descale_tws) + call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_GRACEtwsobsId)//char(0), noahmpnew_updatetws) + call registerlsmdadiagnosevars(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_GRACEtwsobsId)//char(0),noahmpnew_tws_DAlog) + +! Wanshu Nie, LAI DA + call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_GLASSlaiobsId)//char(0),noahmpnew_daveg_init) + call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_GLASSlaiobsId)//char(0),noahmpnew_getvegvars) + call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_GLASSlaiobsId)//char(0),noahmpnew_setvegvars) + call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_GLASSlaiobsId)//char(0),noahmpnew_updatevegvars) + call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_GLASSlaiobsId)//char(0),noahmpnew_qcveg) + + call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_GLASSlaiobsId)//char(0),noahmpnew_getLAIpred) + call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_GLASSlaiobsId)//char(0),noahmpnew_qc_LAIobs) + call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_GLASSlaiobsId)//char(0),noahmpnew_scale_veg) + call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_GLASSlaiobsId)//char(0),noahmpnew_descale_veg) + + call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_MCD15A2HlaiobsId)//char(0),noahmpnew_daveg_init) + call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_MCD15A2HlaiobsId)//char(0),noahmpnew_getvegvars) + call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_MCD15A2HlaiobsId)//char(0),noahmpnew_setvegvars) + call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_MCD15A2HlaiobsId)//char(0),noahmpnew_updatevegvars) + call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_MCD15A2HlaiobsId)//char(0),noahmpnew_qcveg) + + call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_MCD15A2HlaiobsId)//char(0),noahmpnew_getLAIpred) + call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_MCD15A2HlaiobsId)//char(0),noahmpnew_qc_LAIobs) + call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_MCD15A2HlaiobsId)//char(0),noahmpnew_scale_veg) + call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_MCD15A2HlaiobsId)//char(0),noahmpnew_descale_veg) + call registerlsmdadiagnosevars(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_MCD15A2HlaiobsId)//char(0),noahmpnew_veg_DAlog) + +!Y.Kwon + call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_VIIRSgvfobsId)//char(0),noahmpnew_daveg_init) + call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_VIIRSgvfobsId)//char(0),noahmpnew_getvegvars) + call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_VIIRSgvfobsId)//char(0),noahmpnew_setvegvars) + call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_VIIRSgvfobsId)//char(0),noahmpnew_updatevegvars) + call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_VIIRSgvfobsId)//char(0),noahmpnew_qcveg) + + call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_VIIRSgvfobsId)//char(0),noahmpnew_getLAIpred) + call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_VIIRSgvfobsId)//char(0),noahmpnew_qc_LAIobs) + call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_VIIRSgvfobsId)//char(0),noahmpnew_scale_veg) + call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_VIIRSgvfobsId)//char(0),noahmpnew_descale_veg) + call registerlsmdadiagnosevars(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_VIIRSgvfobsId)//char(0),noahmpnew_veg_DAlog) + +!Y.Kwon + call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_CDFSgvfobsId)//char(0),noahmpnew_daveg_init) + call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_CDFSgvfobsId)//char(0),noahmpnew_getvegvars) + call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_CDFSgvfobsId)//char(0),noahmpnew_setvegvars) + call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_CDFSgvfobsId)//char(0),noahmpnew_updatevegvars) + call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_CDFSgvfobsId)//char(0),noahmpnew_qcveg) + + call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_CDFSgvfobsId)//char(0),noahmpnew_getLAIpred) + call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_CDFSgvfobsId)//char(0),noahmpnew_qc_LAIobs) + call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_CDFSgvfobsId)//char(0),noahmpnew_scale_veg) + call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_CDFSgvfobsId)//char(0),noahmpnew_descale_veg) + call registerlsmdadiagnosevars(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_CDFSgvfobsId)//char(0),noahmpnew_veg_DAlog) + +#if ( defined DA_OBS_GCOMW_AMSR2L3SND ) + call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_GCOMW_AMSR2L3sndobsId)//char(0),noahmpnew_dasnow_init) + call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_GCOMW_AMSR2L3sndobsId)//char(0),NoahMPnew_getsnowvars) + call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_GCOMW_AMSR2L3sndobsId)//char(0),NoahMPnew_setsnowvars) + call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_GCOMW_AMSR2L3sndobsId)//char(0),NoahMPnew_getsnowpred) + call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_GCOMW_AMSR2L3sndobsId)//char(0),NoahMPnew_qcsnow) + call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_GCOMW_AMSR2L3sndobsId)//char(0),NoahMPnew_qc_snowobs) + call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_GCOMW_AMSR2L3sndobsId)//char(0),NoahMPnew_scale_snow) + call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_GCOMW_AMSR2L3sndobsId)//char(0),NoahMPnew_descale_snow) + call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_GCOMW_AMSR2L3sndobsId)//char(0),NoahMPnew_updatesnowvars) + call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_GCOMW_AMSR2L3sndobsId)//char(0),NoahMPnew_qc_snowobs) +#endif + +! Yeosang Yoon, SNODEP DA +#if ( defined DA_OBS_SNODEP ) +! DA + snodep wirings + call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_snodepobsId)//char(0),noahmpnew_dasnodep_init) + call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_snodepobsId)//char(0),noahmpnew_getsnodepvars) + call registerlsmdaobstransform(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_snodepobsId)//char(0),noahmpnew_transform_snodep) + call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_snodepobsId)//char(0),noahmpnew_updatesnodepvars) + call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_snodepobsId)//char(0),noahmpnew_setsnodepvars) + call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_snodepobsId)//char(0),noahmpnew_getsnodeppred) + call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_snodepobsId)//char(0),noahmpnew_qcsnodep) + call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_snodepobsId)//char(0),noahmpnew_qc_snodepobs) + call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_snodepobsId)//char(0),noahmpnew_scale_snodep) + call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_snodepobsId)//char(0),noahmpnew_descale_snodep) +#endif + +! Yeosang Yoon, USAFSI DA +#if ( defined DA_OBS_USAFSI ) +! DA + usafsi wirings + call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_usafsiobsId)//char(0),noahmpnew_dausafsi_init) + call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_usafsiobsId)//char(0),noahmpnew_getusafsivars) + call registerlsmdaobstransform(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_usafsiobsId)//char(0),noahmpnew_transform_usafsi) + call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_usafsiobsId)//char(0),noahmpnew_updateusafsivars) + call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_usafsiobsId)//char(0),noahmpnew_setusafsivars) + call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_usafsiobsId)//char(0),noahmpnew_getusafsipred) + call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_usafsiobsId)//char(0),noahmpnew_qcusafsi) + call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_usafsiobsId)//char(0),noahmpnew_qc_usafsiobs) + call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_usafsiobsId)//char(0),noahmpnew_scale_usafsi) + call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_usafsiobsId)//char(0),noahmpnew_descale_usafsi) +#endif + +#if ( defined DA_OBS_ASO_SWE) + call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_ASOsweobsId)//char(0),noahmpnew_dasnow_init) + call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_ASOsweobsId)//char(0),noahmpnew_getsnowvars) + call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_ASOsweobsId)//char(0),noahmpnew_setsnowvars) + call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_ASOsweobsId)//char(0),noahmpnew_getswepred) + call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_ASOsweobsId)//char(0),noahmpnew_qcsnow) + call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_ASOsweobsId)//char(0),noahmpnew_qc_snowobs) + call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_ASOsweobsId)//char(0),noahmpnew_scale_snow) + call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_ASOsweobsId)//char(0),noahmpnew_descale_snow) + call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_ASOsweobsId)//char(0),noahmpnew_updatesnowvars) + call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_ASOsweobsId)//char(0),noahmpnew_qc_snowobs) + +#endif + +! Melissa Wrzesien (MLW) +! NoahMP.New SNODAS snow depth +#if ( defined DA_OBS_SNODAS) + call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SNODASobsId)//char(0),noahmpnew_dasnow_init) + call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SNODASobsId)//char(0),NoahMPnew_getsnowvars) + call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SNODASobsId)//char(0),NoahMPnew_setsnowvars) + call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SNODASobsId)//char(0),NoahMPnew_getsnowpred) + call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SNODASobsId)//char(0),NoahMPnew_qcsnow) + call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SNODASobsId)//char(0),NoahMPnew_qc_snowobs) + call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SNODASobsId)//char(0),NoahMPnew_scale_snow) + call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SNODASobsId)//char(0),NoahMPnew_descale_snow) + call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SNODASobsId)//char(0),NoahMPnew_updatesnowvars) + call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_SNODASobsId)//char(0),NoahMPnew_qc_snowobs) +#endif + +! Melissa Wrzesien (MLW) +! NoahMP.New ANSA snow depth +#if ( defined DA_OBS_ANSA_SNWD) + call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_ANSASNWDsnowobsId)//char(0),noahmpnew_dasnow_init) + call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_ANSASNWDsnowobsId)//char(0),noahmpnew_getsnowvars) + call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_ANSASNWDsnowobsId)//char(0),noahmpnew_setsnowvars) + call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_ANSASNWDsnowobsId)//char(0),noahmpnew_getsnowpred) + call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_ANSASNWDsnowobsId)//char(0),noahmpnew_qcsnow) + call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_ANSASNWDsnowobsId)//char(0),noahmpnew_qc_snowobs) + call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_ANSASNWDsnowobsId)//char(0),noahmpnew_scale_snow) + call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_ANSASNWDsnowobsId)//char(0),noahmpnew_descale_snow) + call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_ANSASNWDsnowobsId)//char(0),noahmpnew_updatesnowvars) + call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_ANSASNWDsnowobsId)//char(0),noahmpnew_qc_snowobs) +#endif + +! end NoahMP.New +#endif #if ( defined SM_CLSM_F2_5 ) ! CLSM-F2.5 synthetic soil moisture diff --git a/lis/plugins/LIS_lsmirrigation_pluginMod.F90 b/lis/plugins/LIS_lsmirrigation_pluginMod.F90 index 09f8e5900..95fb7103e 100644 --- a/lis/plugins/LIS_lsmirrigation_pluginMod.F90 +++ b/lis/plugins/LIS_lsmirrigation_pluginMod.F90 @@ -60,6 +60,10 @@ subroutine LIS_lsmirrigation_plugin external noahmp401_getirrigationstates #endif +#if ( defined SM_NOAHMP_NEW ) + external noahmpnew_getirrigationstates +#endif + #if ( defined IRR_SPRINKLER ) #if ( defined SM_NOAH_3_3 ) call registerlsmirrigationgetstates(trim(LIS_noah33Id)//"+"//& @@ -85,6 +89,11 @@ subroutine LIS_lsmirrigation_plugin call registerlsmirrigationgetstates(trim(LIS_noahmp401Id)//"+"//& trim(LIS_sprinklerIrrigationId)//char(0),NoahMP401_getirrigationstates) #endif + +#if ( defined SM_NOAHMP_NEW ) + call registerlsmirrigationgetstates(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_sprinklerIrrigationId)//char(0),NoahMPnew_getirrigationstates) +#endif #endif #if ( defined IRR_FLOOD ) @@ -112,6 +121,11 @@ subroutine LIS_lsmirrigation_plugin call registerlsmirrigationgetstates(trim(LIS_noahmp401Id)//"+"//& trim(LIS_floodIrrigationId)//char(0),NoahMP401_getirrigationstates) #endif + +#if ( defined SM_NOAHMP_NEW ) + call registerlsmirrigationgetstates(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_floodIrrigationId)//char(0),NoahMPnew_getirrigationstates) +#endif #endif #if ( defined IRR_DRIP ) @@ -144,6 +158,11 @@ subroutine LIS_lsmirrigation_plugin call registerlsmirrigationgetstates(trim(LIS_noahmp401Id)//"+"//& trim(LIS_dripIrrigationId)//char(0),NoahMP401_getirrigationstates) #endif + +#if ( defined SM_NOAHMP_NEW ) + call registerlsmirrigationgetstates(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_dripIrrigationId)//char(0),NoahMPnew_getirrigationstates) +#endif #endif end subroutine LIS_lsmirrigation_plugin diff --git a/lis/plugins/LIS_lsmoptue_pluginMod.F90 b/lis/plugins/LIS_lsmoptue_pluginMod.F90 index 498248ca2..e35bb7553 100644 --- a/lis/plugins/LIS_lsmoptue_pluginMod.F90 +++ b/lis/plugins/LIS_lsmoptue_pluginMod.F90 @@ -76,6 +76,9 @@ subroutine LIS_lsmoptue_plugin #if ( defined SM_NOAHMP_4_0_1 ) use NoahMP401_peMod, only : NoahMP401_setup_pedecvars #endif +#if ( defined SM_NOAHMP_NEW ) + use NoahMPnew_peMod, only : NoahMPnew_setup_pedecvars +#endif ! external noah271_f2t ! external noah271_set_pedecvars @@ -140,6 +143,16 @@ subroutine LIS_lsmoptue_plugin #endif +#if ( defined SM_NOAHMP_NEW) + + external NoahMPnew_f2t + external NoahMPnew_set_pedecvars + + external NoahMPnew_getpeobspred_UAsnowobs + external NoahMPnew_setupobspred_UAsnowobs + +#endif + ! call registerlsmf2t(trim(LIS_noah271Id)//char(0), & ! trim(LIS_paramEstimRunId)//char(0),noah271_f2t) ! call registersetuplsmdecisionspace(trim(LIS_noah271Id)//char(0), & @@ -311,6 +324,23 @@ subroutine LIS_lsmoptue_plugin trim(LIS_UAsnowobsId)//char(0), & NoahMP401_getpeobspred_UAsnowobs) #endif + +#if ( defined SM_NOAHMP_NEW ) + call registerlsmf2t(trim(LIS_noahmpnewId)//"+"// & + trim(LIS_paramEstimRunId)//char(0),NoahMPnew_f2t) + call registerlsmpesetupdecisionspace(trim(LIS_noahmpnewId)//char(0), & + NoahMPnew_setup_pedecvars) + call registerlsmpesetdecisionspace(trim(LIS_noahmpnewId)//char(0), & + NoahMPnew_set_pedecvars) + + call registerlsmpesetupobspred(trim(LIS_noahmpnewId)//"+"// & + trim(LIS_UAsnowobsId)//char(0), & + NoahMPnew_setupobspred_UAsnowobs) + call registerlsmpegetobspred(trim(LIS_noahmpnewId)//"+"// & + trim(LIS_UAsnowobsId)//char(0), & + NoahMPnew_getpeobspred_UAsnowobs) +#endif + #endif end subroutine LIS_lsmoptue_plugin end module LIS_lsmoptue_pluginMod diff --git a/lis/plugins/LIS_lsmrouting_pluginMod.F90 b/lis/plugins/LIS_lsmrouting_pluginMod.F90 index 6ca7c8c30..29dfad6a2 100644 --- a/lis/plugins/LIS_lsmrouting_pluginMod.F90 +++ b/lis/plugins/LIS_lsmrouting_pluginMod.F90 @@ -98,6 +98,14 @@ subroutine LIS_lsmrouting_plugin external noahmp401_getrunoffs_rapid #endif +#if ( defined SM_NOAHMP_NEW ) + external noahmpnew_getrunoffs + external noahmpnew_getrunoffs_mm + external noahmpnew_getrunoffs_hymap2 + external noahmpnew_getsws_hymap2 + external noahmpnew_getrunoffs_rapid +#endif + #if ( defined SM_RUC_3_7 ) external ruc37_getrunoffs external ruc37_getrunoffs_mm @@ -188,6 +196,12 @@ subroutine LIS_lsmrouting_plugin noahmp401_getrunoffs_mm) #endif +#if ( defined SM_NOAHMP_NEW ) + call registerlsmroutinggetrunoff(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_HYMAProuterId)//char(0), & + noahmpnew_getrunoffs_mm) +#endif + #if ( defined SM_RUC_3_7 ) call registerlsmroutinggetrunoff(trim(LIS_ruc37Id)//"+"//& trim(LIS_HYMAProuterId)//char(0), & @@ -287,6 +301,15 @@ subroutine LIS_lsmrouting_plugin noahmp401_getsws_hymap2) #endif +#if ( defined SM_NOAHMP_NEW ) + call registerlsmroutinggetrunoff(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_HYMAP2routerId)//char(0), & + noahmpnew_getrunoffs_hymap2) + call registerlsmroutinggetsws(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_HYMAP2routerId)//char(0), & + noahmpnew_getsws_hymap2) +#endif + #if ( defined SM_RUC_3_7 ) call registerlsmroutinggetrunoff(trim(LIS_ruc37Id)//"+"//& trim(LIS_HYMAP2routerId)//char(0), & @@ -351,7 +374,13 @@ subroutine LIS_lsmrouting_plugin trim(LIS_NLDASrouterId)//char(0), & noahmp401_getrunoffs) #endif - + +#if ( defined SM_NOAHMP_NEW ) + call registerlsmroutinggetrunoff(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_NLDASrouterId)//char(0), & + noahmpnew_getrunoffs) +#endif + #if ( defined SM_RUC_3_7 ) call registerlsmroutinggetrunoff(trim(LIS_ruc37Id)//"+"//& trim(LIS_NLDASrouterId)//char(0), & @@ -390,6 +419,12 @@ subroutine LIS_lsmrouting_plugin noahmp401_getrunoffs_rapid) #endif +#if ( defined SM_NOAHMP_NEW ) + call registerlsmroutinggetrunoff(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_RAPIDrouterId)//char(0), & + noahmpnew_getrunoffs_rapid) +#endif + #if ( defined SM_JULES_5_0 ) call registerlsmroutinggetrunoff(trim(LIS_jules50Id)//"+"//& trim(LIS_RAPIDrouterId)//char(0), & diff --git a/lis/plugins/LIS_pluginIndices.F90 b/lis/plugins/LIS_pluginIndices.F90 index 8f9d57b15..efefe016f 100644 --- a/lis/plugins/LIS_pluginIndices.F90 +++ b/lis/plugins/LIS_pluginIndices.F90 @@ -70,6 +70,7 @@ module LIS_pluginIndices character*50, public, parameter :: LIS_noah39Id = "Noah.3.9" character*50, public, parameter :: LIS_noahmp36Id = "NoahMP.3.6" character*50, public, parameter :: LIS_noahmp401Id = "Noah-MP.4.0.1" + character*50, public, parameter :: LIS_noahmpnewId = "Noah-MP.New" character*50, public, parameter :: LIS_ruc37Id = "RUC.3.7" character*50, public, parameter :: LIS_clm2Id = "CLM.2" character*50, public, parameter :: LIS_vic411Id = "VIC.4.1.1" diff --git a/lis/plugins/LIS_sublsm_pluginMod.F90 b/lis/plugins/LIS_sublsm_pluginMod.F90 index 3b3cbc2cc..f22cf3b35 100644 --- a/lis/plugins/LIS_sublsm_pluginMod.F90 +++ b/lis/plugins/LIS_sublsm_pluginMod.F90 @@ -154,6 +154,11 @@ subroutine LIS_sublsm_plugin external NoahMP401_setCROCUSimport #endif +#if ( defined SM_NOAHMP_NEW ) + external NoahMPnew_getCROCUSexport + external NoahMPnew_setCROCUSimport +#endif + #if ( defined SM_NOAH_3_9 ) external Noah39_getCROCUSexport external Noah39_setCROCUSimport @@ -179,6 +184,11 @@ subroutine LIS_sublsm_plugin external NoahMP401_setSnowModelimport #endif +#if ( defined SM_NOAHMP_NEW ) + external NoahMPnew_getSnowModelexport + external NoahMPnew_setSnowModelimport +#endif + #endif #if ( defined SM_Crocus_8_1 ) @@ -207,6 +217,15 @@ subroutine LIS_sublsm_plugin trim(LIS_Crocus81Id)//char(0),Crocus81_getLSMexport) #endif +#if ( defined SM_NOAHMP_NEW ) + call registerlsm2sublsmgetexport(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_Crocus81Id)//char(0),NoahMPnew_getCROCUSexport) + call registerlsmsetsublsmimport(trim(LIS_noahmpnewId)//char(0),& + NoahMPnew_setCROCUSimport) + call registersublsm2lsmgetexport(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_Crocus81Id)//char(0),Crocus81_getLSMexport) +#endif + #if ( defined SM_NOAH_3_9 ) call registerlsm2sublsmgetexport(trim(LIS_noah39Id)//"+"//& trim(LIS_Crocus81Id)//char(0),Noah39_getCROCUSexport) @@ -216,7 +235,6 @@ subroutine LIS_sublsm_plugin trim(LIS_Crocus81Id)//char(0),Crocus81_getLSMexport) #endif - #endif @@ -246,6 +264,15 @@ subroutine LIS_sublsm_plugin call registersublsm2lsmgetexport(trim(LIS_noahmp401Id)//"+"//& trim(LIS_snowmodelId)//char(0),SnowModel_getLSMexport) #endif + +#if ( defined SM_NOAHMP_NEW ) + call registerlsm2sublsmgetexport(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_snowmodelId)//char(0),NoahMPnew_getSnowModelexport) + call registerlsmsetsublsmimport(trim(LIS_noahmpnewId)//char(0),& + NoahMPnew_setSnowModelimport) + call registersublsm2lsmgetexport(trim(LIS_noahmpnewId)//"+"//& + trim(LIS_snowmodelId)//char(0),SnowModel_getLSMexport) +#endif #endif end subroutine LIS_sublsm_plugin diff --git a/lis/runmodes/nuopc_cpl_mode/LIS_NUOPC_DataCopy.F90 b/lis/runmodes/nuopc_cpl_mode/LIS_NUOPC_DataCopy.F90 index 6392a3085..77f131184 100644 --- a/lis/runmodes/nuopc_cpl_mode/LIS_NUOPC_DataCopy.F90 +++ b/lis/runmodes/nuopc_cpl_mode/LIS_NUOPC_DataCopy.F90 @@ -31,6 +31,7 @@ module LIS_NUOPC_DataCopy use noah33_lsmMod use NoahMP36_lsmMod use NoahMP401_lsmMod + use NoahMPnew_lsmMod IMPLICIT NONE @@ -42,6 +43,7 @@ module LIS_NUOPC_DataCopy public :: LIS_CopyToNoah_3_3 public :: LIS_CopyToNoahMP_3_6 public :: LIS_CopyToNoahMP_4_0_1 + public :: LIS_CopyToNoahMP_New public :: LIS_CopyFromLIS !----------------------------------------------------------------------------- @@ -92,6 +94,15 @@ module LIS_NUOPC_DataCopy module procedure LIS_EnsFarrayR8CopyToNoahMP_4_0_1 end interface + interface LIS_CopyToNoahMP_New + module procedure LIS_FieldCopyToNoahMP_New + module procedure LIS_ArrayCopyToNoahMP_New + module procedure LIS_FarrayR8CopyToNoahMP_New + module procedure LIS_FarrayR4CopyToNoahMP_New + module procedure LIS_EnsFarrayR4CopyToNoahMP_New + module procedure LIS_EnsFarrayR8CopyToNoahMP_New + end interface + interface LIS_CopyFromLIS module procedure LIS_FieldCopyFromLisField module procedure LIS_FieldCopyFromLisFarray @@ -231,6 +242,28 @@ subroutine LIS_FieldCopyToNoahMP_4_0_1(field,stdName,nest,rc) !----------------------------------------------------------------------------- +#undef METHOD +#define METHOD "LIS_FieldCopyToNoahMP_New" + + subroutine LIS_FieldCopyToNoahMP_New(field,stdName,nest,rc) +! !ARGUMENTS: + type(ESMF_Field),intent(in) :: field + character(*),intent(in) :: stdName + integer,intent(in) :: nest + integer,intent(out) :: rc +! !ARGUMENTS: + type(ESMF_Array) :: array + + rc = ESMF_SUCCESS + + call ESMF_FieldGet(field=field,array=array,rc=rc) + if(ESMF_STDERRORCHECK(rc)) return ! bail out + call LIS_CopyToNoahMP_New(array=array,stdName=stdName,nest=nest,rc=rc) + if(ESMF_STDERRORCHECK(rc)) return ! bail out + end subroutine + + !----------------------------------------------------------------------------- + #undef METHOD #define METHOD "LIS_FieldCopyFromLisField" @@ -646,6 +679,84 @@ subroutine LIS_ArrayCopyToNoahMP_4_0_1(array,stdName,nest,rc) !----------------------------------------------------------------------------- +#undef METHOD +#define METHOD "LIS_ArrayCopyToNoahMP_New" + + subroutine LIS_ArrayCopyToNoahMP_New(array,stdName,nest,rc) +! !ARGUMENTS: + type(ESMF_Array),intent(in) :: array + character(*),intent(in) :: stdName + integer,intent(in) :: nest + integer,intent(out) :: rc +! !LOCAL VARIABLES: + integer :: localDeCount + type(ESMF_TypeKind_Flag) :: typekind + integer :: rank + real(ESMF_KIND_R4),pointer :: farray_R4(:,:) + real(ESMF_KIND_R8),pointer :: farray_R8(:,:) + real(ESMF_KIND_R4),pointer :: farray3D_R4(:,:,:) + real(ESMF_KIND_R8),pointer :: farray3D_R8(:,:,:) +! +! !DESCRIPTION: +! +! +!EOP + rc = ESMF_SUCCESS + + call ESMF_ArrayGet(array,typekind=typekind,rank=rank, & + localDeCount=localDeCount,rc=rc) + if (ESMF_STDERRORCHECK(rc)) return + + if (rank /= 2 .AND. rank /= 3) then + call ESMF_LogSetError(ESMF_RC_ARG_OUTOFRANGE, & + msg="Cannot copy. Array is not a 2D or 3D array.", & + line=__LINE__, file=FILENAME, rcToReturn=rc) + return ! bail out + endif + if (localDeCount /= 1) then + call ESMF_LogSetError(ESMF_RC_ARG_OUTOFRANGE, & + msg="Cannot copy. Local DE count is not 1.", & + line=__LINE__, file=FILENAME, rcToReturn=rc) + return ! bail out + endif + + if(rank==2) then + if(typekind==ESMF_TYPEKIND_R4) then + call ESMF_ArrayGet(array,farrayPtr=farray_R4,rc=rc) + if(ESMF_STDERRORCHECK(rc)) return ! bail out + call LIS_CopyToNoahMP_New(farray=farray_R4,stdName=stdName,nest=nest,rc=rc) + if(ESMF_STDERRORCHECK(rc)) return ! bail out + elseif(typekind==ESMF_TYPEKIND_R8) then + call ESMF_ArrayGet(array,farrayPtr=farray_R8,rc=rc) + if(ESMF_STDERRORCHECK(rc)) return ! bail out + call LIS_CopyToNoahMP_New(farray=farray_R8,stdName=stdName,nest=nest,rc=rc) + if(ESMF_STDERRORCHECK(rc)) return ! bail out + else + call ESMF_LogSetError(ESMF_RC_NOT_IMPL, & + msg="Typekind copy not implemented.",rcToReturn=rc) + return + endif + else + if(typekind==ESMF_TYPEKIND_R4) then + call ESMF_ArrayGet(array,farrayPtr=farray3D_R4,rc=rc) + if(ESMF_STDERRORCHECK(rc)) return ! bail out + call LIS_CopyToNoahMP_New(farray=farray3D_R4,stdName=stdName,nest=nest,rc=rc) + if(ESMF_STDERRORCHECK(rc)) return ! bail out + elseif(typekind==ESMF_TYPEKIND_R8) then + call ESMF_ArrayGet(array,farrayPtr=farray3D_R8,rc=rc) + if(ESMF_STDERRORCHECK(rc)) return ! bail out + call LIS_CopyToNoahMP_New(farray=farray3D_R8,stdName=stdName,nest=nest,rc=rc) + if(ESMF_STDERRORCHECK(rc)) return ! bail out + else + call ESMF_LogSetError(ESMF_RC_NOT_IMPL, & + msg="Typekind copy not implemented.",rcToReturn=rc) + return + endif + endif + end subroutine + + !----------------------------------------------------------------------------- + #undef METHOD #define METHOD "LIS_ArrayCopyToLisFarray" @@ -1399,6 +1510,113 @@ subroutine LIS_FarrayR4CopyToNoahMP_4_0_1(farray,stdName,nest,rc) !----------------------------------------------------------------------------- +#undef METHOD +#define METHOD "LIS_FarrayR4CopyToNoahMP_New" + + subroutine LIS_FarrayR4CopyToNoahMP_New(farray,stdName,nest,rc) +! !ARGUMENTS: + real(ESMF_KIND_R4),intent(in),pointer :: farray(:,:) + character(*),intent(in) :: stdName + integer,intent(in) :: nest + integer,intent(out) :: rc +! !LOCAL VARIABLES: + integer :: tile, col, row +! !DESCRIPTION: +! This routine copies from a 2D array to an LIS 1D array +!EOP + rc = ESMF_SUCCESS + select case (trim(stdName)) + case ('liquid_fraction_of_soil_moisture_layer_1') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + NoahmpNew_struc(nest)%noahmpnew(tile)%sh2o(1) = farray(col,row) + enddo + case ('liquid_fraction_of_soil_moisture_layer_2') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + NoahmpNew_struc(nest)%noahmpnew(tile)%sh2o(2) = farray(col,row) + enddo + case ('liquid_fraction_of_soil_moisture_layer_3') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + NoahmpNew_struc(nest)%noahmpnew(tile)%sh2o(3) = farray(col,row) + enddo + case ('liquid_fraction_of_soil_moisture_layer_4') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + NoahmpNew_struc(nest)%noahmpnew(tile)%sh2o(4) = farray(col,row) + enddo + case ('soil_moisture_fraction_layer_1') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + NoahmpNew_struc(nest)%noahmpnew(tile)%smc(1) = farray(col,row) + enddo + case ('soil_moisture_fraction_layer_2') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + NoahmpNew_struc(nest)%noahmpnew(tile)%smc(2) = farray(col,row) + enddo + case ('soil_moisture_fraction_layer_3') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + NoahmpNew_struc(nest)%noahmpnew(tile)%smc(3) = farray(col,row) + enddo + case ('soil_moisture_fraction_layer_4') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + NoahmpNew_struc(nest)%noahmpnew(tile)%smc(4) = farray(col,row) + enddo + case ('soil_temperature_layer_1') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + NoahmpNew_struc(nest)%noahmpnew(tile)%tslb(1) = farray(col,row) + enddo + case ('soil_temperature_layer_2') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + NoahmpNew_struc(nest)%noahmpnew(tile)%tslb(2) = farray(col,row) + enddo + case ('soil_temperature_layer_3') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + NoahmpNew_struc(nest)%noahmpnew(tile)%tslb(3) = farray(col,row) + enddo + case ('soil_temperature_layer_4') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + NoahmpNew_struc(nest)%noahmpnew(tile)%tslb(4) = farray(col,row) + enddo +#ifdef WRF_HYDRO + case ('surface_water_depth') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + NoahmpNew_struc(nest)%noahmpnew(tile)%sfcheadrt = farray(col,row) + enddo +#endif + case default + call ESMF_LogSetError(ESMF_RC_ARG_BAD, & + msg="Cannot directly hookup to Noahmp401 "//trim(stdName), & + line=__LINE__, file=FILENAME, rcToReturn=rc) + return ! bail ou + end select + + end subroutine + + !----------------------------------------------------------------------------- + #undef METHOD #define METHOD "LIS_FarrayR8CopyToNoah_3_3" @@ -1719,6 +1937,113 @@ subroutine LIS_FarrayR8CopyToNoahMP_4_0_1(farray,stdName,nest,rc) !----------------------------------------------------------------------------- +#undef METHOD +#define METHOD "LIS_FarrayR8CopyToNoahMP_New" + + subroutine LIS_FarrayR8CopyToNoahMP_New(farray,stdName,nest,rc) +! !ARGUMENTS: + real(ESMF_KIND_R8),intent(in),pointer :: farray(:,:) + character(*),intent(in) :: stdName + integer,intent(in) :: nest + integer,intent(out) :: rc +! !LOCAL VARIABLES: + integer :: tile, col, row +! !DESCRIPTION: +! This routine copies from a 2D array to an LIS 1D array +!EOP + rc = ESMF_SUCCESS + select case (trim(stdName)) + case ('liquid_fraction_of_soil_moisture_layer_1') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + NoahmpNew_struc(nest)%noahmpnew(tile)%sh2o(1) = farray(col,row) + enddo + case ('liquid_fraction_of_soil_moisture_layer_2') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + NoahmpNew_struc(nest)%noahmpnew(tile)%sh2o(2) = farray(col,row) + enddo + case ('liquid_fraction_of_soil_moisture_layer_3') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + NoahmpNew_struc(nest)%noahmpnew(tile)%sh2o(3) = farray(col,row) + enddo + case ('liquid_fraction_of_soil_moisture_layer_4') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + NoahmpNew_struc(nest)%noahmpnew(tile)%sh2o(4) = farray(col,row) + enddo + case ('soil_moisture_fraction_layer_1') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + NoahmpNew_struc(nest)%noahmpnew(tile)%smc(1) = farray(col,row) + enddo + case ('soil_moisture_fraction_layer_2') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + NoahmpNew_struc(nest)%noahmpnew(tile)%smc(2) = farray(col,row) + enddo + case ('soil_moisture_fraction_layer_3') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + NoahmpNew_struc(nest)%noahmpnew(tile)%smc(3) = farray(col,row) + enddo + case ('soil_moisture_fraction_layer_4') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + NoahmpNew_struc(nest)%noahmpnew(tile)%smc(4) = farray(col,row) + enddo + case ('soil_temperature_layer_1') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + NoahmpNew_struc(nest)%noahmpnew(tile)%tslb(1) = farray(col,row) + enddo + case ('soil_temperature_layer_2') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + NoahmpNew_struc(nest)%noahmpnew(tile)%tslb(2) = farray(col,row) + enddo + case ('soil_temperature_layer_3') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + NoahmpNew_struc(nest)%noahmpnew(tile)%tslb(3) = farray(col,row) + enddo + case ('soil_temperature_layer_4') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + NoahmpNew_struc(nest)%noahmpnew(tile)%tslb(4) = farray(col,row) + enddo +#ifdef WRF_HYDRO + case ('surface_water_depth') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + NoahmpNew_struc(nest)%noahmpnew(tile)%sfcheadrt = farray(col,row) + enddo +#endif + case default + call ESMF_LogSetError(ESMF_RC_ARG_BAD, & + msg="Cannot directly hookup to Noahmp401 "//trim(stdName), & + line=__LINE__, file=FILENAME, rcToReturn=rc) + return ! bail ou + end select + + end subroutine + + !----------------------------------------------------------------------------- + #undef METHOD #define METHOD "LIS_FarrayI4CopyFromLisFarrayI4" @@ -2441,6 +2766,126 @@ subroutine LIS_EnsFarrayR4CopyToNoahMP_4_0_1(farray,stdName,nest,rc) !----------------------------------------------------------------------------- +#undef METHOD +#define METHOD "LIS_EnsFarrayR4CopyToNoahMP_New" + + subroutine LIS_EnsFarrayR4CopyToNoahMP_New(farray,stdName,nest,rc) +! !ARGUMENTS: + real(ESMF_KIND_R4),intent(in),pointer :: farray(:,:,:) + character(*),intent(in) :: stdName + integer,intent(in) :: nest + integer,intent(out) :: rc +! !LOCAL VARIABLES: + integer :: tile, col, row, ens +! !DESCRIPTION: +! This routine copies from a 2D array to an LIS 1D array +!EOP + rc = ESMF_SUCCESS + select case (trim(stdName)) + case ('liquid_fraction_of_soil_moisture_layer_1') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + ens = LIS_domain(nest)%tile(tile)%ensem + NoahmpNew_struc(nest)%noahmpnew(tile)%sh2o(1) = farray(col,row,ens) + enddo + case ('liquid_fraction_of_soil_moisture_layer_2') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + ens = LIS_domain(nest)%tile(tile)%ensem + NoahmpNew_struc(nest)%noahmpnew(tile)%sh2o(2) = farray(col,row,ens) + enddo + case ('liquid_fraction_of_soil_moisture_layer_3') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + ens = LIS_domain(nest)%tile(tile)%ensem + NoahmpNew_struc(nest)%noahmpnew(tile)%sh2o(3) = farray(col,row,ens) + enddo + case ('liquid_fraction_of_soil_moisture_layer_4') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + ens = LIS_domain(nest)%tile(tile)%ensem + NoahmpNew_struc(nest)%noahmpnew(tile)%sh2o(4) = farray(col,row,ens) + enddo + case ('soil_moisture_fraction_layer_1') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + ens = LIS_domain(nest)%tile(tile)%ensem + NoahmpNew_struc(nest)%noahmpnew(tile)%smc(1) = farray(col,row,ens) + enddo + case ('soil_moisture_fraction_layer_2') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + ens = LIS_domain(nest)%tile(tile)%ensem + NoahmpNew_struc(nest)%noahmpnew(tile)%smc(2) = farray(col,row,ens) + enddo + case ('soil_moisture_fraction_layer_3') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + ens = LIS_domain(nest)%tile(tile)%ensem + NoahmpNew_struc(nest)%noahmpnew(tile)%smc(3) = farray(col,row,ens) + enddo + case ('soil_moisture_fraction_layer_4') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + ens = LIS_domain(nest)%tile(tile)%ensem + NoahmpNew_struc(nest)%noahmpnew(tile)%smc(4) = farray(col,row,ens) + enddo + case ('soil_temperature_layer_1') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + ens = LIS_domain(nest)%tile(tile)%ensem + NoahmpNew_struc(nest)%noahmpnew(tile)%tslb(1) = farray(col,row,ens) + enddo + case ('soil_temperature_layer_2') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + ens = LIS_domain(nest)%tile(tile)%ensem + NoahmpNew_struc(nest)%noahmpnew(tile)%tslb(2) = farray(col,row,ens) + enddo + case ('soil_temperature_layer_3') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + ens = LIS_domain(nest)%tile(tile)%ensem + NoahmpNew_struc(nest)%noahmpnew(tile)%tslb(3) = farray(col,row,ens) + enddo + case ('soil_temperature_layer_4') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + ens = LIS_domain(nest)%tile(tile)%ensem + NoahmpNew_struc(nest)%noahmpnew(tile)%tslb(4) = farray(col,row,ens) + enddo +#ifdef WRF_HYDRO + case ('surface_water_depth') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + ens = LIS_domain(nest)%tile(tile)%ensem + NoahmpNew_struc(nest)%noahmpnew(tile)%sfcheadrt = farray(col,row,ens) + enddo +#endif + case default + call ESMF_LogSetError(ESMF_RC_ARG_BAD, & + msg="Cannot directly hookup to Noahmp401 "//trim(stdName), & + line=__LINE__, file=FILENAME, rcToReturn=rc) + return ! bail ou + end select + + end subroutine + + !----------------------------------------------------------------------------- + #undef METHOD #define METHOD "LIS_EnsFarrayR8CopyToNoah_3_3" @@ -2800,6 +3245,126 @@ subroutine LIS_EnsFarrayR8CopyToNoahMP_4_0_1(farray,stdName,nest,rc) !----------------------------------------------------------------------------- +#undef METHOD +#define METHOD "LIS_EnsFarrayR8CopyToNoahMP_New" + + subroutine LIS_EnsFarrayR8CopyToNoahMP_New(farray,stdName,nest,rc) +! !ARGUMENTS: + real(ESMF_KIND_R8),intent(in),pointer :: farray(:,:,:) + character(*),intent(in) :: stdName + integer,intent(in) :: nest + integer,intent(out) :: rc +! !LOCAL VARIABLES: + integer :: tile, col, row, ens +! !DESCRIPTION: +! This routine copies from a 2D array to an LIS 1D array +!EOP + rc = ESMF_SUCCESS + select case (trim(stdName)) + case ('liquid_fraction_of_soil_moisture_layer_1') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + ens = LIS_domain(nest)%tile(tile)%ensem + NoahmpNew_struc(nest)%noahmpnew(tile)%sh2o(1) = farray(col,row,ens) + enddo + case ('liquid_fraction_of_soil_moisture_layer_2') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + ens = LIS_domain(nest)%tile(tile)%ensem + NoahmpNew_struc(nest)%noahmpnew(tile)%sh2o(2) = farray(col,row,ens) + enddo + case ('liquid_fraction_of_soil_moisture_layer_3') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + ens = LIS_domain(nest)%tile(tile)%ensem + NoahmpNew_struc(nest)%noahmpnew(tile)%sh2o(3) = farray(col,row,ens) + enddo + case ('liquid_fraction_of_soil_moisture_layer_4') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + ens = LIS_domain(nest)%tile(tile)%ensem + NoahmpNew_struc(nest)%noahmpnew(tile)%sh2o(4) = farray(col,row,ens) + enddo + case ('soil_moisture_fraction_layer_1') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + ens = LIS_domain(nest)%tile(tile)%ensem + NoahmpNew_struc(nest)%noahmpnew(tile)%smc(1) = farray(col,row,ens) + enddo + case ('soil_moisture_fraction_layer_2') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + ens = LIS_domain(nest)%tile(tile)%ensem + NoahmpNew_struc(nest)%noahmpnew(tile)%smc(2) = farray(col,row,ens) + enddo + case ('soil_moisture_fraction_layer_3') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + ens = LIS_domain(nest)%tile(tile)%ensem + NoahmpNew_struc(nest)%noahmpnew(tile)%smc(3) = farray(col,row,ens) + enddo + case ('soil_moisture_fraction_layer_4') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + ens = LIS_domain(nest)%tile(tile)%ensem + NoahmpNew_struc(nest)%noahmpnew(tile)%smc(4) = farray(col,row,ens) + enddo + case ('soil_temperature_layer_1') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + ens = LIS_domain(nest)%tile(tile)%ensem + NoahmpNew_struc(nest)%noahmpnew(tile)%tslb(1) = farray(col,row,ens) + enddo + case ('soil_temperature_layer_2') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + ens = LIS_domain(nest)%tile(tile)%ensem + NoahmpNew_struc(nest)%noahmpnew(tile)%tslb(2) = farray(col,row,ens) + enddo + case ('soil_temperature_layer_3') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + ens = LIS_domain(nest)%tile(tile)%ensem + NoahmpNew_struc(nest)%noahmpnew(tile)%tslb(3) = farray(col,row,ens) + enddo + case ('soil_temperature_layer_4') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + ens = LIS_domain(nest)%tile(tile)%ensem + NoahmpNew_struc(nest)%noahmpnew(tile)%tslb(4) = farray(col,row,ens) + enddo +#ifdef WRF_HYDRO + case ('surface_water_depth') + do tile=1,LIS_rc%ntiles(nest) + col = LIS_domain(nest)%tile(tile)%col + row = LIS_domain(nest)%tile(tile)%row + ens = LIS_domain(nest)%tile(tile)%ensem + NoahmpNew_struc(nest)%noahmpnew(tile)%sfcheadrt = farray(col,row,ens) + enddo +#endif + case default + call ESMF_LogSetError(ESMF_RC_ARG_BAD, & + msg="Cannot directly hookup to Noahmp401 "//trim(stdName), & + line=__LINE__, file=FILENAME, rcToReturn=rc) + return ! bail ou + end select + + end subroutine + + !----------------------------------------------------------------------------- + #undef METHOD #define METHOD "LIS_EnsFarrayI4CopyFromLisFarrayI4" diff --git a/lis/surfacemodels/land/noahmp.new/.NoahMPnew_setup.F90.swp b/lis/surfacemodels/land/noahmp.new/.NoahMPnew_setup.F90.swp new file mode 100644 index 0000000000000000000000000000000000000000..2e7f6d76db2b764a9e7bdb79b740883ac8408348 GIT binary patch literal 16384 zcmeHOON=8|6)hly1oDq2*#LT;(209++ig#GW-!UZ-L`wI@h`S}zCCfOUC(x<>tm|Q z-P8FfNC_xNNJtzdP_JwD62KOWsrNb>lxB8q& z2R)rW-{qFY(+4qumg*U*##1}Cvy~djPE~WwT)SLqwyU<ChH7ak3%uqaY4M$u?1pb`mwUrOviPaRw=rWzo_XLs>VfN(qnWgrA9oy% zv0HChe~S|RkK}*AZy$}XFhTdpvyYhvW*(S%VCI3D2WB3ad0^&&nFnSbn0a94ftd&1 zl^#$vMfn6Qf0hoy`1}9p{Qvxoit=Tk2b={?1GfUN+@L5w2DX3)ffi5$DnJ^z9XJFi zz;o9t$^$?Qc=8it;q@2yhNa z09OOAT?>1F&jY7`JApT^QIwwpUji-wp9J3ekfOW_`~vt2@BnZP@XM>wANUdQ9PlmR zG2njS9^e+>XCG9Q?*ZQho&@d#4guEzuV1AoF9A;hP2fi0Ra_?g1Q-G(;E%XV_$}}< z@I&B>KoPhWAiqB|x`cR}3}TU|qZ$UI*CrgUYVCpQsAk+sFwfD=c(s;0QK^epB0Oi< ziCgn?<$SAcb+%Qfz0G^v+a2)v1REH5t)g!m8h7TEi0u8o3gJR$XHIDB>IR4OiOz@5 zm#W3u1x9aXEL7^rD&JvbrEc|@=*B(nuv3M#LhEe3z`BlYvcm~>=a>mQj_&a|DKqTe z(9*rck@*Rhn2?%fqY(xD@tO!{!7myOw=~TjYoXRDev&Viz;$tNer_cAUg2o}H5Br) zDI7TG(eNdoHzr)OnRjnGA>-4Tvj(cy>4zQ1c-eG!!Pk77@9Qr(=J1%9xAB+W6~1&j zb3>OK9a9}3ZVWHbB-ve-ZSlM2nb+r5ATrjf6T|lY2+3+lo3RRdFmE-*|us7xr{fIk$2eUP&d2<-HHqpUJtz)TR7l}MO2Lv%!RLY z)d=OeEW&nxu!WE<5Q{lxcU0tIWTuS#Xjn9{f*2c?Lo*?q3Nbe7%}l(zD{5l6!{+q$Lki-L$qU|u^ce6m?YNjEySVLJ(m z1cH+gP52UDg5|DZ52zF*SjVvk6g%pz&_D2|kr)j?-849ZxTq7diL4yzRK-x5V2-^b zWKHGp5^O8MWWG&h5Tlj-&4HnJbdOPPn2U4b16>HSTsCeL#u%C^eGha^|?K zvR-bL%7s&fGTW0BG6}2PTg?|4RWTtE6~{a;i^9@kdP9`fjdmz!L)O^~@ePM}9}XC0 z2@csL*Q4`nV}nf^ML8eVKrxp@{hMkEm`6s4KE7f!N2-3PXJeE1bZd`KT9|5%J@j;> z6K3qTy~Q=AIy@_F^R%v`c0BSOV+)LG8q*wAx6~fZRgh@bpI^8j*}M7}d)KgSjp>e~ z_hfn4+ru31Vd}`XgL}B+J=}q#TU$u(1J&rxm|>pnp$Z(>LrjnI(rD!LlX?82H*~17 zF+<&j&ZThZlK<$z{6{DGGY9i$Ci&9`^QR;HTy<@$-P1I5SztX(I9g&|(ahHJ`H;1* zI@_o+BhjOu$Uh!3VSZc4lAhpNpy@7uj&pgNwl7C$)i@uBssh)U1MaB8edka5=|Vmm zRTkJNeN2@mNT|^w>uVK1Wh#k&KA*!sGt?amCqz&$Zjn5y45j;8qbRP*6Qo- zDB~Hv(ptkU4;6S|qt-C2S$I{H4F`e}%tlvA*J^gjL zPTRgb7UY&)#zJM}Z4(oBOdfVmLKucY=1O^^EtRka3%uUlm2y#2ona_|9BmFtwNt9o zLeK)iK>*rVg&>~%w%#l>vx?#lH~nH0hDpAe8=qH*uT*Un8pYgdLDZkc<l?y{3ZQ+1Mzx>H-k7?Hx1ll0~@E0g^t3u$di z@y%TqGl`wzj!W8(B`L)Nqe-5~?{W1#Zqd|(0m4}%9bw@HD~%7bW!uIUmQoFSOIrO! zUW`xx6W)J<+Y95_M-kyhDQqqg2ERSPon{euR*drkdTusYx2 zPe*o`rhuuton-$og1_(Xt5D5jGu|q#7TCf9%h%`!E96V9eR{x%9F9K?z1R0#)<6Y7 zdDD{AteJ?f>%kd_ryr`S@GO>t9CvI>#ZuUDMU}vn2S88on?`- zSR}@pt!b(Qjl#yFAVfX5bB+*`ETw3OoQD0p7q_{UzW@paFao_yf-AuLIu%J_{TJ?gkD4 zFXO!aIFJSYjC1<;fi`d(@Cwf7PXN1s2iyzX1pE$X^4EZ`0S^Ib;40uZIFCOIJOexi zB!D+?9{&sQH1IgE3FH6mvTHj$vT}A-$gljjHYrKOU+r@zpzL=h5 zFfG?ojZLX~k8bl~NIj1K3q#V$5v8K|I;N`FIClnO@NtqIp%1KPEuYQ*1#&!MT(h!T z$(@O(=UFOhGnyNPBAVwRC%%|mN@u`;&%2My!&RvmZ`Mj>x+W2w;nXGnppG)3Y7Y*v zrxSJr%4m0kg>r~$7i_k&leP+DF}z@OQL9!-CBq1gCJT4_!-~>jb-r;{_;G1bCIK7s z4;W6DTL&{>+>#-)j|BKjGAv65xFQ&%JGb6g$yM9Ma&B$Db)ryZEXGctSaxi2$>iE5 zXG3RGja)0ZV%a5^$lykVHOn)2gA1#E*eqQ`Q#8`6dAd+JL$j7VDW9M~ z3flBu&63X?^opo#HcL}`om+%;vfmzEf;P2R5!vCJ==TZ?l%%P>TBS-Mhb0uxWG_jY z+N^2%#q!XxquYFHAS0L-?a2upt&#*VKRSLuW|JAHSca@>i zxs_5aQ_fMQkXr&T`pwcQ@zqAHE;b@yVKHWKwM+N747YB~(6{O4PPA?6xCU}vcHX={ zliKQCP{1D1wbsa$s&%;=i0Ja0Cv@SOpL7Mcx;RmHRAY<2D=n;{qG&0NZ zTaXGterVbT!z@EqFl0%}y`cOL DArI{^ literal 0 HcmV?d00001 diff --git a/lis/surfacemodels/land/noahmp.new/NoahMP401_dynsetup.F90 b/lis/surfacemodels/land/noahmp.new/NoahMP401_dynsetup.F90 new file mode 100644 index 000000000..4d6cc1917 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/NoahMP401_dynsetup.F90 @@ -0,0 +1,83 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- + +!BOP +! +! !ROUTINE: NoahMP401_dynsetup +! \label{NoahMP401_dynsetup} +! +! !REVISION HISTORY: +! This subroutine is generated with the Model Implementation Toolkit developed +! by Shugong Wang for the NASA Land Information System Version 7. The initial +! specification of the subroutine is defined by Sujay Kumar. +! 10/25/18: Shugong Wang, Zhuo Wang; initial implementation for LIS 7 and NoahMP401 +! 11 Nov 2020: Eric Kemp, added updates to LIS_snow_struc +! +! !INTERFACE: +subroutine NoahMP401_dynsetup(n) +! !USES: + use LIS_coreMod, only : LIS_rc, LIS_domain, LIS_surface + use LIS_fileIOMod, only : LIS_read_param + use LIS_logMod, only : LIS_logunit + use LIS_snowMod, only : LIS_snow_struc + use LIS_timeMgrMod, only : LIS_date2time, LIS_tick + use NoahMP401_lsmMod, only : NOAHMP401_struc + +! +! !DESCRIPTION: +! This routine sets up the time-dependent variables in NoahMP401 +! +!EOP + implicit none + integer, intent(in) :: n + + integer :: tid + integer :: t, gid, change, local_hour + integer :: locdoy, locyr, locmo, locda, lochr, locmn, locss + real*8 :: loctime + real :: interp_fraction + real :: locgmt + integer :: col, row, ncount(LIS_rc%ngrid(n)) + + if (LIS_rc%snowsrc(n) .gt. 0) then + + ncount = 0 ! Number of tiles per grid id (over land) + LIS_snow_struc(n)%snowdepth = 0 ! At grid points + LIS_snow_struc(n)%sneqv = 0 ! At tiles + + ! Collect SWE at tiles + do t = 1, LIS_rc%npatch(n, LIS_rc%lsm_index) + tid = LIS_surface(n, LIS_rc%lsm_index)%tile(t)%tile_id + LIS_snow_struc(n)%sneqv(tid) = LIS_snow_struc(n)%sneqv(tid) + & + noahmp401_struc(n)%noahmp401(t)%sneqv + end do + + ! Collect mean snow depth at grid points + do t = 1, LIS_rc%npatch(n, LIS_rc%lsm_index) + gid = LIS_surface(n,LIS_rc%lsm_index)%tile(t)%index + LIS_snow_struc(n)%snowdepth(gid) = & + LIS_snow_struc(n)%snowdepth(gid) + & + noahmp401_struc(n)%noahmp401(t)%snowh + ncount(gid) = ncount(gid) + 1 + end do + do t = 1, LIS_rc%ngrid(n) + if (ncount(t).gt.0) then + LIS_snow_struc(n)%snowdepth(t) = & + LIS_snow_struc(n)%snowdepth(t) / ncount(t) + else + LIS_snow_struc(n)%snowdepth(t) = 0.0 + endif + end do + end if + + !TODO: add code here if needed. +end subroutine NoahMP401_dynsetup + +! generate date/time string for reading time-dependent variables diff --git a/lis/surfacemodels/land/noahmp.new/NoahMP401_f2t.F90 b/lis/surfacemodels/land/noahmp.new/NoahMP401_f2t.F90 new file mode 100644 index 000000000..07721e343 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/NoahMP401_f2t.F90 @@ -0,0 +1,197 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- + +!BOP +! !ROUTINE: NoahMP401_f2t +! \label{NoahMP401_f2t} +! +! !REVISION HISTORY: +! This subroutine is generated with the Model Implementation Toolkit developed +! by Shugong Wang for the NASA Land Information System Version 7. The initial +! specification of the subroutine is defined by Sujay Kumar. +! +! 10/25/18: Shugong Wang, Zhuo Wang; Initial implementation for LIS 7 and NoahMP401 +! +! !INTERFACE: +subroutine NoahMP401_f2t(n) +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc , LIS_surface + use LIS_metforcingMod, only : LIS_FORC_State + use LIS_logMod, only : LIS_verify + use LIS_FORC_AttributesMod + use NoahMP401_lsmMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n +! +! !DESCRIPTION: +! This routine transfers the LIS provided forcing into the NoahMP401 +! model tiles. +! +! The arguments are: +! \begin{description} +! \item[n] +! index of the nest +! \end{description} +! +!EOP + + integer :: t, v, status + integer :: tid + + ! Near Surface Air Temperature [K] + type(ESMF_Field) :: tmpField + real, pointer :: tmp(:) + + ! Near Surface Specific Humidity [kg/kg] + type(ESMF_Field) :: q2Field + real, pointer :: q2(:) + + ! Incident Shortwave Radiation [W/m2] + type(ESMF_Field) :: swdField + real, pointer :: swd(:) + + ! Incident Longwave Radiation [W/m2] + type(ESMF_Field) :: lwdField + real, pointer :: lwd(:) + + ! Eastward Wind [W/m2] + type(ESMF_Field) :: uField + real, pointer :: uwind(:) + + ! Northward Wind [m/s] + type(ESMF_Field) :: vField + real, pointer :: vwind(:) + + ! Surface Pressure [Pa] + type(ESMF_Field) :: psurfField + real, pointer :: psurf(:) + + ! Rainfall Rate [kg/m2s] + type(ESMF_Field) :: pcpField + real, pointer :: pcp(:) + + ! Snowfall Rate [kg/m2s] + type(ESMF_Field) :: snowField + real, pointer :: snowf(:) + + integer, pointer :: layer_h(:), layer_m(:) + + !!! GET FORCING FIELDS FROM LIS + ! get near surface air temperature + call ESMF_StateGet(LIS_FORC_State(n), trim(LIS_FORC_Tair%varname(1)), tmpField, rc=status) + call LIS_verify(status, "NoahMP401_f2t: error getting Tair") + + call ESMF_FieldGet(tmpField, localDE = 0, farrayPtr = tmp, rc = status) + call LIS_verify(status, "NoahMP401_f2t: error retrieving Tair") + + ! get near surface specific humidity + call ESMF_StateGet(LIS_FORC_State(n), trim(LIS_FORC_Qair%varname(1)), q2Field, rc=status) + call LIS_verify(status, "NoahMP401_f2t: error getting Qair") + + call ESMF_FieldGet(q2Field, localDE = 0, farrayPtr = q2, rc = status) + call LIS_verify(status, "NoahMP401_f2t: error retrieving Qair") + + ! get incident shortwave radiation + call ESMF_StateGet(LIS_FORC_State(n), trim(LIS_FORC_SWdown%varname(1)), swdField, rc=status) + call LIS_verify(status, "NoahMP401_f2t: error getting Swdown") + + call ESMF_FieldGet(swdField, localDE = 0, farrayPtr = swd, rc = status) + call LIS_verify(status, "NoahMP401_f2t: error retrieving Swdown") + + ! get incident longwave radiation + call ESMF_StateGet(LIS_FORC_State(n), trim(LIS_FORC_LWdown%varname(1)), lwdField, rc=status) + call LIS_verify(status, "NoahMP401_f2t: error getting Lwdown") + + call ESMF_FieldGet(lwdField, localDE = 0, farrayPtr = lwd, rc = status) + call LIS_verify(status, "NoahMP401_f2t: error retrieving Lwdown") + + ! get eastward wind + call ESMF_StateGet(LIS_FORC_State(n), trim(LIS_FORC_Wind_E%varname(1)), uField, rc=status) + call LIS_verify(status, "NoahMP401_f2t: error getting Wind_E") + + call ESMF_FieldGet(uField, localDE = 0, farrayPtr = uwind, rc = status) + call LIS_verify(status, "NoahMP401_f2t: error retrieving Wind_E") + + ! get northward wind + call ESMF_StateGet(LIS_FORC_State(n), trim(LIS_FORC_Wind_N%varname(1)), vField, rc=status) + call LIS_verify(status, "NoahMP401_f2t: error getting Wind_N") + + call ESMF_FieldGet(vField, localDE = 0, farrayPtr = vwind, rc = status) + call LIS_verify(status, "NoahMP401_f2t: error retrieving Wind_N") + + ! get surface pressure + call ESMF_StateGet(LIS_FORC_State(n), trim(LIS_FORC_Psurf%varname(1)), psurfField, rc=status) + call LIS_verify(status, "NoahMP401_f2t: error getting Psurf") + + call ESMF_FieldGet(psurfField, localDE = 0, farrayPtr = psurf, rc = status) + call LIS_verify(status, "NoahMP401_f2t: error retrieving Psurf") + + ! get rainfall rate + call ESMF_StateGet(LIS_FORC_State(n), trim(LIS_FORC_Rainf%varname(1)), pcpField, rc=status) + call LIS_verify(status, "NoahMP401_f2t: error getting Rainf") + + call ESMF_FieldGet(pcpField, localDE = 0, farrayPtr = pcp, rc = status) + call LIS_verify(status, "NoahMP401_f2t: error retrieving Rainf") + + ! get snowfall rate + if(LIS_Forc_Snowf%selectOpt .eq. 1) then + call ESMF_StateGet(LIS_FORC_State(n), trim(LIS_FORC_Snowf%varname(1)), snowField, rc=status) + call LIS_verify(status, "NoahMP401_f2t: error getting Snowf") + + call ESMF_FieldGet(snowField, localDE = 0, farrayPtr = snowf, rc = status) + call LIS_verify(status, "NoahMP401_f2t: error retrieving Snowf") + endif + + + !!! set the forcing counter + NOAHMP401_struc(n)%forc_count = NOAHMP401_struc(n)%forc_count + 1 + + !!! pass forcing data to tiles + do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) + tid = LIS_surface(n, LIS_rc%lsm_index)%tile(t)%tile_id + + ! TAIR + NOAHMP401_struc(n)%noahmp401(t)%tair = NOAHMP401_struc(n)%noahmp401(t)%tair + tmp(tid) + + ! QAIR + NOAHMP401_struc(n)%noahmp401(t)%qair = NOAHMP401_struc(n)%noahmp401(t)%qair + q2(tid) + + ! SWDOWN + NOAHMP401_struc(n)%noahmp401(t)%swdown = NOAHMP401_struc(n)%noahmp401(t)%swdown + swd(tid) + + ! LWDOWN + NOAHMP401_struc(n)%noahmp401(t)%lwdown = NOAHMP401_struc(n)%noahmp401(t)%lwdown + lwd(tid) + + ! WIND_E + NOAHMP401_struc(n)%noahmp401(t)%wind_e = NOAHMP401_struc(n)%noahmp401(t)%wind_e + uwind(tid) + + ! WIND_N + NOAHMP401_struc(n)%noahmp401(t)%wind_n = NOAHMP401_struc(n)%noahmp401(t)%wind_n + vwind(tid) + + ! PSURF + NOAHMP401_struc(n)%noahmp401(t)%psurf = NOAHMP401_struc(n)%noahmp401(t)%psurf + psurf(tid) + + ! RAINF + NOAHMP401_struc(n)%noahmp401(t)%prcp = NOAHMP401_struc(n)%noahmp401(t)%prcp + pcp(tid) + + ! SNOWF + ! If there is snowf add it to precipitation. Noah-MP-4.0.1 does not use + ! separate rainf and snowf. It determines what to do with precipitation. + if (LIS_Forc_Snowf%selectOpt.eq.1) then + if (snowf(tid) .ne. LIS_rc%udef) then + NOAHMP401_struc(n)%noahmp401(t)%prcp = NOAHMP401_struc(n)%noahmp401(t)%prcp + snowf(tid) + endif + endif + enddo + +end subroutine NoahMP401_f2t diff --git a/lis/surfacemodels/land/noahmp.new/NoahMP401_finalize.F90 b/lis/surfacemodels/land/noahmp.new/NoahMP401_finalize.F90 new file mode 100644 index 000000000..6c1d68277 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/NoahMP401_finalize.F90 @@ -0,0 +1,70 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- + +!BOP +! +! !ROUTINE: NoahMP401_finalize +! \label{NoahMP401_finalize} +! +! !REVISION HISTORY: +! This subroutine is generated with the Model Implementation Toolkit developed +! by Shugong Wang for the NASA Land Information System Version 7. The initial +! specification of the subroutine is defined by Sujay Kumar. +! +! 10/25/18: Shugong Wang, Zhuo Wang; initial implementation for NoahMP401 with LIS-7 +! +! !INTERFACE: +subroutine NoahMP401_finalize() +! !USES: + use LIS_coreMod, only : LIS_rc + use NoahMP401_lsmMod +! +! !DESCRIPTION: +! +! This routine cleans up the allocated memory structures in NoahMP401 +! +!EOP + implicit none + + integer :: t, n + + do n=1, LIS_rc%nnest + ! free memory allocated for each tile + do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) + deallocate(NOAHMP401_struc(n)%noahmp401(t)%shdfac_monthly) + deallocate(NOAHMP401_struc(n)%noahmp401(t)%soilcomp) + deallocate(NOAHMP401_struc(n)%noahmp401(t)%smc) + deallocate(NOAHMP401_struc(n)%noahmp401(t)%sh2o) + deallocate(NOAHMP401_struc(n)%noahmp401(t)%tslb) + deallocate(NOAHMP401_struc(n)%noahmp401(t)%tsno) + deallocate(NOAHMP401_struc(n)%noahmp401(t)%zss) + deallocate(NOAHMP401_struc(n)%noahmp401(t)%snowice) + deallocate(NOAHMP401_struc(n)%noahmp401(t)%snowliq) + deallocate(NOAHMP401_struc(n)%noahmp401(t)%smoiseq) + deallocate(NOAHMP401_struc(n)%noahmp401(t)%gecros_state) + end do ! tile loop + + ! free memory for noahmp401, the data at tile level + deallocate(NOAHMP401_struc(n)%noahmp401) + + ! free momory for constant parameter + deallocate(NOAHMP401_struc(n)%sldpth) + + ! free momory for initial state variable + deallocate(NOAHMP401_struc(n)%init_smc) + deallocate(NOAHMP401_struc(n)%init_tslb) + deallocate(NOAHMP401_struc(n)%init_gecros_state) + + end do ! nest loop + + deallocate(NOAHMP401_struc) + +end subroutine NoahMP401_finalize + diff --git a/lis/surfacemodels/land/noahmp.new/NoahMP401_main.F90 b/lis/surfacemodels/land/noahmp.new/NoahMP401_main.F90 new file mode 100644 index 000000000..228575965 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/NoahMP401_main.F90 @@ -0,0 +1,1447 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- + +#include "LIS_misc.h" +!BOP +! +! !ROUTINE: NoahMP401_main +! \label{NoahMP401_main} +! +! !REVISION HISTORY: +! This subroutine is generated with the Model Implementation Toolkit +! developed by Shugong Wang for the NASA Land Information System V7. +! The initial specification of the subroutine is by Sujay Kumar. +! +! 10/25/18: Shugong Wang, Zhuo Wang; initial implementation for NoahMP401 with LIS-7 +! 05/15/19: Yeosang Yoon; code added for snow DA to work +! 10/29/19: David Mocko; Added RELSMC to output, and an option +! for different units for Qs/Qsb/Albedo +! 03/09/22: David Mocko: Fixed "input LAI" for dynamic vegetation options 7/8/9 +! +! !INTERFACE: +subroutine NoahMP401_main(n) +! !USES: + use LIS_coreMod + use LIS_histDataMod + use LIS_timeMgrMod, only : LIS_isAlarmRinging + use LIS_constantsMod, only : LIS_CONST_RHOFW !New + use LIS_vegDataMod, only : LIS_lai, LIS_sai + use LIS_logMod, only : LIS_logunit, LIS_endrun + use LIS_FORC_AttributesMod + use NoahMP401_lsmMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + integer :: t + integer :: i + real :: dt + real :: lat, lon + real :: tempval + integer :: row, col, tid + integer :: year, month, day, hour, minute, second + logical :: alarmCheck + +! +! !DESCRIPTION: +! This is the entry point for calling the NoahMP401 physics. +! This routine calls the {\tt noahmp_driver_401} routine that performs +! the land surface computations, to solve water and energy equations. + +! The arguments are: +! \begin{description} +! \item[n] +! index of the nest +! \end{description} +!EOP + +! define variables for NoahMP401 + real :: tmp_latitude ! latitude in decimal degree [rad] + real :: tmp_longitude ! longitude in decimal year [rad] + integer :: tmp_year ! year of the current time step [-] + integer :: tmp_month ! month of the current time step [-] + integer :: tmp_day ! day of the current time step [-] + integer :: tmp_hour ! hour of the current time step [-] + integer :: tmp_minute ! minute of the current time step [-] + real :: tmp_dz8w ! reference height of temperature and humidity [m] + real :: tmp_dt ! timestep [s] + integer :: tmp_ttile ! tile No. [-] + integer :: tmp_itimestep ! timestep number [-] + + real, allocatable :: tmp_sldpth(:) ! thickness of soil layers [m] + integer :: tmp_nsoil ! number of soil layers [-] + integer :: tmp_nsnow ! maximum number of snow layers (e.g. 3) [-] + integer :: tmp_vegetype ! vegetation type [-] + integer :: tmp_soiltype ! soil type [-] + real, allocatable :: tmp_shdfac_monthly(:) ! monthly values for green vegetation fraction [] + real :: tmp_tbot ! deep soil temperature [K] + integer :: tmp_urban_vegetype ! urban land cover type index [-] + integer :: tmp_cropcat ! crop category [-] + real :: tmp_planting ! planting date [-] + real :: tmp_harvest ! harvest date [-] + real :: tmp_season_gdd ! growing season GDD [-] + character :: tmp_landuse_tbl_name ! Noah model landuse parameter table [-] + character :: tmp_soil_tbl_name ! Noah model soil parameter table [-] + character :: tmp_gen_tbl_name ! Noah model general parameter table [-] + character :: tmp_noahmp_tbl_name ! NoahMP parameter table [-] + integer :: tmp_dveg_opt ! dynamic vegetation, (1->off; 2->on); with opt_crs=1 [-] + integer :: tmp_crs_opt ! canopt stomatal resistance (1->Ball-Berry; 2->Jarvis) [-] + integer :: tmp_btr_opt ! soil moisture factor for stomatal resistance (1->Noah;2->CLM;3->SSiB) [-] + integer :: tmp_run_opt ! runoff and groundwater (1->SIMGM; 2->SIMTOP; 3->Schaake96; 4->BATS) [-] + integer :: tmp_sfc_opt ! surface layer drag coeff (CH & CM) (1->M-O; 2->Chen97) [-] + integer :: tmp_frz_opt ! supercooled liquid water (1->NY06; 2->Koren99) [-] + integer :: tmp_inf_opt ! frozen soil permeability (1->NY06; 2->Koren99) [-] + integer :: tmp_rad_opt ! radiation transfer (1->gap=F(3D,cosz); 2->gap=0; 3->gap=1-Fveg) [-] + integer :: tmp_alb_opt ! snow surface albedo (1->BATS; 2->CLASS) [-] + integer :: tmp_snf_opt ! rainfall & snowfall (1->Jordan91; 2->BATS; 3->Noah) [-] + integer :: tmp_tbot_opt ! lower boundary of soil temperature [-] + integer :: tmp_stc_opt ! snow/soil temperature time scheme [-] + integer :: tmp_gla_opt ! glacier option (1->phase change; 2->simple) [-] + integer :: tmp_sndpth_gla_opt ! snow depth max for glacier model [mm] + integer :: tmp_rsf_opt ! surface resistance (1->Sakaguchi/Zeng;2->Seller;3->mod Sellers;4->1+snow) [-] + integer :: tmp_soil_opt ! soil configuration option [-] + integer :: tmp_pedo_opt ! soil pedotransfer function option [-] + integer :: tmp_crop_opt ! crop model option (0->none; 1->Liu et al.; 2->Gecros) [-] + integer :: tmp_iz0tlnd ! option of Chen adjustment of Czil (not used) [-] + integer :: tmp_urban_opt ! urban physics option [-] + real, allocatable :: tmp_soilcomp(:) ! soil sand and clay percentage [-] + real :: tmp_soilcL1 ! soil texture in layer 1 [-] + real :: tmp_soilcL2 ! soil texture in layer 2 [-] + real :: tmp_soilcL3 ! soil texture in layer 3 [-] + real :: tmp_soilcL4 ! soil texture in layer 4 [-] + real :: tmp_tair ! air temperature [K] + real :: tmp_psurf ! air pressure [Pa] + real :: tmp_wind_e ! U wind component [m/s] + real :: tmp_wind_n ! V wind component [m/s] + real :: tmp_qair ! specific humidity [kg/kg] + real :: tmp_swdown ! downward solar radiation [W m-2] + real :: tmp_lwdown ! downward longwave radiation [W m-2] + real :: tmp_prcp ! total precipitation (rainfall+snowfall) [mm] + real :: tmp_tsk ! surface radiative temperature [K] + real :: tmp_hfx ! sensible heat flux [W m-2] +! real :: tmp_fsh ! sensible heat flux [W/m2] + + real :: tmp_qfx ! latent heat flux [kg s-1 m-2] + real :: tmp_lh ! latent heat flux [W m-2] + real :: tmp_grdflx ! ground/snow heat flux [W m-2] + real :: tmp_sfcrunoff ! accumulated surface runoff [m] + real :: tmp_udrrunoff ! accumulated sub-surface runoff [m] + real :: tmp_albedo ! total grid albedo [-] + + real :: tmp_snowc ! snow cover fraction [-] + real, allocatable :: tmp_smc(:) ! volumetric soil moisture [m3/m3] + real, allocatable :: tmp_sh2o(:) ! volumetric liquid soil moisture [m3/m3] + real, allocatable :: tmp_tslb(:) ! soil temperature [K] + real :: tmp_sneqv ! snow water equivalent [mm] + real :: tmp_snowh ! physical snow depth [m] + real :: tmp_canwat ! total canopy water + ice [mm] + real :: tmp_acsnom ! accumulated snow melt leaving pack [-] + real :: tmp_acsnow ! accumulated snow on grid [mm] + real :: tmp_emiss ! surface bulk emissivity [-] + real :: tmp_rs ! total stomatal resistance [s/m] + integer :: tmp_isnow ! actual no. of snow layers [-] + real :: tmp_tv ! vegetation leaf temperature [K] + real :: tmp_tg ! bulk ground surface temperature [K] + real :: tmp_canice ! canopy-intercepted ice [mm] + real :: tmp_canliq ! canopy-intercepted liquid water [mm] + real :: tmp_eah ! canopy air vapor pressure [Pa] + real :: tmp_tah ! canopy air temperature [K] + real :: tmp_cm ! bulk momentum drag coefficient [-] + real :: tmp_ch ! bulk sensible heat exchange coefficient [-] + real :: tmp_fwet ! wetted or snowed fraction of canopy [-] + real :: tmp_sneqvo ! snow mass at last time step [mm h2o] + real :: tmp_albold ! snow albedo at last time step [-] + real :: tmp_qsnow ! snowfall on the ground [mm/s] + real :: tmp_wslake ! lake water storage [mm] + real :: tmp_zwt ! water table depth [m] + real :: tmp_wa ! water in the "aquifer" [mm] + real :: tmp_wt ! water in aquifer and saturated soil [mm] + real, allocatable :: tmp_tsno(:) ! snow layer temperature [K] + real, allocatable :: tmp_zss(:) ! snow/soil layer depth from snow surface [m] + real, allocatable :: tmp_snowice(:) ! snow layer ice [mm] + real, allocatable :: tmp_snowliq(:) ! snow layer liquid water [mm] + real :: tmp_lfmass ! leaf mass [g/m2] + real :: tmp_rtmass ! mass of fine roots [g/m2] + real :: tmp_stmass ! stem mass [g/m2] + real :: tmp_wood ! mass of wood (including woody roots) [g/m2] + real :: tmp_stblcp ! stable carbon in deep soil [g/m2] + real :: tmp_fastcp ! short-lived carbon in shallow soil [g/m2] + real :: tmp_lai ! leaf area index [-] + real :: tmp_sai ! stem area index [-] + real :: tmp_tauss ! snow age factor [-] + real, allocatable :: tmp_smoiseq(:) ! equilibrium volumetric soil moisture content [m3/m3] + real :: tmp_smcwtd ! soil moisture content in the layer to the water table when deep [-] + real :: tmp_deeprech ! recharge to the water table when deep [-] + real :: tmp_rech ! recharge to the water table (diagnostic) [-] + real :: tmp_grain ! mass of grain XING [g/m2] + real :: tmp_gdd ! growing degree days XING (based on 10C) [-] + integer :: tmp_pgs ! growing degree days XING [-] + real, allocatable :: tmp_gecros_state(:) ! optional gecros crop [-] + real :: tmp_t2mv ! 2m temperature of vegetation part [K] + real :: tmp_t2mb ! 2m temperature of bare ground part [K] + real :: tmp_q2mv ! 2m mixing ratio of vegetation part [-] + real :: tmp_q2mb ! 2m mixing ratio of bare ground part [-] + real :: tmp_trad ! surface radiative temperature [K] + real :: tmp_nee ! net ecosys exchange of CO2 [g/m2/s CO2] + real :: tmp_gpp ! gross primary assimilation of carbon [g/m2/s C] + real :: tmp_npp ! net primary productivity of carbon [g/m2/s C] + real :: tmp_fveg ! Noah-MP green vegetation fraction [-] + real :: tmp_runsf ! surface runoff [mm/s] + real :: tmp_runsb ! subsurface runoff [mm/s] + real :: tmp_ecan ! evaporation of intercepted water [mm/s] + real :: tmp_edir ! soil surface evaporation rate [mm/s] + real :: tmp_etran ! transpiration rate [mm/s] + real :: tmp_rainf ! rainfall rate [kg s-1] + real :: tmp_snowf ! snowfall rate [kg s-1] + real :: tmp_fsa ! total absorbed solar radiation [W/m2] + real :: tmp_fira ! total net longwave radiation [+ to atm] [W/m2] + real :: tmp_apar ! photosyn active energy by canopy [W/m2] + real :: tmp_psn ! total photosynthesis [+] [umol co2/m2/s] + real :: tmp_sav ! solar radiation absorbed by vegetation [W/m2] + real :: tmp_sag ! solar radiation absorbed by ground [W/m2] + real :: tmp_rssun ! sunlit leaf stomatal resistance [s/m] + real :: tmp_rssha ! shaded leaf stomatal resistance [s/m] + real :: tmp_bgap ! between gap fraction [-] + real :: tmp_wgap ! within gap fraction [-] + real :: tmp_tgb ! bare ground temperature [K] + real :: tmp_tgv ! under canopy ground temperature [K] + real :: tmp_chv ! sensible heat exchange coefficient vegetated [-] + real :: tmp_chb ! sensible heat exchange coefficient bare-ground [-] + real :: tmp_shg ! veg ground sensible heat [+ to atm] [W/m2] + real :: tmp_shc ! canopy sensible heat [+ to atm] [W/m2] + real :: tmp_shb ! bare sensible heat [+ to atm] [W/m2] + real :: tmp_evg ! veg ground evaporation [+ to atm] [W/m2] + real :: tmp_evb ! bare soil evaporation [+ to atm] [W/m2] + real :: tmp_ghv ! veg ground heat flux [+ to soil] [W/m2] + real :: tmp_ghb ! bare ground heat flux [+ to soil] [W/m2] + real :: tmp_irg ! veg ground net LW radiation [+ to atm] [W/m2] + real :: tmp_irc ! canopy net LW radiation [+ to atm] [W/m2] + real :: tmp_irb ! bare net LW radiation [+ to atm] [W/m2] + real :: tmp_tr ! transpiration [ to atm] [W/m2] + real :: tmp_evc ! canopy evaporation heat [to atm] [W/m2] + real :: tmp_fgev_pet, tmp_fcev_pet,tmp_fctr_pet + real :: tmp_chleaf ! leaf exchange coefficient [-] + real :: tmp_chuc ! under canopy exchange coefficient [-] + real :: tmp_chv2 ! veg 2m exchange coefficient [-] + real :: tmp_chb2 ! bare 2m exchange coefficient [-] + real :: tmp_qsnbot ! melting water out of snow bottom [kg m-2 s-1] + real :: tmp_subsnow ! snow sublimation rate [kg m-2 s-1] + real :: tmp_pah ! precipitation advected heat - total (W/m2) + real, allocatable :: tmp_relsmc(:) ! relative soil moisture [-] + + ! Code added by Zhuo Wang 02/28/2019 + real :: AvgSurfT_out ! average surface temperature [K] + real :: TWS_out ! terrestrial water storage [mm] + ! Code added by David Mocko 04/25/2019 + real :: startsm, startswe, startint, startgw, endsm + + real :: tmp_sfcheadrt ! extra input for WRF-HYDRO [m] + real :: tmp_infxs1rt ! extra output for WRF-HYDRO [m] + real :: tmp_soldrain1rt ! extra output for WRF-HYDRO [m] + + !ag (05Jan2021) + real :: tmp_rivsto + real :: tmp_fldsto + real :: tmp_fldfrc + + ! EMK for 557WW + real :: tmp_q2sat, tmp_es + character*3 :: fnest + REAL, PARAMETER:: LVH2O = 2.501000E+6 ! Latent heat for evapo for water + + allocate( tmp_sldpth( NOAHMP401_struc(n)%nsoil ) ) + allocate( tmp_shdfac_monthly( 12 ) ) + allocate( tmp_soilcomp( 8 ) ) + allocate( tmp_smc( NOAHMP401_struc(n)%nsoil ) ) + allocate( tmp_sh2o( NOAHMP401_struc(n)%nsoil ) ) + allocate( tmp_tslb( NOAHMP401_struc(n)%nsoil ) ) + allocate( tmp_relsmc( NOAHMP401_struc(n)%nsoil ) ) + allocate( tmp_tsno( NOAHMP401_struc(n)%nsnow ) ) + allocate( tmp_zss( NOAHMP401_struc(n)%nsnow+NOAHMP401_struc(n)%nsoil) ) + allocate( tmp_snowice( NOAHMP401_struc(n)%nsnow ) ) + allocate( tmp_snowliq( NOAHMP401_struc(n)%nsnow ) ) + allocate( tmp_smoiseq( NOAHMP401_struc(n)%nsoil ) ) + allocate( tmp_gecros_state( 60 ) ) + + ! check NoahMP401 alarm. If alarm is ring, run model. + + alarmCheck = LIS_isAlarmRinging(LIS_rc, "NoahMP401 model alarm") + + if (alarmCheck) Then + do t = 1, LIS_rc%npatch(n, LIS_rc%lsm_index) + dt = LIS_rc%ts + row = LIS_surface(n, LIS_rc%lsm_index)%tile(t)%row + col = LIS_surface(n, LIS_rc%lsm_index)%tile(t)%col + lat = LIS_domain(n)%grid(LIS_domain(n)%gindex(col, row))%lat + lon = LIS_domain(n)%grid(LIS_domain(n)%gindex(col, row))%lon + + ! retrieve forcing data from NOAHMP401_struc(n)%noahmp401(t) and assign to local variables + ! tair: air temperature + tmp_tair = NOAHMP401_struc(n)%noahmp401(t)%tair / NOAHMP401_struc(n)%forc_count + ! Yeosang Yoon, for snow DA + NOAHMP401_struc(n)%noahmp401(t)%sfctmp = tmp_tair + + ! psurf: air pressure + tmp_psurf = NOAHMP401_struc(n)%noahmp401(t)%psurf / NOAHMP401_struc(n)%forc_count + + ! wind_e: U wind component + tmp_wind_e = NOAHMP401_struc(n)%noahmp401(t)%wind_e / NOAHMP401_struc(n)%forc_count + + ! wind_n: V wind component + tmp_wind_n = NOAHMP401_struc(n)%noahmp401(t)%wind_n / NOAHMP401_struc(n)%forc_count + + ! qair: specific humidity + tmp_qair = NOAHMP401_struc(n)%noahmp401(t)%qair / NOAHMP401_struc(n)%forc_count + + ! swdown: downward solar radiation + tmp_swdown = NOAHMP401_struc(n)%noahmp401(t)%swdown / NOAHMP401_struc(n)%forc_count + + ! lwdown: downward longwave radiation + tmp_lwdown = NOAHMP401_struc(n)%noahmp401(t)%lwdown / NOAHMP401_struc(n)%forc_count + + ! prcp: total precipitation (rainfall+snowfall) + ! Both Noah-MP-3.6 and Noah-MP-4.0.1 require total precipitation as forcing input. + ! In Noah-MP-3.6, the forcing is required to be precipitation rate [kg m-2 sec-1]. + ! In Noah-MP-4.0.1, the forcing is required to be precipitation amount [kg m-2]. + + ! T. Lahmers: Correct total precip for cases when model time step > forcing timestep. + ! Edit suggested by D. Mocko and K. Arsenault + if (NOAHMP401_struc(n)%ts > LIS_rc%ts) then + tmp_dt = NOAHMP401_struc(n)%ts + tmp_prcp = tmp_dt * (NOAHMP401_struc(n)%noahmp401(t)%prcp / NOAHMP401_struc(n)%forc_count) + else + tmp_prcp = dt * (NOAHMP401_struc(n)%noahmp401(t)%prcp / NOAHMP401_struc(n)%forc_count) + endif + + !ag(05Jan2021) + ! rivsto/fldsto: River storage and flood storage + ! NOAHMP401_struc(n)%noahmp401(t)%rivsto and NOAHMP401_struc(n)%noahmp401(t)%fldsto + ! are updated in noahmp401_getsws_hymap2.F90 + tmp_rivsto = NOAHMP401_struc(n)%noahmp401(t)%rivsto + tmp_fldsto = NOAHMP401_struc(n)%noahmp401(t)%fldsto + tmp_fldfrc = NOAHMP401_struc(n)%noahmp401(t)%fldfrc + + ! check validity of tair + if(tmp_tair .eq. LIS_rc%udef) then + write(LIS_logunit, *) "[ERR] undefined value found for forcing variable tair in NoahMP401" + write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon + call LIS_endrun() + endif + ! check validity of psurf + if(tmp_psurf .eq. LIS_rc%udef) then + write(LIS_logunit, *) "[ERR] undefined value found for forcing variable psurf in NoahMP401" + write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon + call LIS_endrun() + endif + ! check validity of wind_e + if(tmp_wind_e .eq. LIS_rc%udef) then + write(LIS_logunit, *) "[ERR] undefined value found for forcing variable wind_e in NoahMP401" + write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon + call LIS_endrun() + endif + ! check validity of wind_n + if(tmp_wind_n .eq. LIS_rc%udef) then + write(LIS_logunit, *) "[ERR] undefined value found for forcing variable wind_n in NoahMP401" + write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon + call LIS_endrun() + endif + ! check validity of qair + if(tmp_qair .eq. LIS_rc%udef) then + write(LIS_logunit, *) "[ERR] undefined value found for forcing variable qair in NoahMP401" + write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon + call LIS_endrun() + endif + ! check validity of swdown + if(tmp_swdown .eq. LIS_rc%udef) then + write(LIS_logunit, *) "[ERR] undefined value found for forcing variable swdown in NoahMP401" + write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon + call LIS_endrun() + endif + ! check validity of lwdown + if(tmp_lwdown .eq. LIS_rc%udef) then + write(LIS_logunit, *) "[ERR] undefined value found for forcing variable lwdown in NoahMP401" + write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon + call LIS_endrun() + endif + ! check validity of prcp + if(tmp_prcp .eq. LIS_rc%udef) then + write(LIS_logunit, *) "[ERR] undefined value found for forcing variable prcp in NoahMP401" + write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon + call LIS_endrun() + endif + ! + + !ag (05Jan2021) + ! check validity of rivsto + if(tmp_rivsto .eq. LIS_rc%udef) then + write(LIS_logunit, *) "[ERR] undefined value found for forcing variable rivsto in NoahMP36" + write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon + call LIS_endrun() + endif + ! check validity of fldsto + if(tmp_fldsto .eq. LIS_rc%udef) then + write(LIS_logunit, *) "[ERR] undefined value found for forcing variable fldsto in NoahMP36" + write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon + call LIS_endrun() + endif + ! check validity of fldfrc + if(tmp_fldfrc .eq. LIS_rc%udef) then + write(LIS_logunit, *) "[ERR] undefined value found for forcing variable fldfrc in NoahMP36" + write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon + call LIS_endrun() + endif + ! + + tmp_latitude = lat + tmp_longitude = lon + tmp_year = LIS_rc%yr + tmp_month = LIS_rc%mo + tmp_day = LIS_rc%da + tmp_hour = LIS_rc%hr + tmp_minute = LIS_rc%mn + + ! Added by Zhuo Wang on 11/13/2018 + tmp_ttile = t + tmp_itimestep = LIS_rc%tscount(n) + + ! get parameters + tmp_dt = NOAHMP401_struc(n)%ts + tmp_sldpth(:) = NOAHMP401_struc(n)%sldpth(:) + tmp_nsoil = NOAHMP401_struc(n)%nsoil + tmp_nsnow = NOAHMP401_struc(n)%nsnow + tmp_vegetype = NOAHMP401_struc(n)%noahmp401(t)%vegetype + tmp_soiltype = NOAHMP401_struc(n)%noahmp401(t)%soiltype + ! Multiply shdfac by 100.0 because noahmpdrv.f90 + ! expects it in units of percentage, not fraction. + tmp_shdfac_monthly(:) = NOAHMP401_struc(n)%noahmp401(t)%shdfac_monthly(:) * 100.0 + tmp_tbot = NOAHMP401_struc(n)%noahmp401(t)%tbot + tmp_urban_vegetype = LIS_rc%urbanclass + tmp_cropcat = LIS_rc%cropclass + tmp_dveg_opt = NOAHMP401_struc(n)%dveg_opt + tmp_crs_opt = NOAHMP401_struc(n)%crs_opt + tmp_btr_opt = NOAHMP401_struc(n)%btr_opt + tmp_run_opt = NOAHMP401_struc(n)%run_opt + tmp_sfc_opt = NOAHMP401_struc(n)%sfc_opt + tmp_frz_opt = NOAHMP401_struc(n)%frz_opt + tmp_inf_opt = NOAHMP401_struc(n)%inf_opt + tmp_rad_opt = NOAHMP401_struc(n)%rad_opt + tmp_alb_opt = NOAHMP401_struc(n)%alb_opt + tmp_snf_opt = NOAHMP401_struc(n)%snf_opt + tmp_tbot_opt = NOAHMP401_struc(n)%tbot_opt + tmp_stc_opt = NOAHMP401_struc(n)%stc_opt + tmp_gla_opt = NOAHMP401_struc(n)%gla_opt + tmp_sndpth_gla_opt = NOAHMP401_struc(n)%sndpth_gla_opt + tmp_rsf_opt = NOAHMP401_struc(n)%rsf_opt + tmp_soil_opt = NOAHMP401_struc(n)%soil_opt + tmp_pedo_opt = NOAHMP401_struc(n)%pedo_opt + tmp_crop_opt = NOAHMP401_struc(n)%crop_opt + tmp_iz0tlnd = 0 + tmp_urban_opt = NOAHMP401_struc(n)%urban_opt +! Multiply reference height by 2.0 because module_sf_noahmpdrv +! expects this variable to be in terms of a thickness of the +! atmospheric layers, and it later divides this value by 2.0. +! Thus, the LIS user should specify the exact height of the +! reference in lis.config, and module_sf_noahmpdrv will then +! correctly use this actual value. This code is confirmed in +! the HRLDAS driver, which also multiplies this value by 2.0. +! 11/30/2018 - dmm + tmp_dz8w = NOAHMP401_struc(n)%dz8w * 2.0 + + if (tmp_crop_opt.ne.0) then + tmp_planting = NOAHMP401_struc(n)%noahmp401(t)%planting + tmp_harvest = NOAHMP401_struc(n)%noahmp401(t)%harvest + tmp_season_gdd = NOAHMP401_struc(n)%noahmp401(t)%season_gdd + if (tmp_crop_opt.eq.2) then + tmp_gecros_state(:) = NOAHMP401_struc(n)%noahmp401(t)%gecros_state(:) + else + tmp_gecros_state(:) = 0.0 + endif + else + tmp_planting = 0.0 + tmp_harvest = 0.0 + tmp_season_gdd = 0.0 + endif + +! Zhuo Wang tested on 11/15/2018, not read from LDT-generated netcdf input file + if (tmp_soil_opt.eq.2) then + tmp_soilcL1 = NOAHMP401_struc(n)%noahmp401(t)%soilcL1 + tmp_soilcL2 = NOAHMP401_struc(n)%noahmp401(t)%soilcL2 + tmp_soilcL3 = NOAHMP401_struc(n)%noahmp401(t)%soilcL3 + tmp_soilcL4 = NOAHMP401_struc(n)%noahmp401(t)%soilcL4 + else + tmp_soilcL1 = 0.0 + tmp_soilcL2 = 0.0 + tmp_soilcL3 = 0.0 + tmp_soilcL4 = 0.0 + endif + if (tmp_soil_opt.eq.3) then + tmp_soilcomp(:) = NOAHMP401_struc(n)%noahmp401(t)%soilcomp(:) + else + tmp_soilcomp = 0.0 + endif + + ! get state variables + tmp_sfcrunoff = NOAHMP401_struc(n)%noahmp401(t)%sfcrunoff + tmp_udrrunoff = NOAHMP401_struc(n)%noahmp401(t)%udrrunoff + tmp_smc(:) = NOAHMP401_struc(n)%noahmp401(t)%smc(:) + tmp_sh2o(:) = NOAHMP401_struc(n)%noahmp401(t)%sh2o(:) + tmp_tslb(:) = NOAHMP401_struc(n)%noahmp401(t)%tslb(:) + tmp_sneqv = NOAHMP401_struc(n)%noahmp401(t)%sneqv + tmp_snowh = NOAHMP401_struc(n)%noahmp401(t)%snowh + tmp_canwat = NOAHMP401_struc(n)%noahmp401(t)%canwat + tmp_acsnom = NOAHMP401_struc(n)%noahmp401(t)%acsnom + tmp_acsnow = NOAHMP401_struc(n)%noahmp401(t)%acsnow + tmp_isnow = NOAHMP401_struc(n)%noahmp401(t)%isnow + tmp_tv = NOAHMP401_struc(n)%noahmp401(t)%tv + tmp_tg = NOAHMP401_struc(n)%noahmp401(t)%tg + tmp_canice = NOAHMP401_struc(n)%noahmp401(t)%canice + tmp_canliq = NOAHMP401_struc(n)%noahmp401(t)%canliq + tmp_eah = NOAHMP401_struc(n)%noahmp401(t)%eah + tmp_tah = NOAHMP401_struc(n)%noahmp401(t)%tah + tmp_cm = NOAHMP401_struc(n)%noahmp401(t)%cm + tmp_ch = NOAHMP401_struc(n)%noahmp401(t)%ch + tmp_fwet = NOAHMP401_struc(n)%noahmp401(t)%fwet + tmp_sneqvo = NOAHMP401_struc(n)%noahmp401(t)%sneqvo + tmp_albold = NOAHMP401_struc(n)%noahmp401(t)%albold + tmp_qsnow = NOAHMP401_struc(n)%noahmp401(t)%qsnow + tmp_wslake = NOAHMP401_struc(n)%noahmp401(t)%wslake + tmp_zwt = NOAHMP401_struc(n)%noahmp401(t)%zwt + tmp_wa = NOAHMP401_struc(n)%noahmp401(t)%wa + tmp_wt = NOAHMP401_struc(n)%noahmp401(t)%wt + tmp_tsno(:) = NOAHMP401_struc(n)%noahmp401(t)%tsno(:) + tmp_zss(:) = NOAHMP401_struc(n)%noahmp401(t)%zss(:) + tmp_snowice(:) = NOAHMP401_struc(n)%noahmp401(t)%snowice(:) + tmp_snowliq(:) = NOAHMP401_struc(n)%noahmp401(t)%snowliq(:) + tmp_lfmass = NOAHMP401_struc(n)%noahmp401(t)%lfmass + tmp_rtmass = NOAHMP401_struc(n)%noahmp401(t)%rtmass + tmp_stmass = NOAHMP401_struc(n)%noahmp401(t)%stmass + tmp_wood = NOAHMP401_struc(n)%noahmp401(t)%wood + tmp_stblcp = NOAHMP401_struc(n)%noahmp401(t)%stblcp + tmp_fastcp = NOAHMP401_struc(n)%noahmp401(t)%fastcp +! DMM - If dynamic vegetation option DVEG = 7, 8, or 9 for "input LAI", +! then send LAI/SAI from input to the Noah-MP-4.0.1 physics. If any +! tile has an undefined LAI/SAI value, instead use the value from the +! MPTABLE file for that vegetation class and for the month. + if ((tmp_dveg_opt.ge.7).and.(tmp_dveg_opt.le.9)) then + tid = LIS_surface(n,LIS_rc%lsm_index)%tile(t)%tile_id +! If "LAI data source:" is set to "none" for these three Noah-MP-4.0.1 +! input LAI vegetation options, stop the run. + if (LIS_rc%useLAImap(n).ne."none") then + tmp_lai = LIS_lai(n)%tlai(tid) + else + write(LIS_logunit,*) & + '[ERR] Attempting to use input LAI, however' + write(LIS_logunit,*) & + '[ERR] "LAI data source:" is set to "none".' + call LIS_endrun() + endif +! If "SAI data source:" is set to "none" for these three Noah-MP-4.0.1 +! input LAI vegetation options, fill in the SAI values from MPTABLE. + if (LIS_rc%useSAImap(n).ne."none") then + tmp_sai = LIS_sai(n)%tsai(tid) + endif +! If any LAI or SAI values are undefined at a tile, +! fill in the LAI or SAI values from MPTABLE. + if (tmp_lai.eq.LIS_rc%udef) then + tmp_lai = NOAHMP401_struc(n)%noahmp401(t)%lai + endif + if (tmp_sai.eq.LIS_rc%udef) then + tmp_sai = NOAHMP401_struc(n)%noahmp401(t)%sai + endif + else + tmp_lai = NOAHMP401_struc(n)%noahmp401(t)%lai + tmp_sai = NOAHMP401_struc(n)%noahmp401(t)%sai + endif + tmp_tauss = NOAHMP401_struc(n)%noahmp401(t)%tauss + tmp_smoiseq(:) = NOAHMP401_struc(n)%noahmp401(t)%smoiseq(:) + tmp_smcwtd = NOAHMP401_struc(n)%noahmp401(t)%smcwtd + tmp_deeprech = NOAHMP401_struc(n)%noahmp401(t)%deeprech + tmp_rech = NOAHMP401_struc(n)%noahmp401(t)%rech + tmp_grain = NOAHMP401_struc(n)%noahmp401(t)%grain + tmp_gdd = NOAHMP401_struc(n)%noahmp401(t)%gdd + tmp_pgs = NOAHMP401_struc(n)%noahmp401(t)%pgs + tmp_sfcheadrt = NoahMP401_struc(n)%noahmp401(t)%sfcheadrt + +! Calculate water storages at start of timestep + startsm = 0.0 + do i = 1,tmp_nsoil + startsm = startsm + & + (tmp_smc(i) * tmp_sldpth(i) * LIS_CONST_RHOFW) + enddo + startswe = tmp_sneqv + startint = tmp_canliq + tmp_canice + startgw = tmp_wa + + ! call model physics + call noahmp_driver_401(n , & ! in - nest id [-] + tmp_ttile , & ! in - tile id [-] + tmp_itimestep , & ! in - timestep number [-] + tmp_latitude , & ! in - latitude in decimal degree [rad] + tmp_longitude , & ! in - longitude in decimal year [rad] + tmp_year , & ! in - year of the currrent time step [-] + tmp_month , & ! in - month of the current time step [-] + tmp_day , & ! in - day of the current time step [-] + tmp_hour , & ! in - hour of the current time step [-] + tmp_minute , & ! in - minute of the current time step [-] + tmp_dz8w , & ! in - thickness of atmospheric layers [m] + tmp_dt , & ! in - timestep [s] + tmp_sldpth , & ! in - thickness of soil layers [m] + tmp_nsoil , & ! in - number of soil layers [-] + tmp_nsnow , & ! in - maximum number of snow layers (e.g. 3) [-] + tmp_vegetype , & ! in - vegetation type [-] + tmp_soiltype , & ! in - soil type [-] + tmp_shdfac_monthly , & ! in - monthly values for green vegetation fraction [] + tmp_tbot , & ! in - deep soil temperature [K] + tmp_urban_vegetype , & ! in - urban land cover type index [-] + tmp_cropcat , & ! in - crop category [-] + tmp_planting , & ! in - planting date [-] + tmp_harvest , & ! in - harvest date [-] + tmp_season_gdd , & ! in - growing season GDD [-] + tmp_dveg_opt , & ! in - dynamic vegetation, 1->off; 2->on); with opt_crs=1 [-] + tmp_crs_opt , & ! in - canopt stomatal resistance (1->Ball-Berry; 2->Jarvis) [-] + tmp_btr_opt , & ! in - soil moisture factor for stomatal resistance(1->Noah;2->CLM;3->SSiB) [-] + tmp_run_opt , & ! in - runoff and groundwater (1->SIMGM; 2->SIMTOP; 3->Schaake96; 4->BATS) [-] + tmp_sfc_opt , & ! in - surface layer drag coeff (CH & CM) (1->M-O; 2->Chen97) [-] + tmp_frz_opt , & ! in - supercooled liquid water (1->NY06; 2->Koren99) [-] + tmp_inf_opt , & ! in - frozen soil permeability (1->NY06; 2->Koren99) [-] + tmp_rad_opt , & ! in - radiation transfer (1->gap=F(3D,cosz); 2->gap=0; 3->gap=1-Fveg) [-] + tmp_alb_opt , & ! in - snow surface albedo (1->BATS; 2->CLASS) [-] + tmp_snf_opt , & ! in - rainfall & snowfall (1->Jordan91; 2->BATS; 3->Noah) [-] + tmp_tbot_opt , & ! in - lower boundary of soil temperature [-] + tmp_stc_opt , & ! in - snow/soil temperature time scheme [-] + tmp_gla_opt , & ! in - glacier option (1->phase change; 2->simple) [-] + tmp_sndpth_gla_opt , & ! in - Snow depth max for glacier model [mm] + tmp_rsf_opt , & ! in - surface resistance(1->Sakaguchi/Zeng;2->Seller;3->mod Sellers;4->1+snow) [-] + tmp_soil_opt , & ! in - soil configuration option [-] + tmp_pedo_opt , & ! in - soil pedotransfer function option [-] + tmp_crop_opt , & ! in - crop model option (0->none; 1->Liu et al.; 2->Gecros) [-] + tmp_iz0tlnd , & ! in - option of Chen adjustment of Czil (not used) [-] + tmp_urban_opt , & ! in - urban physics option [-] + tmp_soilcomp , & ! in - soil sand and clay percentage [-] + tmp_soilcL1 , & ! in - soil texture in layer 1 [-] + tmp_soilcL2 , & ! in - soil texture in layer 2 [-] + tmp_soilcL3 , & ! in - soil texture in layer 3 [-] + tmp_soilcL4 , & ! in - soil texture in layer 4 [-] + tmp_tair , & ! in - air temperature [K] + tmp_psurf , & ! in - air pressure [Pa] + tmp_wind_e , & ! in - U wind component [m/s] + tmp_wind_n , & ! in - V wind component [m/s] + tmp_qair , & ! in - specific humidity [kg/kg] + tmp_swdown , & ! in - downward solar radiation [W m-2] + tmp_lwdown , & ! in - downward longwave radiation [W m-2] + tmp_prcp , & ! in - total precipitation (rainfall+snowfall) [mm] + tmp_tsk , & ! out - surface radiative temperature [K] + tmp_hfx , & ! out - sensible heat flux [W m-2] +! tmp_fsh , & ! out - sensible heat flux [W/m2] + + tmp_qfx , & ! out - latent heat flux [kg s-1 m-2] + tmp_lh , & ! out - latent heat flux [W m-2] + tmp_grdflx , & ! out - ground/snow heat flux [W m-2] + tmp_sfcrunoff , & ! inout - accumulated surface runoff [m] + tmp_udrrunoff , & ! inout - accumulated sub-surface runoff [m] + tmp_albedo , & ! out - total grid albedo [-] + tmp_qsnbot , & ! out - melting water out of snow bottom [kg m-2 s-1] + tmp_subsnow , & ! out - snow sublimation rate [kg m-2 s-1] + tmp_snowc , & ! out - snow cover fraction [-] + tmp_smc , & ! inout - volumetric soil moisture [m3/m3] + tmp_pah , & ! out - precipitation advected heat - total (W/m2) + tmp_sh2o , & ! inout - volumetric liquid soil moisture [m3/m3] + tmp_tslb , & ! inout - soil temperature [K] + tmp_sneqv , & ! inout - snow water equivalent [mm] + tmp_snowh , & ! inout - physical snow depth [m] + tmp_canwat , & ! inout - total canopy water + ice [mm] + tmp_acsnom , & ! inout - accumulated snow melt leaving pack [-] + tmp_acsnow , & ! inout - accumulated snow on grid [mm] + tmp_emiss , & ! out - surface bulk emissivity [-] + tmp_rs , & ! out - total stomatal resistance [s/m] + tmp_isnow , & ! inout - actual no. of snow layers [-] + tmp_tv , & ! inout - vegetation leaf temperature [K] + tmp_tg , & ! inout - bulk ground surface temperature [K] + tmp_canice , & ! inout - canopy-intercepted ice [mm] + tmp_canliq , & ! inout - canopy-intercepted liquid water [mm] + tmp_eah , & ! inout - canopy air vapor pressure [Pa] + tmp_tah , & ! inout - canopy air temperature [K] + tmp_cm , & ! inout - bulk momentum drag coefficient [-] + tmp_ch , & ! inout - bulk sensible heat exchange coefficient [-] + tmp_fwet , & ! inout - wetted or snowed fraction of canopy [-] + tmp_sneqvo , & ! inout - snow mass at last time step [mm h2o] + tmp_albold , & ! inout - snow albedo at last time step [-] + tmp_qsnow , & ! inout - snowfall on the ground [mm/s] + tmp_wslake , & ! inout - lake water storage [mm] + tmp_zwt , & ! inout - water table depth [m] + tmp_wa , & ! inout - water in the "aquifer" [mm] + tmp_wt , & ! inout - water in aquifer and saturated soil [mm] + tmp_tsno , & ! inout - snow layer temperature [K] + tmp_zss , & ! inout - snow/soil layer depth from snow surface [m] + tmp_snowice , & ! inout - snow layer ice [mm] + tmp_snowliq , & ! inout - snow layer liquid water [mm] + tmp_lfmass , & ! inout - leaf mass [g/m2] + tmp_rtmass , & ! inout - mass of fine roots [g/m2] + tmp_stmass , & ! inout - stem mass [g/m2] + tmp_wood , & ! inout - mass of wood (including woody roots) [g/m2] + tmp_stblcp , & ! inout - stable carbon in deep soil [g/m2] + tmp_fastcp , & ! inout - short-lived carbon in shallow soil [g/m2] + tmp_lai , & ! inout - leaf area index [-] + tmp_sai , & ! inout - stem area index [-] + tmp_tauss , & ! inout - snow age factor [-] + tmp_smoiseq , & ! inout - equilibrium volumetric soil moisture content [m3/m3] + tmp_smcwtd , & ! inout - soil moisture content in the layer to the water table when deep [-] + tmp_deeprech , & ! inout - recharge to the water table when deep [-] + tmp_rech , & ! inout - recharge to the water table (diagnostic) [-] + tmp_grain , & ! inout - mass of grain XING [g/m2] + tmp_gdd , & ! inout - growing degree days XING (based on 10C) [-] + tmp_pgs , & ! inout - growing degree days XING [-] + tmp_gecros_state , & ! inout - optional gecros crop [-] + tmp_t2mv , & ! out - 2m temperature of vegetation part [K] + tmp_t2mb , & ! out - 2m temperature of bare ground part [K] + tmp_q2mv , & ! out - 2m mixing ratio of vegetation part [-] + tmp_q2mb , & ! out - 2m mixing ratio of bare ground part [-] + tmp_trad , & ! out - surface radiative temperature [K] + tmp_nee , & ! out - net ecosys exchange of CO2 [g/m2/s CO2] + tmp_gpp , & ! out - gross primary assimilation of carbon [g/m2/s C] + tmp_npp , & ! out - net primary productivity of carbon [g/m2/s C] + tmp_fveg , & ! out - Noah-MP green vegetation fraction [-] + tmp_runsf , & ! out - surface runoff [mm/s] + tmp_runsb , & ! out - subsurface runoff [mm/s] + tmp_ecan , & ! out - evaporation of intercepted water [mm/s] + tmp_edir , & ! out - soil surface evaporation rate [mm/s] + tmp_etran , & ! out - transpiration rate [mm/s] + tmp_rainf , & ! out - raifall rate [km s-1] + tmp_snowf , & ! out - snowfall rate [kg s-1] + tmp_fsa , & ! out - total absorbed solar radiation [W/m2] + tmp_fira , & ! out - total net longwave radiation [+ to atm] [W/m2] + tmp_apar , & ! out - photosyn active energy by canopy [W/m2] + tmp_psn , & ! out - total photosynthesis [+] [umol co2/m2/s] + tmp_sav , & ! out - solar radiation absorbed by vegetation [W/m2] + tmp_sag , & ! out - solar radiatiob absorbed by ground [W/m2] + tmp_rssun , & ! out - sunlit leaf stomatal resistance [s/m] + tmp_rssha , & ! out - shaded leaf stomatal resistance [s/m] + tmp_bgap , & ! out - between gap fraction [-] + tmp_wgap , & ! out - within gap fraction [-] + tmp_tgb , & ! out - bare ground temperature [K] + tmp_tgv , & ! out - under canopy ground temperature [K] + tmp_chv , & ! out - sensible heat exchange coefficient vegetated [-] + tmp_chb , & ! out - sensible heat exchange coefficient bare-ground [-] + tmp_shg , & ! out - veg ground sensible heat [+ to atm] [W/m2] + tmp_shc , & ! out - canopy sensible heat [+ to atm] [W/m2] + tmp_shb , & ! out - bare sensible heat [+ to atm] [W/m2] + tmp_evg , & ! out - veg ground evaporation [+ to atm] [W/m2] + tmp_evb , & ! out - bare soil evaporation [+ to atm] [W/m2] + tmp_ghv , & ! out - veg ground heat flux [+ to soil] [W/m2] + tmp_ghb , & ! out - bare ground heat flux [+ to soil] [W/m2] + tmp_irg , & ! out - veg ground net LW radiation [+ to atm] [W/m2] + tmp_irc , & ! out - canopy net LW radiation [+ to atm] [W/m2] + tmp_irb , & ! out - bare net LW radiation [+ to atm] [W/m2] + tmp_tr , & ! out - transpiration [ to atm] [W/m2] + tmp_evc , & ! out - canopy evaporation heat [to atm] [W/m2] + tmp_fgev_pet, tmp_fcev_pet, tmp_fctr_pet, & !PET code from Sujay + tmp_chleaf , & ! out - leaf exchange coefficient [-] + tmp_chuc , & ! out - under canopy exchange coefficient [-] + tmp_chv2 , & ! out - veg 2m exchange coefficient [-] + tmp_chb2 , & ! out - bare 2m exchange coefficient [-] + tmp_relsmc , & + !ag (12Sep2019) + tmp_rivsto , & ! in - river storage [m/s] + tmp_fldsto , & ! in - flood storage [m/s] + tmp_fldfrc , & ! in - flooded fraction [-] + NOAHMP401_struc(n)%noahmp401(t)%param, & ! out - relative soil moisture [-] + tmp_sfcheadrt , & + tmp_infxs1rt , & + tmp_soldrain1rt ) ! out - extra output for WRF-HYDRO [m] + + ! save state variables from local variables to global variables + NOAHMP401_struc(n)%noahmp401(t)%sfcrunoff = tmp_sfcrunoff + NOAHMP401_struc(n)%noahmp401(t)%udrrunoff = tmp_udrrunoff + NOAHMP401_struc(n)%noahmp401(t)%smc(:) = tmp_smc(:) + NOAHMP401_struc(n)%noahmp401(t)%sh2o(:) = tmp_sh2o(:) + NOAHMP401_struc(n)%noahmp401(t)%tslb(:) = tmp_tslb(:) + NOAHMP401_struc(n)%noahmp401(t)%sneqv = tmp_sneqv + NOAHMP401_struc(n)%noahmp401(t)%snowh = tmp_snowh + NOAHMP401_struc(n)%noahmp401(t)%canwat = tmp_canwat + NOAHMP401_struc(n)%noahmp401(t)%acsnom = tmp_acsnom + NOAHMP401_struc(n)%noahmp401(t)%acsnow = tmp_acsnow + NOAHMP401_struc(n)%noahmp401(t)%isnow = tmp_isnow + NOAHMP401_struc(n)%noahmp401(t)%tv = tmp_tv + NOAHMP401_struc(n)%noahmp401(t)%tg = tmp_tg + NOAHMP401_struc(n)%noahmp401(t)%canice = tmp_canice + NOAHMP401_struc(n)%noahmp401(t)%canliq = tmp_canliq + NOAHMP401_struc(n)%noahmp401(t)%eah = tmp_eah + NOAHMP401_struc(n)%noahmp401(t)%tah = tmp_tah + NOAHMP401_struc(n)%noahmp401(t)%cm = tmp_cm + NOAHMP401_struc(n)%noahmp401(t)%ch = tmp_ch + NOAHMP401_struc(n)%noahmp401(t)%fwet = tmp_fwet + NOAHMP401_struc(n)%noahmp401(t)%sneqvo = tmp_sneqvo + NOAHMP401_struc(n)%noahmp401(t)%albold = tmp_albold + NOAHMP401_struc(n)%noahmp401(t)%qsnow = tmp_qsnow + NOAHMP401_struc(n)%noahmp401(t)%wslake = tmp_wslake + NOAHMP401_struc(n)%noahmp401(t)%zwt = tmp_zwt + NOAHMP401_struc(n)%noahmp401(t)%wa = tmp_wa + NOAHMP401_struc(n)%noahmp401(t)%wt = tmp_wt + NOAHMP401_struc(n)%noahmp401(t)%tsno(:) = tmp_tsno(:) + NOAHMP401_struc(n)%noahmp401(t)%zss(:) = tmp_zss(:) + NOAHMP401_struc(n)%noahmp401(t)%snowice(:) = tmp_snowice(:) + NOAHMP401_struc(n)%noahmp401(t)%snowliq(:) = tmp_snowliq(:) + NOAHMP401_struc(n)%noahmp401(t)%lfmass = tmp_lfmass + NOAHMP401_struc(n)%noahmp401(t)%rtmass = tmp_rtmass + NOAHMP401_struc(n)%noahmp401(t)%stmass = tmp_stmass + NOAHMP401_struc(n)%noahmp401(t)%wood = tmp_wood + NOAHMP401_struc(n)%noahmp401(t)%stblcp = tmp_stblcp + NOAHMP401_struc(n)%noahmp401(t)%fastcp = tmp_fastcp + NOAHMP401_struc(n)%noahmp401(t)%lai = tmp_lai + NOAHMP401_struc(n)%noahmp401(t)%sai = tmp_sai + NOAHMP401_struc(n)%noahmp401(t)%tauss = tmp_tauss + NOAHMP401_struc(n)%noahmp401(t)%smoiseq(:) = tmp_smoiseq(:) + NOAHMP401_struc(n)%noahmp401(t)%smcwtd = tmp_smcwtd + NOAHMP401_struc(n)%noahmp401(t)%deeprech = tmp_deeprech + NOAHMP401_struc(n)%noahmp401(t)%rech = tmp_rech + NOAHMP401_struc(n)%noahmp401(t)%grain = tmp_grain + NOAHMP401_struc(n)%noahmp401(t)%gdd = tmp_gdd + NOAHMP401_struc(n)%noahmp401(t)%pgs = tmp_pgs + NOAHMP401_struc(n)%noahmp401(t)%gecros_state(:) = tmp_gecros_state(:) + + ! save output variables from local variables to global variables + NOAHMP401_struc(n)%noahmp401(t)%tsk = tmp_tsk + NOAHMP401_struc(n)%noahmp401(t)%hfx = tmp_hfx +! NOAHMP401_struc(n)%noahmp401(t)%fsh = tmp_fsh + + NOAHMP401_struc(n)%noahmp401(t)%qfx = tmp_qfx + NOAHMP401_struc(n)%noahmp401(t)%lh = tmp_lh + NOAHMP401_struc(n)%noahmp401(t)%grdflx = tmp_grdflx + NOAHMP401_struc(n)%noahmp401(t)%albedo = tmp_albedo + NOAHMP401_struc(n)%noahmp401(t)%snowc = tmp_snowc + NOAHMP401_struc(n)%noahmp401(t)%emiss = tmp_emiss + NOAHMP401_struc(n)%noahmp401(t)%rs = tmp_rs + NOAHMP401_struc(n)%noahmp401(t)%t2mv = tmp_t2mv + NOAHMP401_struc(n)%noahmp401(t)%t2mb = tmp_t2mb + NOAHMP401_struc(n)%noahmp401(t)%q2mv = tmp_q2mv + NOAHMP401_struc(n)%noahmp401(t)%q2mb = tmp_q2mb + NOAHMP401_struc(n)%noahmp401(t)%trad = tmp_trad + NOAHMP401_struc(n)%noahmp401(t)%nee = tmp_nee + NOAHMP401_struc(n)%noahmp401(t)%gpp = tmp_gpp + NOAHMP401_struc(n)%noahmp401(t)%npp = tmp_npp + NOAHMP401_struc(n)%noahmp401(t)%fveg = tmp_fveg + NOAHMP401_struc(n)%noahmp401(t)%runsf = tmp_runsf + NOAHMP401_struc(n)%noahmp401(t)%runsb = tmp_runsb + NOAHMP401_struc(n)%noahmp401(t)%ecan = tmp_ecan +! Direct soil evaporation does not include sublimation of the snowpack +! on the soil (by the strict ALMA definition of ESoil). - David Mocko + NOAHMP401_struc(n)%noahmp401(t)%edir = tmp_edir - tmp_subsnow + NOAHMP401_struc(n)%noahmp401(t)%etran = tmp_etran + NOAHMP401_struc(n)%noahmp401(t)%rainf = tmp_rainf + NOAHMP401_struc(n)%noahmp401(t)%snowf = tmp_snowf + NOAHMP401_struc(n)%noahmp401(t)%fsa = tmp_fsa + NOAHMP401_struc(n)%noahmp401(t)%fira = tmp_fira + NOAHMP401_struc(n)%noahmp401(t)%apar = tmp_apar + NOAHMP401_struc(n)%noahmp401(t)%psn = tmp_psn + NOAHMP401_struc(n)%noahmp401(t)%sav = tmp_sav + NOAHMP401_struc(n)%noahmp401(t)%sag = tmp_sag + NOAHMP401_struc(n)%noahmp401(t)%rssun = tmp_rssun + NOAHMP401_struc(n)%noahmp401(t)%rssha = tmp_rssha + NOAHMP401_struc(n)%noahmp401(t)%bgap = tmp_bgap + NOAHMP401_struc(n)%noahmp401(t)%wgap = tmp_wgap + NOAHMP401_struc(n)%noahmp401(t)%tgb = tmp_tgb + NOAHMP401_struc(n)%noahmp401(t)%tgv = tmp_tgv + NOAHMP401_struc(n)%noahmp401(t)%chv = tmp_chv + NOAHMP401_struc(n)%noahmp401(t)%chb = tmp_chb + NOAHMP401_struc(n)%noahmp401(t)%shg = tmp_shg + NOAHMP401_struc(n)%noahmp401(t)%shc = tmp_shc + NOAHMP401_struc(n)%noahmp401(t)%shb = tmp_shb + NOAHMP401_struc(n)%noahmp401(t)%evg = tmp_evg + NOAHMP401_struc(n)%noahmp401(t)%evb = tmp_evb + NOAHMP401_struc(n)%noahmp401(t)%ghv = tmp_ghv + NOAHMP401_struc(n)%noahmp401(t)%ghb = tmp_ghb + NOAHMP401_struc(n)%noahmp401(t)%irg = tmp_irg + NOAHMP401_struc(n)%noahmp401(t)%irc = tmp_irc + NOAHMP401_struc(n)%noahmp401(t)%irb = tmp_irb + NOAHMP401_struc(n)%noahmp401(t)%tr = tmp_tr + NOAHMP401_struc(n)%noahmp401(t)%evc = tmp_evc + NOAHMP401_struc(n)%noahmp401(t)%chleaf = tmp_chleaf + NOAHMP401_struc(n)%noahmp401(t)%chuc = tmp_chuc + NOAHMP401_struc(n)%noahmp401(t)%chv2 = tmp_chv2 + NOAHMP401_struc(n)%noahmp401(t)%chb2 = tmp_chb2 + NOAHMP401_struc(n)%noahmp401(t)%infxs1rt = tmp_infxs1rt + NOAHMP401_struc(n)%noahmp401(t)%soldrain1rt = tmp_soldrain1rt + + ! EMK Update RHMin for 557WW + if (tmp_tair .lt. & + noahmp401_struc(n)%noahmp401(t)%tair_agl_min) then + noahmp401_struc(n)%noahmp401(t)%tair_agl_min = tmp_tair + ! Use formulation based on Noah.3.6 code, which treats + ! q2sat as saturated specific humidity + tmp_es = 611.0*exp(2.501E6/461.0*(1./273.15 - 1./tmp_tair)) + tmp_q2sat = 0.622*tmp_es/(tmp_psurf-(1.-0.622)*tmp_es) + noahmp401_struc(n)%noahmp401(t)%rhmin = tmp_qair / tmp_q2sat + endif + + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RHMIN, & + value=noahmp401_struc(n)%noahmp401(t)%rhmin, & + vlevel=1, unit="-", direction="-",& + surface_type=LIS_rc%lsm_index) + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RHMIN, & + value=(100.*noahmp401_struc(n)%noahmp401(t)%rhmin), & + vlevel=1, unit="%", direction="-",& + surface_type=LIS_rc%lsm_index) + + ![ 1] output variable: tsk (unit=K ). *** surface radiative temperature + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RADT, value = NOAHMP401_struc(n)%noahmp401(t)%tsk, & + vlevel=1, unit="K", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 2] output variable: fsh (unit=W/m2). *** sensible heat flux to atmosphere + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QH, value = NOAHMP401_struc(n)%noahmp401(t)%hfx, & + vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) + + !call LIS_diagnoseSurfaceOutputVar(n, t,LIS_MOC_QH,value = NOAHMP401_struc(n)%noahmp401(t)%fsh, & + ! vlevel=1,unit="W m-2",direction="UP",surface_type=LIS_rc%lsm_index) + + + ![ 3] output variable: lh (unit=W/m2). *** latent heat flux + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QLE, value = NOAHMP401_struc(n)%noahmp401(t)%lh, & + vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) + + ![ 4] output variable: grdflx (unit=W/m2). *** ground/snow heat flux to soil + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QG, value = NOAHMP401_struc(n)%noahmp401(t)%grdflx, & + vlevel=1, unit="W m-2", direction="DN", surface_type = LIS_rc%lsm_index) + + ![ 5] output variable: albedo (unit=- ). *** total grid albedo + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_ALBEDO, value = NOAHMP401_struc(n)%noahmp401(t)%albedo, & + vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) + + if (tmp_albedo.ne.LIS_rc%udef) tmp_albedo = tmp_albedo * 100.0 + + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_ALBEDO, value = tmp_albedo, & + vlevel=1, unit="%", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 6] output variable: snowc (unit=-). *** snow cover fraction + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWCOVER, value = NOAHMP401_struc(n)%noahmp401(t)%snowc, & + vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) + + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWCOVER, value = (NOAHMP401_struc(n)%noahmp401(t)%snowc*100.0), & + vlevel=1, unit="%", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 7] output variable: smc (unit=m3/m3). *** volumetric soil moisture + do i=1, NOAHMP401_struc(n)%nsoil + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SOILMOIST, value = NOAHMP401_struc(n)%noahmp401(t)%smc(i), & + vlevel=i, unit="m^3 m-3", direction="-", surface_type = LIS_rc%lsm_index) + end do + + ![ 8] output variable: sh2o (unit=m3/m3). *** equilibrium volumetric liquid soil moisture content + do i=1, NOAHMP401_struc(n)%nsoil + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SMLIQFRAC, value = NOAHMP401_struc(n)%noahmp401(t)%sh2o(i), & + vlevel=i, unit="m^3 m-3", direction="-", surface_type = LIS_rc%lsm_index) + end do + + ![ 9] output variable: tslb (unit=K). *** soil temperature + do i=1, NOAHMP401_struc(n)%nsoil + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SOILTEMP, value = NOAHMP401_struc(n)%noahmp401(t)%tslb(i), & + vlevel=i, unit="K", direction="-", surface_type = LIS_rc%lsm_index) + end do + + ![ 10] output variable: sneqv (unit=mm ). *** snow water equivalent + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SWE, value = NOAHMP401_struc(n)%noahmp401(t)%sneqv, & + vlevel=1, unit="kg m-2", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 11] output variable: snowh (unit=m ). *** physical snow depth + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWDEPTH, value = NOAHMP401_struc(n)%noahmp401(t)%snowh, & + vlevel=1, unit="m ", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 12] output variable: canwat (unit=kg/m2). *** total canopy water storage + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CANOPINT, value = NOAHMP401_struc(n)%noahmp401(t)%canwat, & + vlevel=1, unit="kg m-2", direction="- ", surface_type = LIS_rc%lsm_index) + + ![ 13] output variable: emiss (unit=- ). *** surface bulk emissivity + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_EMISSFORC, value = NOAHMP401_struc(n)%noahmp401(t)%emiss, & + vlevel=1, unit="- ", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 14] output variable: rs (unit=s/m). *** total stomatal resistance + ! call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RS, value = NOAHMP401_struc(n)%noahmp401(t)%rs, & + ! vlevel=1, unit="s/m", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 15] output variable: isnow (unit=-). *** actual number of snow layers + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SOWN_NLAYER, value = -1.0*NOAHMP401_struc(n)%noahmp401(t)%isnow, & + vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 16] output variable: tv (unit=K ). *** vegetation leaf temperature + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_VEGT, value = NOAHMP401_struc(n)%noahmp401(t)%tv, & + vlevel=1, unit="K", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 17] output variable: tg (unit=K). *** averaged ground surface temperature + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_GROUNDAVGT, value = NOAHMP401_struc(n)%noahmp401(t)%tg, & + vlevel=1, unit="K", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 18] output variable: canice (unit=mm). *** canopy intercepted ice + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SWEVEG, value = NOAHMP401_struc(n)%noahmp401(t)%canice, & + vlevel=1, unit="kg m-2", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 19] output variable: canliq (unit=mm). *** canopy intercepted liquid water + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CANOPY_INTL, value = NOAHMP401_struc(n)%noahmp401(t)%canliq, & + vlevel=1, unit="mm", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 20] output variable: eah (unit=Pa ). *** canopy air vapor pressure + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CANOPY_VP, value = NOAHMP401_struc(n)%noahmp401(t)%eah, & + vlevel=1, unit="Pa", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 21] output variable: tah (unit=K ). *** canopy air temperature + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CANOPY_TEMP, value = NOAHMP401_struc(n)%noahmp401(t)%tah, & + vlevel=1, unit="K", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 22] output variable: cm (unit=s/m ). *** bulk momentum drag coefficient + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CM, value = NOAHMP401_struc(n)%noahmp401(t)%cm, & + vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 23] output variable: ch (unit=s/m ). *** bulk sensible heat exchange coefficient + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CH, value = NOAHMP401_struc(n)%noahmp401(t)%ch, & + vlevel=1, unit="m", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 24] output variable: fwet (unit=- ). *** wetted or snowed fraction of canopy + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CANOPY_WF, value = NOAHMP401_struc(n)%noahmp401(t)%fwet, & + vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 25] output variable: wslake (unit=mm). *** lake water storage + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_LAKEWATER, value = NOAHMP401_struc(n)%noahmp401(t)%wslake, & + vlevel=1, unit="mm", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 26] output variable: zwt (unit=m). *** water table depth + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_WATERTABLED, value = NOAHMP401_struc(n)%noahmp401(t)%zwt, & + vlevel=1, unit="m", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 27] output variable: wa (unit=mm). *** water storage in the "aquifer" + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_GWS, value = NOAHMP401_struc(n)%noahmp401(t)%wa, & + vlevel=1, unit="mm", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 28] output variable: wt (unit=mm). *** water in aquifer and saturated soil + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_WT_AQUI_SATSOIL, value = NOAHMP401_struc(n)%noahmp401(t)%wt, & + vlevel=1, unit="mm", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 29] output variable: tsno (unit=K). *** snow layer temperature + do i=1, NOAHMP401_struc(n)%nsnow + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWTPROF, value = NOAHMP401_struc(n)%noahmp401(t)%tsno(i), & + vlevel=i, unit="K", direction="-", surface_type = LIS_rc%lsm_index) + end do + + ![ 30] output variable: snowice (unit=mm ). *** snow layer ice + do i=1, NOAHMP401_struc(n)%nsnow + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWICE, value = NOAHMP401_struc(n)%noahmp401(t)%snowice(i), & + vlevel=i, unit="mm", direction="-", surface_type = LIS_rc%lsm_index) + end do + + ![ 31] output variable: snowliq (unit=mm ). *** snow layer liquid water + do i=1, NOAHMP401_struc(n)%nsnow + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWLIQ, value = NOAHMP401_struc(n)%noahmp401(t)%snowliq(i), & + vlevel=i, unit="mm", direction="-", surface_type = LIS_rc%lsm_index) + end do + + ! Yeosang Yoon, for snow DA + ! output variable: z_snow (unit=m). *** snow layer-bottom depth from snow surface + do i=1, NOAHMP401_struc(n)%nsnow + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOW_LBDFSS, value = NOAHMP401_struc(n)%noahmp401(t)%zss(i), & + vlevel=i, unit="m", direction="-", surface_type = LIS_rc%lsm_index) + end do + + ![ 32] output variable: lfmass (unit=g/m2). *** leaf mass + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_LEAFMASS, value = NOAHMP401_struc(n)%noahmp401(t)%lfmass, & + vlevel=1, unit="g m-2", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 33] output variable: rtmass (unit=g/m2 ). *** mass of fine roots + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_ROOTMASS, value = NOAHMP401_struc(n)%noahmp401(t)%rtmass, & + vlevel=1, unit="g m-2 ", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 34] output variable: stmass (unit=g/m2 ). *** stem mass + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_STEMMASS, value = NOAHMP401_struc(n)%noahmp401(t)%stmass, & + vlevel=1, unit="g m-2", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 35] output variable: wood (unit=g/m2). *** mass of wood including woody roots + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_WOODMASS, value = NOAHMP401_struc(n)%noahmp401(t)%wood, & + vlevel=1, unit="g m-2", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 36] output variable: stblcp (unit=g/m2). *** stable carbon in deep soil + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CARBON_DEEPSOIL, value = NOAHMP401_struc(n)%noahmp401(t)%stblcp, & + vlevel=1, unit="g m-2", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 37] output variable: fastcp (unit=g/m2 ). *** short-lived carbon in shallow soil + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CARBON_SHALLOWSOIL, value = NOAHMP401_struc(n)%noahmp401(t)%fastcp, & + vlevel=1, unit="g m-2", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 38] output variable: lai (unit=-). *** leave area index + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_LAI, value = NOAHMP401_struc(n)%noahmp401(t)%lai, & + vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 39] output variable: sai (unit=- ). *** stem area index + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SAI, value = NOAHMP401_struc(n)%noahmp401(t)%sai, & + vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 40] output variable: tauss (unit=- ). *** snow aging factor + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWAGE, value = NOAHMP401_struc(n)%noahmp401(t)%tauss, & + vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 41] output variable: smcwtd (unit=m3/m3). *** soil moisture content in the layer to the water table when deep + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_BETWEENWATER, value = NOAHMP401_struc(n)%noahmp401(t)%smcwtd, & + vlevel=1, unit="m^3 m-3", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 42] output variable: deeprech (unit=m). *** recharge to the water table when groundwater is deep + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QRECTOGW, value = NOAHMP401_struc(n)%noahmp401(t)%deeprech, & + vlevel=1, unit="m", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 43] output variable: rech (unit=m). *** recharge from the water table when groundwater is shallow + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QRECFROMGW, value = NOAHMP401_struc(n)%noahmp401(t)%rech, & + vlevel=1, unit="m", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 44] output variable: t2mv (unit=K). *** 2-m air temperature over vegetated part + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_VEGE2MT, value = NOAHMP401_struc(n)%noahmp401(t)%t2mv, & + vlevel=1, unit="K", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 45] output variable: t2mb (unit=K ). *** 2-m height air temperature + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_BARE2MT, value = NOAHMP401_struc(n)%noahmp401(t)%t2mb, & + vlevel=1, unit="K", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 46] output variable: q2mv (unit=kg/kg). *** 2-m mixing ratio of vegetation part + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_VEGE2MQ2, value = NOAHMP401_struc(n)%noahmp401(t)%q2mv, & + vlevel=1, unit="kg kg-1", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 47] output variable: q2mb (unit=kg/kg). *** 2-m mixing ratio of bare ground part + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_BARE2MQ2, value = NOAHMP401_struc(n)%noahmp401(t)%q2mb, & + vlevel=1, unit="kg kg-1", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 48] output variable: trad (unit=K). *** surface radiative temperature + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RADT, value = NOAHMP401_struc(n)%noahmp401(t)%trad, & + vlevel=1, unit="K", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 49] output variable: nee (unit=g/m2/s ). *** net ecosystem exchange of CO2 + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_NEE, value = NOAHMP401_struc(n)%noahmp401(t)%nee, & + vlevel=1, unit="g m-2 s-1", direction="OUT", surface_type = LIS_rc%lsm_index) + + ![ 50] output variable: gpp (unit=g/m2/s ). *** gross primary assimilation of carbon + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_GPP, value = NOAHMP401_struc(n)%noahmp401(t)%gpp, & + vlevel=1, unit="g m-2 s-1", direction="IN", surface_type = LIS_rc%lsm_index) + + ![ 51] output variable: npp (unit=g/m2/s). *** net primary productivity of carbon + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_NPP, value = NOAHMP401_struc(n)%noahmp401(t)%npp, & + vlevel=1, unit="g m-2 s-1", direction="OUT", surface_type = LIS_rc%lsm_index) + + ![ 52] output variable: fveg (unit=-). *** Noah-MP green vegetation fraction + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_GREENNESS, value = NOAHMP401_struc(n)%noahmp401(t)%fveg, & + vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 53] output variable: runsf (unit=mm/s). *** surface runoff + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QS, value = NOAHMP401_struc(n)%noahmp401(t)%runsf, & + vlevel=1, unit="kg m-2 s-1", direction="OUT", surface_type = LIS_rc%lsm_index) + + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QS, value = NOAHMP401_struc(n)%noahmp401(t)%runsf*dt, & + vlevel=1, unit="kg m-2", direction="OUT", surface_type = LIS_rc%lsm_index) + + ![ 54] output variable: runsb (unit=mm/s ). *** baseflow (saturation excess) + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QSB, value = NOAHMP401_struc(n)%noahmp401(t)%runsb, & + vlevel=1, unit="kg m-2 s-1", direction="OUT", surface_type = LIS_rc%lsm_index) + + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QSB, value = NOAHMP401_struc(n)%noahmp401(t)%runsb*dt, & + vlevel=1, unit="kg m-2", direction="OUT", surface_type = LIS_rc%lsm_index) + + ! Combined output variable: qtot (unit=mm | mm/s). *** total runoff + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QTOT, & + value = NOAHMP401_struc(n)%noahmp401(t)%runsf + NOAHMP401_struc(n)%noahmp401(t)%runsb, & + vlevel=1, unit="kg m-2 s-1", direction="OUT", surface_type = LIS_rc%lsm_index) + + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QTOT, & + value = NOAHMP401_struc(n)%noahmp401(t)%runsf*dt + NOAHMP401_struc(n)%noahmp401(t)%runsb*dt, & + vlevel=1, unit="kg m-2", direction="OUT", surface_type = LIS_rc%lsm_index) + + ![ 55] output variable: ecan (unit=mm/s ). *** evaporation of intercepted water + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_ECANOP, value = NOAHMP401_struc(n)%noahmp401(t)%ecan, & + vlevel=1, unit="kg m-2 s-1", direction="UP", surface_type = LIS_rc%lsm_index) + + ![ 56] output variable: edir (unit=mm/s ). *** soil surface evaporation rate + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_ESOIL, value = NOAHMP401_struc(n)%noahmp401(t)%edir, & + vlevel=1, unit="kg m-2 s-1", direction="UP", surface_type = LIS_rc%lsm_index) + + ![ 57] output variable: etran (unit=mm/s ). *** transpiration rate + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_TVEG, value = NOAHMP401_struc(n)%noahmp401(t)%etran, & + vlevel=1, unit="kg m-2 s-1", direction="UP", surface_type = LIS_rc%lsm_index) + + ![ 58] output variable: fsa (unit=W/m2). *** total absorbed solar radiation + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SWNET, value = NOAHMP401_struc(n)%noahmp401(t)%fsa, & + vlevel=1, unit="W m-2", direction="DN", surface_type = LIS_rc%lsm_index) + + ![ 59] output variable: fira (unit=W/m2 ). *** total net longwave radiation [+ to atm] + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_LWUP, value = NOAHMP401_struc(n)%noahmp401(t)%fira, & + vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) + + ![ 60] output variable: apar (unit=W/m2). *** photosynthesis active energy by canopy + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_APAR, value = NOAHMP401_struc(n)%noahmp401(t)%apar, & + vlevel=1, unit="W m-2", direction="IN", surface_type = LIS_rc%lsm_index) + + ![ 61] output variable: psn (unit=umol/m2/s ). *** total photosynthesis of CO2 [+] + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_PSCO2, value = NOAHMP401_struc(n)%noahmp401(t)%psn, & + vlevel=1, unit="umol m-2 s-1", direction="IN", surface_type = LIS_rc%lsm_index) + + !![ 62] output variable: sav (unit=W/m2 ). *** solar radiation absorbed by vegetation + !call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SAV, value = NOAHMP401_struc(n)%noahmp401(t)%sav, & + ! vlevel=1, unit="W/m2 ", direction="IN", surface_type = LIS_rc%lsm_index) + + ![ 63] output variable: sag (unit=W/m2 ). *** solar radiation absorbed by ground + !call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SAQ, value = NOAHMP401_struc(n)%noahmp401(t)%sag, & + ! vlevel=1, unit="W/m2 ", direction="IN", surface_type = LIS_rc%lsm_index) + + ![ 64] output variable: rssun (unit=s/m). *** sunlit leaf stomatal resistance + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RSSUN, value = NOAHMP401_struc(n)%noahmp401(t)%rssun, & + vlevel=1, unit="s m-1", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 65] output variable: rssha (unit=s/m). *** shaded leaf stomatal resistance + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RSSHA, value = NOAHMP401_struc(n)%noahmp401(t)%rssha, & + vlevel=1, unit="s m-1", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 66] output variable: bgap (unit=-). *** between gap fraction + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_BGAP, value = NOAHMP401_struc(n)%noahmp401(t)%bgap, & + vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 67] output variable: wgap (unit=- ). *** within gap fraction + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_WGAP, value = NOAHMP401_struc(n)%noahmp401(t)%wgap, & + vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 68] output variable: tgb (unit=K). *** bare ground temperature + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_BARESOILT, value = NOAHMP401_struc(n)%noahmp401(t)%tgb, & + vlevel=1, unit="K", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 69] output variable: tgv (unit=K). *** vegetated ground surface temperature + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_GROUNDVEGT, value = NOAHMP401_struc(n)%noahmp401(t)%tgv, & + vlevel=1, unit="K", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 70] output variable: chv (unit=s/m). *** sensible heat exchange coefficient over vegetated fraction + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CHV, value = NOAHMP401_struc(n)%noahmp401(t)%chv, & + vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 71] output variable: chb (unit=s/m). *** sensible heat exchange coefficient over bare-ground fraction + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CHB, value = NOAHMP401_struc(n)%noahmp401(t)%chb, & + vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 72] output variable: shg (unit=W/m2 ). *** get ground sensible heat [+ to atm] + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SHG, value = NOAHMP401_struc(n)%noahmp401(t)%shg, & + vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) + + ![ 73] output variable: shc (unit=W/m2 ). *** canopy sensible heat [+ to atm] + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SHC, value = NOAHMP401_struc(n)%noahmp401(t)%shc, & + vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) + + ![ 74] output variable: shb (unit=W/m2 ). *** bare ground sensible heat [+ to atm] + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SHB, value = NOAHMP401_struc(n)%noahmp401(t)%shb, & + vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) + + ![ 75] output variable: evg (unit=W/m2 ). *** veg ground evaporation [+ to atm] + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_EVG, value = NOAHMP401_struc(n)%noahmp401(t)%evg, & + vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) + + ![ 76] output variable: evb (unit=W/m2 ). *** bare soil evaporation [+ to atm] + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_EVB, value = NOAHMP401_struc(n)%noahmp401(t)%evb, & + vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) + + ![ 77] output variable: ghv (unit=W/m2 ). *** vegetated ground heat flux [+ to soil] + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_GHV, value = NOAHMP401_struc(n)%noahmp401(t)%ghv, & + vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) + + ![ 78] output variable: ghb (unit=W/m2 ). *** bare ground heat flux [+ to soil] + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_GHB, value = NOAHMP401_struc(n)%noahmp401(t)%ghb, & + vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) + + ![ 79] output variable: irg (unit=W/m2 ). *** veg ground net long wave radiation [+ to atm] + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_IRV, value = NOAHMP401_struc(n)%noahmp401(t)%irg, & + vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) + + ![ 80] output variable: irc (unit=W/m2 ). *** canopy net long wave radiation [+ to atm] + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_IRC, value = NOAHMP401_struc(n)%noahmp401(t)%irc, & + vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) + + ![ 81] output variable: irb (unit=W/m2 ). *** bare net long wave radiation [+ to atm] + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_IRB, value = NOAHMP401_struc(n)%noahmp401(t)%irb, & + vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) + + ![ 82] output variable: tr (unit=W/m2 ). *** transpiration heat [to atm] + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_HTR, value = NOAHMP401_struc(n)%noahmp401(t)%tr, & + vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) + + ![ 83] output variable: evc (unit=W/m2 ). *** canopy evaporation heat [to atm] + !call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_EVC, value = NOAHMP401_struc(n)%noahmp401(t)%evc, & + ! vlevel=1, unit="W/m2 ", direction="UP", surface_type = LIS_rc%lsm_index) + + ![ 84] output variable: chleaf (unit=m/s). *** leaf exchange coefficient + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CHLEAF, value = NOAHMP401_struc(n)%noahmp401(t)%chleaf, & + vlevel=1, unit="m s-1", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 85] output variable: chuc (unit=m/s). *** under canopy exchange coefficient + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CHUC, value = NOAHMP401_struc(n)%noahmp401(t)%chuc, & + vlevel=1, unit="m s-1", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 86] output variable: chv2 (unit=m/s). *** veg 2m exchange coefficient + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CHV2, value = NOAHMP401_struc(n)%noahmp401(t)%chv2, & + vlevel=1, unit="m s-1", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 87] output variable: chb2 (unit=m/s). *** bare 2m exchange coefficient + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CHB2, value = NOAHMP401_struc(n)%noahmp401(t)%chb2, & + vlevel=1, unit="m s-1", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 88] output variable: evap (unit=kg/m2/s). *** total evapotranspiration + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_EVAP, value = NOAHMP401_struc(n)%noahmp401(t)%qfx, & + vlevel=1, unit="kg m-2 s-1", direction="UP", surface_type = LIS_rc%lsm_index) + !PET + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_POTEVAP, & + value=(tmp_fgev_pet+tmp_fcev_pet+tmp_fctr_pet), vlevel=1,unit="W m-2",& + direction="UP",surface_type=LIS_rc%lsm_index) + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_POTEVAP, & + value=(tmp_fgev_pet+tmp_fcev_pet+tmp_fctr_pet)/LVH2O, vlevel=1,unit="kg m-2 s-1",& + direction="UP",surface_type=LIS_rc%lsm_index) + + ![ 89] output variable: rainf (unit=kg/m2). *** precipitation rate + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RAINF, value = NOAHMP401_struc(n)%noahmp401(t)%rainf, & + vlevel=1, unit="kg m-2 s-1", direction="DN", surface_type = LIS_rc%lsm_index) + + ![ 90] output variable: snowf (unit=kg/m2). *** snowfall rate + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWF, value = NOAHMP401_struc(n)%noahmp401(t)%snowf, & + vlevel=1, unit="kg m-2 s-1", direction="DN", surface_type = LIS_rc%lsm_index) + + ![ 91] LWnet + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_LWNET,vlevel=1, & + value=(-1.0 * NOAHMP401_struc(n)%noahmp401(t)%fira), & + unit="W m-2", direction="DN", surface_type=LIS_rc%lsm_index) + + ! Code added by Zhuo Wang on 02/28/2019 + ![ 92] output variable: qsnbot (unit=kg m-2 s-1). *** melting water out of snow bottom + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QSM, value = tmp_qsnbot, & + vlevel=1, unit="kg m-2 s-1", direction="S2L", surface_type = LIS_rc%lsm_index) + + ![ 93] output variable: subsnow (unit=kg m-2 s-1). *** snow sublimation + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SUBSNOW, value = tmp_subsnow, & + vlevel=1, unit="kg m-2 s-1", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 94] output variable: AvgSurfT (unit=K). *** average surface temperature + AvgSurfT_out = NOAHMP401_struc(n)%noahmp401(t)%fveg * NOAHMP401_struc(n)%noahmp401(t)%tv + & + (1.0-NOAHMP401_struc(n)%noahmp401(t)%fveg) * NOAHMP401_struc(n)%noahmp401(t)%tgb + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_AVGSURFT, value = AvgSurfT_out, & + vlevel=1, unit="K", direction="-",surface_type = LIS_rc%lsm_index) + + ![ 95] TWS should be SWE + CanopInt + Soil moisture + WA - David Mocko + TWS_out = NOAHMP401_struc(n)%noahmp401(t)%sneqv + if ((NOAHMP401_struc(n)%noahmp401(t)%canliq.ge.0.0).and. & + (NOAHMP401_struc(n)%noahmp401(t)%canice.ge.0.0)) then + TWS_out = TWS_out + & + (NOAHMP401_struc(n)%noahmp401(t)%canliq + & + NOAHMP401_struc(n)%noahmp401(t)%canice) + endif + do i = 1,NOAHMP401_struc(n)%nsoil + TWS_out = TWS_out + & + (NOAHMP401_struc(n)%noahmp401(t)%smc(i) * & + tmp_sldpth(i)*LIS_CONST_RHOFW) + enddo + if (NOAHMP401_struc(n)%noahmp401(t)%wa.ge.0.0) then + TWS_out = TWS_out + NOAHMP401_struc(n)%noahmp401(t)%wa + endif + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_TWS, value = TWS_out, & + vlevel=1, unit="mm", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 96] Qa - Advective energy - Heat transferred to a snow cover by rain + ! - (unit=W m-2) - added by David Mocko + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QA, value = tmp_pah, & + vlevel=1, unit="W m-2",direction="DN",surface_type=LIS_rc%lsm_index) + +! Added water balance change terms - David Mocko + endsm = 0.0 + do i = 1,tmp_nsoil + endsm = endsm + & + (tmp_smc(i) * tmp_sldpth(i) * LIS_CONST_RHOFW) + enddo + call LIS_diagnoseSurfaceOutputVar(n,t,LIS_MOC_DELSOILMOIST,& + value=(endsm - startsm),vlevel=1,unit="kg m-2", & + direction="INC",surface_type=LIS_rc%lsm_index) + call LIS_diagnoseSurfaceOutputVar(n,t,LIS_MOC_DELSWE, & + value=(NOAHMP401_struc(n)%noahmp401(t)%sneqv - & + startswe), & + vlevel=1,unit="kg m-2",direction="INC", & + surface_type=LIS_rc%lsm_index) + call LIS_diagnoseSurfaceOutputVar(n,t,LIS_MOC_DELINTERCEPT,& + value=((NOAHMP401_struc(n)%noahmp401(t)%canliq + & + NOAHMP401_struc(n)%noahmp401(t)%canice) - & + startint), & + vlevel=1,unit="kg m-2",direction="INC", & + surface_type=LIS_rc%lsm_index) +! For now, the ALMA standard does not provide a variable for the +! change in groundwater storage. Instead, temporarily writing it +! to the DELSURFSTOR (which is the change in surface water storage). +! This is only a temporary fix, until LIS_MOC_DELGROUNDWATER or +! a similarly-named variable is added into LIS_histDataMod.F90. + call LIS_diagnoseSurfaceOutputVar(n,t,LIS_MOC_DELSURFSTOR, & + value=(NOAHMP401_struc(n)%noahmp401(t)%wa - & + startgw), & + vlevel=1,unit="kg m-2",direction="INC", & + surface_type=LIS_rc%lsm_index) + +! David Mocko (10/29/2019) - Copy RELSMC calculation from Noah-3.X + do i = 1,tmp_nsoil + if (tmp_relsmc(i).gt.1.0) then + tmp_relsmc(i) = 1.0 + endif + if (tmp_relsmc(i).lt.0.01) then + tmp_relsmc(i) = 0.01 + endif + +! J.Case (9/11/2014) -- Set relative soil moisture to missing (LIS_rc%udef) +! if the vegetation type is urban class. + if (tmp_vegetype.eq.tmp_urban_vegetype) then + tmp_relsmc(i) = LIS_rc%udef + endif + call LIS_diagnoseSurfaceOutputVar(n,t,LIS_MOC_RELSMC,vlevel=i, & + value=tmp_relsmc(i),unit='-',direction="-",surface_type=LIS_rc%lsm_index) + if (tmp_relsmc(i).eq.LIS_rc%udef) then + tempval = tmp_relsmc(i) + else + tempval = tmp_relsmc(i)*100.0 + endif + call LIS_diagnoseSurfaceOutputVar(n,t,LIS_MOC_RELSMC,vlevel=i, & + value=tempval,unit='%',direction="-",surface_type=LIS_rc%lsm_index) + enddo + + ! reset forcing variables to zeros + NOAHMP401_struc(n)%noahmp401(t)%tair = 0.0 + NOAHMP401_struc(n)%noahmp401(t)%psurf = 0.0 + NOAHMP401_struc(n)%noahmp401(t)%wind_e = 0.0 + NOAHMP401_struc(n)%noahmp401(t)%wind_n = 0.0 + NOAHMP401_struc(n)%noahmp401(t)%qair = 0.0 + NOAHMP401_struc(n)%noahmp401(t)%swdown = 0.0 + NOAHMP401_struc(n)%noahmp401(t)%lwdown = 0.0 + NOAHMP401_struc(n)%noahmp401(t)%prcp = 0.0 + + enddo ! end of tile (t) loop + ! reset forcing counter to be zero + NOAHMP401_struc(n)%forc_count = 0 + + endif ! end of alarmCheck loop + + deallocate( tmp_sldpth ) + deallocate( tmp_shdfac_monthly ) + deallocate( tmp_soilcomp ) + deallocate( tmp_smc ) + deallocate( tmp_sh2o ) + deallocate( tmp_tslb ) + deallocate( tmp_tsno ) + deallocate( tmp_zss ) + deallocate( tmp_snowice ) + deallocate( tmp_snowliq ) + deallocate( tmp_smoiseq ) + deallocate( tmp_gecros_state ) + + ! EMK...See if noahmp401_struc(n)%noahmp401(t)%tair_agl_min needs to be + ! reset for calculating RHMin. + write(fnest,'(i3.3)') n + alarmCheck = LIS_isAlarmRinging(LIS_rc, & + "NoahMP401 RHMin alarm "//trim(fnest)) + if (alarmCheck) then + write(LIS_logunit,*) & + '[INFO] Resetting tair_agl_min for RHMin calculation' + do t = 1,LIS_rc%npatch(n,LIS_rc%lsm_index) + noahmp401_struc(n)%noahmp401(t)%tair_agl_min = 999. + end do + end if + +end subroutine NoahMP401_main diff --git a/lis/surfacemodels/land/noahmp.new/NoahMP401_read_OPT_parameters.F90 b/lis/surfacemodels/land/noahmp.new/NoahMP401_read_OPT_parameters.F90 new file mode 100644 index 000000000..ca8ca3da0 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/NoahMP401_read_OPT_parameters.F90 @@ -0,0 +1,444 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +#include "LIS_misc.h" +!BOP +! +! !ROUTINE: NoahMP401_read_OPT_parameters +! \label{NoahMP401_read_OPT_parameters} +! +! !REVISION HISTORY: +! +! This subroutine reads the optimized parameters generated typically +! from the LIS OPT/UE system. In general, this routine can be used +! to overwrite the default lookup table values that the model uses. +! +! 5 May 2020: Sujay Kumar; Initial specification +! +! !INTERFACE: +! +subroutine NoahMP401_read_OPT_parameters() +! !USES: + use LIS_coreMod + use NoahMP401_lsmMod + + implicit none + + integer :: mtype + logical :: var_found + integer :: t, k, n + integer :: col, row + real, allocatable :: placeholder(:,:) + + mtype = LIS_rc%lsm_index + + do n=1,LIS_rc%nnest + allocate(placeholder(LIS_rc%lnc(n), LIS_rc%lnr(n))) + + call NOAHMP401_read_OPT_param(n, "ALBDRY1", placeholder, var_found) + + if(var_found) then + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + if(placeholder(col,row).ne.LIS_rc%udef) then + NOAHMP401_struc(n)%noahmp401(t)%param%albdry(1) =& + placeholder(col, row) + endif + enddo + endif + + call NOAHMP401_read_OPT_param(n, "ALBDRY2", placeholder, var_found) + if(var_found) then + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + if(placeholder(col,row).ne.LIS_rc%udef) then + NOAHMP401_struc(n)%noahmp401(t)%param%albdry(2) =& + placeholder(col, row) + endif + enddo + endif + + call NOAHMP401_read_OPT_param(n, "ALBICE1", placeholder, var_found) + if(var_found) then + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + if(placeholder(col,row).ne.LIS_rc%udef) then + NOAHMP401_struc(n)%noahmp401(t)%param%albice(1) =& + placeholder(col, row) + endif + enddo + endif + + call NOAHMP401_read_OPT_param(n, "ALBICE2", placeholder, var_found) + if(var_found) then + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + if(placeholder(col,row).ne.LIS_rc%udef) then + NOAHMP401_struc(n)%noahmp401(t)%param%albice(2) =& + placeholder(col, row) + endif + enddo + endif + + call NOAHMP401_read_OPT_param(n, "ALBSAT1", placeholder, var_found) + if(var_found) then + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + if(placeholder(col,row).ne.LIS_rc%udef) then + NOAHMP401_struc(n)%noahmp401(t)%param%albsat(1) =& + placeholder(col, row) + endif + enddo + endif + + call NOAHMP401_read_OPT_param(n, "ALBSAT2", placeholder, var_found) + if(var_found) then + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + if(placeholder(col,row).ne.LIS_rc%udef) then + NOAHMP401_struc(n)%noahmp401(t)%param%albsat(2) =& + placeholder(col, row) + endif + enddo + endif + + call NOAHMP401_read_OPT_param(n, "BETADS", placeholder, var_found) + if(var_found) then + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + if(placeholder(col,row).ne.LIS_rc%udef) then + NOAHMP401_struc(n)%noahmp401(t)%param%betads =& + placeholder(col, row) + endif + enddo + endif + + call NOAHMP401_read_OPT_param(n, "BETAIS", placeholder, var_found) + if(var_found) then + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + if(placeholder(col,row).ne.LIS_rc%udef) then + NOAHMP401_struc(n)%noahmp401(t)%param%betais =& + placeholder(col, row) + endif + enddo + endif + + call NOAHMP401_read_OPT_param(n, "EG1", placeholder, var_found) + if(var_found) then + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + if(placeholder(col,row).ne.LIS_rc%udef) then + NOAHMP401_struc(n)%noahmp401(t)%param%eg(1) =& + placeholder(col, row) + endif + enddo + endif + + call NOAHMP401_read_OPT_param(n, "EG2", placeholder, var_found) + if(var_found) then + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + if(placeholder(col,row).ne.LIS_rc%udef) then + NOAHMP401_struc(n)%noahmp401(t)%param%eg(2) =& + placeholder(col, row) + endif + enddo + endif + + call NOAHMP401_read_OPT_param(n, "MFSNO", placeholder, var_found) + if(var_found) then + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + if(placeholder(col,row).ne.LIS_rc%udef) then + NOAHMP401_struc(n)%noahmp401(t)%param%mfsno =& + placeholder(col, row) + endif + enddo + endif + + call NOAHMP401_read_OPT_param(n, "OMEGAS1", placeholder, var_found) + if(var_found) then + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + if(placeholder(col,row).ne.LIS_rc%udef) then + NOAHMP401_struc(n)%noahmp401(t)%param%omegas(1) =& + placeholder(col, row) + endif + enddo + endif + + call NOAHMP401_read_OPT_param(n, "OMGEAS2", placeholder, var_found) + if(var_found) then + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + if(placeholder(col,row).ne.LIS_rc%udef) then + NOAHMP401_struc(n)%noahmp401(t)%param%omegas(2) =& + placeholder(col, row) + endif + enddo + endif + + call NOAHMP401_read_OPT_param(n, "RSURF_SNOW", placeholder, var_found) + if(var_found) then + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + if(placeholder(col,row).ne.LIS_rc%udef) then + NOAHMP401_struc(n)%noahmp401(t)%param%rsurf_snow =& + placeholder(col, row) + endif + enddo + endif + + call NOAHMP401_read_OPT_param(n, "SSI", placeholder, var_found) + if(var_found) then + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + if(placeholder(col,row).ne.LIS_rc%udef) then + NOAHMP401_struc(n)%noahmp401(t)%param%ssi =& + placeholder(col, row) + endif + enddo + endif + + call NOAHMP401_read_OPT_param(n, "Z0SNO", placeholder, var_found) + if(var_found) then + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + if(placeholder(col,row).ne.LIS_rc%udef) then + NOAHMP401_struc(n)%noahmp401(t)%param%z0sno =& + placeholder(col, row) + endif + enddo + endif + + call NOAHMP401_read_OPT_param(n, "MXSNALB", placeholder, var_found) + if(var_found) then + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + if(placeholder(col,row).ne.LIS_rc%udef) then + NOAHMP401_struc(n)%noahmp401(t)%param%mxsnalb =& + placeholder(col, row) + endif + enddo + endif + + + call NOAHMP401_read_OPT_param(n, "MNSNALB", placeholder, var_found) + if(var_found) then + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + if(placeholder(col,row).ne.LIS_rc%udef) then + NOAHMP401_struc(n)%noahmp401(t)%param%mnsnalb =& + placeholder(col, row) + endif + enddo + endif + + + call NOAHMP401_read_OPT_param(n, "SNDECAYEXP", placeholder, var_found) + if(var_found) then + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + if(placeholder(col,row).ne.LIS_rc%udef) then + NOAHMP401_struc(n)%noahmp401(t)%param%sndecayexp =& + placeholder(col, row) + endif + enddo + endif + + call NOAHMP401_read_OPT_param(n, "T_ULIMIT", placeholder, var_found) + if(var_found) then + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + if(placeholder(col,row).ne.LIS_rc%udef) then + NOAHMP401_struc(n)%noahmp401(t)%param%t_ulimit =& + placeholder(col, row) + endif + enddo + endif + + call NOAHMP401_read_OPT_param(n, "T_MLIMIT", placeholder, var_found) + if(var_found) then + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + if(placeholder(col,row).ne.LIS_rc%udef) then + NOAHMP401_struc(n)%noahmp401(t)%param%t_mlimit =& + placeholder(col, row) + endif + enddo + endif + + + call NOAHMP401_read_OPT_param(n, "T_LLIMIT", placeholder, var_found) + if(var_found) then + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + if(placeholder(col,row).ne.LIS_rc%udef) then + NOAHMP401_struc(n)%noahmp401(t)%param%t_llimit =& + placeholder(col, row) + endif + enddo + endif + + call NOAHMP401_read_OPT_param(n, "SNOWF_SCALEF", placeholder, var_found) + if(var_found) then + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + if(placeholder(col,row).ne.LIS_rc%udef) then + NOAHMP401_struc(n)%noahmp401(t)%param%snowf_scalef =& + placeholder(col, row) + endif + enddo + endif + + deallocate(placeholder) + + end do +end subroutine NoahMP401_read_OPT_parameters + +!BOP +! +! !ROUTINE: NOAHMP401_read_OPT_param +! \label{NOAHMP401_read_OPT_param} +! +! !REVISION HISTORY: +! 03 Sept 2004: Sujay Kumar; Initial Specification for read_laiclimo +! 30 Oct 2013: Shugong Wang; Generalization for reading OPT spatial parameter +! +! !INTERFACE: +subroutine NOAHMP401_read_OPT_param(n, ncvar_name, placeholder,var_found) +! !USES: + use netcdf + use LIS_coreMod, only : LIS_rc, LIS_domain, LIS_localPet, & + LIS_ews_halo_ind, LIS_ewe_halo_ind, & + LIS_nss_halo_ind, LIS_nse_halo_ind + use LIS_logMod, only : LIS_logunit, LIS_verify, LIS_endrun + use LIS_fileIOMod, only: LIS_read_param + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + character(len=*), intent(in) :: ncvar_name + real, intent(out) :: placeholder(LIS_rc%lnc(n), LIS_rc%lnr(n)) + logical :: var_found +! !DESCRIPTION: +! This subroutine reads OPT parameters from the LIS +! NetCDF parameter data file +! +! The arguments are: +! \begin{description} +! \item[n] +! index of n +! \item[array] +! array containing returned values +! \end{description} +! +!EOP + + integer :: ios1 + integer :: ios, nid, param_ID, nc_ID, nr_ID, dimids(3) + integer :: nc, nr, t, k + real, pointer :: level_data(:, :) + logical :: file_exists + + placeholder = LIS_rc%udef + var_found = .false. + + inquire(file=LIS_rc%paramfile(n), exist=file_exists) + if(file_exists) then + write(LIS_logunit, *) '[INFO] Reading '//trim(ncvar_name)//& + ' map ' + + ! open NetCDF parameter file + ios = nf90_open(path=trim(LIS_rc%paramfile(n)), & + mode=NF90_NOWRITE, ncid=nid) + call LIS_verify(ios, 'Error in nf90_open in NOAHMP401_read_OPT_param') + + ! inquire the ID of east-west dimension + ios = nf90_inq_dimid(nid, 'east_west', nc_ID) + call LIS_verify(ios, & + 'Error in nf90_inq_dimid in NOAHMP401_read_OPT_param') + + ! inquire the ID of north-south dimension + ios = nf90_inq_dimid(nid, 'north_south', nr_ID) + call LIS_verify(ios, & + 'Error in nf90_inq_dimid in NOAHMP401_read_OPT_param') + + ! inquire the length of east-west dimension + ios = nf90_inquire_dimension(nid, nc_ID, len=nc) + call LIS_verify(ios, & + 'Error in nf90_inquire_dimension in NOAHMP401_read_OPT_param') + + ! inquire the length of north-south dimension + ios = nf90_inquire_dimension(nid, nr_ID, len=nr) + call LIS_verify(ios, & + 'Error in nf90_inquire_dimension in NOAHMP401_read_OPT_param') + + ! inquire the ID of parameter. + ios = nf90_inq_varid(nid, Trim(ncvar_name), param_ID) + if(ios.eq.0) then + ! inquire the IDs of all dimensions. The third dimension is the level dimension + ios = nf90_inquire_variable(nid, param_ID, dimids = dimids) + call LIS_verify(ios, trim(ncvar_name)//' failed to inquire dimensions') + + ! allocate memory + allocate(level_data (LIS_rc%gnc(n), LIS_rc%gnr(n))) + + ! inquire the variable ID of parameter + ios = nf90_inq_varid(nid, trim(ncvar_name), param_ID) + call LIS_verify(ios, trim(ncvar_name)//& + ' field not found in the LIS param file') + + ! read parameter + ios = nf90_get_var(nid, param_ID, level_data) + call LIS_verify(ios, 'Error in nf90_get_var in NOAHMP401_read_OPT_param') + + ! grab parameter at specific level + placeholder(:, :) = & + level_data(LIS_ews_halo_ind(n, LIS_localPet+1):LIS_ewe_halo_ind(n, LIS_localPet+1), & + LIS_nss_halo_ind(n, LIS_localPet+1):LIS_nse_halo_ind(n, LIS_localPet+1)) + + deallocate(level_data) + + var_found = .true. + else + write(LIS_logunit,*) '[WARN] ', trim(ncvar_name)//& + ' field not found in the LIS param file' + endif + + ! close netcdf file + ios = nf90_close(nid) + call LIS_verify(ios, 'Error in nf90_close in NOAHMP401_read_OPT_param') + + endif +end subroutine NOAHMP401_read_OPT_param + diff --git a/lis/surfacemodels/land/noahmp.new/NoahMP401_readrst.F90 b/lis/surfacemodels/land/noahmp.new/NoahMP401_readrst.F90 new file mode 100644 index 000000000..606a12682 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/NoahMP401_readrst.F90 @@ -0,0 +1,453 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- + +#include "LIS_misc.h" +!BOP +! +! !ROUTINE: NoahMP401_readrst +! \label{NoahMP401_readrst} +! +! !REVISION HISTORY: +! This subroutine is generated with the Model Implementation Toolkit developed +! by Shugong Wang for the NASA Land Information System Version 7. The initial +! specification of the subroutine is defined by Sujay Kumar. +! 10/25/18: Shugong Wang, Zhuo Wang; initial implementation for LIS 7 and Noah-MP-4.0.1 +! 01/08/2021 Bailing Li; implemented code for reading GRACE DA restart file +! +! !INTERFACE: +subroutine NoahMP401_readrst() +! !USES: + use LIS_coreMod, only : LIS_rc, LIS_masterproc + use LIS_historyMod, only : LIS_readvar_restart + use LIS_logMod, only : LIS_logunit, LIS_endrun, & + LIS_getNextUnitNumber, & + LIS_releaseUnitNumber, & + LIS_verify + use LIS_constantsMod, only : LIS_CONST_PATH_LEN + use NoahMP401_lsmMod + use ESMF + use LIS_fileIOMod + use LIS_timeMgrMod + +#if (defined USE_NETCDF3 || defined USE_NETCDF4) + use netcdf +#endif + +! +! !DESCRIPTION: +! This program reads restart files for Noah-MP-4.0.1 LSM. +! This includes all relevant water/energy storages and tile information. +! The following is the list of variables specified in the Noah-MP-4.0.1 +! restart file: +! \begin{verbatim} +! nc, nr, ntiles - grid and tile space dimensions +! sfcrunoff - NoahMP401 accumulated surface runoff [m] +! udrrunoff - NoahMP401 accumulated sub-surface runoff [m] +! smc - NoahMP401 volumtric soil moisture [m3/m3] +! sh2o - NoahMP401 volumtric liquid soil moisture [m3/m3] +! tslb - NoahMP401 soil temperature [K] +! sneqv - NoahMP401 snow water equivalent [mm] +! snowh - NoahMP401 physical snow depth [m] +! canwat - NoahMP401 total canopy water + ice [mm] +! acsnom - NoahMP401 accumulated snow melt leaving pack [-] +! acsnow - NoahMP401 accumulated snow on grid [mm] +! isnow - NoahMP401 actual no. of snow layers [-] +! tv - NoahMP401 vegetation leaf temperature [K] +! tg - NoahMP401 bulk ground surface temperature [K] +! canice - NoahMP401 canopy-intercepted ice [mm] +! canliq - NoahMP401 canopy-intercepted liquid water [mm] +! eah - NoahMP401 canopy air vapor pressure [Pa] +! tah - NoahMP401 canopy air temperature [K] +! cm - NoahMP401 bulk momentum drag coefficient [-] +! ch - NoahMP401 bulk sensible heat exchange coefficient [-] +! fwet - NoahMP401 wetted or snowed fraction of canopy [-] +! sneqvo - NoahMP401 snow mass at last time step [mm h2o] +! albold - NoahMP401 snow albedo at last time step [-] +! qsnow - NoahMP401 snowfall on the ground [mm/s] +! wslake - NoahMP401 lake water storage [mm] +! zwt - NoahMP401 water table depth [m] +! wa - NoahMP401 water in the "aquifer" [mm] +! wt - NoahMP401 water in aquifer and saturated soil [mm] +! tsno - NoahMP401 snow layer temperature [K] +! zss - NoahMP401 snow/soil layer depth from snow surface [m] +! snowice - NoahMP401 snow layer ice [mm] +! snowliq - NoahMP401 snow layer liquid water [mm] +! lfmass - NoahMP401 leaf mass [g/m2] +! rtmass - NoahMP401 mass of fine roots [g/m2] +! stmass - NoahMP401 stem mass [g/m2] +! wood - NoahMP401 mass of wood (including woody roots) [g/m2] +! stblcp - NoahMP401 stable carbon in deep soil [g/m2] +! fastcp - NoahMP401 short-lived carbon in shallow soil [g/m2] +! lai - NoahMP401 leaf area index [-] +! sai - NoahMP401 stem area index [-] +! tauss - NoahMP401 snow age factor [-] +! smoiseq - NoahMP401 equilibrium volumetric soil moisture content [m3/m3] +! smcwtd - NoahMP401 soil moisture content in the layer to the water table when deep [-] +! deeprech - NoahMP401 recharge to the water table when deep [-] +! rech - NoahMP401 recharge to the water table (diagnostic) [-] +! grain - NoahMP401 mass of grain XING [g/m2] +! gdd - NoahMP401 growing degree days XING (based on 10C) [-] +! pgs - NoahMP401 growing degree days XING [-] +! gecros_state - NoahMP401 optional gecros crop [-] +! \end{verbatim} +! +! The routines invoked are: +! \begin{description} +! \item[LIS\_readvar\_restart](\ref{LIS_readvar_restart})\\ +! reads a variable from the restart file +! \item[NoahMP401\_coldstart](\ref{NoahMP401_coldstart})\\ +! initializes the NoahMP401 state variables +! \end{description} +!EOP + + implicit none + + integer :: t, l + integer :: nc, nr, npatch + integer :: n + integer :: ftn + integer :: status + real, allocatable :: tmptilen(:) + logical :: file_exists + character*20 :: wformat + character(len=LIS_CONST_PATH_LEN) :: filen + integer :: yr,mo,da,hr,mn,ss,doy + real*8 :: time + real :: gmt + real :: ts + + + do n=1, LIS_rc%nnest + wformat = trim(NOAHMP401_struc(n)%rformat) + ! coldstart + if(LIS_rc%startcode .eq. "coldstart") then + call NoahMP401_coldstart(LIS_rc%lsm_index) + ! restart + elseif(LIS_rc%startcode .eq. "restart") then + !---create restart filename based on timewindow for EnKS + if(LIS_rc%runmode.eq."ensemble smoother") then + if(LIS_rc%iterationId(n).gt.1) then + if(NOAHMP401_struc(n)%rstInterval.eq.2592000) then + !create the restart filename based on the timewindow start time + call ESMF_TimeGet(LIS_twStartTime,yy=yr,mm=mo,& + dd=da,calendar=LIS_calendar,rc=status) + hr = 0 + mn = 0 + ss = 0 + call LIS_tick(time,doy,gmt,yr,mo,da,hr,mn,ss,(-1)*LIS_rc%ts) + else + call ESMF_TimeGet(LIS_twStartTime,yy=yr,mm=mo,& + dd=da,calendar=LIS_calendar,rc=status) + hr = 0 + mn = 0 + ss = 0 + endif + + call LIS_create_restart_filename(n,filen,'SURFACEMODEL','NOAHMP401', & + yr,mo,da,hr,mn,ss, wformat=wformat) + NOAHMP401_struc(n)%rfile = filen + endif + endif + + + allocate(tmptilen(LIS_rc%npatch(n, LIS_rc%lsm_index))) + ! check the existance of restart file + inquire(file=NOAHMP401_struc(n)%rfile, exist=file_exists) + If (.not. file_exists) then + write(LIS_logunit,*) "[ERR] NoahMP401 restart file: ", & + trim(NOAHMP401_struc(n)%rfile) + write(LIS_logunit,*) "[ERR] does not exist." + write(LIS_logunit,*) "[ERR] Program stopping ..." + call LIS_endrun + endif + write(LIS_logunit,*) & + "[INFO] Noah-MP.4.0.1 restart file used: ",trim(NOAHMP401_struc(n)%rfile) + + ! open restart file + if(wformat .eq. "binary") then + ftn = LIS_getNextUnitNumber() + open(ftn, file=NOAHMP401_struc(n)%rfile, & + form="unformatted") + read(ftn) nc, nr, npatch !time, veg class, no. tiles + + ! check for grid space conflict + if((nc .ne. LIS_rc%gnc(n)) .or. (nr .ne. LIS_rc%gnr(n))) then + write(LIS_logunit,*) "[ERR]",trim(NOAHMP401_struc(n)%rfile) + write(LIS_logunit,*) "[ERR] grid space mismatch" + write(LIS_logunit,*) "[ERR] Program stopping..." + call LIS_endrun + endif + + if(npatch .ne. LIS_rc%glbnpatch_red(n, LIS_rc%lsm_index)) then + write(LIS_logunit,*) "[ERR]",trim(NOAHMP401_struc(n)%rfile) + write(LIS_logunit,*) "[ERR] tile space mismatch" + write(LIS_logunit,*) "[ERR] Program stopping..." + call LIS_endrun + endif + elseif(wformat .eq. "netcdf") then +#if (defined USE_NETCDF3 || defined USE_NETCDF4) + status = nf90_open(path=NOAHMP401_struc(n)%rfile, & + mode=NF90_NOWRITE, ncid=ftn) + call LIS_verify(status, "Error opening file "//NOAHMP401_struc(n)%rfile) +#endif + endif + + ! read: accumulated surface runoff + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%sfcrunoff, & + varname="SFCRUNOFF", wformat=wformat) + + ! read: accumulated sub-surface runoff + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%udrrunoff, & + varname="UDRRUNOFF", wformat=wformat) + + ! read: volumtric soil moisture + do l=1, NOAHMP401_struc(n)%nsoil ! TODO: check loop + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, varname="SMC", & + dim=l, vlevels = NOAHMP401_struc(n)%nsoil, wformat=wformat) + do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) + NOAHMP401_struc(n)%noahmp401(t)%smc(l) = tmptilen(t) + enddo + enddo + + ! read: volumtric liquid soil moisture + do l=1, NOAHMP401_struc(n)%nsoil ! TODO: check loop + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, varname="SH2O", & + dim=l, vlevels = NOAHMP401_struc(n)%nsoil, wformat=wformat) + do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) + NOAHMP401_struc(n)%noahmp401(t)%sh2o(l) = tmptilen(t) + enddo + enddo + + ! read: soil temperature + do l=1, NOAHMP401_struc(n)%nsoil ! TODO: check loop + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, varname="TSLB", & + dim=l, vlevels = NOAHMP401_struc(n)%nsoil, wformat=wformat) + do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) + NOAHMP401_struc(n)%noahmp401(t)%tslb(l) = tmptilen(t) + enddo + enddo + + ! read: snow water equivalent + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%sneqv, & + varname="SNEQV", wformat=wformat) + + ! read: physical snow depth + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%snowh, & + varname="SNOWH", wformat=wformat) + + ! read: total canopy water + ice + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%canwat, & + varname="CANWAT", wformat=wformat) + + ! read: accumulated snow melt leaving pack + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%acsnom, & + varname="ACSNOM", wformat=wformat) + + ! read: accumulated snow on grid + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%acsnow, & + varname="ACSNOW", wformat=wformat) + + ! read: actual no. of snow layers + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%isnow, & + varname="ISNOW", wformat=wformat) + + ! read: vegetation leaf temperature + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%tv, & + varname="TV", wformat=wformat) + + ! read: bulk ground surface temperature + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%tg, & + varname="TG", wformat=wformat) + + ! read: canopy-intercepted ice + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%canice, & + varname="CANICE", wformat=wformat) + + ! read: canopy-intercepted liquid water + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%canliq, & + varname="CANLIQ", wformat=wformat) + + ! read: canopy air vapor pressure + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%eah, & + varname="EAH", wformat=wformat) + + ! read: canopy air temperature + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%tah, & + varname="TAH", wformat=wformat) + + ! read: bulk momentum drag coefficient + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%cm, & + varname="CM", wformat=wformat) + + ! read: bulk sensible heat exchange coefficient + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%ch, & + varname="CH", wformat=wformat) + + ! read: wetted or snowed fraction of canopy + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%fwet, & + varname="FWET", wformat=wformat) + + ! read: snow mass at last time step + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%sneqvo, & + varname="SNEQVO", wformat=wformat) + + ! read: snow albedo at last time step + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%albold, & + varname="ALBOLD", wformat=wformat) + + ! read: snowfall on the ground + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%qsnow, & + varname="QSNOW", wformat=wformat) + + ! read: lake water storage + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%wslake, & + varname="WSLAKE", wformat=wformat) + + ! read: water table depth + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%zwt, & + varname="ZWT", wformat=wformat) + + ! read: water in the "aquifer" + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%wa, & + varname="WA", wformat=wformat) + + ! read: water in aquifer and saturated soil + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%wt, & + varname="WT", wformat=wformat) + + ! read: snow layer temperature + do l=1, NOAHMP401_struc(n)%nsnow ! TODO: check loop + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, varname="TSNO", & + dim=l, vlevels = NOAHMP401_struc(n)%nsnow, wformat=wformat) + do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) + NOAHMP401_struc(n)%noahmp401(t)%tsno(l) = tmptilen(t) + enddo + enddo + + ! read: snow/soil layer depth from snow surface + do l=1, NOAHMP401_struc(n)%nsnow + NOAHMP401_struc(n)%nsoil + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, varname="ZSS", & + dim=l, vlevels = NOAHMP401_struc(n)%nsnow + NOAHMP401_struc(n)%nsoil, wformat=wformat) + do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) + NOAHMP401_struc(n)%noahmp401(t)%zss(l) = tmptilen(t) + enddo + enddo + + ! read: snow layer ice + do l=1, NOAHMP401_struc(n)%nsnow ! TODO: check loop + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, varname="SNOWICE", & + dim=l, vlevels = NOAHMP401_struc(n)%nsnow, wformat=wformat) + do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) + NOAHMP401_struc(n)%noahmp401(t)%snowice(l) = tmptilen(t) + enddo + enddo + + ! read: snow layer liquid water + do l=1, NOAHMP401_struc(n)%nsnow ! TODO: check loop + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, varname="SNOWLIQ", & + dim=l, vlevels = NOAHMP401_struc(n)%nsnow, wformat=wformat) + do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) + NOAHMP401_struc(n)%noahmp401(t)%snowliq(l) = tmptilen(t) + enddo + enddo + + ! read: leaf mass + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%lfmass, & + varname="LFMASS", wformat=wformat) + + ! read: mass of fine roots + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%rtmass, & + varname="RTMASS", wformat=wformat) + + ! read: stem mass + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%stmass, & + varname="STMASS", wformat=wformat) + + ! read: mass of wood (including woody roots) + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%wood, & + varname="WOOD", wformat=wformat) + + ! read: stable carbon in deep soil + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%stblcp, & + varname="STBLCP", wformat=wformat) + + ! read: short-lived carbon in shallow soil + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%fastcp, & + varname="FASTCP", wformat=wformat) + + ! read: leaf area index + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%lai, & + varname="LAI", wformat=wformat) + + ! read: stem area index + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%sai, & + varname="SAI", wformat=wformat) + + ! read: snow age factor + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%tauss, & + varname="TAUSS", wformat=wformat) + + ! read: equilibrium volumetric soil moisture content + do l=1, NOAHMP401_struc(n)%nsoil ! TODO: check loop + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, varname="SMOISEQ", & + dim=l, vlevels = NOAHMP401_struc(n)%nsoil, wformat=wformat) + do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) + NOAHMP401_struc(n)%noahmp401(t)%smoiseq(l) = tmptilen(t) + enddo + enddo + + ! read: soil moisture content in the layer to the water table when deep + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%smcwtd, & + varname="SMCWTD", wformat=wformat) + + ! read: recharge to the water table when deep + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%deeprech, & + varname="DEEPRECH", wformat=wformat) + + ! read: recharge to the water table (diagnostic) + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%rech, & + varname="RECH", wformat=wformat) + + ! read: mass of grain XING + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%grain, & + varname="GRAIN", wformat=wformat) + + ! read: growing degree days XING (based on 10C) + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%gdd, & + varname="GDD", wformat=wformat) + + ! read: growing degree days XING + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%pgs, & + varname="PGS", wformat=wformat) + + ! read: optional gecros crop +! do l=1, 60 ! TODO: check loop +! call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, varname="GECROS_STATE", & +! dim=l, vlevels = 60, wformat=wformat) +! do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) +! NOAHMP401_struc(n)%noahmp401(t)%gecros_state(l) = tmptilen(t) +! enddo +! enddo + + ! close restart file + if(wformat .eq. "binary") then + call LIS_releaseUnitNumber(ftn) + elseif(wformat .eq. "netcdf") then +#if (defined USE_NETCDF3 || defined USE_NETCDF4) + status = nf90_close(ftn) + call LIS_verify(status, & + "Error in nf90_close in NoahMP401_readrst") +#endif + endif + deallocate(tmptilen) + endif + enddo +end subroutine NoahMP401_readrst + diff --git a/lis/surfacemodels/land/noahmp.new/NoahMP401_reset.F90 b/lis/surfacemodels/land/noahmp.new/NoahMP401_reset.F90 new file mode 100644 index 000000000..8d041f4c5 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/NoahMP401_reset.F90 @@ -0,0 +1,55 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! +! !ROUTINE: NoahMP401_reset +! \label{NoahMP401_reset} +! +! !REVISION HISTORY: +! Modified by Shugong Wang for Noah-MP.4.0.1 +! !INTERFACE: +subroutine NoahMP401_reset() +! !USES: + use LIS_coreMod, only : LIS_rc + use LIS_logMod, only : LIS_logunit + use NoahMP401_lsmMod + +! +! !DESCRIPTION: +! +! This routine is the entry point to set up the parameters +! required for Noah-MP.4.0.1 LSM. These include the soils, greenness, +! albedo, bottom temperature and the initialization of state +! variables in Noah-MP.4.0.1. +! +!EOP + implicit none + integer :: t,n + integer :: status + + + do n=1,LIS_rc%nnest + write(LIS_logunit,*) "Noah-MP.4.0.1 resetting" + + ! initialize forcing variables to zeros + do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) + NOAHMP401_struc(n)%noahmp401(t)%lwdown = 0.0 + NOAHMP401_struc(n)%noahmp401(t)%swdown = 0.0 + NOAHMP401_struc(n)%noahmp401(t)%psurf = 0.0 + NOAHMP401_struc(n)%noahmp401(t)%prcp = 0.0 + NOAHMP401_struc(n)%noahmp401(t)%tair = 0.0 + NOAHMP401_struc(n)%noahmp401(t)%qair = 0.0 + NOAHMP401_struc(n)%noahmp401(t)%wind_e = 0.0 + NOAHMP401_struc(n)%noahmp401(t)%wind_n = 0.0 + enddo ! end of tile (t) loop + NOAHMP401_struc(n)%forc_count = 0 + + enddo ! do n=1,LIS_rc%nnest +end subroutine NoahMP401_reset diff --git a/lis/surfacemodels/land/noahmp.new/NoahMP401_writerst.F90 b/lis/surfacemodels/land/noahmp.new/NoahMP401_writerst.F90 new file mode 100644 index 000000000..66dce6a26 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/NoahMP401_writerst.F90 @@ -0,0 +1,788 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- + +#include "LIS_misc.h" +!BOP +! +! !ROUTINE: NoahMP401_writerst +! \label{NoahMP401_writerst} +! +! !REVISION HISTORY: +! This subroutine is generated with the Model Implementation Toolkit developed +! by Shugong Wang for the NASA Land Information System Version 7. The initial +! specification of the subroutine is defined by Sujay Kumar. +! 10/25/18: Shugong Wang, Zhuo Wang; initial implementation for LIS 7 and NoahMP401 +! +! !INTERFACE: +subroutine NoahMP401_writerst(n) +! !USES: + use LIS_coreMod, only : LIS_rc, LIS_masterproc + use LIS_timeMgrMod, only : LIS_isAlarmRinging + use LIS_logMod, only : LIS_logunit, LIS_getNextUnitNumber, & + LIS_releaseUnitNumber , LIS_verify + use LIS_fileIOMod, only : LIS_create_output_directory, & + LIS_create_restart_filename + use LIS_constantsMod, only : LIS_CONST_PATH_LEN + use NoahMP401_lsmMod + +#if (defined USE_NETCDF3 || defined USE_NETCDF4) + use netcdf +#endif + + implicit none + ! !ARGUMENTS: + integer, intent(in) :: n +! +! !DESCRIPTION: +! This program writes restart files for Noah-MP-4.0.1 LSM. +! This includes all relevant water/energy storage and tile information. +! +! The routines invoked are: +! \begin{description} +! \item[LIS\_create\_output\_directory](\ref{LIS_create_output_directory})\\ +! creates a timestamped directory for the restart files +! \item[LIS\_create\_restart\_filename](\ref{LIS_create_restart_filename})\\ +! generates a timestamped restart filename +! \item[NoahMP401\_dump\_restart](\ref{NoahMP401_dump_restart})\\ +! writes the NoahMP401 variables into the restart file +! \end{description} +!EOP + + character(len=LIS_CONST_PATH_LEN) :: filen + character*20 :: wformat + logical :: alarmCheck + integer :: ftn + integer :: status + + ! set restart alarm + alarmCheck = LIS_isAlarmRinging(LIS_rc, "NoahMP401 restart alarm") + + ! set restart file format (read from LIS configration file_ + wformat = trim(NOAHMP401_struc(n)%rformat) + + if(alarmCheck .or. (LIS_rc%endtime ==1)) then + If (LIS_masterproc) Then + call LIS_create_output_directory("SURFACEMODEL") + call LIS_create_restart_filename(n, filen, "SURFACEMODEL", & + "NOAHMP401",wformat=wformat) + if(wformat .eq. "binary") then + ftn = LIS_getNextUnitNumber() + open(ftn,file=filen,status="unknown", form="unformatted") + elseif(wformat .eq. "netcdf") then +#if (defined USE_NETCDF4) + status = nf90_create(path=filen, cmode=nf90_hdf5, ncid = ftn) + call LIS_verify(status, & + "Error in nf90_open in NoahMP401_writerst") +#endif +#if (defined USE_NETCDF3) + status = nf90_create(Path = filen, cmode = nf90_clobber, ncid = ftn) + call LIS_verify(status, & + "Error in nf90_open in NoahMP401_writerst") +#endif + endif + endif + + call NoahMP401_dump_restart(n, ftn, wformat) + + if (LIS_masterproc) then + if(wformat .eq. "binary") then + call LIS_releaseUnitNumber(ftn) + elseif(wformat .eq. "netcdf") then +#if (defined USE_NETCDF3 || defined USE_NETCDF4) + status = nf90_close(ftn) + call LIS_verify(status, & + "Error in nf90_close in NoahMP401_writerst") +#endif + endif + write(LIS_logunit, *)& + "[INFO] Noah-MP.4.0.1 archive restart written: ",trim(filen) + endif + endif +end subroutine NoahMP401_writerst + +!BOP +! +! !ROUTINE: NoahMP401_dump_restart +! \label{NoahMP401_dump_restart} +! +! !REVISION HISTORY: +! This subroutine is generated with the Model Implementation Toolkit developed +! by Shugong Wang for the NASA Land Information System Version 7. The initial +! specification of the subroutine is defined by Sujay Kumar. +! 10/25/18: Shugong Wang, Zhuo Wang, initial implementation for LIS 7 and NoahMP401 +! !INTERFACE: +subroutine NoahMP401_dump_restart(n, ftn, wformat) + +! !USES: + use LIS_coreMod, only : LIS_rc, LIS_masterproc + use LIS_logMod, only : LIS_logunit + use LIS_historyMod + use NoahMP401_lsmMod + + implicit none + + integer, intent(in) :: ftn + integer, intent(in) :: n + character(len=*), intent(in) :: wformat +! +! !DESCRIPTION: +! This routine gathers the necessary restart variables and performs +! the actual write statements to create the restart files. +! +! The arguments are: +! \begin{description} +! \item[n] +! index of the nest +! \item[ftn] +! unit number for the restart file +! \item[wformat] +! restart file format (binary/netcdf) +! \end{description} +! +! +! The following is the list of variables written in the NoahMP401 +! restart file: +! \begin{verbatim} +! nc, nr, ntiles - grid and tile space dimensions +! sfcrunoff - NoahMP401 accumulated surface runoff [m] +! udrrunoff - NoahMP401 accumulated sub-surface runoff [m] +! smc - NoahMP401 volumtric soil moisture [m3/m3] +! sh2o - NoahMP401 volumtric liquid soil moisture [m3/m3] +! tslb - NoahMP401 soil temperature [K] +! sneqv - NoahMP401 snow water equivalent [mm] +! snowh - NoahMP401 physical snow depth [m] +! canwat - NoahMP401 total canopy water + ice [mm] +! acsnom - NoahMP401 accumulated snow melt leaving pack [-] +! acsnow - NoahMP401 accumulated snow on grid [mm] +! isnow - NoahMP401 actual no. of snow layers [-] +! tv - NoahMP401 vegetation leaf temperature [K] +! tg - NoahMP401 bulk ground surface temperature [K] +! canice - NoahMP401 canopy-intercepted ice [mm] +! canliq - NoahMP401 canopy-intercepted liquid water [mm] +! eah - NoahMP401 canopy air vapor pressure [Pa] +! tah - NoahMP401 canopy air temperature [K] +! cm - NoahMP401 bulk momentum drag coefficient [-] +! ch - NoahMP401 bulk sensible heat exchange coefficient [-] +! fwet - NoahMP401 wetted or snowed fraction of canopy [-] +! sneqvo - NoahMP401 snow mass at last time step [mm h2o] +! albold - NoahMP401 snow albedo at last time step [-] +! qsnow - NoahMP401 snowfall on the ground [mm/s] +! wslake - NoahMP401 lake water storage [mm] +! zwt - NoahMP401 water table depth [m] +! wa - NoahMP401 water in the "aquifer" [mm] +! wt - NoahMP401 water in aquifer and saturated soil [mm] +! tsno - NoahMP401 snow layer temperature [K] +! zss - NoahMP401 snow/soil layer depth from snow surface [m] +! snowice - NoahMP401 snow layer ice [mm] +! snowliq - NoahMP401 snow layer liquid water [mm] +! lfmass - NoahMP401 leaf mass [g/m2] +! rtmass - NoahMP401 mass of fine roots [g/m2] +! stmass - NoahMP401 stem mass [g/m2] +! wood - NoahMP401 mass of wood (including woody roots) [g/m2] +! stblcp - NoahMP401 stable carbon in deep soil [g/m2] +! fastcp - NoahMP401 short-lived carbon in shallow soil [g/m2] +! lai - NoahMP401 leaf area index [-] +! sai - NoahMP401 stem area index [-] +! tauss - NoahMP401 snow age factor [-] +! smoiseq - NoahMP401 equilibrium volumetric soil moisture content [m3/m3] +! smcwtd - NoahMP401 soil moisture content in the layer to the water table when deep [-] +! deeprech - NoahMP401 recharge to the water table when deep [-] +! rech - NoahMP401 recharge to the water table (diagnostic) [-] +! grain - NoahMP401 mass of grain XING [g/m2] +! gdd - NoahMP401 growing degree days XING (based on 10C) [-] +! pgs - NoahMP401 growing degree days XING [-] +! gecros_state - NoahMP401 optional gecros crop [-] +! \end{verbatim} +! +! The routines invoked are: +! \begin{description} +! \item[LIS\_writeGlobalHeader\_restart](\ref{LIS_writeGlobalHeader_restart})\\ +! writes the global header information +! \item[LIS\_writeHeader\_restart](\ref{LIS_writeHeader_restart})\\ +! writes the header information for a variable +! \item[LIS\_closeHeader\_restart](\ref{LIS_closeHeader_restart})\\ +! close the header +! \item[LIS\_writevar\_restart](\ref{LIS_writevar_restart})\\ +! writes a variable to the restart file +! \end{description} +! +!EOP + + integer :: l, t + real :: tmptilen(LIS_rc%npatch(n, LIS_rc%lsm_index)) + integer :: dimID(11) + integer :: sfcrunoff_ID + integer :: udrrunoff_ID + integer :: smc_ID + integer :: sh2o_ID + integer :: tslb_ID + integer :: sneqv_ID + integer :: snowh_ID + integer :: canwat_ID + integer :: acsnom_ID + integer :: acsnow_ID + integer :: isnow_ID + integer :: tv_ID + integer :: tg_ID + integer :: canice_ID + integer :: canliq_ID + integer :: eah_ID + integer :: tah_ID + integer :: cm_ID + integer :: ch_ID + integer :: fwet_ID + integer :: sneqvo_ID + integer :: albold_ID + integer :: qsnow_ID + integer :: wslake_ID + integer :: zwt_ID + integer :: wa_ID + integer :: wt_ID + integer :: tsno_ID + integer :: zss_ID + integer :: snowice_ID + integer :: snowliq_ID + integer :: lfmass_ID + integer :: rtmass_ID + integer :: stmass_ID + integer :: wood_ID + integer :: stblcp_ID + integer :: fastcp_ID + integer :: lai_ID + integer :: sai_ID + integer :: tauss_ID + integer :: smoiseq_ID + integer :: smcwtd_ID + integer :: deeprech_ID + integer :: rech_ID + integer :: grain_ID + integer :: gdd_ID + integer :: pgs_ID + integer :: gecros_state_ID + + ! write the header of the restart file + call LIS_writeGlobalHeader_restart(ftn, n, LIS_rc%lsm_index, & + "NOAHMP401", & + dim1=NOAHMP401_struc(n)%nsoil+NOAHMP401_struc(n)%nsnow, & + dim2=NOAHMP401_struc(n)%nsoil, & + dim3=NOAHMP401_struc(n)%nsnow, & +! dim4=60, & ! GECROS + dim4=1, & + dimID=dimID, & + output_format = trim(wformat)) + + ! write the header for state variable sfcrunoff + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, sfcrunoff_ID, "SFCRUNOFF", & + "accumulated surface runoff", & + "m", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable udrrunoff + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, udrrunoff_ID, "UDRRUNOFF", & + "accumulated sub-surface runoff", & + "m", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable smc + !TODO: check dimension of the state variable following "vlevels=" + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, smc_ID, "SMC", & + "volumtric soil moisture", & + "m3/m3", vlevels=NOAHMP401_struc(n)%nsoil , valid_min=-99999.0, valid_max=99999.0, & + var_flag = "dim2") + + ! write the header for state variable sh2o + !TODO: check dimension of the state variable following "vlevels=" + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, sh2o_ID, "SH2O", & + "volumtric liquid soil moisture", & + "m3/m3", vlevels=NOAHMP401_struc(n)%nsoil , valid_min=-99999.0, valid_max=99999.0, & + var_flag = "dim2") + + ! write the header for state variable tslb + !TODO: check dimension of the state variable following "vlevels=" + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, tslb_ID, "TSLB", & + "soil temperature", & + "K", vlevels=NOAHMP401_struc(n)%nsoil , valid_min=-99999.0, valid_max=99999.0, & + var_flag = "dim2") + + ! write the header for state variable sneqv + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, sneqv_ID, "SNEQV", & + "snow water equivalent", & + "mm", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable snowh + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, snowh_ID, "SNOWH", & + "physical snow depth", & + "m", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable canwat + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, canwat_ID, "CANWAT", & + "total canopy water + ice", & + "mm", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable acsnom + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, acsnom_ID, "ACSNOM", & + "accumulated snow melt leaving pack", & + "-", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable acsnow + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, acsnow_ID, "ACSNOW", & + "accumulated snow on grid", & + "mm", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable isnow + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, isnow_ID, "ISNOW", & + "actual no. of snow layers", & + "-", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable tv + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, tv_ID, "TV", & + "vegetation leaf temperature", & + "K", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable tg + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, tg_ID, "TG", & + "bulk ground surface temperature", & + "K", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable canice + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, canice_ID, "CANICE", & + "canopy-intercepted ice", & + "mm", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable canliq + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, canliq_ID, "CANLIQ", & + "canopy-intercepted liquid water", & + "mm", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable eah + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, eah_ID, "EAH", & + "canopy air vapor pressure", & + "Pa", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable tah + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, tah_ID, "TAH", & + "canopy air temperature", & + "K", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable cm + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, cm_ID, "CM", & + "bulk momentum drag coefficient", & + "-", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable ch + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, ch_ID, "CH", & + "bulk sensible heat exchange coefficient", & + "-", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable fwet + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, fwet_ID, "FWET", & + "wetted or snowed fraction of canopy", & + "-", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable sneqvo + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, sneqvo_ID, "SNEQVO", & + "snow mass at last time step", & + "mm h2o", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable albold + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, albold_ID, "ALBOLD", & + "snow albedo at last time step", & + "-", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable qsnow + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, qsnow_ID, "QSNOW", & + "snowfall on the ground", & + "mm/s", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable wslake + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, wslake_ID, "WSLAKE", & + "lake water storage", & + "mm", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable zwt + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, zwt_ID, "ZWT", & + "water table depth", & + "m", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable wa + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, wa_ID, "WA", & + "water in aquifer", & + "mm", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable wt + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, wt_ID, "WT", & + "water in aquifer and saturated soil", & + "mm", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable tsno + !TODO: check dimension of the state variable following "vlevels=" + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, tsno_ID, "TSNO", & + "snow layer temperature", & + "K", vlevels=NOAHMP401_struc(n)%nsnow , valid_min=-99999.0, valid_max=99999.0, & + var_flag = "dim3") + + ! write the header for state variable zss + !TODO: check dimension of the state variable following "vlevels=" + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, zss_ID, "ZSS", & + "snow/soil layer depth from snow surface", & + "m", vlevels=NOAHMP401_struc(n)%nsnow+NOAHMP401_struc(n)%nsoil , valid_min=-99999.0, valid_max=99999.0, & + var_flag = "dim1") + + ! write the header for state variable snowice + !TODO: check dimension of the state variable following "vlevels=" + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, snowice_ID, "SNOWICE", & + "snow layer ice", & + "mm", vlevels=NOAHMP401_struc(n)%nsnow , valid_min=-99999.0, valid_max=99999.0, & + var_flag = "dim3") + + ! write the header for state variable snowliq + !TODO: check dimension of the state variable following "vlevels=" + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, snowliq_ID, "SNOWLIQ", & + "snow layer liquid water", & + "mm", vlevels=NOAHMP401_struc(n)%nsnow , valid_min=-99999.0, valid_max=99999.0, & + var_flag = "dim3") + + ! write the header for state variable lfmass + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, lfmass_ID, "LFMASS", & + "leaf mass", & + "g/m2", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable rtmass + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, rtmass_ID, "RTMASS", & + "mass of fine roots", & + "g/m2", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable stmass + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, stmass_ID, "STMASS", & + "stem mass", & + "g/m2", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable wood + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, wood_ID, "WOOD", & + "mass of wood (including woody roots)", & + "g/m2", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable stblcp + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, stblcp_ID, "STBLCP", & + "stable carbon in deep soil", & + "g/m2", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable fastcp + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, fastcp_ID, "FASTCP", & + "short-lived carbon in shallow soil", & + "g/m2", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable lai + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, lai_ID, "LAI", & + "leaf area index", & + "-", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable sai + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, sai_ID, "SAI", & + "stem area index", & + "-", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable tauss + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, tauss_ID, "TAUSS", & + "snow age factor", & + "-", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable smoiseq + !TODO: check dimension of the state variable following "vlevels=" + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, smoiseq_ID, "SMOISEQ", & + "equilibrium volumetric soil moisture content", & + "m3/m3", vlevels=NOAHMP401_struc(n)%nsoil , valid_min=-99999.0, valid_max=99999.0, & + var_flag = "dim2") + + ! write the header for state variable smcwtd + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, smcwtd_ID, "SMCWTD", & + "soil moisture content in the layer to the water table when deep", & + "-", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable deeprech + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, deeprech_ID, "DEEPRECH", & + "recharge to the water table when deep", & + "-", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable rech + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, rech_ID, "RECH", & + "recharge to the water table (diagnostic)", & + "-", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable grain + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, grain_ID, "GRAIN", & + "mass of grain XING", & + "g/m2", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable gdd + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, gdd_ID, "GDD", & + "growing degree days XING (based on 10C)", & + "-", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable pgs + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, pgs_ID, "PGS", & + "growing degree days XING", & + "-", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable gecros_state + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max +! call LIS_writeHeader_restart(ftn, n, dimID, gecros_state_ID, "GECROS_STATE", & +! "optional gecros crop", & +! "-", vlevels=60, valid_min=-99999.0, valid_max=99999.0, & +! var_flag = "dim4") + + ! close header of restart file + call LIS_closeHeader_restart(ftn, n, LIS_rc%lsm_index, dimID, NOAHMP401_struc(n)%rstInterval) + + ! write state variables into restart file + ! accumulated surface runoff + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%sfcrunoff, & + varid=sfcrunoff_ID, dim=1, wformat=wformat) + + ! accumulated sub-surface runoff + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%udrrunoff, & + varid=udrrunoff_ID, dim=1, wformat=wformat) + + ! volumtric soil moisture + do l=1, NOAHMP401_struc(n)%nsoil ! TODO: check loop + tmptilen = 0 + do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) + tmptilen(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(l) + enddo + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, & + varid=smc_ID, dim=l, wformat=wformat) + enddo + ! volumtric liquid soil moisture + do l=1, NOAHMP401_struc(n)%nsoil ! TODO: check loop + tmptilen = 0 + do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) + tmptilen(t) = NOAHMP401_struc(n)%noahmp401(t)%sh2o(l) + enddo + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, & + varid=sh2o_ID, dim=l, wformat=wformat) + enddo + ! soil temperature + do l=1, NOAHMP401_struc(n)%nsoil ! TODO: check loop + tmptilen = 0 + do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) + tmptilen(t) = NOAHMP401_struc(n)%noahmp401(t)%tslb(l) + enddo + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, & + varid=tslb_ID, dim=l, wformat=wformat) + enddo + ! snow water equivalent + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%sneqv, & + varid=sneqv_ID, dim=1, wformat=wformat) + + ! physical snow depth + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%snowh, & + varid=snowh_ID, dim=1, wformat=wformat) + + ! total canopy water + ice + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%canwat, & + varid=canwat_ID, dim=1, wformat=wformat) + + ! accumulated snow melt leaving pack + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%acsnom, & + varid=acsnom_ID, dim=1, wformat=wformat) + + ! accumulated snow on grid + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%acsnow, & + varid=acsnow_ID, dim=1, wformat=wformat) + + ! actual no. of snow layers + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%isnow, & + varid=isnow_ID, dim=1, wformat=wformat) + + ! vegetation leaf temperature + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%tv, & + varid=tv_ID, dim=1, wformat=wformat) + + ! bulk ground surface temperature + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%tg, & + varid=tg_ID, dim=1, wformat=wformat) + + ! canopy-intercepted ice + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%canice, & + varid=canice_ID, dim=1, wformat=wformat) + + ! canopy-intercepted liquid water + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%canliq, & + varid=canliq_ID, dim=1, wformat=wformat) + + ! canopy air vapor pressure + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%eah, & + varid=eah_ID, dim=1, wformat=wformat) + + ! canopy air temperature + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%tah, & + varid=tah_ID, dim=1, wformat=wformat) + + ! bulk momentum drag coefficient + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%cm, & + varid=cm_ID, dim=1, wformat=wformat) + + ! bulk sensible heat exchange coefficient + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%ch, & + varid=ch_ID, dim=1, wformat=wformat) + + ! wetted or snowed fraction of canopy + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%fwet, & + varid=fwet_ID, dim=1, wformat=wformat) + + ! snow mass at last time step + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%sneqvo, & + varid=sneqvo_ID, dim=1, wformat=wformat) + + ! snow albedo at last time step + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%albold, & + varid=albold_ID, dim=1, wformat=wformat) + + ! snowfall on the ground + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%qsnow, & + varid=qsnow_ID, dim=1, wformat=wformat) + + ! lake water storage + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%wslake, & + varid=wslake_ID, dim=1, wformat=wformat) + + ! water table depth + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%zwt, & + varid=zwt_ID, dim=1, wformat=wformat) + + ! water in the "aquifer" + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%wa, & + varid=wa_ID, dim=1, wformat=wformat) + + ! water in aquifer and saturated soil + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%wt, & + varid=wt_ID, dim=1, wformat=wformat) + + ! snow layer temperature + do l=1, NOAHMP401_struc(n)%nsnow ! TODO: check loop + tmptilen = 0 + do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) + tmptilen(t) = NOAHMP401_struc(n)%noahmp401(t)%tsno(l) + enddo + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, & + varid=tsno_ID, dim=l, wformat=wformat) + enddo + ! snow/soil layer depth from snow surface + do l=1, NOAHMP401_struc(n)%nsnow+NOAHMP401_struc(n)%nsoil ! TODO: check loop + tmptilen = 0 + do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) + tmptilen(t) = NOAHMP401_struc(n)%noahmp401(t)%zss(l) + enddo + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, & + varid=zss_ID, dim=l, wformat=wformat) + enddo + ! snow layer ice + do l=1, NOAHMP401_struc(n)%nsnow ! TODO: check loop + tmptilen = 0 + do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) + tmptilen(t) = NOAHMP401_struc(n)%noahmp401(t)%snowice(l) + enddo + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, & + varid=snowice_ID, dim=l, wformat=wformat) + enddo + ! snow layer liquid water + do l=1, NOAHMP401_struc(n)%nsnow ! TODO: check loop + tmptilen = 0 + do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) + tmptilen(t) = NOAHMP401_struc(n)%noahmp401(t)%snowliq(l) + enddo + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, & + varid=snowliq_ID, dim=l, wformat=wformat) + enddo + ! leaf mass + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%lfmass, & + varid=lfmass_ID, dim=1, wformat=wformat) + + ! mass of fine roots + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%rtmass, & + varid=rtmass_ID, dim=1, wformat=wformat) + + ! stem mass + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%stmass, & + varid=stmass_ID, dim=1, wformat=wformat) + + ! mass of wood (including woody roots) + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%wood, & + varid=wood_ID, dim=1, wformat=wformat) + + ! stable carbon in deep soil + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%stblcp, & + varid=stblcp_ID, dim=1, wformat=wformat) + + ! short-lived carbon in shallow soil + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%fastcp, & + varid=fastcp_ID, dim=1, wformat=wformat) + + ! leaf area index + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%lai, & + varid=lai_ID, dim=1, wformat=wformat) + + ! stem area index + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%sai, & + varid=sai_ID, dim=1, wformat=wformat) + + ! snow age factor + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%tauss, & + varid=tauss_ID, dim=1, wformat=wformat) + + ! equilibrium volumetric soil moisture content + do l=1, NOAHMP401_struc(n)%nsoil ! TODO: check loop + tmptilen = 0 + do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) + tmptilen(t) = NOAHMP401_struc(n)%noahmp401(t)%smoiseq(l) + enddo + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, & + varid=smoiseq_ID, dim=l, wformat=wformat) + enddo + ! soil moisture content in the layer to the water table when deep + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%smcwtd, & + varid=smcwtd_ID, dim=1, wformat=wformat) + + ! recharge to the water table when deep + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%deeprech, & + varid=deeprech_ID, dim=1, wformat=wformat) + + ! recharge to the water table (diagnostic) + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%rech, & + varid=rech_ID, dim=1, wformat=wformat) + + ! mass of grain XING + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%grain, & + varid=grain_ID, dim=1, wformat=wformat) + + ! growing degree days XING (based on 10C) + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%gdd, & + varid=gdd_ID, dim=1, wformat=wformat) + + ! growing degree days XING + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%pgs, & + varid=pgs_ID, dim=1, wformat=wformat) + + ! optional gecros crop +! do l=1, 60 ! TODO: check loop +! tmptilen = 0 +! do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) +! tmptilen(t) = NOAHMP401_struc(n)%noahmp401(t)%gecros_state(l) +! enddo +! call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, & +! varid=gecros_state_ID, dim=l, wformat=wformat) +! enddo +end subroutine NoahMP401_dump_restart diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_coldstart.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_coldstart.F90 new file mode 100644 index 000000000..b05931d68 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_coldstart.F90 @@ -0,0 +1,480 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- + +#include "LIS_misc.h" +!BOP +! +! !ROUTINE: NoahMP401_coldstart +! \label{NoahMP401_coldstart} +! +! !REVISION HISTORY: +! This subroutine is generated with the Model Implementation Toolkit developed +! by Shugong Wang for the NASA Land Information System Version 7. The initial +! specification of the subroutine is defined by Sujay Kumar. +! 10/25/18: Shugong Wang, Zhuo Wang; initial implementation for LIS 7 and NoahMP401 +! May 2023: Cenlin He; update to work with refactored NoahMP (v5.0 and newer) +! +! !INTERFACE: +subroutine NoahMPnew_coldstart(mtype) +! !USES: +! use LIS_coreMod, only: LIS_rc +! use LIS_logMod, only: LIS_logunit +! use LIS_timeMgrMod, only: LIS_date2time + + use LIS_coreMod + use LIS_logMod + use LIS_histDataMod + + use LIS_timeMgrMod, only: LIS_date2time + use NoahMPnew_lsmMod + +! +! !DESCRIPTION: +! +! This routine initializes the NoahMP401 state variables with +! some predefined values constantly for the entire domain. +! +!EOP + + implicit none + + integer :: mtype + integer :: t, l, n, i + integer :: c, r + + ! Added by Zhuo Wang on 11/21/2018 + integer :: ids,ide, jds,jde, kds,kde, & + & ims,ime, jms,jme, kms,kme, & + & its,ite, jts,jte, kts,kte + + !------------------------------------------------------------------------ + ! End 2D variables not used in WRF + !------------------------------------------------------------------------ + CHARACTER(LEN=256) :: LLANDUSE ! (=USGS, using USGS landuse classification) + !------------------------------------------------------------------------ + + integer :: row, col + integer :: NSOIL ! number of soil layers + LOGICAL :: restart, & + & allowed_to_read + + real, dimension(4) :: DZS ! Thickness of the soil layers [m] + real :: dx, dy + real, dimension( 1, 1 ) :: msftx, msfty + real :: wtddt, dtbl + integer :: stepwtd + + real, dimension( 1, 1 ) :: & + & snowxy, & ! snow water equivalent [mm] + & snowhxy, & ! physical snow depth [m] + & canwatxy ! total canopy water + ice [mm] + + integer, dimension( 1, 1 ) :: & + & ISLTYP, & ! soil type + IVGTYP ! vegetation type + + real, dimension( 1, 4, 1 ) :: & + & tslb_3d, & ! soil temperature [K] + & smois_3d, & ! volumetric soil moisture [m3/m3] + & sh2o_3d ! volumetric liquid soil moisture [m3/m3] + + LOGICAL :: FNDSOILW, & ! soil water present in input + & FNDSNOWH ! snow depth present in input + + integer :: runoff_option + integer :: crop_option + + real, dimension(1,1) :: XLAT !latitude + real, dimension(1,1) :: TSK !skin temperature (k) + real, dimension(1,1) :: tvxy !vegetation canopy temperature + real, dimension(1,1) :: tgxy !ground surface temperature + real, dimension(1,1) :: canicexy !canopy-intercepted ice (mm) + real, dimension(1,1) :: canliqxy !canopy-intercepted liquid water (mm) + real, dimension(1,1) :: tmnxy !deep soil temperature (k) + real, dimension(1,1) :: XICE !sea ice fraction + real, dimension(1,1) :: eahxy !canopy air vapor pressure (pa) + real, dimension(1,1) :: tahxy !canopy air temperature (k) + real, dimension(1,1) :: cmxy !momentum drag coefficient + real, dimension(1,1) :: chxy !sensible heat exchange coefficient + real, dimension(1,1) :: fwetxy !wetted or snowed fraction of the canopy (-) + real, dimension(1,1) :: sneqvoxy !snow mass at last time step(mm h2o) + real, dimension(1,1) :: alboldxy !snow albedo at last time step (-) + real, dimension(1,1) :: qsnowxy !snowfall on the ground [mm/s] + real, dimension(1,1) :: wslakexy !lake water storage [mm] + real, dimension(1,1) :: zwtxy !water table depth [m] + real, dimension(1,1) :: waxy !water in the "aquifer" [mm] + real, dimension(1,1) :: wtxy !groundwater storage [mm] + real, allocatable, dimension(:,:,:) :: tsnoxy !snow temperature [K] + real, allocatable, dimension(:,:,:) :: zsnsoxy !snow layer depth [m] + real, allocatable, dimension(:,:,:) :: snicexy !snow layer ice [mm] + real, allocatable, dimension(:,:,:) :: snliqxy !snow layer liquid water [mm] + real, dimension(1,1) :: lfmassxy !leaf mass [g/m2] + real, dimension(1,1) :: rtmassxy !mass of fine roots [g/m2] + real, dimension(1,1) :: stmassxy !stem mass [g/m2] + real, dimension(1,1) :: woodxy !mass of wood (incl. woody roots) [g/m2] + real, dimension(1,1) :: stblcpxy !stable carbon in deep soil [g/m2] + real, dimension(1,1) :: fastcpxy !short-lived carbon, shallow soil [g/m2] + real, dimension(1,1) :: saixy !stem area index + real, dimension(1,1) :: laixy !leaf area index + real, dimension(1,1) :: grainxy !mass of grain [g/m2] !XING + real, dimension(1,1) :: gddxy !growing degree days !XING + integer, dimension(1, 1) :: cropcatxy + + real, dimension(1,1) :: t2mvxy !2m temperature vegetation part (k) + real, dimension(1,1) :: t2mbxy !2m temperature bare ground part (k) + real, dimension(1,1) :: chstarxy !dummy + + ! Optional + real, dimension(1,1) :: smcwtdxy !deep soil moisture content [m3 m-3] + real, dimension(1,1) :: deeprechxy !deep recharge [m] + real, dimension(1,1) :: rechxy !accumulated recharge [mm] + real, dimension(1,1) :: qrfsxy !accumulated flux from groundwater to rivers [mm] + real, dimension(1,1) :: qspringsxy !accumulated seeping water [mm] + real, dimension(1,1) :: qslatxy !accumulated lateral flow [mm] + real, dimension(1,1) :: areaxy !grid cell area [m2] + real, dimension(1,1) :: FDEPTHXY !efolding depth for transmissivity (m) + real, dimension(1,1) :: HT !terrain height (m) + real, dimension(1,1) :: RIVERBEDXY !riverbed depth (m) + real, dimension(1,1) :: EQZWT !equilibrium water table depth (m) + real, dimension(1,1) :: RIVERCONDXY !river conductance + real, dimension(1,1) :: PEXPXY !factor for river conductance + real, dimension(1,1) :: rechclim + integer :: sf_urban_physics + + real, dimension(1,1) :: taussxy + real, dimension(1,1) :: acsnomxy + real, dimension(1,1) :: acsnowxy + real, dimension(1,1) :: sfcrunoffxy + real, dimension(1,1) :: udrrunoffxy + real, allocatable, dimension(:,:,:) :: smoiseqxy + + integer, dimension(1,1) :: pgsxy + real, allocatable, dimension(:,:,:) :: croptype +! integer, dimension(1,1) :: PLANTING,HARVEST,SEASON_GDD +! integer, dimension(1,1) :: SLOPETYP + + ! added by Shugong Wang + integer :: isnow + real, allocatable, dimension(:) :: zsnso + real, allocatable, dimension(:) :: snice + real, allocatable, dimension(:) :: snliq + real, allocatable, dimension(:) :: zsoil + +! Modified by Zhuo Wang + real, allocatable, dimension(:) :: tsnow + ! end add + + !EMK...Temporary arrays. + real :: tmp_swe(1,1),tmp_snodep(1,1) + integer :: isnowxy(1,1) + integer :: tmp_isnowxy(1,1) + + real, dimension(1,60,1) :: gecros_state ! Optional gecros crop + +! PLANTING(1,1) = 126 ! default planting date +! HARVEST(1,1) = 290 ! default harvest date +! SEASON_GDD(1,1) = 1605 ! default total seasonal growing degree days +! SLOPETYP = 2 +!--------------------------------------------------------------------- + ids = 1 + ide = 2 + jds = 1 + jde = 2 + kds = 1 + kde = 1 + ims = 1 + ime = 1 + jms = 1 + jme = 1 + kms = 1 + kme = 1 + its = 1 + ite = 1 + jts = 1 + jte = 1 + kts = 1 + kte = 1 + + do n=1, LIS_rc%nnest + isnow = -NoahmpNew_struc(n)%nsnow + + ! Added by Shugong + allocate(zsnso(-NoahmpNew_struc(n)%nsnow+1:NoahmpNew_struc(n)%nsoil)) + ! Modified by Zhuo Wang + allocate(tsnow(-NoahmpNew_struc(n)%nsnow+1:0)) + allocate(snice(-NoahmpNew_struc(n)%nsnow+1:0)) + allocate(snliq(-NoahmpNew_struc(n)%nsnow+1:0)) + allocate(zsoil(NoahmpNew_struc(n)%nsoil)) + ! Added by David + allocate(tsnoxy(1,-NoahmpNew_struc(n)%nsnow+1:0,1)) + allocate(zsnsoxy(1,-NoahmpNew_struc(n)%nsnow+1:NoahmpNew_struc(n)%nsoil,1)) + allocate(snicexy(1,-NoahmpNew_struc(n)%nsnow+1:0,1)) + allocate(snliqxy(1,-NoahmpNew_struc(n)%nsnow+1:0,1)) + allocate(smoiseqxy(1,NoahmpNew_struc(n)%nsoil,1)) + allocate(croptype(1,5,1)) ! Check to see if 5 should be hard-coded + + zsoil(1) = -NoahmpNew_struc(n)%sldpth(1) + do l=2, NoahmpNew_struc(n)%nsoil + zsoil(l) = zsoil(l-1) - NoahmpNew_struc(n)%sldpth(l) + enddo + ! end add + +!------------------------------------ +! Initialize Model State Variables +!---------------------------------------------------------------------- + if (trim(LIS_rc%startcode) .eq. "coldstart") then + write(LIS_logunit,*) & + "[INFO] NoahMP401_coldstart -- cold-starting Noah-MP.4.0.1" + + do t=1, LIS_rc%npatch(n,mtype) + + row = LIS_surface(n, LIS_rc%lsm_index)%tile(t)%row + col = LIS_surface(n, LIS_rc%lsm_index)%tile(t)%col + XLAT(1,1) = LIS_domain(n)%grid(LIS_domain(n)%gindex(col,row))%lat + + ! added by shugong + zsnso = 0.0 + tmp_swe(1,1) = NoahmpNew_struc(n)%init_sneqv + tgxy(1,1) = NoahmpNew_struc(n)%init_tskin + tmp_snodep(1,1) = NoahmpNew_struc(n)%init_snowh + + call snow_init_401(1, 1, 1, 1, 1, 1, 1, 1, & !input + NoahmpNew_struc(n)%nsnow, & !input + NoahmpNew_struc(n)%nsoil, & !input + zsoil, & !input + tmp_swe, & !input + tgxy, & !input + tmp_snodep, & !input + zsnso, tsnow, snice, snliq, & !output + isnowxy) ! output + isnow = isnowxy(1,1) + ! end add + + snicexy(1,-NoahmpNew_struc(n)%nsnow+1:0,1) = snice(-NoahmpNew_struc(n)%nsnow+1:0) + snliqxy(1,-NoahmpNew_struc(n)%nsnow+1:0,1) = snliq(-NoahmpNew_struc(n)%nsnow+1:0) + zsnsoxy(1,-NoahmpNew_struc(n)%nsnow+1:NoahmpNew_struc(n)%nsoil,1) = zsnso(-NoahmpNew_struc(n)%nsnow+1:NoahmpNew_struc(n)%nsoil) + tsnoxy(1,-NoahmpNew_struc(n)%nsnow+1:0,1) = tsnow(-NoahmpNew_struc(n)%nsnow+1:0) + + do l=1,5 + croptype(1,l,1) = 0.0 + enddo + + cropcatxy(1,1) = LIS_rc%cropclass + + if (NoahmpNew_struc(n)%crop_opt.eq.2) then + do l=1, 60 ! TODO: check loop + gecros_state(1,l,1) = NoahmpNew_struc(n)%init_gecros_state(l) + enddo + else + gecros_state(1,l,1) = 0.0 + endif + + canwatxy(1,1) = NoahmpNew_struc(n)%init_canwat + IVGTYP(1,1) = NoahmpNew_struc(n)%noahmpnew(t)%vegetype + ISLTYP(1,1) = NoahmpNew_struc(n)%noahmpnew(t)%soiltype + + do l=1, NoahmpNew_struc(n)%nsoil + tslb_3d(1,l,1) = NoahmpNew_struc(n)%init_tslb(l) ! Noah-MP.4.0.1 initial soil temperatures: + smois_3d(1,l,1) = NoahmpNew_struc(n)%init_smc(l) ! Noah-MP.4.0.1 initial total soil moistures: + sh2o_3d(1,l,1) = 0.0 ! Noah-MP.4.0.1 initial liquid soil moistures set in NOAHMP_INIT + DZS(l) = NoahmpNew_struc(n)%sldpth(l) ! Noah-MP.4.0.1 thickness of soil layers: + enddo + + FNDSOILW = .true. + FNDSNOWH = .true. + + TSK(1,1) = NoahmpNew_struc(n)%init_tskin ! Noah-MP.4.0.1 surface skin temperature: + tvxy(1,1) = 0.0 ! Noah-MP.4.0.1 initial vegetation temperature set in NOAHMP_INIT + tgxy(1,1) = 0.0 ! Noah-MP.4.0.1 initial ground temperature set in NOAHMP_INIT + canicexy(1,1) = 0.0 ! Noah-MP.4.0.1 initial canopy-intercepted ice set in NOAHMP_INIT + canliqxy(1,1) = 0.0 ! Noah-MP.4.0.1 initial canopy-intercepted liquid water set in NOAHMP_INIT + tmnxy(1,1) = NoahmpNew_struc(n)%noahmpnew(t)%tbot ! Noah-MP.4.0.1 soil temperature lower boundary: +! Fix later (should it be zero?) +! XICE(1,1) = NoahmpNew_struc(n)%seaice ! Noah-MP.4.0.1 sea ice fraction: + XICE(1,1) = 0.0 + eahxy(1,1) = 0.0 + tahxy(1,1) = 0.0 + cmxy(1,1) = 0.0 + chxy(1,1) = 0.0 + fwetxy(1,1) = 0.0 + sneqvoxy(1,1) = 0.0 ! Noah-MP.4.0.1 initial snow mass at last time step set in NOAHMP_INIT + alboldxy(1,1) = 0.0 ! Noah-MP.4.0.1 initial snow albedo at last time step set in NOAHMP_INIT + qsnowxy(1,1) = 0.0 ! Noah-MP.4.0.1 initial snowfall on the ground set in NOAHMP_INIT + wslakexy(1,1) = 0.0 + zwtxy(1,1) = NoahmpNew_struc(n)%init_zwt ! Noah-MP.4.0.1 initial water table depth: + waxy(1,1) = NoahmpNew_struc(n)%init_wa ! Noah-MP.4.0.1 initial water in the aquifer: + wtxy(1,1) = NoahmpNew_struc(n)%init_wt ! Noah-MP.4.0.1 initial water in aquifer and saturated soil: + lfmassxy(1,1) = 0.0 ! Noah-MP.4.0.1 initial leaf mass set in NOAHMP_INIT + rtmassxy(1,1) = 0.0 ! Noah-MP.4.0.1 initial mass of fine roots set in NOAHMP_INIT + stmassxy(1,1) = 0.0 ! Noah-MP.4.0.1 initial stem mass set in NOAHMP_INIT + woodxy(1,1) = 0.0 ! Noah-MP.4.0.1 initial mass of wood including woody roots set in NOAHMP_INIT + stblcpxy(1,1) = 0.0 ! Noah-MP.4.0.1 initial stable carbon in deep soil set in NOAHMP_INIT + fastcpxy(1,1) = 0.0 ! Noah-MP.4.0.1 initial short-lived carbon in shallow soil set in NOAHMP_INIT + saixy(1,1) = 0.0 ! Noah-MP.4.0.1 initial stem area index set in NOAHMP_INIT + laixy(1,1) = NoahmpNew_struc(n)%init_lai ! Noah-MP.4.0.1 initial leaf area index: + grainxy(1,1) = 0.0 + gddxy(1,1) = 0.0 + cropcatxy(1,1) = 0.0 + t2mvxy(1,1) = 0.0 ! set in NOAHMP_INIT + t2mbxy(1,1) = 0.0 ! set in NOAHMP_INIT + chstarxy(1,1) = 0.0 ! dummy + NSOIL = NoahmpNew_struc(n)%nsoil + restart = .false. + allowed_to_read = .true. + runoff_option = NoahmpNew_struc(n)%run_opt ! Noah-MP.4.0.1 runoff and groundwater option: + crop_option = NoahmpNew_struc(n)%crop_opt ! Noah-MP.4.0.1 crop model option: + sf_urban_physics = NoahmpNew_struc(n)%urban_opt ! Noah-MP.4.0.1 urban physics option: + + ! The following variables are optional for groundwater dynamics iopt_run=5, + ! so some random values are set temporarily. + + do l=1, NoahmpNew_struc(n)%nsoil + smoiseqxy(1,l,1) = 0.0 ! Noah-MP.4.0.1 initial equilibrium soil moisture content + end do + + smcwtdxy(1,1) = 0.0 + rechxy(1,1) = 0.0 + deeprechxy(1,1) = 0.0 + areaxy(1,1) = 100. + dx = 10.0 + dy = 10.0 + msftx(1,1) = 0.0 + msfty(1,1) = 0.0 + wtddt = 0.0 + stepwtd = 0 + dtbl = 0.0 + qrfsxy(1,1) = 0.0 + qslatxy(1,1) = 0.0 + fdepthxy(1,1) = 0.0 +! Fix terrain height later for crop model (Get from lis_input file) + HT(1,1) = -9999.9 + riverbedxy(1,1) = 0.0 + eqzwt(1,1) = 0.0 + rivercondxy(1,1) = 0.0 + pexpxy(1,1) = 0.0 + rechclim(1,1) = 0.0 + sfcrunoffxy(1,1) = 0.0 + udrrunoffxy(1,1) = 0.0 + acsnomxy(1,1) = 0.0 + acsnowxy(1,1) = 0.0 + taussxy(1,1) = 0.0 + pgsxy(1,1) = 0 + + CALL NOAHMP_INIT( LLANDUSE, tmp_swe, tmp_snodep, canwatxy, ISLTYP, IVGTYP, XLAT, & + tslb_3d, smois_3d, sh2o_3d, DZS, FNDSOILW, FNDSNOWH, & + TSK, isnowxy, tvxy, tgxy, canicexy, tmnxy, XICE, & + canliqxy, eahxy, tahxy, cmxy, chxy, & + fwetxy, sneqvoxy, alboldxy, qsnowxy, wslakexy, zwtxy, waxy, & + wtxy, tsnoxy, zsnsoxy, snicexy, snliqxy, lfmassxy, rtmassxy, & + stmassxy, woodxy, stblcpxy, fastcpxy, saixy, laixy, & + grainxy, gddxy, & + croptype, cropcatxy, & + t2mvxy, t2mbxy, chstarxy, & + NSOIL, restart, & + allowed_to_read,runoff_option, crop_option, & + sf_urban_physics, & ! urban scheme + ids,ide, jds,jde, kds,kde, & ! domain + ims,ime, jms,jme, kms,kme, & ! memory + its,ite, jts,jte, kts,kte & ! tile + ,smoiseqxy,smcwtdxy ,rechxy ,deeprechxy, areaxy ,dx, dy, msftx, msfty,& + wtddt ,stepwtd ,dtbl ,qrfsxy ,qspringsxy ,qslatxy, & + fdepthxy ,HT ,riverbedxy ,eqzwt ,rivercondxy ,pexpxy, & + rechclim ,gecros_state & + ) + + NoahmpNew_struc(n)%noahmpnew(t)%sfcrunoff = sfcrunoffxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%udrrunoff = udrrunoffxy(1,1) + + do l=1, NoahmpNew_struc(n)%nsoil + NoahmpNew_struc(n)%noahmpnew(t)%smc(l) = smois_3d(1,l,1) + enddo + do l=1, NoahmpNew_struc(n)%nsoil + NoahmpNew_struc(n)%noahmpnew(t)%sh2o(l) = sh2o_3d(1,l,1) + enddo + do l=1, NoahmpNew_struc(n)%nsoil + NoahmpNew_struc(n)%noahmpnew(t)%tslb(l) = tslb_3d(1,l,1) + enddo + NoahmpNew_struc(n)%noahmpnew(t)%sneqv = tmp_swe(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%snowh = tmp_snodep(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%canwat = canwatxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%acsnom = acsnomxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%acsnow = acsnowxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%isnow = isnowxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%tv = tvxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%tg = tgxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%canice = canicexy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%canliq = canliqxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%fwet = fwetxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%sneqvo = sneqvoxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%albold = alboldxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%qsnow = qsnowxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%wslake = wslakexy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%zwt = zwtxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%wa = waxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%wt = wtxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%lfmass = lfmassxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%rtmass = rtmassxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%stmass = stmassxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%wood = woodxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%stblcp = stblcpxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%fastcp = fastcpxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%lai = laixy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%sai = saixy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%tauss = taussxy(1,1) + + do l=1, NoahmpNew_struc(n)%nsoil + NoahmpNew_struc(n)%noahmpnew(t)%smoiseq(l) = smoiseqxy(1,l,1) + enddo + NoahmpNew_struc(n)%noahmpnew(t)%smcwtd = smcwtdxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%deeprech = deeprechxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%rech = rechxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%grain = grainxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%gdd = gddxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%pgs = pgsxy(1,1) + + do l=1, 60 ! TODO: check loop + NoahmpNew_struc(n)%noahmpnew(t)%gecros_state(l) = gecros_state(1,l,1) + enddo + + NoahmpNew_struc(n)%noahmpnew(t)%snowice(1:NoahmpNew_struc(n)%nsnow) = snicexy(1,-NoahmpNew_struc(n)%nsnow+1:0,1) + NoahmpNew_struc(n)%noahmpnew(t)%snowliq(1:NoahmpNew_struc(n)%nsnow) = snliqxy(1,-NoahmpNew_struc(n)%nsnow+1:0,1) + NoahmpNew_struc(n)%noahmpnew(t)%zss(1:NoahmpNew_struc(n)%nsnow+NoahmpNew_struc(n)%nsoil) = zsnsoxy(1,-NoahmpNew_struc(n)%nsnow+1:NoahmpNew_struc(n)%nsoil,1) + NoahmpNew_struc(n)%noahmpnew(t)%isnow = isnowxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%tsno(1:NoahmpNew_struc(n)%nsnow) = tsnoxy(1,-NoahmpNew_struc(n)%nsnow+1:0,1) +!----------------------------------------------------------------------- + enddo ! t=1,1 + + endif ! coldstart + + deallocate(zsnso) + deallocate(tsnow) + deallocate(snice) + deallocate(snliq) + deallocate(zsoil) + deallocate(tsnoxy) + deallocate(zsnsoxy) + deallocate(snicexy) + deallocate(snliqxy) + deallocate(smoiseqxy) + deallocate(croptype) + + LIS_rc%yr = LIS_rc%syr + LIS_rc%mo = LIS_rc%smo + LIS_rc%da = LIS_rc%sda + LIS_rc%hr = LIS_rc%shr + LIS_rc%mn = LIS_rc%smn + LIS_rc%ss = LIS_rc%sss + + call LIS_date2time(LIS_rc%time, LIS_rc%doy, LIS_rc%gmt, LIS_rc%yr, & + LIS_rc%mo, LIS_rc%da, LIS_rc%hr, LIS_rc%mn, LIS_rc%ss) + write(LIS_logunit,*) "[INFO] NoahMP401_coldstart -- ", & + "Using the specified start time ", LIS_rc%time + enddo ! nnest +end subroutine NoahMP401_coldstart diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_lsmMod.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_lsmMod.F90 new file mode 100644 index 000000000..207393505 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_lsmMod.F90 @@ -0,0 +1,382 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- + +!#include "LIS_misc.h" +module NoahMPnew_lsmMod +!BOP +! +! !MODULE: NoahMPnew_lsmMod +! +! !DESCRIPTION: +! +! This module provides the definition of derived data type used to +! control the operation of NoahMPnew model. It also provides the entry method +! for the initialization of NoahMPnew-specific variables. The derived +! data type {\tt NoahmpNew\_struc} includes the variables that specify +! the runtime options and other control variables as described below: +! +! \begin{description} +! \item[rfile] +! name of the NoahMPnew restart file +! \item[rformat] +! format of restart file (binary or netcdf) for NoahMPnew +! \item[LDT\_ncvar\_vegetype] +! LDT NetCDF variable name for vegetation type +! \item[LDT\_ncvar\_soiltype] +! LDT NetCDF variable name for soil type +! \item[LDT\_ncvar\_tbot] +! LDT NetCDF variable name for deep soil temperature +! \item[LDT\_ncvar\_planting] +! LDT NetCDF variable name for planting date +! \item[LDT\_ncvar\_harvest] +! LDT NetCDF variable name for harvest date +! \item[LDT\_ncvar\_season\_gdd] +! LDT NetCDF variable name for growing season GDD +! \item[LDT\_ncvar\_soilcL1] +! LDT NetCDF variable name for soil texture in layer 1 +! \item[LDT\_ncvar\_soilcL2] +! LDT NetCDF variable name for soil texture in layer 2 +! \item[LDT\_ncvar\_soilcL3] +! LDT NetCDF variable name for soil texture in layer 3 +! \item[LDT\_ncvar\_soilcL4] +! LDT NetCDF variable name for soil texture in layer 4 +! \item[LDT\_ncvar\_irfract] +! LDT NetCDF variable name for total irrigation fraction +! \item[LDT\_ncvar\_sifract] +! LDT NetCDF variable name for sprinkler irrigation fraction +! \item[LDT\_ncvar\_mifract] +! LDT NetCDF variable name for micro/drip irrigation fraction +! \item[LDT\_ncvar\_fifract] +! LDT NetCDF variable name for flood irrigation fraction +! \item[LDT\_ncvar\_tdfract] +! LDT NetCDF variable name for tile drainage fraction +! \item[ts] +! NoahMPnew model time step in second +! \item[ts\_soil] +! NoahMPnew model soil time step in second +! \item[count] +! variable to keep track of the number of timesteps before an output +! \item[rstInterval] +! restart writing interval +! \item[outInterval] +! output writing interval +! \item[noahmpnew] +! NoahMPnew model specific variables +! \item[forc\_count] +! counter of forcing data +! \item[dz8w] +! reference height of temperature and humidity +! \item[dt] +! timestep +! \item[dt_soil] +! timestep for soil process +! \item[sldpth] +! thickness of soil layers +! \item[nsoil] +! number of soil layers +! \item[nsnow] +! maximum number of snow layers (e.g. 3) +! \item[noahmp\_tbl\_name] +! NoahMP parameter table +! \item[landuse\_scheme\_name] +! Landuse classification scheme +! \item[dveg\_opt] +! dynamic vegetation, 1->off; 2->on); with opt\_crs=1 +! \item[crs\_opt] +! canopt stomatal resistance (1->Ball-Berry; 2->Jarvis) +! \item[btr\_opt] +! soil moisture factor for stomatal resistance(1->Noah;2->CLM;3->SSiB) +! \item[runsfc\_opt] +! surface runoff (1->SIMGM; 2->SIMTOP; 3->Schaake96; 4->BATS; 5->MMF; 6->VIC; 7->XinAnJiang; 8->DynamicVIC) +! \item[runsub\_opt] +! subsurface runoff (1->SIMGM; 2->SIMTOP; 3->Schaake96; 4->BATS; 5->MMF; 6->VIC; 7->XinAnJiang; 8->DynamicVIC) +! \item[sfc\_opt] +! surface layer drag coeff (CH \& CM) (1->M-O; 2->Chen97) +! \item[frz\_opt] +! supercooled liquid water (1->NY06; 2->Koren99) +! \item[tksno\_opt] +! snow thermal conductivity (1->Yen1965; 2->Anderson1976; 3->constant; 4->Verseghy1991; 5->Yen1981) +! \item[inf\_opt] +! frozen soil permeability (1->NY06; 2->Koren99) +! \item[rad\_opt] +! radiation transfer (1->gap=F(3D,cosz); 2->gap=0; 3->gap=1-Fveg) +! \item[alb\_opt] +! snow surface albedo (1->BATS; 2->CLASS) +! \item[snf\_opt] +! rainfall \& snowfall (1->Jordan91; 2->BATS; 3->Noah) +! \item[tbot\_opt] +! lower boundary of soil temperature +! \item[stc\_opt] +! snow/soil temperature time scheme +! \item[gla\_opt] +! glacier option (1->phase change; 2->simple) +! \item[rsf\_opt] +! surface resistance(1->Sakaguchi/Zeng;2->Seller;3->mod Sellers;4->1+snow) +! \item[soil\_opt] +! soil configuration option +! \item[pedo\_opt] +! soil pedotransfer function option +! \item[crop\_opt] +! crop model option (0->none; 1->Liu2016) +! \item[irr\_opt] +! irrigation scheme option (0->none; 1->always on; 2->trigger by planting/harvest dates; 3->trigger by LAI) +! \item[irrm\_opt] +! irrigation method option (0->fraction from input; 1->sprinkler; 2->micro/drip; 3->flood) +! \item[tdrn\_opt] +! tile drainage option (0->none; 1->simple drainage; 2->Hooghoudt's scheme) +! \item[urban\_opt] +! urban physics option (0->none; 1->SLUCM; 2->BEP; 3->BEP_BEM) +! \end{description} +! +! !REVISION HISTORY: +! This module is generated with the Model Implementation Toolkit developed +! by Shugong Wang for the NASA Land Information System Version 7. The initial +! specification of the module is defined by Sujay Kumar. +! 10/25/18: Shugong Wang, Zhuo Wang Initial implementation for LIS 7 and NoahMP401 +! 05/01/23: Cenlin He, update to work with refactored Noah-MP (v5.0 and later) + +! !USES: + use NoahMPnew_module + use LIS_constantsMod, only : LIS_CONST_PATH_LEN + + implicit none + + PRIVATE + !------------------------------------------------------------------------- + ! PUBLIC MEMBER FUNCTIONS + !------------------------------------------------------------------------- + public :: NoahMPnew_ini + !------------------------------------------------------------------------- + ! PUBLIC TYPES + !------------------------------------------------------------------------- + public :: NoahmpNew_struc +!EOP + type, public :: NoahMPnew_type_dec + character(len=LIS_CONST_PATH_LEN) :: rfile + character*256 :: rformat + !------------------------------------------------------------------------- + ! Parameter file names + !------------------------------------------------------------------------- + character*128 :: LDT_ncvar_vegetype + character*128 :: LDT_ncvar_soiltype + character*128 :: LDT_ncvar_shdfac_monthly + character*128 :: LDT_ncvar_tbot + character*128 :: LDT_ncvar_planting + character*128 :: LDT_ncvar_harvest + character*128 :: LDT_ncvar_season_gdd + character*128 :: LDT_ncvar_soilcomp + character*128 :: LDT_ncvar_soilcL1 + character*128 :: LDT_ncvar_soilcL2 + character*128 :: LDT_ncvar_soilcL3 + character*128 :: LDT_ncvar_soilcL4 + character*128 :: LDT_ncvar_irfract + character*128 :: LDT_ncvar_sifract + character*128 :: LDT_ncvar_mifract + character*128 :: LDT_ncvar_fifract + character*128 :: LDT_ncvar_tdfract + + !------------------------------------------------------------------------- + ! ts, Count, rstInterval, outInterval + !------------------------------------------------------------------------- + real :: ts + real :: ts_soil + integer :: count + real :: rstInterval + integer :: outInterval + integer :: forc_count + !------------------------------------------------------------------------- + ! Initial Model State for cold start + !------------------------------------------------------------------------- + real :: init_tskin + real :: init_sneqv + real :: init_snowh + real :: init_canwat + real, pointer :: init_tslb(:) + real, pointer :: init_smc(:) + real :: init_zwt + real :: init_wa + real :: init_wt + real :: init_lai + !------------------------------------------------------------------------- + ! Constant Parameter + !------------------------------------------------------------------------- + real :: dz8w + real :: dt + real :: dt_soil + real, pointer :: sldpth(:) + integer :: nsoil + integer :: nsnow + character(len=256) :: noahmp_tbl_name + character(len=256) :: landuse_scheme_name + integer :: dveg_opt + integer :: crs_opt + integer :: btr_opt + integer :: runsfc_opt + integer :: runsub_opt + integer :: sfc_opt + integer :: frz_opt + integer :: inf_opt + integer :: rad_opt + integer :: alb_opt + integer :: snf_opt + integer :: tksno_opt + integer :: tbot_opt + integer :: stc_opt + integer :: gla_opt + integer :: sndpth_gla_opt + integer :: rsf_opt + integer :: soil_opt + integer :: pedo_opt + integer :: crop_opt + integer :: irr_opt + integer :: irrm_opt + integer :: tdrn_opt + integer :: urban_opt + type(NoahMPnewdec), pointer :: noahmpnew(:) + end type NoahMPnew_type_dec + + type(NoahMPnew_type_dec), pointer :: NoahmpNew_struc(:) + +contains + +!BOP +! +! !ROUTINE: NoahMPnew_ini +! \label{NoahMPnew_ini} +! +! !INTERFACE: + subroutine NoahMPnew_ini() +! !USES: + use LIS_coreMod, only : LIS_rc + use LIS_logMod, only : LIS_verify, LIS_logunit + use LIS_timeMgrMod, only : LIS_clock, LIS_calendar, & + LIS_update_timestep, LIS_registerAlarm + use LIS_surfaceModelDataMod, only : LIS_sfmodel_struc +! !DESCRIPTION: +! +! This routine creates the datatypes and allocates memory for NoahMPnew-specific +! variables. It also invokes the routine to read the runtime specific options +! for NoahMPnew from the configuration file. +! +! The routines invoked are: +! \begin{description} +! \item[NoahMPnew\_readcrd](\ref{NoahMPnew_readcrd})\\ +! reads the runtime options for NoahMPnew model +! \end{description} +!EOP + implicit none + integer :: n, t + integer :: status + character*3 :: fnest ! EMK for RHMin + + ! allocate memory for nest + allocate(NoahmpNew_struc(LIS_rc%nnest)) + + ! read configuation information from lis.config file + call NoahMPnew_readcrd() + + do n=1, LIS_rc%nnest + ! allocate memory for all tiles in current nest + allocate(NoahmpNew_struc(n)%noahmpnew(LIS_rc%npatch(n, LIS_rc%lsm_index))) + !------------------------------------------------------------------------ + ! allocate memory for vector variables passed to model interfaces + ! TODO: check the following allocation statements carefully! + !------------------------------------------------------------------------ + ! allocate memory for multilevel spatial parameter + do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) + allocate(NoahmpNew_struc(n)%noahmpnew(t)%shdfac_monthly(12)) + allocate(NoahmpNew_struc(n)%noahmpnew(t)%soilcomp(8)) + enddo + + ! allocate memory for state variables + do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) + allocate(NoahmpNew_struc(n)%noahmpnew(t)%smc(NoahmpNew_struc(n)%nsoil)) + allocate(NoahmpNew_struc(n)%noahmpnew(t)%sh2o(NoahmpNew_struc(n)%nsoil)) + allocate(NoahmpNew_struc(n)%noahmpnew(t)%tslb(NoahmpNew_struc(n)%nsoil)) + allocate(NoahmpNew_struc(n)%noahmpnew(t)%tsno(NoahmpNew_struc(n)%nsnow)) + allocate(NoahmpNew_struc(n)%noahmpnew(t)%zss(NoahmpNew_struc(n)%nsnow + NoahmpNew_struc(n)%nsoil)) + allocate(NoahmpNew_struc(n)%noahmpnew(t)%snowice(NoahmpNew_struc(n)%nsnow)) + allocate(NoahmpNew_struc(n)%noahmpnew(t)%snowliq(NoahmpNew_struc(n)%nsnow)) + allocate(NoahmpNew_struc(n)%noahmpnew(t)%smoiseq(NoahmpNew_struc(n)%nsoil)) + enddo + + ! initialize forcing variables to zeros + do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) + NoahmpNew_struc(n)%noahmpnew(t)%lwdown = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%swdown = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%psurf = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%prcp = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%tair = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%qair = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%wind_e = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%wind_n = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%sfcheadrt = 0.0 + + !ag(05Jan2021) + NoahmpNew_struc(n)%noahmpnew(t)%rivsto = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%fldsto = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%fldfrc = 0.0 + enddo ! end of tile (t) loop + + !------------------------------------------------------------------------ + ! Model timestep Alarm + !------------------------------------------------------------------------ + NoahmpNew_struc(n)%forc_count = 0 + + call LIS_update_timestep(LIS_rc, n, NoahmpNew_struc(n)%ts) + + call LIS_registerAlarm("NoahMPnew model alarm",& + NoahmpNew_struc(n)%ts, & + NoahmpNew_struc(n)%ts) + + ! CH2023: add soil timestep that is allowed to be different from main timestep + call LIS_registerAlarm("NoahMPnew model alarm",& + NoahmpNew_struc(n)%ts, & + NoahmpNew_struc(n)%ts_soil) + + call LIS_registerAlarm("NoahMPnew restart alarm", & + NoahmpNew_struc(n)%ts,& + NoahmpNew_struc(n)%rstInterval) + + ! EMK Add alarm to reset tair_agl_min for RHMin. This should + ! match the output interval, since that is used for calculating + ! Tair_F_min. + write(fnest,'(i3.3)') n + call LIS_registerAlarm("NoahMPnew RHMin alarm "//trim(fnest),& + NoahmpNew_struc(n)%ts,& + LIS_sfmodel_struc(n)%outInterval) + if (LIS_sfmodel_struc(n)%outInterval .gt. 86400 .or. & + trim(LIS_sfmodel_struc(n)%outIntervalType) .eq. "dekad") then + write(LIS_logunit,*) & + '[WARN] If RHMin is selected for output, please reset ', & + 'surface model output interval to no more than 24 hours.' + end if + + ! Initialize min/max values to implausible values. + NoahmpNew_struc(n)%noahmpnew(:)%tair_agl_min = 999.0 + NoahmpNew_struc(n)%noahmpnew(:)%rhmin = 999.0 + + !------------------------------------------------------------------------ + ! TODO: setup number of soil moisture/temperature layers and depth here + !------------------------------------------------------------------------ + ! TODO: set number of soil moisture layers in surface model + LIS_sfmodel_struc(n)%nsm_layers = NoahmpNew_struc(n)%nsoil + ! TODO: set number of soil temperature layers in surface model + LIS_sfmodel_struc(n)%nst_layers = NoahmpNew_struc(n)%nsoil + allocate(LIS_sfmodel_struc(n)%lyrthk(NoahmpNew_struc(n)%nsoil)) + !LIS_sfmodel_struc(n)%lyrthk(:) = NoahmpNew_struc(n)%sldpth(:) + !EMK...Output soil layer thicknesses in centimeters for + !consistency with other LSMs. + LIS_sfmodel_struc(n)%lyrthk(:) = & + 100*NoahmpNew_struc(n)%sldpth(:) + LIS_sfmodel_struc(n)%ts = NoahmpNew_struc(n)%ts + enddo + end subroutine NoahMPnew_ini +end module NoahMPnew_lsmMod diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_module.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_module.F90 new file mode 100644 index 000000000..1687b727c --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_module.F90 @@ -0,0 +1,532 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- + +module NoahMPnew_module +!BOP +! +! !MODULE: NoahMPnew_module +! +! !DESCRIPTION: +! The code in this file provides a description of the +! data structure containing the NoahMP 1-d variables (for v5.0 and later). +! The variables specified in the data structure include: +! +! \begin{description} +! \item[n] +! nest id. unit: - +! \item[latitude] +! latitude in decimal degree. unit: rad +! \item[logitude] +! longitude in decimal year. unit: rad +! \item[year] +! year of the current time step. unit: - +! \item[month] +! month of the current time step. unit: - +! \item[day] +! day of the current time step. unit: - +! \item[hour] +! hour of the current time step. unit: - +! \item[minute] +! minute of the current time step. unit: - +! \item[dz8w] +! thickness of atmospheric layers. unit: m +! \item[dt] +! timestep. unit: s +! \item[sldpth] +! thickness of soil layers. unit: m +! \item[nsoil] +! number of soil layers. unit: - +! \item[nsnow] +! maximum number of snow layers (e.g. 3). unit: - +! \item[vegetype] +! vegetation type. unit: - +! \item[soiltype] +! soil type. unit: - +! \item[shdfac\_monthly] +! monthly values for green vegetation fraction. unit: +! \item[tbot] +! deep soil temperature. unit: K +! \item[urban\_vegetype] +! urban land cover type index. unit: - +! \item[cropcat] +! crop category. unit: - +! \item[planting] +! planting date. unit: - +! \item[harvest] +! harvest date. unit: - +! \item[season\_gdd] +! growing season GDD. unit: - +! \item[landuse\_tbl\_name] +! Noah model landuse parameter table. unit: - +! \item[soil\_tbl\_name] +! Noah model soil parameter table. unit: - +! \item[gen\_tbl\_name] +! Noah model general parameter table. unit: - +! \item[noahmp\_tbl\_name] +! NoahMP parameter table. unit: - +! \item[landuse\_scheme\_name] +! Landuse classification scheme. unit: - +! \item[soil\_scheme\_name] +! Soil classification scheme. unit: - +! \item[dveg\_opt] +! dynamic vegetation, (1-$>$off; 2-$>$on); with opt\_crs=1. unit: - +! \item[crs\_opt] +! canopt stomatal resistance (1-$>$Ball-Berry; 2-$>$Jarvis). unit: - +! \item[btr\_opt] +! soil moisture factor for stomatal resistance (1-$>$Noah;2-$>$CLM;3-$>$SSiB). unit: - +! \item[runsfc\_opt] +! surface runoff (1->SIMGM; 2->SIMTOP; 3->Schaake96; 4->BATS; 5->MMF; 6->VIC; 7->XinAnJiang; 8->DynamicVIC) +! \item[runsub\_opt] +! subsurface runoff (1->SIMGM; 2->SIMTOP; 3->Schaake96; 4->BATS; 5->MMF; 6->VIC; 7->XinAnJiang; 8->DynamicVIC) +! \item[sfc\_opt] +! surface layer drag coeff (CH \& CM) (1-$>$M-O; 2-$>$Chen97). unit: - +! \item[frz\_opt] +! supercooled liquid water (1-$>$NY06; 2-$>$Koren99). unit: - +! \item[tksno\_opt] +! snow thermal conductivity (1->Yen1965; 2->Anderson1976; 3->constant; 4->Verseghy1991; 5->Yen1981). unit: - +! \item[inf\_opt] +! frozen soil permeability (1-$>$NY06; 2-$>$Koren99). unit: - +! \item[rad\_opt] +! radiation transfer (1-$>$gap=F(3D,cosz); 2-$>$gap=0; 3-$>$gap=1-Fveg). unit: - +! \item[alb\_opt] +! snow surface albedo (1-$>$BATS; 2-$>$CLASS). unit: - +! \item[snf\_opt] +! rainfall \& snowfall (1-$>$Jordan91; 2-$>$BATS; 3-$>$Noah). unit: - +! \item[tbot\_opt] +! lower boundary of soil temperature. unit: - +! \item[stc\_opt] +! snow/soil temperature time scheme. unit: - +! \item[gla\_opt] +! glacier option (1-$>$phase change; 2-$>$simple). unit: - +! \item[rsf\_opt] +! surface resistance (1-$>$Sakaguchi/Zeng;2-$>$Seller;3-$>$mod Sellers;4-$>$1+snow). unit: - +! \item[soil\_opt] +! soil configuration option. unit: - +! \item[pedo\_opt] +! soil pedotransfer function option. unit: - +! \item[crop\_opt] +! crop model option (0-$>$none; 1-$>$Liu et al.; 2-$>$Gecros). unit: - +! \item[irr\_opt] +! irrigation scheme option (0->none; 1->always on; 2->trigger by planting/harvest dates; 3->trigger by LAI) +! \item[irrm\_opt] +! irrigation method option (0->fraction from input; 1->sprinkler; 2->micro/drip; 3->flood) +! \item[tdrn\_opt] +! tile drainage option (0->none; 1->simple drainage; 2->Hooghoudt's scheme) +! \item[urban\_opt] +! urban physics option. unit: - +! \item[soilcomp] +! soil sand and clay percentage. unit: - +! \item[soilcL1] +! soil texture in layer 1. unit: - +! \item[soilcL2] +! soil texture in layer 2. unit: - +! \item[soilcL3] +! soil texture in layer 3. unit: - +! \item[soilcL4] +! soil texture in layer 4. unit: - +! \item[tair] +! air temperature. unit: K +! \item[psurf] +! air pressure. unit: Pa +! \item[wind\_e] +! U wind component. unit: m/s +! \item[wind\_n] +! V wind component. unit: m/s +! \item[qair] +! specific humidity. unit: kg/kg +! \item[swdown] +! downward solar radiation. unit: W m-2 +! \item[lwdown] +! downward longwave radiation. unit: W m-2 +! \item[prcp] +! total precipitation (rainfall+snowfall). unit: mm +! \item[tsk] +! surface radiative temperature. unit: K +! \item[hfx] +! sensible heat flux. unit: W m-2 +! \item[qfx] +! latent heat flux. unit: kg s-1 m-2 +! \item[lh] +! latent heat flux. unit: W m-2 +! \item[grdflx] +! ground/snow heat flux. unit: W m-2 +! \item[sfcrunoff] +! accumulated surface runoff. unit: m +! \item[udrrunoff] +! accumulated sub-surface runoff. unit: m +! \item[albedo] +! total grid albedo. unit: - +! \item[snowc] +! snow cover fraction. unit: - +! \item[smc] +! volumtric soil moisture. unit: m3/m3 +! \item[sh2o] +! volumtric liquid soil moisture. unit: m3/m3 +! \item[tslb] +! soil temperature. unit: K +! \item[sneqv] +! snow water equivalent. unit: mm +! \item[snowh] +! physical snow depth. unit: m +! \item[canwat] +! total canopy water + ice. unit: mm +! \item[acsnom] +! accumulated snow melt leaving pack. unit: - +! \item[acsnow] +! accumulated snow on grid. unit: mm +! \item[emiss] +! surface bulk emissivity. unit: - +! \item[rs] +! total stomatal resistance. unit: s/m +! \item[isnow] +! actual no. of snow layers. unit: - +! \item[tv] +! vegetation leaf temperature. unit: K +! \item[tg] +! bulk ground surface temperature. unit: K +! \item[canice] +! canopy-intercepted ice. unit: mm +! \item[canliq] +! canopy-intercepted liquid water. unit: mm +! \item[eah] +! canopy air vapor pressure. unit: Pa +! \item[tah] +! canopy air temperature. unit: K +! \item[cm] +! bulk momentum drag coefficient. unit: - +! \item[ch] +! bulk sensible heat exchange coefficient. unit: - +! \item[fwet] +! wetted or snowed fraction of canopy. unit: - +! \item[sneqvo] +! snow mass at last time step. unit: mm h2o +! \item[albold] +! snow albedo at last time step. unit: - +! \item[qsnow] +! snowfall on the ground. unit: mm/s +! \item[wslake] +! lake water storage. unit: mm +! \item[zwt] +! water table depth. unit: m +! \item[wa] +! water in the "aquifer". unit: mm +! \item[wt] +! water in aquifer and saturated soil. unit: mm +! \item[tsno] +! snow layer temperature. unit: K +! \item[zss] +! snow/soil layer depth from snow surface. unit: m +! \item[snowice] +! snow layer ice. unit: mm +! \item[snowliq] +! snow layer liquid water. unit: mm +! \item[lfmass] +! leaf mass. unit: g/m2 +! \item[rtmass] +! mass of fine roots. unit: g/m2 +! \item[stmass] +! stem mass. unit: g/m2 +! \item[wood] +! mass of wood (including woody roots). unit: g/m2 +! \item[stblcp] +! stable carbon in deep soil. unit: g/m2 +! \item[fastcp] +! short-lived carbon in shallow soil. unit: g/m2 +! \item[lai] +! leaf area index. unit: - +! \item[sai] +! stem area index. unit: - +! \item[tauss] +! snow age factor. unit: - +! \item[smoiseq] +! equilibrium volumetric soil moisture content. unit: m3/m3 +! \item[smcwtd] +! soil moisture content in the layer to the water table when deep. unit: - +! \item[deeprech] +! recharge to the water table when deep. unit: - +! \item[rech] +! recharge to the water table (diagnostic). unit: - +! \item[grain] +! mass of grain XING. unit: g/m2 +! \item[gdd] +! growing degree days XING (based on 10C). unit: - +! \item[pgs] +! growing degree days XING. unit: - +! \item[t2mv] +! 2m temperature of vegetation part. unit: K +! \item[t2mb] +! 2m temperature of bare ground part. unit: K +! \item[q2mv] +! 2m mixing ratio of vegetation part. unit: - +! \item[q2mb] +! 2m mixing ratio of bare ground part. unit: - +! \item[trad] +! surface radiative temperature. unit: K +! \item[nee] +! net ecosys exchange of CO2. unit: g/m2/s CO2 +! \item[gpp] +! gross primary assimilation of carbon. unit: g/m2/s C +! \item[npp] +! net primary productivity of carbon. unit: g/m2/s C +! \item[fveg] +! Noah-MP green vegetation fraction. unit: - +! \item[runsf] +! surface runoff. unit: mm/s +! \item[runsb] +! subsurface runoff. unit: mm/s +! \item[ecan] +! evaporation of intercepted water. unit: mm/s +! \item[edir] +! soil surface evaporation rate. unit: mm/s +! \item[etran] +! transpiration rate. unit: mm/s +! \item[rainf] +! raifall. unit: km s-1 +! \item[snowf] +! snow fall. unit: kg s-1 +! \item[fsa] +! total absorbed solar radiation. unit: W/m2 +! \item[fira] +! total net longwave radiation [+ to atm]. unit: W/m2 +! \item[apar] +! photosyn active energy by canopy. unit: W/m2 +! \item[psn] +! total photosynthesis [+]. unit: umol co2/m2/s +! \item[sav] +! solar radiation absorbed by vegetation. unit: W/m2 +! \item[sag] +! solar radiation absorbed by ground. unit: W/m2 +! \item[rssun] +! sunlit leaf stomatal resistance. unit: s/m +! \item[rssha] +! shaded leaf stomatal resistance. unit: s/m +! \item[bgap] +! between gap fraction. unit: - +! \item[wgap] +! within gap fraction. unit: - +! \item[tgb] +! bare ground temperature. unit: K +! \item[tgv] +! under canopy ground temperature. unit: K +! \item[chv] +! sensible heat exchange coefficient vegetated. unit: - +! \item[chb] +! sensible heat exchange coefficient bare-ground. unit: - +! \item[shg] +! veg ground sensible heat [+ to atm]. unit: W/m2 +! \item[shc] +! canopy sensible heat [+ to atm]. unit: W/m2 +! \item[shb] +! bare sensible heat [+ to atm]. unit: W/m2 +! \item[evg] +! veg ground evaporation [+ to atm]. unit: W/m2 +! \item[evb] +! bare soil evaporation [+ to atm]. unit: W/m2 +! \item[ghv] +! veg ground heat flux [+ to soil]. unit: W/m2 +! \item[ghb] +! bare ground heat flux [+ to soil]. unit: W/m2 +! \item[irg] +! veg ground net LW radiation [+ to atm]. unit: W/m2 +! \item[irc] +! canopy net LW radiation [+ to atm]. unit: W/m2 +! \item[irb] +! bare net LW radiation [+ to atm]. unit: W/m2 +! \item[tr] +! transpiration [ to atm]. unit: W/m2 +! \item[evc] +! canopy evaporation heat [to atm]. unit: W/m2 +! \item[chleaf] +! leaf exchange coefficient. unit: - +! \item[chuc] +! under canopy exchange coefficient. unit: - +! \item[chv2] +! veg 2m exchange coefficient. unit: - +! \item[chb2] +! bare 2m exchange coefficient. unit: - +! \end{description} +! +! !REVISION HISTORY: +! This module is generated with the Model Implementation Toolkit developed +! by Shugong Wang for the NASA Land Information System Version 7. The initial +! specification of the module is defined by Sujay Kumar. +! 10/25/18: Shugong Wang, Zhuo Wang Initial implementation for LIS 7 and NoahMP401 +! 05/01/23: Cenlin He, update to work with refactored Noah-MP (v5.0 and later) + +!EOP + USE LisNoahmpParamType + + implicit none + + INTEGER, PRIVATE, PARAMETER :: MBAND = 2 + INTEGER, PRIVATE, PARAMETER :: NSOIL = 4 + INTEGER, PRIVATE, PARAMETER :: NSTAGE = 8 + + type, public :: noahmpnewdec + !------------------------------------------------------ + ! forcing + !------------------------------------------------------ + real :: tair + real :: sfctmp ! Yeosang Yoon for snow DA + real :: psurf + real :: wind_e + real :: wind_n + real :: qair + real :: swdown + real :: lwdown + real :: prcp + !-------------------------------------------------------- + ! spatial parameter + !-------------------------------------------------------- + integer :: vegetype + integer :: soiltype + real :: tbot + real :: planting + real :: harvest + real :: season_gdd + real :: soilcL1 + real :: soilcL2 + real :: soilcL3 + real :: soilcL4 + !---------------------------------------------------------- + ! multilevel spatial parameter + !---------------------------------------------------------- + real, pointer :: shdfac_monthly(:) + real, pointer :: soilcomp(:) + !---------------------------------------------------------- + ! state + !---------------------------------------------------------- + real :: sfcrunoff + real :: udrrunoff + real, pointer :: smc(:) + real, pointer :: sh2o(:) + real, pointer :: tslb(:) + real :: sneqv + real :: snowh + real :: canwat + real :: acsnom + real :: acsnow + integer :: isnow + real :: tv + real :: tg + real :: canice + real :: canliq + real :: eah + real :: tah + real :: cm + real :: ch + real :: fwet + real :: sneqvo + real :: albold + real :: qsnow + real :: wslake + real :: zwt + real :: wa + real :: wt + real, pointer :: tsno(:) + real, pointer :: zss(:) + real, pointer :: snowice(:) + real, pointer :: snowliq(:) + real :: lfmass + real :: rtmass + real :: stmass + real :: wood + real :: stblcp + real :: fastcp + real :: lai + real :: sai + real :: tauss + real, pointer :: smoiseq(:) + real :: smcwtd + real :: deeprech + real :: rech + real :: grain + real :: gdd + integer :: pgs + !ag (05Jan2021) + ! 2-way coupling parameters + real :: rivsto + real :: fldsto + real :: fldfrc + + !------------------------------------------------------- + ! output + !------------------------------------------------------- + real :: tsk +! real :: fsh + real :: hfx + real :: qfx + real :: lh + real :: grdflx + real :: albedo + real :: snowc + real :: emiss + real :: rs + real :: t2mv + real :: t2mb + real :: q2mv + real :: q2mb + real :: trad + real :: nee + real :: gpp + real :: npp + real :: fveg + real :: runsf + real :: runsb + real :: ecan + real :: edir + real :: etran + real :: rainf + real :: snowf + real :: fsa + real :: fira + real :: apar + real :: psn + real :: sav + real :: sag + real :: rssun + real :: rssha + real :: bgap + real :: wgap + real :: tgb + real :: tgv + real :: chv + real :: chb + real :: shg + real :: shc + real :: shb + real :: evg + real :: evb + real :: ghv + real :: ghb + real :: irg + real :: irc + real :: irb + real :: tr + real :: evc + real :: chleaf + real :: chuc + real :: chv2 + real :: chb2 + + !EMK for 557WW + real :: tair_agl_min + real :: rhmin + + type(LisNoahmpParam_type) :: param + + ! For WRF-HYDRO + real :: sfcheadrt + real :: infxs1rt + real :: soldrain1rt + + end type noahmpnewdec + +end module NoahMPnew_module diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_readcrd.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_readcrd.F90 new file mode 100644 index 000000000..15cb522b0 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_readcrd.F90 @@ -0,0 +1,600 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- + +!BOP +! +! !ROUTINE: NoahMPnew_readcrd +! \label{NoahMPnew\_readcrd} +! +! !REVISION HISTORY: +! This subroutine is generated with the Model Implementation Toolkit developed +! by Shugong Wang for the NASA Land Information System Version 7. The initial +! specification of the subroutine is defined by Sujay Kumar. +! 10/25/18 : Shugong Wang, Zhuo Wang, initial implementation for LIS 7 and NoahMP401 +! May 2023: Cenlin He; update to work with refactored NoahMP (v5.0 and newer) +! +! !INTERFACE: +subroutine NoahMPnew_readcrd() +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc , LIS_config + use LIS_timeMgrMod, only : LIS_parseTimeString + use LIS_logMod, only : LIS_logunit, LIS_verify, LIS_endrun + use NoahMPnew_lsmMod, only : NoahmpNew_struc + use netcdf +! +! !DESCRIPTION: +! +! This routine reads the options specific to NoahMPnew model from +! the LIS configuration file. +! +!EOP + implicit none + + integer :: rc + integer :: n, i + character*10 :: time + character*6 :: str_i + integer :: ios + integer, allocatable :: nids(:) + character*32 :: soil_scheme_name, landuse_scheme_name + + allocate(nids(LIS_rc%nnest)) + + write(LIS_logunit,*) & + "[INFO] Start reading LIS configuration file for Noah-MP.New (v5.0 or newer)" + + ! open NetCDF parameter file for reading global attributes + do n=1,LIS_rc%nnest + ios = nf90_open(path=trim(LIS_rc%paramfile(n)), mode=NF90_NOWRITE,ncid=nids(n)) + call LIS_verify(ios,'Error in nf90_open in '//trim(LIS_rc%paramfile(n))//' in NoahMPnew_readcrd') + enddo + + ! main Noah-MP model timestep + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New model timestep:", rc = rc) + do n=1,LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Time, rc = rc) + call LIS_verify(rc, "Noah-MP.New model timestep: not defined") + call LIS_parseTimeString(time, NoahmpNew_struc(n)%ts) + enddo + + ! Noah-MP soil process timestep + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New soil timestep:", rc = rc) + do n=1,LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Time, rc = rc) + call LIS_verify(rc, "Noah-MP.New soil timestep: not defined") + call LIS_parseTimeString(time, NoahmpNew_struc(n)%ts_soil) + enddo + + ! restart timestep + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New restart output interval:", rc = rc) + do n=1,LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Time, rc = rc) + call LIS_verify(rc, & + "Noah-MP.New restart output interval: not defined") + call LIS_parseTimeString(time, NoahmpNew_struc(n)%rstInterval) + enddo + + !---------------------------! + ! Constant Parameters ! + !---------------------------! + ! number of soil layers + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New number of soil layers:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%nsoil, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New number of soil layers: not defined") + enddo + + ! allocate memory for sldpth using nsoil as dimension + do n=1, LIS_rc%nnest + allocate(NoahmpNew_struc(n)%sldpth(NoahmpNew_struc(n)%nsoil)) + enddo + ! allocate memory for init_smc using nsoil as dimension + do n=1, LIS_rc%nnest + allocate(NoahmpNew_struc(n)%init_smc(NoahmpNew_struc(n)%nsoil)) + enddo + ! allocate memory for init_tslb using nsoil as dimension + do n=1, LIS_rc%nnest + allocate(NoahmpNew_struc(n)%init_tslb(NoahmpNew_struc(n)%nsoil)) + enddo + + ! maximum number of snow layers (e.g., 3) + do n=1, LIS_rc%nnest + NoahmpNew_struc(n)%nsnow = 3 + enddo + + ! thickness of atmospheric layers + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New reference height of temperature and humidity:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%dz8w, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New reference height of temperature and "//& + "humidity: not defined") + enddo + + ! thickness of soil layers + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New thickness of soil layers:", rc = rc) + do n=1, LIS_rc%nnest + do i = 1, NoahmpNew_struc(n)%nsoil + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%sldpth(i), rc=rc) + call LIS_verify(rc, & + 'Noah-MP.New thickness of soil layers: not defined') + enddo + enddo + + ! Landuse classification scheme + do n=1, LIS_rc%nnest + ios = nf90_get_att(nids(n), NF90_GLOBAL, 'LANDCOVER_SCHEME', landuse_scheme_name) + call LIS_verify(ios, 'Error in nf90_get_att: LANDCOVER_SCHEME') + if (trim(landuse_scheme_name) .eq. "USGS") then + NoahmpNew_struc(n)%landuse_scheme_name = "USGS" + elseif (trim(landuse_scheme_name) .eq. "IGBPNCEP") then + NoahmpNew_struc(n)%landuse_scheme_name = & + "MODIFIED_IGBP_MODIS_NOAH" + elseif (trim(landuse_scheme_name) .eq. "NALCMS_SM_IGBPNCEP" ) then + NoahmpNew_struc(n)%landuse_scheme_name = & + "MODIFIED_IGBP_MODIS_NOAH" + elseif (trim(landuse_scheme_name) .eq. "UMD") then + NoahmpNew_struc(n)%landuse_scheme_name = "UMD" + else + write(LIS_logunit,*) & + "[ERR] Currently, only USGS, IGBPNCEP, and UMD" + write(LIS_logunit,*) "[ERR] are supported by Noah-MP-New LSM" + write(LIS_logunit,*) "[ERR] program stopping ..." + call LIS_endrun() + endif + enddo + + ! NoahMP.New parameter table (merged SOILPARM.TBL,GENPARM.TBL,MPTABLE.TBL) + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New parameter table:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%noahmp_tbl_name, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New parameter table: not defined") + enddo + + write(LIS_logunit,*) & + "[INFO] Setting Noah-MP.New physics options:" + + ! dynamic vegetation + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New dynamic vegetation option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%dveg_opt, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New dynamic vegetation option: not defined") + write(LIS_logunit,33) "dynamic vegetation:", & + NoahmpNew_struc(n)%dveg_opt + enddo + + ! canopy stomatal resistance (1->Ball-Berry; 2->Jarvis) + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New canopy stomatal resistance option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%crs_opt, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New canopy stomatal resistance option: not defined") + write(LIS_logunit,33) "canopy stomatal resistance:", & + NoahmpNew_struc(n)%crs_opt + enddo + + ! soil moisture factor for stomatal resistance(1->Noah;2->CLM;3->SSiB) + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New soil moisture factor for stomatal resistance:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%btr_opt, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New soil moisture factor for stomatal resistance:"//& + " not defined") + write(LIS_logunit,33) "soil moisture factor for stomatal "//& + "resistance:",NoahmpNew_struc(n)%btr_opt + enddo + + ! surface runoff (1->SIMGM; 2->SIMTOP; 3->Schaake96; 4->BATS; 5->MMF; 6->VIC; 7->XAJ; 8->DynVIC) + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New surface runoff option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%runsfc_opt, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New surface runoff option: not defined") + write(LIS_logunit,33) "surface runoff:", & + NoahmpNew_struc(n)%runsfc_opt + enddo + + ! subsurface runoff and groundwater (1->SIMGM; 2->SIMTOP; 3->Schaake96; 4->BATS; 5->MMF; 6->VIC; 7->XAJ; 8->DynVIC) + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New subsurface runoff and groundwater option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%runsub_opt, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New subsurface runoff and groundwater option: not defined") + write(LIS_logunit,33) "subsurface runoff and groundwater:", & + NoahmpNew_struc(n)%runsub_opt + enddo + + ! surface layer drag coeff (CH & CM) (1->M-O; 2->Chen97) + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New surface layer drag coefficient option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%sfc_opt, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New surface layer drag coefficient option:"//& + " not defined") + write(LIS_logunit,33) "surface layer drag coefficient:", & + NoahmpNew_struc(n)%sfc_opt + enddo + + ! supercooled liquid water (1->NY06; 2->Koren99) + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New supercooled liquid water option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%frz_opt, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New supercooled liquid water option: not defined") + write(LIS_logunit,33) "supercooled liquid water:", & + NoahmpNew_struc(n)%frz_opt + enddo + + ! frozen soil permeability (1->NY06; 2->Koren99) + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New frozen soil permeability option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%inf_opt, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New frozen soil permeability option: not defined") + write(LIS_logunit,33) "frozen soil permeability:", & + NoahmpNew_struc(n)%inf_opt + enddo + + ! radiation transfer (1->gap=F(3D,cosz); 2->gap=0; 3->gap=1-Fveg) + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New canopy radiative transfer option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%rad_opt, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New canopy radiative transfer option: not defined") + write(LIS_logunit,33) "canopy radiative transfer:", & + NoahmpNew_struc(n)%rad_opt + enddo + + ! snow surface albedo (1->BATS; 2->CLASS) + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New snow surface albedo option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%alb_opt, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New snow surface albedo option: not defined") + write(LIS_logunit,33) "snow surface albedo:", & + NoahmpNew_struc(n)%alb_opt + enddo + + ! rainfall & snowfall (1->Jordan91; 2->BATS; 3->Noah; 4->WRF; 5->Wet-bulb) + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New rain-snow partition option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%snf_opt, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New rain-snow partition option: not defined") + write(LIS_logunit,33) "rain-snow partition:", & + NoahmpNew_struc(n)%snf_opt + enddo + + ! lower boundary of soil temperature + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New lower boundary of soil temperature option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%tbot_opt, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New lower boundary of soil temperature option:"//& + " not defined") + write(LIS_logunit,33) "lower boundary of soil temperature:", & + NoahmpNew_struc(n)%tbot_opt + enddo + + ! snow/soil temperature time scheme + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New snow&soil temperature time scheme option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%stc_opt, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New snow&soil temperature time scheme option:"//& + " not defined") + write(LIS_logunit,33) "snow&soil temperature time scheme:", & + NoahmpNew_struc(n)%stc_opt + enddo + + ! glacier option (1->phase change; 2->simple) + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New glacier ice option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%gla_opt, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New glacier ice option: not defined") + write(LIS_logunit,33) "glacier ice:",NoahmpNew_struc(n)%gla_opt + enddo + + ! Custom snowpack depth for glacier model (in mm) + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New snow depth glacier model option:", rc = rc) + if(rc /= 0) then + write(LIS_logunit,33) "[WARN] Max snow depth not defined." + write(LIS_logunit,33) "[WARN] Setting to default value of 2000." + do n=1, LIS_rc%nnest + NoahmpNew_struc(n)%sndpth_gla_opt = 2000 + write(LIS_logunit,33) "snow depth for glacier model: ",NoahmpNew_struc(n)%sndpth_gla_opt + enddo + else + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%sndpth_gla_opt, rc=rc) + write(LIS_logunit,33) "snow depth for glacier model: ",NoahmpNew_struc(n)%sndpth_gla_opt + enddo + endif + + ! surface resistance (1->Sakaguchi/Zeng;2->Seller;3->mod Sellers;4->1+snow) + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New surface resistance option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%rsf_opt, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New surface resistance option: not defined") + write(LIS_logunit,33) "surface resistance:", & + NoahmpNew_struc(n)%rsf_opt + enddo + + ! soil configuration option + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New soil configuration option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%soil_opt, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New soil configuration option: not defined") + write(LIS_logunit,33) "soil configuration:", & + NoahmpNew_struc(n)%soil_opt + enddo + + ! soil pedotransfer function option + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New soil pedotransfer function option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%pedo_opt, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New soil pedotransfer function option: not defined") + write(LIS_logunit,33) "soil pedotransfer function:", & + NoahmpNew_struc(n)%pedo_opt + enddo + + ! crop model option (0->none; 1->Liu2016) + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New crop model option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%crop_opt, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New crop model option: not defined") + write(LIS_logunit,33) "crop model:", & + NoahmpNew_struc(n)%crop_opt + enddo + + ! urban physics option + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New urban physics option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%urban_opt, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New urban physics option: not defined") + write(LIS_logunit,33) "urban physics:", & + NoahmpNew_struc(n)%urban_opt + enddo + + ! snow thermal conductivity option (1->Yen1965; 2->Anderson1976; 3->Constant; 4->Verseghy1991; 5->Yen1981) + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New snow thermal conductivity option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%tksno_opt, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New snow thermal conductivity option: not defined") + write(LIS_logunit,33) "snow thermal conductivity:",NoahmpNew_struc(n)%tksno_opt + enddo + + ! irrigation option (0->none; 1->always on; 2->trigger by planting/harvest dates; 3->trigger by LAI) + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New irrigation trigger option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%irr_opt, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New irrigation trigger option: not defined") + write(LIS_logunit,33) "irrigation trigger:",NoahmpNew_struc(n)%irr_opt + enddo + + ! irrigation method option (0->fraction from input; 1->sprinkler; 2->micro/drip; 3->flood) + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New irrigation method option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%irrm_opt, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New irrigation method option: not defined") + write(LIS_logunit,33) "irrigation method:",NoahmpNew_struc(n)%irrm_opt + enddo + + ! tile drainage option (0->none; 1->simple drainage; 2->Hooghoudt's scheme) + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New tile drainage option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%tdrn_opt, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New tile drainage option: not defined") + write(LIS_logunit,33) "tile drainage:",NoahmpNew_struc(n)%tdrn_opt + enddo + + + ! The following lines hard code the LDT NetCDF variable names. + ! Modified by Zhuo Wang on 11/08/2018 + ! Setting some values to PLANTING, HARVEST, SEASON_GDD, SOILCOMP, SOILCL1-->SOILCL4 in NoahMPnew_main.F90 + do n=1, LIS_rc%nnest + ! NoahmpNew_struc(n)%LDT_ncvar_vegetype = ' ! Edit here if hard code name + ! NoahmpNew_struc(n)%LDT_ncvar_soiltype = ' ! Edit here if hard code name + NoahmpNew_struc(n)%LDT_ncvar_tbot = 'TBOT' !'NOAHMPnew_TBOT' + NoahmpNew_struc(n)%LDT_ncvar_shdfac_monthly = 'GREENNESS' !'NOAHMPnew_SHDFAC_MONTHLY' + NoahmpNew_struc(n)%LDT_ncvar_planting = 'PLANTING' !'NOAHMPnew_PLANTING' + NoahmpNew_struc(n)%LDT_ncvar_harvest = 'HARVEST' !'NOAHMPnew_HARVEST' + NoahmpNew_struc(n)%LDT_ncvar_season_gdd = 'SEASON_GDD' !'NOAHMPnew_SEASON_GDD' + NoahmpNew_struc(n)%LDT_ncvar_soilcomp = 'SOILCOMP' !'NOAHMPnew_SOILCOMP' + NoahmpNew_struc(n)%LDT_ncvar_soilcL1 = 'SOILCL1' !'NOAHMPnew_SOILCL1' + NoahmpNew_struc(n)%LDT_ncvar_soilcL2 = 'SOILCL2' !'NOAHMPnew_SOILCL2' + NoahmpNew_struc(n)%LDT_ncvar_soilcL3 = 'SOILCL3' !'NOAHMPnew_SOILCL3' + NoahmpNew_struc(n)%LDT_ncvar_soilcL4 = 'SOILCL4' !'NOAHMPnew_SOILCL4' + enddo + +!------------------------------------------------------------------------------------------ + ! set default restart format to netcdf + do n=1,LIS_rc%nnest + NoahmpNew_struc(n)%rformat = "netcdf" + enddo + ! restart run, read restart file + if (trim(LIS_rc%startcode) == "restart") then + Call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New restart file:", rc=rc) + do n=1,LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%rfile, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New restart file: not defined") + enddo + + Call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New restart file format:", rc=rc) + do n=1,LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%rformat, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New restart file format: not defined") + enddo + + ! coldstart run, read initial state variables + else + ! skin temperature + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New initial surface skin temperature:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%init_tskin, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New initial surface skin temperature:"//& + " not defined") + enddo + + ! snow water equivalent + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New initial snow water equivalent:", rc = rc) + do n=1,LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%init_sneqv, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New initial snow water equivalent:"//& + " not defined") + enddo + + ! physical snow depth + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New initial snow depth:", rc = rc) + do n=1,LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%init_snowh, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New initial snow depth:"//& + " not defined") + enddo + + ! total canopy water + ice + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New initial total canopy surface water:", rc = rc) + do n=1,LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%init_canwat, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New initial total canopy surface water:"//& + " not defined") + enddo + + ! soil temperature + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New initial soil temperatures:", rc = rc) + do n=1,LIS_rc%nnest + do i=1, NoahmpNew_struc(n)%nsoil + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%init_tslb(i), rc=rc) + end do + call LIS_verify(rc, & + "Noah-MP.New initial soil temperatures:"//& + " not defined") + enddo + + ! volumetric soil moisture + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New initial total soil moistures:", rc = rc) + do n=1,LIS_rc%nnest + do i=1, NoahmpNew_struc(n)%nsoil + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%init_smc(i), rc=rc) + end do + call LIS_verify(rc, & + "Noah-MP.New initial total soil moistures:"//& + " not defined") + enddo + + ! water table depth + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New initial water table depth:", rc = rc) + do n=1,LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%init_zwt, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New initial water table depth:"//& + " not defined") + enddo + + ! water in the "aquifer" + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New initial water in the aquifer:", rc = rc) + do n=1,LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%init_wa, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New initial water in the aquifer:"//& + " not defined") + enddo + + ! water in aquifer and saturated soil + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New initial water in aquifer and saturated soil:", rc = rc) + do n=1,LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%init_wt, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New initial water in aquifer and saturated soil:"//& + " not defined") + enddo + + ! leaf area index + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New initial leaf area index:", rc = rc) + do n=1,LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%init_lai, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New initial leaf area index:"//& + " not defined") + enddo + + endif + + deallocate(nids) + + 33 format(a47,i4) + + write(LIS_logunit, *) & + "[INFO] Finish reading LIS configuration file for Noah-MP.New" + +end subroutine NoahMPnew_readcrd diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_setup.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_setup.F90 new file mode 100644 index 000000000..5e8f92f97 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_setup.F90 @@ -0,0 +1,657 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- + +#include "LIS_misc.h" +!BOP +! +! !ROUTINE: NoahMPnew_setup +! \label{NoahMPnew_setup} +! +! !REVISION HISTORY: +! This subroutine is generated with the Model Implementation Toolkit developed +! by Shugong Wang for the NASA Land Information System Version 7. The initial +! specification of the subroutine is defined by Sujay Kumar. +! 10/25/18: Shugong Wang, Zhuo Wang; initial implementation for LIS 7 and NoahMPnew +! 05/01/23: Cenlin He, update to work with refactored Noah-MP (v5.0 and later) +! !INTERFACE: + +subroutine NoahMPnew_setup() + +! !USES: + use NoahMPnew_lsmMod + use NoahmpIOVarType + use LIS_logMod, only: LIS_logunit, LIS_verify, LIS_endrun + use LIS_fileIOMod, only: LIS_read_param!, LIS_convertParamDataToLocalDomain + use LIS_coreMod, only: LIS_rc, LIS_surface + use NoahmpReadTableMod, only : NoahmpReadTable +! +! !DESCRIPTION: +! +! This routine is the entry point to set up the parameters +! required for NoahMPnew. These include: +! vegetype - vegetation type [-] +! soiltype - soil type [-] +! tbot - deep soil temperature [K] +! planting - planting date [-] +! harvest - harvest date [-] +! season_gdd - growing season GDD [-] +! soilcL1 - soil texture in layer 1 [-] +! soilcL2 - soil texture in layer 2 [-] +! soilcL3 - soil texture in layer 3 [-] +! soilcL4 - soil texture in layer 4 [-] +! irfract - total irrigation fraction [-] +! sifract - sprinker irrigation fraction [-] +! mifract - micro irrigation fraction [-] +! fifract - flood irrigation fraction [-] +! tdfract - tile drainage fraction [-] +! The routines invoked are: +! \begin{description} +! \item[LIS\_read\_param](\ref{LIS_read_param}) \\ +! retrieves LIS parameter data from NetCDF file +! \item[NOAHMP401\_read\_MULTILEVEL\_param](\ref{NOAHMP401_read_MULTILEVEL_param}) \\ +! retrieves MULTILEVEL spatial parameter from NetCDF file +! \end{description} +!EOP + + implicit none + integer :: mtype + integer :: t, k, n + integer :: col, row + real, allocatable :: placeholder(:,:) + integer :: soilcolor, vegtyp, soiltyp(4), slopetyp, croptype + mtype = LIS_rc%lsm_index + + do n=1, LIS_rc%nnest + ! allocate memory for place holder for #n nest + allocate(placeholder(LIS_rc%lnc(n), LIS_rc%lnr(n))) + + !----------------------------! + ! reading spatial parameters ! + !----------------------------! + ! vegetype takes value from the LIS built-in parameter vegt + !TODO: convert vegetation data source into vegetation types + if(LIS_rc%uselcmap(n) .ne. 'none') then + write(LIS_logunit,*) & + "[INFO] Noah-MP.New retrieve parameter VEGETYPE from LIS" + do t=1, LIS_rc%npatch(n, mtype) + NOAHMPnew_struc(n)%noahmpnew(t)%vegetype= LIS_surface(n, mtype)%tile(t)%vegt + enddo + else + ! read: vegetype + write(LIS_logunit,*) & + "[INFO] Noah-MP.New reading parameter VEGETYPE from ", & + trim(LIS_rc%paramfile(n)) + call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_vegetype), placeholder) + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + NOAHMPnew_struc(n)%noahmpnew(t)%vegetype = placeholder(col, row) + enddo + endif + ! soiltype takes value from the LIS built-in parameter soilt + !TODO: convert soil texture into soil types according to scheme + if(LIS_rc%usetexturemap(n) .ne. 'none') then + write(LIS_logunit,*) & + "[INFO] Noah-MP.New retrieve parameter SOILTYPE from LIS" + do t=1, LIS_rc%npatch(n, mtype) + NOAHMPnew_struc(n)%noahmpnew(t)%soiltype= LIS_surface(n, mtype)%tile(t)%soilt + enddo + else + ! read: soiltype + write(LIS_logunit,*) & + "[INFO] Noah-MP.New reading parameter SOILTYPE from ", & + trim(LIS_rc%paramfile(n)) + call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_soiltype), placeholder) + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + NOAHMPnew_struc(n)%noahmpnew(t)%soiltype = placeholder(col, row) + enddo + endif + ! read: tbot + write(LIS_logunit,*) & + "[INFO] Noah-MP.New reading parameter TBOT from ", & + trim(LIS_rc%paramfile(n)) + call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_tbot), placeholder) + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + NOAHMPnew_struc(n)%noahmpnew(t)%tbot = placeholder(col, row) + enddo + + !!! SW 11/06/2018 + if(NOAHMPnew_struc(n)%crop_opt .ne.0) then + ! read: planting + write(LIS_logunit,*) & + "[INFO] Noah-MP.New reading parameter PLANTING from ", & + trim(LIS_rc%paramfile(n)) + call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_planting), placeholder) + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + NOAHMPnew_struc(n)%noahmpnew(t)%planting = placeholder(col, row) + enddo + + ! read: harvest + write(LIS_logunit,*) "[INFO] Noah-MP.New reading parameter HARVEST from ",& + trim(LIS_rc%paramfile(n)) + call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_harvest), placeholder) + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + NOAHMPnew_struc(n)%noahmpnew(t)%harvest = placeholder(col, row) + enddo + + ! read: season_gdd + write(LIS_logunit,*) "[INFO] Noah-MP.New reading parameter SEASON_GDD from ", & + trim(LIS_rc%paramfile(n)) + call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_season_gdd), placeholder) + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + NOAHMPnew_struc(n)%noahmpnew(t)%season_gdd = placeholder(col, row) + enddo + endif + + ! CH 05/01/2023: for irrigation + if(NOAHMPnew_struc(n)%irr_opt > 0) then + ! read: total irrigation fraction + write(LIS_logunit,*) & + "[INFO] Noah-MP.New reading parameter IRFRACT from ", & + trim(LIS_rc%paramfile(n)) + call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_irfract), placeholder) + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + NOAHMPnew_struc(n)%noahmpnew(t)%irfract = placeholder(col, row) + enddo + + ! read: sprinkler irrigation fraction + write(LIS_logunit,*) & + "[INFO] Noah-MP.New reading parameter SIFRACT from ", & + trim(LIS_rc%paramfile(n)) + call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_sifract), placeholder) + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + NOAHMPnew_struc(n)%noahmpnew(t)%sifract = placeholder(col, row) + enddo + + ! read: micro/drip irrigation fraction + write(LIS_logunit,*) & + "[INFO] Noah-MP.New reading parameter MIFRACT from ", & + trim(LIS_rc%paramfile(n)) + call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_mifract), placeholder) + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + NOAHMPnew_struc(n)%noahmpnew(t)%mifract = placeholder(col, row) + enddo + + ! read: flood irrigation fraction + write(LIS_logunit,*) & + "[INFO] Noah-MP.New reading parameter FIFRACT from ", & + trim(LIS_rc%paramfile(n)) + call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_fifract), placeholder) + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + NOAHMPnew_struc(n)%noahmpnew(t)%fifract = placeholder(col, row) + enddo + endif + + ! CH 05/01/2023: for tile drainage + if(NOAHMPnew_struc(n)%tdrn_opt > 0) then + ! read: tile drainage fraction + write(LIS_logunit,*) & + "[INFO] Noah-MP.New reading parameter TDFRACT from ", & + trim(LIS_rc%paramfile(n)) + call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_tdfract), placeholder) + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + NOAHMPnew_struc(n)%noahmpnew(t)%tdfract = placeholder(col, row) + enddo + endif + + !!! SW 11/06/2018 + if(NOAHMPnew_struc(n)%soil_opt .eq. 2) then + ! read: soilcL1 + write(LIS_logunit,*) "[INFO] Noah-MP.New reading parameter SOILCL1 from ", & + trim(LIS_rc%paramfile(n)) + call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_soilcL1), placeholder) + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + NOAHMPnew_struc(n)%noahmpnew(t)%soilcl1 = placeholder(col, row) + enddo + + ! read: soilcL2 + write(LIS_logunit,*) "[INFO] Noah-MP.New reading parameter SOILCL2 from ", & + trim(LIS_rc%paramfile(n)) + call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_soilcL2), placeholder) + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + NOAHMPnew_struc(n)%noahmpnew(t)%soilcl2 = placeholder(col, row) + enddo + + ! read: soilcL3 + write(LIS_logunit,*) "[INFO] Noah-MP.New reading parameter SOILCL3 from ", & + trim(LIS_rc%paramfile(n)) + call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_soilcL3), placeholder) + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + NOAHMPnew_struc(n)%noahmpnew(t)%soilcl3 = placeholder(col, row) + enddo + + ! read: soilcL4 + write(LIS_logunit,*) "[INFO] Noah-MP.New reading parameter SOILCL4 from ", & + trim(LIS_rc%paramfile(n)) + call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_soilcL4), placeholder) + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + NOAHMPnew_struc(n)%noahmpnew(t)%soilcl4 = placeholder(col, row) + enddo + endif + + !----------------------------------------------! + ! MULTILEVEL reading spatial spatial parameters ! + !----------------------------------------------! + write(LIS_logunit,*) "[INFO] Noah-MP.New reading parameter SHDFAC_MONTHLY from ",& + trim(LIS_rc%paramfile(n)) + do k = 1, 12 + call NOAHMPnew_read_MULTILEVEL_param(n, NOAHMPnew_struc(n)%LDT_ncvar_shdfac_monthly, k, placeholder) + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + NOAHMPnew_struc(n)%noahmpnew(t)%shdfac_monthly(k) = placeholder(col, row) + enddo + enddo + + if(NOAHMPnew_struc(n)%soil_opt .eq. 3) then + ! read: soilcomp + write(LIS_logunit,*) "[INFO] Noah-MP.New reading parameter SOILCOMP from ", & + trim(LIS_rc%paramfile(n)) + do k = 1, 8 + call NOAHMPnew_read_MULTILEVEL_param(n, NOAHMPnew_struc(n)%LDT_ncvar_soilcomp, k, placeholder) + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + NOAHMPnew_struc(n)%noahmpnew(t)%soilcomp(k) = placeholder(col, row) + enddo + enddo + endif + deallocate(placeholder) + + !!!! read Noah-MP parameter tables + write(LIS_logunit,*) "[INFO] Noah-MP.New parameter table (veg, soil, general): ", & + trim(NOAHMPnew_struc(n)%noahmp_tbl_name) + write(LIS_logunit,*) "[INFO] Noah-MP.New Landuse classification scheme: ", & + trim(NOAHMPnew_struc(n)%landuse_scheme_name) + write(LIS_logunit,*) "[INFO] Noah-MP.New Soil classification scheme: ", & + "STAS (default, cannot change)" + call NoahmpReadTable(trim(NOAHMPnew_struc(n)%landuse_scheme_name), & + trim(NOAHMPnew_struc(n)%noahmp_tbl_name)) + + do t=1,LIS_rc%npatch(n,mtype) + soiltyp = NoahMPnew_struc(n)%noahmpnew(t)%soiltype + vegtyp = NoahMPnew_struc(n)%noahmpnew(t)%vegetype + + SLOPETYP = 1 ! set underground runoff slope term + SOILCOLOR = 4 ! soil color: assuming a middle color category ????????? + CROPTYPE = 0 + CALL TRANSFER_MP_PARAMETERS(VEGTYP,SOILTYP,SLOPETYP,SOILCOLOR,CROPTYPE,& + NoahMPnew_struc(n)%noahmpnew(t)%param) + + enddo + + !optional read of Optimized parameters + + call NoahMPnew_read_OPT_parameters() + enddo + +end subroutine NoahMPnew_setup + +!BOP +! +! !ROUTINE: NOAHMP401_read_MULTILEVEL_param +! \label{read_MULTILEVEL_param} +! +! !REVISION HISTORY: +! 03 Sept 2004: Sujay Kumar; Initial Specification for read_laiclimo +! 30 Oct 2013: Shugong Wang; Generalization for reading MULTILEVEL spatial parameter +! +! !INTERFACE: +subroutine NOAHMPnew_read_MULTILEVEL_param(n, ncvar_name, level, placeholder) +! !USES: + use netcdf + use LIS_coreMod, only : LIS_rc, LIS_domain, LIS_localPet, & + LIS_ews_halo_ind, LIS_ewe_halo_ind, & + LIS_nss_halo_ind, LIS_nse_halo_ind + use LIS_logMod, only : LIS_logunit, LIS_verify, LIS_endrun + use LIS_fileIOMod, only: LIS_read_param + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + integer, intent(in) :: level + character(len=*), intent(in) :: ncvar_name + real, intent(out) :: placeholder(LIS_rc%lnc(n), LIS_rc%lnr(n)) +! !DESCRIPTION: +! This subroutine reads MULTILEVEL parameters from the LIS +! NetCDF parameter data file +! +! The arguments are: +! \begin{description} +! \item[n] +! index of n +! \item[level] +! level index (month, quarter, soil layer, snow layer) of the data to be read +! \item[array] +! array containing returned values +! \end{description} +! +!EOP + + integer :: ios1 + integer :: ios, nid, param_ID, nc_ID, nr_ID, dimids(3) + integer :: nc, nr, t, nlevel, k + real, pointer :: level_data(:, :, :) + logical :: file_exists + + inquire(file=LIS_rc%paramfile(n), exist=file_exists) + if(file_exists) then + write(LIS_logunit, *) '[INFO] Reading '//trim(ncvar_name)//' map for level ', level + + ! open NetCDF parameter file + ios = nf90_open(path=trim(LIS_rc%paramfile(n)), mode=NF90_NOWRITE, ncid=nid) + call LIS_verify(ios, 'Error in nf90_open in NOAHMPnew_read_MULTILEVEL_param') + + ! inquire the ID of east-west dimension + ios = nf90_inq_dimid(nid, 'east_west', nc_ID) + call LIS_verify(ios, 'Error in nf90_inq_dimid in NOAHMPnew_read_MULTILEVEL_param') + + ! inquire the ID of north-south dimension + ios = nf90_inq_dimid(nid, 'north_south', nr_ID) + call LIS_verify(ios, 'Error in nf90_inq_dimid in NOAHMPnew_read_MULTILEVEL_param') + + ! inquire the length of east-west dimension + ios = nf90_inquire_dimension(nid, nc_ID, len=nc) + call LIS_verify(ios, 'Error in nf90_inquire_dimension in NOAHMPnew_read_MULTILEVEL_param') + + ! inquire the length of north-south dimension + ios = nf90_inquire_dimension(nid, nr_ID, len=nr) + call LIS_verify(ios, 'Error in nf90_inquire_dimension in NOAHMPnew_read_MULTILEVEL_param') + + ! inquire the ID of parameter. + ios = nf90_inq_varid(nid, Trim(ncvar_name), param_ID) + call LIS_verify(ios, trim(ncvar_name)//' field not found in the LIS param file') + + ! inquire the IDs of all dimensions. The third dimension is the level dimension + ios = nf90_inquire_variable(nid, param_ID, dimids = dimids) + call LIS_verify(ios, trim(ncvar_name)//' failed to inquire dimensions') + + ! inquire the length of the level dimension + ios = nf90_inquire_dimension(nid, dimids(3), len=nlevel) + call LIS_verify(ios, trim(ncvar_name)//' failed to inquire the length of the 3rd dimension') + + ! allocate memory + allocate(level_data (LIS_rc%gnc(n), LIS_rc%gnr(n), nlevel)) + + ! inquire the variable ID of parameter + ios = nf90_inq_varid(nid, trim(ncvar_name), param_ID) + call LIS_verify(ios, trim(ncvar_name)//' field not found in the LIS param file') + + ! read parameter + ios = nf90_get_var(nid, param_ID, level_data) + call LIS_verify(ios, 'Error in nf90_get_var in NOAHMPnew_read_MULTILEVEL_param') + + ! close netcdf file + ios = nf90_close(nid) + call LIS_verify(ios, 'Error in nf90_close in NOAHMPnew_read_MULTILEVEL_param') + + ! grab parameter at specific level + placeholder(:, :) = & + level_data(LIS_ews_halo_ind(n, LIS_localPet+1):LIS_ewe_halo_ind(n, LIS_localPet+1), & + LIS_nss_halo_ind(n, LIS_localPet+1):LIS_nse_halo_ind(n, LIS_localPet+1), level) + + ! free memory + deallocate(level_data) + + else + write(LIS_logunit, *) '[ERR] MULTILEVEL parameter data file: ', & + trim(LIS_rc%paramfile(n)) + write(LIS_logunit, *) '[ERR] does not exist.' + write(LIS_logunit, *) '[ERR] program stopping ...' + call LIS_endrun + endif + + end subroutine NOAHMP401_read_MULTILEVEL_param + +SUBROUTINE TRANSFER_MP_PARAMETERS(VEGTYPE,SOILTYPE,SLOPETYPE,SOILCOLOR,CROPTYPE,parameters) + + use NoahmpIOVarType + + implicit none + + INTEGER, INTENT(IN) :: VEGTYPE + INTEGER, INTENT(IN) :: SOILTYPE(4) + INTEGER, INTENT(IN) :: SLOPETYPE + INTEGER, INTENT(IN) :: SOILCOLOR + INTEGER, INTENT(IN) :: CROPTYPE + + type (LisNoahmpParam_type), intent(inout) :: parameters + + REAL :: REFDK + REAL :: REFKDT + REAL :: FRZK + REAL :: FRZFACT + INTEGER :: ISOIL + + parameters%ISWATER = NoahmpIO%ISWATER_TABLE + parameters%ISBARREN = NoahmpIO%ISBARREN_TABLE + parameters%ISICE = NoahmpIO%ISICE_TABLE + parameters%ISCROP = NoahmpIO%ISCROP_TABLE + parameters%EBLFOREST = NoahmpIO%EBLFOREST_TABLE + + parameters%URBAN_FLAG = .FALSE. + IF( VEGTYPE == NoahmpIO%ISURBAN_TABLE .or. VEGTYPE >= NoahmpIO%URBTYPE_beg ) THEN + parameters%URBAN_FLAG = .TRUE. + ENDIF + +!------------------------------------------------------------------------------------------! +! Transfer veg parameters +!------------------------------------------------------------------------------------------! + + parameters%CH2OP = NoahmpIO%CH2OP_TABLE(VEGTYPE) !maximum intercepted h2o per unit lai+sai (mm) + parameters%DLEAF = NoahmpIO%DLEAF_TABLE(VEGTYPE) !characteristic leaf dimension (m) + parameters%Z0MVT = NoahmpIO%Z0MVT_TABLE(VEGTYPE) !momentum roughness length (m) + parameters%HVT = NoahmpIO%HVT_TABLE(VEGTYPE) !top of canopy (m) + parameters%HVB = NoahmpIO%HVB_TABLE(VEGTYPE) !bottom of canopy (m) + parameters%DEN = NoahmpIO%DEN_TABLE(VEGTYPE) !tree density (no. of trunks per m2) + parameters%RC = NoahmpIO%RC_TABLE(VEGTYPE) !tree crown radius (m) + parameters%MFSNO = NoahmpIO%MFSNO_TABLE(VEGTYPE) !snowmelt m parameter () + parameters%SCFFAC = NoahmpIO%SCFFAC_TABLE(VEGTYPE) !snow cover factor (m) (replace original hard-coded 2.5*z0 in SCF formulation) + parameters%CBIOM = NoahmpIO%CBIOM_TABLE(VEGTYPE) !canopy biomass heat capacity parameter (m) + parameters%SAIM = NoahmpIO%SAIM_TABLE(VEGTYPE,:) !monthly stem area index, one-sided + parameters%LAIM = NoahmpIO%LAIM_TABLE(VEGTYPE,:) !monthly leaf area index, one-sided + parameters%SLA = NoahmpIO%SLA_TABLE(VEGTYPE) !single-side leaf area per Kg [m2/kg] + parameters%DILEFC = NoahmpIO%DILEFC_TABLE(VEGTYPE) !coeficient for leaf stress death [1/s] + parameters%DILEFW = NoahmpIO%DILEFW_TABLE(VEGTYPE) !coeficient for leaf stress death [1/s] + parameters%FRAGR = NoahmpIO%FRAGR_TABLE(VEGTYPE) !fraction of growth respiration !original was 0.3 + parameters%LTOVRC = NoahmpIO%LTOVRC_TABLE(VEGTYPE) !leaf turnover [1/s] + + parameters%C3PSN = NoahmpIO%C3PSN_TABLE(VEGTYPE) !photosynthetic pathway: 0. = c4, 1. = c3 + parameters%KC25 = NoahmpIO%KC25_TABLE(VEGTYPE) !co2 michaelis-menten constant at 25c (pa) + parameters%AKC = NoahmpIO%AKC_TABLE(VEGTYPE) !q10 for kc25 + parameters%KO25 = NoahmpIO%KO25_TABLE(VEGTYPE) !o2 michaelis-menten constant at 25c (pa) + parameters%AKO = NoahmpIO%AKO_TABLE(VEGTYPE) !q10 for ko25 + parameters%VCMX25 = NoahmpIO%VCMX25_TABLE(VEGTYPE) !maximum rate of carboxylation at 25c (umol co2/m**2/s) + parameters%AVCMX = NoahmpIO%AVCMX_TABLE(VEGTYPE) !q10 for vcmx25 + parameters%BP = NoahmpIO%BP_TABLE(VEGTYPE) !minimum leaf conductance (umol/m**2/s) + parameters%MP = NoahmpIO%MP_TABLE(VEGTYPE) !slope of conductance-to-photosynthesis relationship + parameters%QE25 = NoahmpIO%QE25_TABLE(VEGTYPE) !quantum efficiency at 25c (umol co2 / umol photon) + parameters%AQE = NoahmpIO%AQE_TABLE(VEGTYPE) !q10 for qe25 + parameters%RMF25 = NoahmpIO%RMF25_TABLE(VEGTYPE) !leaf maintenance respiration at 25c (umol co2/m**2/s) + parameters%RMS25 = NoahmpIO%RMS25_TABLE(VEGTYPE) !stem maintenance respiration at 25c (umol co2/kg bio/s) + parameters%RMR25 = NoahmpIO%RMR25_TABLE(VEGTYPE) !root maintenance respiration at 25c (umol co2/kg bio/s) + parameters%ARM = NoahmpIO%ARM_TABLE(VEGTYPE) !q10 for maintenance respiration + parameters%FOLNMX = NoahmpIO%FOLNMX_TABLE(VEGTYPE) !foliage nitrogen concentration when f(n)=1 (%) + parameters%TMIN = NoahmpIO%TMIN_TABLE(VEGTYPE) !minimum temperature for photosynthesis (k) + + parameters%XL = NoahmpIO%XL_TABLE(VEGTYPE) !leaf/stem orientation index + parameters%RHOL = NoahmpIO%RHOL_TABLE(VEGTYPE,:) !leaf reflectance: 1=vis, 2=nir + parameters%RHOS = NoahmpIO%RHOS_TABLE(VEGTYPE,:) !stem reflectance: 1=vis, 2=nir + parameters%TAUL = NoahmpIO%TAUL_TABLE(VEGTYPE,:) !leaf transmittance: 1=vis, 2=nir + parameters%TAUS = NoahmpIO%TAUS_TABLE(VEGTYPE,:) !stem transmittance: 1=vis, 2=nir + + parameters%MRP = NoahmpIO%MRP_TABLE(VEGTYPE) !microbial respiration parameter (umol co2 /kg c/ s) + parameters%CWPVT = NoahmpIO%CWPVT_TABLE(VEGTYPE) !empirical canopy wind parameter + + parameters%WRRAT = NoahmpIO%WRRAT_TABLE(VEGTYPE) !wood to non-wood ratio + parameters%WDPOOL = NoahmpIO%WDPOOL_TABLE(VEGTYPE) !wood pool (switch 1 or 0) depending on woody or not [-] + parameters%TDLEF = NoahmpIO%TDLEF_TABLE(VEGTYPE) !characteristic T for leaf freezing [K] + + parameters%NROOT = NoahmpIO%NROOT_TABLE(VEGTYPE) !number of soil layers with root present + parameters%RGL = NoahmpIO%RGL_TABLE(VEGTYPE) !Parameter used in radiation stress function + parameters%RSMIN = NoahmpIO%RS_TABLE(VEGTYPE) !Minimum stomatal resistance [s m-1] + parameters%HS = NoahmpIO%HS_TABLE(VEGTYPE) !Parameter used in vapor pressure deficit function + parameters%TOPT = NoahmpIO%TOPT_TABLE(VEGTYPE) !Optimum transpiration air temperature [K] + parameters%RSMAX = NoahmpIO%RSMAX_TABLE(VEGTYPE) !Maximal stomatal resistance [s m-1] + +!------------------------------------------------------------------------------------------! +! Transfer rad parameters +!------------------------------------------------------------------------------------------! + + parameters%ALBSAT = NoahmpIO%ALBSAT_TABLE(SOILCOLOR,:) + parameters%ALBDRY = NoahmpIO%ALBDRY_TABLE(SOILCOLOR,:) + parameters%ALBICE = NoahmpIO%ALBICE_TABLE + parameters%ALBLAK = NoahmpIO%ALBLAK_TABLE + parameters%OMEGAS = NoahmpIO%OMEGAS_TABLE + parameters%BETADS = NoahmpIO%BETADS_TABLE + parameters%BETAIS = NoahmpIO%BETAIS_TABLE + parameters%EG = NoahmpIO%EG_TABLE + +!------------------------------------------------------------------------------------------! +! Transfer crop parameters +!------------------------------------------------------------------------------------------! + + IF(CROPTYPE > 0) THEN + parameters%PLTDAY = NoahmpIO%PLTDAY_TABLE(CROPTYPE) ! Planting date + parameters%HSDAY = NoahmpIO%HSDAY_TABLE(CROPTYPE) ! Harvest date + parameters%PLANTPOP = NoahmpIO%PLANTPOP_TABLE(CROPTYPE) ! Plant density [per ha] - used? + parameters%IRRI = NoahmpIO%IRRI_TABLE(CROPTYPE) ! Irrigation strategy 0= non-irrigation 1=irrigation (no water-stress) + parameters%GDDTBASE = NoahmpIO%GDDTBASE_TABLE(CROPTYPE) ! Base temperature for GDD accumulation [C] + parameters%GDDTCUT = NoahmpIO%GDDTCUT_TABLE(CROPTYPE) ! Upper temperature for GDD accumulation [C] + parameters%GDDS1 = NoahmpIO%GDDS1_TABLE(CROPTYPE) ! GDD from seeding to emergence + parameters%GDDS2 = NoahmpIO%GDDS2_TABLE(CROPTYPE) ! GDD from seeding to initial vegetative + parameters%GDDS3 = NoahmpIO%GDDS3_TABLE(CROPTYPE) ! GDD from seeding to post vegetative + parameters%GDDS4 = NoahmpIO%GDDS4_TABLE(CROPTYPE) ! GDD from seeding to intial reproductive + parameters%GDDS5 = NoahmpIO%GDDS5_TABLE(CROPTYPE) ! GDD from seeding to pysical maturity + parameters%C3C4 = NoahmpIO%C3C4_TABLE(CROPTYPE) ! photosynthetic pathway: 1. = c3 2. = c4 + parameters%AREF = NoahmpIO%AREF_TABLE(CROPTYPE) ! reference maximum CO2 assimulation rate + parameters%PSNRF = NoahmpIO%PSNRF_TABLE(CROPTYPE) ! CO2 assimulation reduction factor(0-1) (caused by non-modeling part,e.g.pest,weeds) + parameters%I2PAR = NoahmpIO%I2PAR_TABLE(CROPTYPE) ! Fraction of incoming solar radiation to photosynthetically active radiation + parameters%TASSIM0 = NoahmpIO%TASSIM0_TABLE(CROPTYPE) ! Minimum temperature for CO2 assimulation [C] + parameters%TASSIM1 = NoahmpIO%TASSIM1_TABLE(CROPTYPE) ! CO2 assimulation linearly increasing until temperature reaches T1 [C] + parameters%TASSIM2 = NoahmpIO%TASSIM2_TABLE(CROPTYPE) ! CO2 assmilation rate remain at Aref until temperature reaches T2 [C] + parameters%K = NoahmpIO%K_TABLE(CROPTYPE) ! light extinction coefficient + parameters%EPSI = NoahmpIO%EPSI_TABLE(CROPTYPE) ! initial light use efficiency + parameters%Q10MR = NoahmpIO%Q10MR_TABLE(CROPTYPE) ! q10 for maintainance respiration + parameters%FOLN_MX = NoahmpIO%FOLN_MX_TABLE(CROPTYPE) ! foliage nitrogen concentration when f(n)=1 (%) + parameters%LEFREEZ = NoahmpIO%LEFREEZ_TABLE(CROPTYPE) ! characteristic T for leaf freezing [K] + parameters%DILE_FC = NoahmpIO%DILE_FC_TABLE(CROPTYPE,:) ! coeficient for temperature leaf stress death [1/s] + parameters%DILE_FW = NoahmpIO%DILE_FW_TABLE(CROPTYPE,:) ! coeficient for water leaf stress death [1/s] + parameters%FRA_GR = NoahmpIO%FRA_GR_TABLE(CROPTYPE) ! fraction of growth respiration + parameters%LF_OVRC = NoahmpIO%LF_OVRC_TABLE(CROPTYPE,:) ! fraction of leaf turnover [1/s] + parameters%ST_OVRC = NoahmpIO%ST_OVRC_TABLE(CROPTYPE,:) ! fraction of stem turnover [1/s] + parameters%RT_OVRC = NoahmpIO%RT_OVRC_TABLE(CROPTYPE,:) ! fraction of root tunrover [1/s] + parameters%LFMR25 = NoahmpIO%LFMR25_TABLE(CROPTYPE) ! leaf maintenance respiration at 25C [umol CO2/m**2 /s] + parameters%STMR25 = NoahmpIO%STMR25_TABLE(CROPTYPE) ! stem maintenance respiration at 25C [umol CO2/kg bio/s] + parameters%RTMR25 = NoahmpIO%RTMR25_TABLE(CROPTYPE) ! root maintenance respiration at 25C [umol CO2/kg bio/s] + parameters%GRAINMR25 = NoahmpIO%GRAINMR25_TABLE(CROPTYPE) ! grain maintenance respiration at 25C [umol CO2/kg bio/s] + parameters%LFPT = NoahmpIO%LFPT_TABLE(CROPTYPE,:) ! fraction of carbohydrate flux to leaf + parameters%STPT = NoahmpIO%STPT_TABLE(CROPTYPE,:) ! fraction of carbohydrate flux to stem + parameters%RTPT = NoahmpIO%RTPT_TABLE(CROPTYPE,:) ! fraction of carbohydrate flux to root + parameters%GRAINPT = NoahmpIO%GRAINPT_TABLE(CROPTYPE,:) ! fraction of carbohydrate flux to grain + parameters%BIO2LAI = NoahmpIO%BIO2LAI_TABLE(CROPTYPE) ! leaf are per living leaf biomass [m^2/kg] + END IF + +!------------------------------------------------------------------------------------------! +! Transfer global parameters +!------------------------------------------------------------------------------------------! + + parameters%CO2 = NoahmpIO%CO2_TABLE + parameters%O2 = NoahmpIO%O2_TABLE + parameters%TIMEAN = NoahmpIO%TIMEAN_TABLE + parameters%FSATMX = NoahmpIO%FSATMX_TABLE + parameters%Z0SNO = NoahmpIO%Z0SNO_TABLE + parameters%SSI = NoahmpIO%SSI_TABLE + parameters%SWEMX = NoahmpIO%SWEMX_TABLE + parameters%RSURF_SNOW = NoahmpIO%RSURF_SNOW_TABLE + +! ---------------------------------------------------------------------- +! Transfer soil parameters +! ---------------------------------------------------------------------- + + do isoil = 1, size(soiltype) + parameters%BEXP(isoil) = NoahmpIO%BEXP_TABLE (SOILTYPE(isoil)) + parameters%DKSAT(isoil) = NoahmpIO%DKSAT_TABLE (SOILTYPE(isoil)) + parameters%DWSAT(isoil) = NoahmpIO%DWSAT_TABLE (SOILTYPE(isoil)) + parameters%PSISAT(isoil) = NoahmpIO%PSISAT_TABLE (SOILTYPE(isoil)) + parameters%QUARTZ(isoil) = NoahmpIO%QUARTZ_TABLE (SOILTYPE(isoil)) + parameters%SMCDRY(isoil) = NoahmpIO%SMCDRY_TABLE (SOILTYPE(isoil)) + parameters%SMCMAX(isoil) = NoahmpIO%SMCMAX_TABLE (SOILTYPE(isoil)) + parameters%SMCREF(isoil) = NoahmpIO%SMCREF_TABLE (SOILTYPE(isoil)) + parameters%SMCWLT(isoil) = NoahmpIO%SMCWLT_TABLE (SOILTYPE(isoil)) + end do + + parameters%F1 = NoahmpIO%F1_TABLE(SOILTYPE(1)) + parameters%REFDK = NoahmpIO%REFDK_TABLE + parameters%REFKDT = NoahmpIO%REFKDT_TABLE + +! ---------------------------------------------------------------------- +! Transfer GENPARM parameters +! ---------------------------------------------------------------------- + parameters%CSOIL = NoahmpIO%CSOIL_TABLE + parameters%ZBOT = NoahmpIO%ZBOT_TABLE + parameters%CZIL = NoahmpIO%CZIL_TABLE + + FRZK = NoahmpIO%FRZK_TABLE + parameters%KDT = parameters%REFKDT * parameters%DKSAT(1) / parameters%REFDK + parameters%SLOPE = NoahmpIO%SLOPE_TABLE(SLOPETYPE) + + IF(parameters%URBAN_FLAG)THEN ! Hardcoding some urban parameters for soil + parameters%SMCMAX = 0.45 + parameters%SMCREF = 0.42 + parameters%SMCWLT = 0.40 + parameters%SMCDRY = 0.40 + parameters%CSOIL = 3.E6 + ENDIF + +! adjust FRZK parameter to actual soil type: FRZK * FRZFACT + + IF(SOILTYPE(1) /= 14) then + FRZFACT = (parameters%SMCMAX(1) / parameters%SMCREF(1)) * (0.412 / 0.468) + parameters%FRZX = FRZK * FRZFACT + END IF + + parameters%mxsnalb = 0.84 + parameters%mnsnalb = 0.55 + parameters%sndecayexp = 0.01 + + parameters%t_ulimit = 2.5 + parameters%t_mlimit = 2.0 + parameters%t_llimit = 0.5 + parameters%snowf_scalef = 1.0 + + END SUBROUTINE TRANSFER_MP_PARAMETERS diff --git a/lis/surfacemodels/land/noahmp.new/cpl_wrf_noesmf/noahMP401_setwrfexport.F90 b/lis/surfacemodels/land/noahmp.new/cpl_wrf_noesmf/noahMP401_setwrfexport.F90 new file mode 100755 index 000000000..e81a4b346 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/cpl_wrf_noesmf/noahMP401_setwrfexport.F90 @@ -0,0 +1,125 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! +! !ROUTINE: noahMP401_setwrfexport.F90 +! +! !DESCRIPTION: +! Defines the export states from Noah to WRF in coupled mode +! surface albedo (albedo) +! soil moisture content (smc 1:4) +! soil temperature (stc 1:4) +! snow water equivalent (snow) +! snow height (snowh) +! volumetric liquid soil moisture (sh2o 1:4) +! if WRF_HYDRO +! infiltration excess (infxsrt) +! soil drainage (soldrain) +! +! !REVISION HISTORY: +! 02 Dec 2003; Sujay Kumar, Initial Version +! 17 Nov 2008; Sujay Kumar, Modified for the ESMF coupled version +! 28 Jun 2018; Chandana Gangodagamage Modified for the NoahMP.3.6 +! +! !INTERFACE: +subroutine noahMP401_setwrfexport(n) +! !USES: + use ESMF + use LIS_coreMod + use LIS_historyMod, only : LIS_patch2tile + use LIS_logMod + use LISWRFGridCompMod, only : LISWRF_export +! use noah33_lsmMod + use NoahMP401_lsmMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n +!EOP + integer :: i,j,k,t + real, allocatable :: temp(:) + + allocate(temp(LIS_rc%npatch(n,LIS_rc%lsm_index))) + ! surface albedo + call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%albedo_t,& + NOAHMP401_struc(n)%noahmp401%albedo) +#ifdef WRF_HYDRO + ! infiltration excess + call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%infxsrt_t,& + NOAHMP401_struc(n)%noahmp401%infxs1rt) + ! soil drainage + call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%soldrain_t,& + NOAHMP401_struc(n)%noahmp401%soldrain1rt) +#endif + ! soil moisture content layers 1:4 + do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + temp(i) = NOAHMP401_struc(n)%noahmp401(i)%smc(1) + enddo + call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%smc1_t,& + temp) + do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + temp(i) = NOAHMP401_struc(n)%noahmp401(i)%smc(2) + enddo + call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%smc2_t,& + temp) + do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + temp(i) = NOAHMP401_struc(n)%noahmp401(i)%smc(3) + enddo + call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%smc3_t,& + temp) + do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + temp(i) = NOAHMP401_struc(n)%noahmp401(i)%smc(4) + enddo + call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%smc4_t,& + temp) + do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + temp(i) = NOAHMP401_struc(n)%noahmp401(i)%tslb(1) + enddo + ! soil temperature layers 1:4 + call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%stc1_t,temp) + do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + temp(i) = NOAHMP401_struc(n)%noahmp401(i)%tslb(2) + enddo + call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%stc2_t,temp) + do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + temp(i) = NOAHMP401_struc(n)%noahmp401(i)%tslb(3) + enddo + call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%stc3_t,temp) + do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + temp(i) = NOAHMP401_struc(n)%noahmp401(i)%tslb(4) + enddo + call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%stc4_t,temp) + ! snow water equivalent + call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%snow_t,& + NOAHMP401_struc(n)%noahmp401%sneqv*1000.0) + ! snow height NUWRF EMK + call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%snowh_t,& + NOAHMP401_struc(n)%noahmp401%snowh) + ! volumetric liquid soil moisture layers 1:4 + do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + temp(i) = NOAHMP401_struc(n)%noahmp401(i)%sh2o(1) + enddo + call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%sh2o1_t,temp) + do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + temp(i) = NOAHMP401_struc(n)%noahmp401(i)%sh2o(2) + enddo + call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%sh2o2_t,temp) + do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + temp(i) = NOAHMP401_struc(n)%noahmp401(i)%sh2o(3) + enddo + call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%sh2o3_t,temp) + do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + temp(i) = NOAHMP401_struc(n)%noahmp401(i)%sh2o(4) + enddo + call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%sh2o4_t,temp) + deallocate(temp) + +end subroutine noahMP401_setwrfexport + diff --git a/lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmp401_getCROCUSexport.F90 b/lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmp401_getCROCUSexport.F90 new file mode 100644 index 000000000..1241fa81e --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmp401_getCROCUSexport.F90 @@ -0,0 +1,74 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_getCROCUSexport +! \label{noahmp401_getCROCUSexport} +! +! !REVISION HISTORY: +! 19 Sep 2020: Sujay Kumar; Initial Specification +! 17 Nov 2020: Mahdi Navari; In analogous to ISBA-Crocus %tgb replaced with %tslb +! 2 Dec 2020: Mahdi Navari; Edited to add soil volumetric liquid and frozen water content +! +! !INTERFACE: +subroutine noahmp401_getCROCUSexport(n, LSM2SUBLSM_State) +! !USES: + use ESMF + use LIS_coreMod + use LIS_logMod + use noahmp401_lsmMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM2SUBLSM_State +! +! !DESCRIPTION: +! +! +!EOP + + + + type(ESMF_Field) :: gtField + type(ESMF_Field) :: XWGIField + type(ESMF_Field) :: XWGField + real, pointer :: gt(:) + real, pointer :: XWGI(:) + real, pointer :: XWG(:) + integer :: t + integer :: status + + call ESMF_StateGet(LSM2SUBLSM_State,"Ground temperature",gtField,rc=status) + call LIS_verify(status) + call ESMF_StateGet(LSM2SUBLSM_State,"soil volumetric liquid water content",XWGField,rc=status) + call LIS_verify(status) + call ESMF_StateGet(LSM2SUBLSM_State,"soil volumetric frozen water content",XWGIField,rc=status) + call LIS_verify(status) + + call ESMF_FieldGet(gtField,localDE=0,farrayPtr=gt,rc=status) + call LIS_verify(status) + call ESMF_FieldGet(XWGField,localDE=0,farrayPtr=XWG,rc=status) + call LIS_verify(status) + call ESMF_FieldGet(XWGIField,localDE=0,farrayPtr=XWGI,rc=status) + call LIS_verify(status) + + + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + gt(t) = NOAHMP401_struc(n)%noahmp401(t)%tslb(1) + !gt(t) = NOAHMP401_struc(n)%noahmp401(t)%tgb + XWGI(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(1) - NOAHMP401_struc(n)%noahmp401(t)%sh2o(1) ! volumetric frozen soil moisture [m3/m3] + XWG(t) = NOAHMP401_struc(n)%noahmp401(t)%sh2o(1) ! volumetric liquid soil moisture [m3/m3] + enddo + + +end subroutine noahmp401_getCROCUSexport + + diff --git a/lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmp401_getSnowModelexport.F90 b/lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmp401_getSnowModelexport.F90 new file mode 100644 index 000000000..8346a1798 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmp401_getSnowModelexport.F90 @@ -0,0 +1,75 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_getSnowModelexport +! \label{noahmp401_getSnowModelexport} +! +! !REVISION HISTORY: +! 19 Sep 2020: Sujay Kumar; Initial Specification +! 17 Nov 2020: Mahdi Navari; In analogous to ISBA-Crocus %tgb replaced with %tslb +! 2 Dec 2020: Mahdi Navari; Edited to add soil volumetric liquid and frozen water content +! 12 Aug 2021: Kristi Arsenault; Added SnowModel connections +! +! !INTERFACE: +subroutine noahmp401_getSnowModelexport(n, LSM2SUBLSM_State) +! !USES: + use ESMF + use LIS_coreMod + use LIS_logMod + use noahmp401_lsmMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM2SUBLSM_State +! +! !DESCRIPTION: +! +! +!EOP + +#if 0 + type(ESMF_Field) :: gtField + type(ESMF_Field) :: XWGIField + type(ESMF_Field) :: XWGField + real, pointer :: gt(:) + real, pointer :: XWGI(:) + real, pointer :: XWG(:) + integer :: t + integer :: status + + call ESMF_StateGet(LSM2SUBLSM_State,"Ground temperature",gtField,rc=status) + call LIS_verify(status) + call ESMF_StateGet(LSM2SUBLSM_State,"soil volumetric liquid water content",XWGField,rc=status) + call LIS_verify(status) + call ESMF_StateGet(LSM2SUBLSM_State,"soil volumetric frozen water content",XWGIField,rc=status) + call LIS_verify(status) + + call ESMF_FieldGet(gtField,localDE=0,farrayPtr=gt,rc=status) + call LIS_verify(status) + call ESMF_FieldGet(XWGField,localDE=0,farrayPtr=XWG,rc=status) + call LIS_verify(status) + call ESMF_FieldGet(XWGIField,localDE=0,farrayPtr=XWGI,rc=status) + call LIS_verify(status) + + + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + gt(t) = NOAHMP401_struc(n)%noahmp401(t)%tslb(1) + !gt(t) = NOAHMP401_struc(n)%noahmp401(t)%tgb + XWGI(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(1) - NOAHMP401_struc(n)%noahmp401(t)%sh2o(1) ! volumetric frozen soil moisture [m3/m3] + XWG(t) = NOAHMP401_struc(n)%noahmp401(t)%sh2o(1) ! volumetric liquid soil moisture [m3/m3] + enddo + +#endif + +end subroutine noahmp401_getSnowModelexport + + diff --git a/lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmp401_setCROCUSimport.F90 b/lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmp401_setCROCUSimport.F90 new file mode 100755 index 000000000..6889274e6 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmp401_setCROCUSimport.F90 @@ -0,0 +1,61 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_setCROCUSimport +! \label{noahmp401_setCROCUSimport} +! +! !REVISION HISTORY: +! 19 Sep 2020: Sujay Kumar; Initial Specification +! +! !INTERFACE: +subroutine noahmp401_setCROCUSimport(n, SubLSM2LSM_State) +! !USES: + use ESMF + use LIS_coreMod + use LIS_logMod + use noahmp401_lsmMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: SubLSM2LSM_State +! +! !DESCRIPTION: +! +! +!EOP + type(ESMF_Field) :: snwdField, sweField + real, pointer :: swe(:), snwd(:) + real :: dsneqv,dsnowh + integer :: t + integer :: status + + call ESMF_StateGet(SubLSM2LSM_State,"Total SWE",sweField,rc=status) + call LIS_verify(status) + call ESMF_StateGet(SubLSM2LSM_State,"Total snowdepth",snwdField,rc=status) + call LIS_verify(status) + + call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) + call LIS_verify(status) + call ESMF_FieldGet(snwdField,localDE=0,farrayPtr=snwd,rc=status) + call LIS_verify(status) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + dsneqv = swe(t) - noahmp401_struc(n)%noahmp401(t)%sneqv !in mm + dsnowh = snwd(t) - noahmp401_struc(n)%noahmp401(t)%snowh !in m + + ! update + call noahmp401_snow_update(n, t, dsneqv, dsnowh) + + enddo + +end subroutine noahmp401_setCROCUSimport + + diff --git a/lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmp401_setSnowModelimport.F90 b/lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmp401_setSnowModelimport.F90 new file mode 100755 index 000000000..51d3723a9 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmp401_setSnowModelimport.F90 @@ -0,0 +1,68 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_setSnowModelimport +! \label{noahmp401_setSnowModelimport} +! +! !REVISION HISTORY: +! 19 Sep 2020: Sujay Kumar; Initial Specification +! 12 Aug 2021: Kristi Arsenault; Added SnowModel +! +! !INTERFACE: +subroutine noahmp401_setSnowModelimport(n, SubLSM2LSM_State) +! !USES: + use ESMF + use LIS_coreMod + use LIS_logMod + use noahmp401_lsmMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: SubLSM2LSM_State +! +! !DESCRIPTION: +! +! +!EOP + type(ESMF_Field) :: snwdField, sweField + real, pointer :: swe(:), snwd(:) + real :: dsneqv,dsnowh + integer :: t + integer :: status + + call ESMF_StateGet(SubLSM2LSM_State,"Total SWE",sweField,rc=status) + call LIS_verify(status,"noahmp401_setSnowModelimport: error in swe state get from SnowModel") + call ESMF_StateGet(SubLSM2LSM_State,"Total snowdepth",snwdField,rc=status) + call LIS_verify(status,"noahmp401_setSnowModelimport: error in snwd state get from SnowModel") + + call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) + call LIS_verify(status,"noahmp401_setSnowModelimport: error in swe data values") + call ESMF_FieldGet(snwdField,localDE=0,farrayPtr=snwd,rc=status) + call LIS_verify(status,"noahmp401_setSnowModelimport: error in snwd data values") + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + ! SnowModel has its SWE in meters -- conversion here to mm: + dsneqv = (swe(t)*1000.) - noahmp401_struc(n)%noahmp401(t)%sneqv !in mm + dsnowh = snwd(t) - noahmp401_struc(n)%noahmp401(t)%snowh !in m + +! if( dsneqv > 0. .or. dsnowh > 0. ) then +! write(501,*) t, swe(t), noahmp401_struc(n)%noahmp401(t)%sneqv, & +! snwd(t), noahmp401_struc(n)%noahmp401(t)%snowh +! endif + + ! Update NoahMP's Snow states: + call noahmp401_snow_update(n, t, dsneqv, dsnowh) + + enddo + +end subroutine noahmp401_setSnowModelimport + + diff --git a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_daveg_Mod.F90 b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_daveg_Mod.F90 new file mode 100755 index 000000000..3630931d2 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_daveg_Mod.F90 @@ -0,0 +1,53 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +#include "LIS_misc.h" +module noahmp401_daveg_Mod +!BOP +! +! !MODULE: noahmp401_daveg_Mod +! +! !DESCRIPTION: +! +! !REVISION HISTORY: +! 13 Feb 2020: Sujay Kumar; Initial Specification +! +! !USES: + use ESMF + use LIS_coreMod + use LIS_dataAssimMod + use LIS_logMod + + implicit none + + PRIVATE +!----------------------------------------------------------------------------- +! !PUBLIC MEMBER FUNCTIONS: +!----------------------------------------------------------------------------- + public :: noahmp401_daveg_init +!EOP + +contains +!BOP +! +! !ROUTINE: noahmp401_daveg_init +! \label{noahmp401_daveg_init} +! +! !INTERFACE: + subroutine noahmp401_daveg_init(k) +! !USES: +! !DESCRIPTION: +! +!EOP + + implicit none + integer, intent(in) :: k + + end subroutine noahmp401_daveg_init +end module noahmp401_daveg_Mod diff --git a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_descale_veg.F90 b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_descale_veg.F90 new file mode 100755 index 000000000..bd317c20b --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_descale_veg.F90 @@ -0,0 +1,46 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_descale_veg +! \label{noahmp401_descale_veg} +! +! !REVISION HISTORY: +! 13 Feb 2020: Sujay Kumar; Initial Specification +! +! !INTERFACE: +subroutine noahmp401_descale_veg(n, LSM_State, LSM_Incr_State) + +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc + use LIS_logMod, only : LIS_verify + use noahmp401_lsmMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM_State + type(ESMF_State) :: LSM_Incr_State +! +! !DESCRIPTION: +! +! Descales ESI related state prognostic variables for +! data assimilation +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[LSM\_State] ESMF State container for LSM state variables \newline +! \end{description} +!EOP + + +end subroutine noahmp401_descale_veg + diff --git a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_getLAIpred.F90 b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_getLAIpred.F90 new file mode 100755 index 000000000..d0fe9d6b1 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_getLAIpred.F90 @@ -0,0 +1,62 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_getLAIpred +! \label{noahmp401_getLAIpred} +! +! !REVISION HISTORY: +! 13 Feb 2020: Sujay Kumar; Initial Specification +! +! !INTERFACE: +subroutine noahmp401_getLAIpred(n, k,obs_pred) +! !USES: + use ESMF + use LIS_constantsMod + use LIS_coreMod + use LIS_dataAssimMod + use LIS_DAobservationsMod + use noahmp401_lsmMod + use noahmp401_dasoilm_Mod +!EOP + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + integer, intent(in) :: k + real :: obs_pred(LIS_rc%obs_ngrid(k),LIS_rc%nensem(n)) +! +! !DESCRIPTION: +! +! Returns the Soil moisture obs pred (model's estimate of +! observations) for data assimilation +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[obs\_pred] model's estimate of observations \newline +! \end{description} +!EOP + real :: obs_tmp + integer :: i,t,m,gid,kk + real :: inputs_tp(6) + character*50 :: units_tp(6) + real :: lai(LIS_rc%npatch(n,LIS_rc%lsm_index)) + + + do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) + lai(t) = noahmp401_struc(n)%noahmp401(t)%lai + enddo + call LIS_convertPatchSpaceToObsEnsSpace(n,k,& + LIS_rc%lsm_index, & + lai,& + obs_pred) + +end subroutine noahmp401_getLAIpred + diff --git a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_getvegvars.F90 b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_getvegvars.F90 new file mode 100755 index 000000000..e7ce945f7 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_getvegvars.F90 @@ -0,0 +1,63 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_getvegvars +! \label{noahmp401_getvegvars} +! +! !REVISION HISTORY: +! 27Feb2005: Sujay Kumar; Initial Specification +! 25Jun2006: Sujay Kumar: Updated for the ESMF design +! 1 Aug 2016: Mahdi Navari; Modified for Noahmp401 +! To do: makes it general for x layers (currently hard coded for 4 layers) +! !INTERFACE: +subroutine noahmp401_getvegvars(n, LSM_State) + +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc + use LIS_logMod, only : LIS_verify + use noahmp401_lsmMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM_State +! +! !DESCRIPTION: +! +! Returns the soilmoisture related state prognostic variables for +! data assimilation +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[LSM\_State] ESMF State container for LSM state variables \newline +! \end{description} + !EOP + + + type(ESMF_Field) :: laiField + + integer :: t + integer :: status + real, pointer :: lai(:) + + call ESMF_StateGet(LSM_State,"LAI",laiField,rc=status) + call LIS_verify(status) + call ESMF_FieldGet(laiField,localDE=0,farrayPtr=lai,rc=status) + call LIS_verify(status) + + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + lai(t) = NOAHMP401_struc(n)%noahmp401(t)%lai + enddo + +end subroutine noahmp401_getvegvars + diff --git a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_qc_LAIobs.F90 b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_qc_LAIobs.F90 new file mode 100755 index 000000000..cb6be1e72 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_qc_LAIobs.F90 @@ -0,0 +1,54 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_qc_LAIobs +! \label{noahmp401_qc_LAIobs} +! +! !REVISION HISTORY: +! 25Feb2008: Sujay Kumar: Initial Specification +! 1 Aug 2016: Mahdi Navari; Modified for Noahmp401 +! +! !INTERFACE: +subroutine noahmp401_qc_LAIobs(n,k,OBS_State) +! !USES: + use ESMF + use LIS_coreMod + use LIS_logMod, only : LIS_verify + use LIS_constantsMod, only : LIS_CONST_TKFRZ + use LIS_DAobservationsMod + use noahmp401_lsmMod + use NOAHMP_TABLES_401, ONLY : SMCMAX_TABLE,SMCWLT_TABLE + + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + integer, intent(in) :: k + type(ESMF_State) :: OBS_State +! +! !DESCRIPTION: +! +! This subroutine performs any model-based QC of the observation +! prior to data assimilation. Here the soil moisture observations +! are flagged when LSM indicates that (1) rain is falling (2) +! soil is frozen or (3) ground is fully or partially covered +! with snow MN:(4) ground is covered with vegatation (more than 50%). +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[OBS\_State] ESMF state container for observations \newline +! \end{description} +! +!EOP + + +end subroutine noahmp401_qc_LAIobs + diff --git a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_qcveg.F90 b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_qcveg.F90 new file mode 100755 index 000000000..546655de7 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_qcveg.F90 @@ -0,0 +1,169 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_qcveg +! \label{noahmp401_qcveg} +! +! !REVISION HISTORY: +! 13 Feb 2020: Sujay Kumar; Initial Specification +! +! !INTERFACE: +subroutine noahmp401_qcveg(n, LSM_State) + +! !USES: + use ESMF + use LIS_coreMod + use LIS_logMod, only : LIS_verify + use noahmp401_lsmMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM_State +! +! !DESCRIPTION: +! +! Returns the soilmoisture related state prognostic variables for +! data assimilation +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[LSM\_State] ESMF State container for LSM state variables \newline +! \end{description} + !EOP + type(ESMF_Field) :: laiField + integer :: t + integer :: status + real, pointer :: lai(:) + + real :: laimax + real :: laimin + + integer :: gid + real :: laitmp + + logical :: update_flag(LIS_rc%ngrid(n)) + real :: perc_violation(LIS_rc%ngrid(n)) + + real :: laimean(LIS_rc%ngrid(n)) + integer :: nlaimean(LIS_rc%ngrid(n)) + + integer :: N_ens + real :: state_tmp(LIS_rc%nensem(n)),state_mean + + call ESMF_StateGet(LSM_State,"LAI",laiField,rc=status) + call LIS_verify(status) + + + call ESMF_FieldGet(laiField,localDE=0,farrayPtr=lai,rc=status) + call LIS_verify(status) + + + call ESMF_AttributeGet(laiField,"Max Value",laimax,rc=status) + call LIS_verify(status) + call ESMF_AttributeGet(laiField,"Min Value",laimin,rc=status) + call LIS_verify(status) + + + + update_flag = .true. + perc_violation = 0.0 + laimean = 0.0 + nlaimean = 0 + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + + gid = LIS_domain(n)%gindex(& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col,& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) + + laitmp = lai(t) + + if(laitmp.lt.laimin.or.laitmp.gt.laimax) then + update_flag(gid) = .false. + perc_violation(gid) = perc_violation(gid) +1 + endif + + enddo + + do gid=1,LIS_rc%ngrid(n) + perc_violation(gid) = perc_violation(gid)/LIS_rc%nensem(n) + enddo + +! For ensembles that are unphysical, compute the +! ensemble average after excluding them. This +! is done only if the majority of the ensemble +! members are good (>60%) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + + gid = LIS_domain(n)%gindex(& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col,& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) + if(.not.update_flag(gid)) then + if(perc_violation(gid).lt.0.8) then + if((lai(t).gt.laimin).and.& + (lai(t).lt.laimax)) then + laimean(gid) = laimean(gid) + & + lai(t) + nlaimean(gid) = nlaimean(gid) + 1 + endif + endif + endif + enddo + + do gid=1,LIS_rc%ngrid(n) + if(nlaimean(gid).gt.0) then + laimean(gid) = laimean(gid)/nlaimean(gid) + endif + enddo + + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + gid = LIS_domain(n)%gindex(& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col,& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) + + laitmp = lai(t) + +! If the update is unphysical, simply set to the average of +! the good ensemble members. If all else fails, do not +! update. + + if(update_flag(gid)) then + lai(t) = laitmp + elseif(perc_violation(gid).lt.0.8) then + if(laitmp.lt.laimin.or.laitmp.gt.laimax) then + lai(t) = laimean(gid) + else + lai(t) = lai(t) + endif + endif + enddo + +#if 0 + N_ens = LIS_rc%nensem(n) + do t=1,N_ens + state_tmp(t) = lai(t) + enddo + state_mean =sum(state_tmp)/N_ens + + write(113,fmt='(i4.4,i2.2,i2.2,i2.2,i2.2,i2.2,21F8.3)') & + LIS_rc%yr, LIS_rc%mo, LIS_rc%da, LIS_rc%hr, & + LIS_rc%mn, LIS_rc%ss, & + state_mean, & + state_tmp + +#endif + + +end subroutine noahmp401_qcveg + diff --git a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_scale_veg.F90 b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_scale_veg.F90 new file mode 100755 index 000000000..d617f0f8e --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_scale_veg.F90 @@ -0,0 +1,45 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_scale_veg +! \label{noahmp401_scale_veg} +! +! !REVISION HISTORY: +! 13 Feb 2020: Sujay Kumar; Initial Specification +! +! !INTERFACE: +subroutine noahmp401_scale_veg(n, LSM_State) + +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc + use LIS_logMod, only : LIS_verify + use noahmp401_lsmMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM_State +! +! !DESCRIPTION: +! +! Scales esioisture related state prognostic variables for +! data assimilation +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[LSM\_State] ESMF State container for LSM state variables \newline +! \end{description} +!EOP + + +end subroutine noahmp401_scale_veg + diff --git a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_setvegvars.F90 b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_setvegvars.F90 new file mode 100755 index 000000000..2ef4fc49d --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_setvegvars.F90 @@ -0,0 +1,91 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_setvegvars +! \label{noahmp401_setvegvars} +! +! !REVISION HISTORY: +! 13 Feb 2020: Sujay Kumar; Initial Specification +! +! Apply the update if it met the update conditions +! Update conditions: +! 1- Prior SM(sh2o) + increment > MIN_THRESHOLD +! 2- Prior SM(sh2o) + increment < sm_threshold +! There are 3 cases +! 1- If all the ensemble members met the update conditions --> apply the update +! 2- If more than 50% of the ensemble members met the update condition --> +! apply the update for that members and set the other member to the mean +! value of the ensemble (i.e. mean of the members that met the conditions) +! 3- If less then 50% of the ensemble members met the update conditions --> +! adjust the states + + +! !INTERFACE: +subroutine noahmp401_setvegvars(n, LSM_State) +! !USES: + use ESMF + use LIS_coreMod + use LIS_logMod + use noahmp401_lsmMod + use NOAHMP_TABLES_401, ONLY : SMCMAX_TABLE,SMCWLT_TABLE + + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM_State +! +! !DESCRIPTION: +! +! This routine assigns the soil moisture prognostic variables to noah's +! model space. +! +!EOP + real, parameter :: MIN_THRESHOLD = 0.02 + type(ESMF_Field) :: laiField,sm1Field + real :: MAX_threshold + real :: sm_threshold + real :: delta1 + integer :: SOILTYP ! soil type index [-] + integer :: t,i,gid,m,t_unpert + integer :: status + real, pointer :: lai(:),soilm1(:) + real :: lfmass + logical :: flag_tmp(LIS_rc%nensem(n)) + logical :: update_flag(LIS_rc%ngrid(n)) + logical :: ens_flag(LIS_rc%nensem(n)) + logical :: update_flag_tile(LIS_rc%npatch(n,LIS_rc%lsm_index)) + logical :: update_flag_ens(LIS_rc%ngrid(n)) + logical :: update_flag_new(LIS_rc%ngrid(n)) + real :: tmp1(LIS_rc%nensem(n)) + integer :: pcount + logical :: bounds_violation + real :: MinEnsSM1 ,MaxEnsSM1 + real :: tmpval + integer :: nIter + real :: smc_tmp + + call ESMF_StateGet(LSM_State,"LAI",laiField,rc=status) + call LIS_verify(status) + + call ESMF_FieldGet(laiField,localDE=0,farrayPtr=lai,rc=status) + call LIS_verify(status) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + + if(NOAHMP401_struc(n)%noahmp401(t)%param%sla.ne.0) then + NOAHMP401_struc(n)%noahmp401(t)%lai = lai(t) + lfmass = lai(t)*1000.0/(NOAHMP401_struc(n)%noahmp401(t)%param%sla) + NOAHMP401_struc(n)%noahmp401(t)%lfmass = lfmass + endif + enddo + +end subroutine noahmp401_setvegvars + diff --git a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_updatevegvars.F90 b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_updatevegvars.F90 new file mode 100755 index 000000000..38760e06d --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_updatevegvars.F90 @@ -0,0 +1,148 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_updatevegvars +! \label{noahmp401_updatevegvars} +! +! !REVISION HISTORY: +! 13 Feb 2020: Sujay Kumar; Initial Specification +! +! !INTERFACE: +subroutine noahmp401_updatevegvars(n, LSM_State, LSM_Incr_State) +! !USES: + use ESMF + use LIS_coreMod + use LIS_logMod + use noahmp401_lsmMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM_State + type(ESMF_State) :: LSM_Incr_State +! +! !DESCRIPTION: +! +! This routine assigns the soil moisture prognostic variables to noah's +! model space. +! +!EOP + type(ESMF_Field) :: laiField, laiIncrField + + integer :: t,gid + integer :: status + real, pointer :: lai(:), laiincr(:) + real :: laitmp,laimax,laimin + + logical :: update_flag(LIS_rc%ngrid(n)) + real :: perc_violation(LIS_rc%ngrid(n)) + + real :: laimean(LIS_rc%ngrid(n)) + integer :: nlaimean(LIS_rc%ngrid(n)) + + + call ESMF_StateGet(LSM_State,"LAI",laiField,rc=status) + call LIS_verify(status) + + call ESMF_StateGet(LSM_Incr_State,"LAI",laiIncrField,rc=status) + call LIS_verify(status) + + + call ESMF_FieldGet(laiField,localDE=0,farrayPtr=lai,rc=status) + call LIS_verify(status) + + call ESMF_FieldGet(laiIncrField,localDE=0,farrayPtr=laiincr,rc=status) + call LIS_verify(status) + + + call ESMF_AttributeGet(laiField,"Max Value",laimax,rc=status) + call LIS_verify(status) + call ESMF_AttributeGet(laiField,"Min Value",laimin,rc=status) + call LIS_verify(status) + + + update_flag = .true. + perc_violation = 0.0 + laimean = 0.0 + nlaimean = 0 + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + + gid = LIS_domain(n)%gindex(& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col,& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) + + laitmp = lai(t) + laiincr(t) + + + if(laitmp.lt.laimin.or.laitmp.gt.laimax) then + update_flag(gid) = .false. + perc_violation(gid) = perc_violation(gid) +1 + endif + + enddo + + do gid=1,LIS_rc%ngrid(n) + perc_violation(gid) = perc_violation(gid)/LIS_rc%nensem(n) + enddo + +! For ensembles that are unphysical, compute the +! ensemble average after excluding them. This +! is done only if the majority of the ensemble +! members are good (>60%) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + + gid = LIS_domain(n)%gindex(& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col,& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) + if(.not.update_flag(gid)) then + if(perc_violation(gid).lt.0.8) then + if((lai(t)+laiincr(t).gt.laimin).and.& + (lai(t)+laiincr(t).lt.laimax)) then + laimean(gid) = laimean(gid) + & + lai(t) + laiincr(t) + nlaimean(gid) = nlaimean(gid) + 1 + endif + endif + endif + enddo + + do gid=1,LIS_rc%ngrid(n) + if(nlaimean(gid).gt.0) then + laimean(gid) = laimean(gid)/nlaimean(gid) + endif + enddo + + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + gid = LIS_domain(n)%gindex(& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col,& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) + + laitmp = lai(t) + laiincr(t) + +! If the update is unphysical, simply set to the average of +! the good ensemble members. If all else fails, do not +! update. + + if(update_flag(gid)) then + lai(t) = laitmp + elseif(perc_violation(gid).lt.0.8) then + if(laitmp.lt.laimin.or.laitmp.gt.laimax) then + lai(t) = laimean(gid) + else + lai(t) = lai(t) + laiincr(t) + endif + endif + enddo + +end subroutine noahmp401_updatevegvars + diff --git a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_veg_DAlog.F90 b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_veg_DAlog.F90 new file mode 100755 index 000000000..5f9bcb19e --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_veg_DAlog.F90 @@ -0,0 +1,25 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +! +! 15 Apr 2021: Wanshu Nie; created for Noah-MP4.0.1 +! + +subroutine noahmp401_veg_DAlog(n) + + ! USES: + + ! ARGUMENTS: + integer, intent(in) :: n + + ! DESCRIPTION: + + +end subroutine noahmp401_veg_DAlog + diff --git a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_write_veg.F90 b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_write_veg.F90 new file mode 100755 index 000000000..83ec93f15 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_write_veg.F90 @@ -0,0 +1,69 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_write_veg +! \label{noahmp401_write_veg} +! +! !REVISION HISTORY: +! 13 Feb 2020: Sujay Kumar; Initial Specification +! +! !INTERFACE: +subroutine noahmp401_write_veg(ftn,n, LSM_State) + +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc + use noahmp401_lsmMod + use LIS_historyMod, only : LIS_writevar_restart + implicit none +! !ARGUMENTS: + integer, intent(in) :: ftn + integer, intent(in) :: n + type(ESMF_State) :: LSM_State +! +! !DESCRIPTION: +! +! Returns the esioisture related state prognostic variables for +! data assimilation +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[LSM\_State] ESMF State container for LSM state variables \newline +! \end{description} +!EOP + integer :: t + real, allocatable :: tmp(:) + + allocate(tmp(LIS_rc%npatch(n,LIS_rc%lsm_index))) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + tmp(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(1) + enddo + call LIS_writevar_restart(ftn,n,1,tmp) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + tmp(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(2) + enddo + call LIS_writevar_restart(ftn,n,1,tmp) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + tmp(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(3) + enddo + call LIS_writevar_restart(ftn,n,1,tmp) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + tmp(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(4) + enddo + call LIS_writevar_restart(ftn,n,1,tmp) + deallocate(tmp) + +end subroutine noahmp401_write_veg + diff --git a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_dasnodep_Mod.F90 b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_dasnodep_Mod.F90 new file mode 100755 index 000000000..8db8ac65c --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_dasnodep_Mod.F90 @@ -0,0 +1,49 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +#include "LIS_misc.h" +module noahmp401_dasnodep_Mod +!BOP +! +! !MODULE: noahmp401_dasnodep_Mod +! +! !DESCRIPTION: +! +! !REVISION HISTORY: +! +! !USES: + + implicit none + + PRIVATE +!----------------------------------------------------------------------------- +! !PUBLIC MEMBER FUNCTIONS: +!----------------------------------------------------------------------------- + public :: noahmp401_dasnodep_init +!----------------------------------------------------------------------------- +! !PUBLIC TYPES: +!----------------------------------------------------------------------------- +!EOP + + SAVE +contains +!BOP +! +! !ROUTINE: noahmp401_dasnodep_init +! \label{noahmp401_dasnodep_init} +! +! !INTERFACE: + subroutine noahmp401_dasnodep_init() +! !USES: +! !DESCRIPTION: +! +!EOP + implicit none + end subroutine noahmp401_dasnodep_init +end module noahmp401_dasnodep_Mod diff --git a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_descale_snodep.F90 b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_descale_snodep.F90 new file mode 100644 index 000000000..1776e2864 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_descale_snodep.F90 @@ -0,0 +1,72 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_descale_snodep +! \label{noahmp401_descale_snodep} +! +! !REVISION HISTORY: +! 27Feb2005: Sujay Kumar; Initial Specification +! 25Jun2006: Sujay Kumar: Updated for the ESMF design +! 02 Mar 2010: Sujay Kumar; Modified for Noah 3.1 +! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 +! +! !INTERFACE: +subroutine noahmp401_descale_snodep(n, LSM_State, LSM_Incr_State) + +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc + use noahmp401_lsmMod + use LIS_logMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM_State + type(ESMF_State) :: LSM_Incr_State +! +! !DESCRIPTION: +! +! Returns the snow related state prognostic variables for +! data assimilation +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[LSM\_State] ESMF State container for LSM state variables \newline +! \end{description} +!EOP + + type(ESMF_Field) :: sweField + type(ESMF_Field) :: snodField + + integer :: t + integer :: status + real, pointer :: swe(:) + real, pointer :: snod(:) + +#if 0 + call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) + call LIS_verify(status) + call ESMF_StateGet(LSM_State,"Snowdepth",snodField,rc=status) + call LIS_verify(status) + + call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) + call LIS_verify(status) + call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) + call LIS_verify(status) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + swe(t) = swe(t)*1000.0 + enddo +#endif + +end subroutine noahmp401_descale_snodep + diff --git a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_getsnodeppred.F90 b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_getsnodeppred.F90 new file mode 100644 index 000000000..da3b4a3c0 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_getsnodeppred.F90 @@ -0,0 +1,58 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_getsnodeppred +! \label{noahmp401_getsnodeppred} +! +! !REVISION HISTORY: +! 27Feb2005: Sujay Kumar; Initial Specification +! 25Jun2006: Sujay Kumar: Updated for the ESMF design +! 02 Mar 2010: Sujay Kumar; Modified for Noah 3.1 +! 01 May 2014: Yuqiong Liu; modifed to include mesh8, mesh16, and 0p25 SNODEP data +! 24 May 2017: Yeosang Yoon: updated the file to work with the DA observation +! space updates. +! 03 Oct 2018: Yeosang Yoon; Modified for NoahMP 3.6 +! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 +! +! !INTERFACE: +subroutine noahmp401_getsnodeppred(n, k, obs_pred) + +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc,LIS_surface + use noahmp401_lsmMod + use SNODEPobs_Mod, only: SNODEP_obs_obj + use LIS_DAobservationsMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + integer, intent(in) :: k + real :: obs_pred(LIS_rc%ngrid(n),LIS_rc%nensem(n)) + real :: snwd(LIS_rc%npatch(n,LIS_rc%lsm_index)) +!EOP + + integer :: t + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + if (SNODEP_obs_obj(n)%mesh .eq. 8) then + snwd(t) = noahmp401_struc(n)%noahmp401(t)%snowh*39.37 !convert from meter to inch + elseif (SNODEP_obs_obj(n)%mesh .eq. 16 .or. SNODEP_obs_obj(n)%mesh .eq. 25) then + snwd(t) = noahmp401_struc(n)%noahmp401(t)%snowh + endif + enddo + + call LIS_convertPatchSpaceToObsEnsSpace(n,k,& + LIS_rc%lsm_index, & + snwd,& + obs_pred) + +end subroutine noahmp401_getsnodeppred + diff --git a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_getsnodepvars.F90 b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_getsnodepvars.F90 new file mode 100644 index 000000000..abdeea682 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_getsnodepvars.F90 @@ -0,0 +1,69 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_getsnodepvars +! \label{noahmp401_getsnodepvars} +! +! !REVISION HISTORY: +! 27Feb2005: Sujay Kumar; Initial Specification +! 25Jun2006: Sujay Kumar: Updated for the ESMF design +! 02 Mar 2010: Sujay Kumar; Modified for Noah 3.1 +! 03OC2018: Yeosang Yoon; Modified for NoahMP 3.6 +! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 + +! !INTERFACE: +subroutine noahmp401_getsnodepvars(n, LSM_State) +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc + use LIS_logMod, only : LIS_verify + use noahmp401_lsmMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM_State +! +! !DESCRIPTION: +! +! Returns the snow related state prognostic variables for +! data assimilation +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[LSM\_State] ESMF State container for LSM state variables \newline +! \end{description} +! +!EOP + type(ESMF_Field) :: sweField + type(ESMF_Field) :: snodField + + integer :: t + integer :: status + real, pointer :: swe(:) + real, pointer :: snod(:) + + call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) + call LIS_verify(status) + call ESMF_StateGet(LSM_State,"Snowdepth",snodField,rc=status) + call LIS_verify(status) + + call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) + call LIS_verify(status) + call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) + call LIS_verify(status) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + swe(t) = noahmp401_struc(n)%noahmp401(t)%sneqv + snod(t) = noahmp401_struc(n)%noahmp401(t)%snowh + enddo +end subroutine noahmp401_getsnodepvars + diff --git a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_map_snodep.F90 b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_map_snodep.F90 new file mode 100644 index 000000000..7b08f8f1b --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_map_snodep.F90 @@ -0,0 +1,135 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_map_snodep +! \label{noahmp401_map_snodep} +! +! !REVISION HISTORY: +! 27Feb2005: Sujay Kumar; Initial Specification +! 25Jun2006: Sujay Kumar: Updated for the ESMF design +! 02 Mar 2010: Sujay Kumar; Modified for Noah 3.1 +! 21 Jul 2011: James Geiger; Modified for Noah 3.2 +! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 +! +! !INTERFACE: +subroutine noahmp401_map_snodep(n,k,OBS_State,LSM_Incr_State) +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc, LIS_surface + use LIS_constantsMod, only : LIS_CONST_TKFRZ + use LIS_logMod, only : LIS_logunit, LIS_verify + use LIS_lsmMod + use noahmp401_lsmMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + integer, intent(in) :: k + type(ESMF_State) :: OBS_State + type(ESMF_State) :: LSM_Incr_State +! !DESCRIPTION: +! +! This subroutine directly maps the observation state to the corresponding +! variables in the LSM state for SNODEP data assimilation. +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[OBS\_State] ESMF State for observations \newline +! \item[LSM\_State] ESMF State for LSM state variables \newline +! \end{description} +! +!EOP + type(ESMF_Field) :: sweIncrField + type(ESMF_Field) :: obs_snodep_field + real, pointer :: sweincr(:) + type(ESMF_Field) :: snodIncrField + real, pointer :: snodincr(:) + real :: tmpsneqv + real, pointer :: snodepobs(:) + integer :: t + integer :: status + integer :: obs_state_count + integer :: st_id, en_id + character*100,allocatable :: obs_state_objs(:) + real, allocatable :: noahmp401_swe(:) + real, allocatable :: noahmp401_snod(:) + real, allocatable :: snod(:) + + allocate(noahmp401_swe(LIS_rc%npatch(n,LIS_rc%lsm_index))) + allocate(noahmp401_snod(LIS_rc%npatch(n,LIS_rc%lsm_index))) + allocate(snod(LIS_rc%npatch(n,LIS_rc%lsm_index))) + + call ESMF_StateGet(LSM_Incr_State,"SWE",sweIncrField,rc=status) + call LIS_verify(status) + + call ESMF_FieldGet(sweIncrField,localDE=0,farrayPtr=sweincr,rc=status) + call LIS_verify(status) + + call ESMF_StateGet(LSM_Incr_State,"Snowdepth",snodincrField,rc=status) + call LIS_verify(status) + + call ESMF_FieldGet(snodincrField,localDE=0,farrayPtr=snodincr,rc=status) + call LIS_verify(status) + + call ESMF_StateGet(OBS_State,itemCount=obs_state_count,rc=status) + call LIS_verify(status) + allocate(obs_state_objs(obs_state_count)) + + call ESMF_StateGet(OBS_State,itemNameList=obs_state_objs,rc=status) + call LIS_verify(status) + + call ESMF_StateGet(OBS_State,obs_state_objs(1),obs_snodep_field,& + rc=status) + call LIS_verify(status) + call ESMF_FieldGet(obs_snodep_field,localDE=0,farrayPtr=snodepobs,rc=status) + call LIS_verify(status) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + noahmp401_swe(t) = noahmp401_struc(n)%noahmp401(t)%sneqv + noahmp401_snod(t) = noahmp401_struc(n)%noahmp401(t)%snowh + enddo + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + + call LIS_lsm_DAmapTileSpaceToObsSpace(n,k,t,st_id,en_id) + +! Assume here that st_id and en_id are the same and that we are +! working with an model grid finer than the observation grid + + if(snodepobs(st_id).ge.0) then + if(noahmp401_snod(t).gt.1e-6) then + tmpsneqv = noahmp401_swe(t)/noahmp401_snod(t) + else + tmpsneqv = 0.0 + endif + + snod(t) = snodepobs(st_id) + +! Based on SNODEP, we manually update SWE + if(snod(t).lt.2.54E-3) tmpsneqv = 0.0 + if(snod(t).ge.2.54E-3.and.tmpsneqv.lt.0.001) then + tmpsneqv = 0.20 + endif + sweincr(t) = tmpsneqv*snod(t) - noahmp401_swe(t) + snodincr(t) = snod(t) - noahmp401_snod(t) + else + sweincr(t) = 0 + snodincr(t) = 0 + endif + enddo +! stop + deallocate(obs_state_objs) + deallocate(noahmp401_swe) + deallocate(noahmp401_snod) + deallocate(snod) + +end subroutine noahmp401_map_snodep + diff --git a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_qc_snodepobs.F90 b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_qc_snodepobs.F90 new file mode 100755 index 000000000..a563d03e2 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_qc_snodepobs.F90 @@ -0,0 +1,105 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_qc_snodepobs +! \label{noahmp401_qc_snodepobs} +! +! !REVISION HISTORY: +! 27Feb2005: Sujay Kumar; Initial Specification +! 25Jun2006: Sujay Kumar: Updated for the ESMF design +! 02 Mar 2010: Sujay Kumar; Modified for Noah 3.1 +! 21 Jul 2011: James Geiger; Modified for Noah 3.2 +! 30 Jan 2015: Yuqiong Liu; added additional QC +! 03 Oct 2018: Yeosang Yoon; Modified for NoahMP 3.6 +! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 +! +! !INTERFACE: +subroutine noahmp401_qc_snodepobs(n,k,OBS_State) +! !USES: + use ESMF + use LIS_coreMod + use LIS_logMod, only : LIS_verify + use LIS_constantsMod, only : LIS_CONST_TKFRZ + use LIS_DAobservationsMod + use noahmp401_lsmMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + integer, intent(in) :: k + type(ESMF_State) :: OBS_State +! +! !DESCRIPTION: +! +! This subroutine performs any model-based QC of the observation +! prior to data assimilation. Here the snow observations +! are flagged when LSM indicates that (1) rain is falling (2) +! ground is fully or partially covered with snow. +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[OBS\_State] ESMF state container for observations \newline +! \end{description} +! +!EOP + type(ESMF_Field) :: obs_snow_field + + real, pointer :: snowobs(:) + integer :: t + integer :: gid + integer :: status + real :: stc1(LIS_rc%npatch(n,LIS_rc%lsm_index)) + real :: vegt(LIS_rc%npatch(n,LIS_rc%lsm_index)) + real :: fveg_obs(LIS_rc%obs_ngrid(k)) + real :: tv_obs(LIS_rc%obs_ngrid(k)) + real :: stc1_obs(LIS_rc%obs_ngrid(k)) + real :: vegt_obs(LIS_rc%obs_ngrid(k)) + + call ESMF_StateGet(OBS_State,"Observation01",obs_snow_field,rc=status) + call LIS_verify(status,& + "ESMF_StateGet failed in noahmp401_qc_snodepobs") + call ESMF_FieldGet(obs_snow_field,localDE=0,farrayPtr=snowobs,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet failed in noahmp401_qc_snodepobs") + + do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) + !stc1(t) = noahmp401_struc(n)%noahmp401(t)%sstc(1) ! get snow/veg temp. + stc1(t) = noahmp401_struc(n)%noahmp401(t)%tslb(1) ! get snow/veg temp. + vegt(t) = LIS_surface(n,1)%tile(t)%vegt + enddo + + call LIS_convertPatchSpaceToObsSpace(n,k,& + LIS_rc%lsm_index, noahmp401_struc(n)%noahmp401(:)%tv,tv_obs) !tv: vegetation temperature. unit: K + call LIS_convertPatchSpaceToObsSpace(n,k,LIS_rc%lsm_index, & !fveg: green vegetation fraction. unit: - + noahmp401_struc(n)%noahmp401(:)%fveg,fveg_obs) + + call LIS_convertPatchSpaceToObsSpace(n,k,& + LIS_rc%lsm_index,stc1,stc1_obs) + call LIS_convertPatchSpaceToObsSpace(n,k,& + LIS_rc%lsm_index,vegt,vegt_obs) + +! do t=1,LIS_rc%obs_ngrid(k) +! if(snowobs(t).ne.LIS_rc%udef) then +! if(fveg_obs(t).gt.0.7) then +! snowobs(t) = LIS_rc%udef +! ! elseif(vegt_obs(t).le.4) then !forest types +! ! snowobs(t) = LIS_rc%udef +! !assume that snow will not form at 5 deg. celcius or higher ground temp. +! elseif(tv_obs(t).ge.278.15) then +! snowobs(t) = LIS_rc%udef +! elseif(stc1_obs(t).ge.278.15) then +! snowobs(t) = LIS_rc%udef +! endif +! endif +! enddo + +end subroutine noahmp401_qc_snodepobs + diff --git a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_qcsnodep.F90 b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_qcsnodep.F90 new file mode 100644 index 000000000..c63b36e0f --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_qcsnodep.F90 @@ -0,0 +1,124 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_qcsnodep +! \label{noahmp401_qcsnow} +! +! !REVISION HISTORY: +! 27Feb2005: Sujay Kumar; Initial Specification +! 25Jun2006: Sujay Kumar: Updated for the ESMF design +! 02 Mar 2010: Sujay Kumar; Modified for Noah 3.1 +! 21 Jul 2011: James Geiger; Modified for Noah 3.2 +! 30 Jan 2015: Yuqiong Liu; added additional QC +! 03 Oct 2018: Yeosang Yoon; Modified for NoahMP 3.6 +! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 +! 09 Jan 2020: Yeosang Yoon; update QC +! +! !INTERFACE: +subroutine noahmp401_qcsnodep(n, LSM_State) + +! !USES: + use ESMF + use LIS_coreMod + use noahmp401_lsmMod + use LIS_logMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM_State +! +! !DESCRIPTION: +! +! QC's the related state prognostic variable objects for +! SNODEP data assimilation +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[LSM\_State] ESMF State container for LSM state variables \newline +! \end{description} +!EOP + type(ESMF_Field) :: sweField + type(ESMF_Field) :: snodField + integer :: t, gid + integer :: status + real, pointer :: swe(:) + real, pointer :: snod(:) + + real :: swemax,snodmax + real :: swemin,snodmin + + real :: sndens + logical :: update_flag(LIS_rc%ngrid(n)) + + call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) + call LIS_verify(status) + call ESMF_StateGet(LSM_State,"Snowdepth",snodField,rc=status) + call LIS_verify(status) + + call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) + call LIS_verify(status) + call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) + call LIS_verify(status) + + call ESMF_AttributeGet(sweField,"Max Value",swemax,rc=status) + call LIS_verify(status) + call ESMF_AttributeGet(sweField,"Min Value",swemin,rc=status) + call LIS_verify(status) + call ESMF_AttributeGet(snodField,"Max Value",snodmax,rc=status) + call LIS_verify(status) + call ESMF_AttributeGet(snodField,"Min Value",snodmin,rc=status) + call LIS_verify(status) + + update_flag = .true. + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + + gid = LIS_domain(n)%gindex(& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col,& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) + + if((snod(t).lt.snodmin) .or. swe(t).lt.swemin) then + update_flag(gid) = .false. + endif + + enddo + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + gid = LIS_domain(n)%gindex(& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col,& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) + +!Use the model's snow density from the previous timestep + sndens = 0.0 + if(noahmp401_struc(n)%noahmp401(t)%snowh.gt.0) then + sndens = noahmp401_struc(n)%noahmp401(t)%sneqv/noahmp401_struc(n)%noahmp401(t)%snowh + endif + +!If the update is unphysical, do not update. + if(update_flag(gid)) then + snod(t) = snod(t) + swe(t) = snod(t)*sndens + else ! do not update + snod(t) = noahmp401_struc(n)%noahmp401(t)%snowh + swe(t) = noahmp401_struc(n)%noahmp401(t)%sneqv + end if + + if(swe(t).gt.swemax) then + swe(t) = swemax + endif + if(snod(t).gt.snodmax) then + snod(t) = snodmax + endif + + end do + +end subroutine noahmp401_qcsnodep + diff --git a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_scale_snodep.F90 b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_scale_snodep.F90 new file mode 100644 index 000000000..f5e10c834 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_scale_snodep.F90 @@ -0,0 +1,72 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_scale_snodep +! \label{noahmp401_scale_snodep} +! +! !REVISION HISTORY: +! 27Feb2005: Sujay Kumar; Initial Specification +! 25Jun2006: Sujay Kumar: Updated for the ESMF design +! 02 Mar 2010: Sujay Kumar; Modified for Noah 3.1 +! 03 Oct 2018: Yeosang Yoon; Modified for NoahMP 3.6 +! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 +! +! !INTERFACE: +subroutine noahmp401_scale_snodep(n, LSM_State) + +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc + use noahmp401_lsmMod + use LIS_logMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM_State +! +! !DESCRIPTION: +! +! Returns the snow related state prognostic variables for +! data assimilation +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[LSM\_State] ESMF State container for LSM state variables \newline +! \end{description} +!EOP + + type(ESMF_Field) :: sweField + type(ESMF_Field) :: snodField + + integer :: t + integer :: status + real, pointer :: swe(:) + real, pointer :: snod(:) + +#if 0 + call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) + call LIS_verify(status) + call ESMF_StateGet(LSM_State,"Snowdepth",snodField,rc=status) + call LIS_verify(status) + + call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) + call LIS_verify(status) + call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) + call LIS_verify(status) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + swe(t) = swe(t)/1000.0 + enddo +#endif + +end subroutine noahmp401_scale_snodep + diff --git a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_setsnodepvars.F90 b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_setsnodepvars.F90 new file mode 100644 index 000000000..df7ce3975 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_setsnodepvars.F90 @@ -0,0 +1,111 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_setsnodepvars +! \label{noahmp401_setsnodepvars} +! +! !REVISION HISTORY: +! 15 Aug 2017: Sujay Kumar; Initial Specification +! 03 Oct 2018: Yeosang Yoon; Modified for NoahMP 3.6 +! +! 27Feb2005: Sujay Kumar; Initial Specification +! 25Jun2006: Sujay Kumar: Updated for the ESMF design +! 02 Mar 2010: Sujay Kumar; Modified for Noah 3.1 +! 21 Jul 2011: James Geiger; Modified for Noah 3.2 +! 03 Oct 2018: Yeosang Yoon; Modified for NoahMP 3.6 +! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 +! 10 Nov 2020: Eric Kemp; Added update to LIS_snow_struc +! +! !INTERFACE: +subroutine noahmp401_setsnodepvars(n, LSM_State) +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc, LIS_domain, LIS_surface + use LIS_logMod, only : LIS_logunit, LIS_verify + use LIS_snowMod, only : LIS_snow_struc + use noahmp401_lsmMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM_State +! +! !DESCRIPTION: +! +! This routine assigns the snow progognostic variables to noah's +! model space. The state vector consists of total SWE and snow depth. +! This routine also updates other model prognostics (snice, snliq, +! snow thickness, snow temperature) based on the update. +! +!EOP + type(ESMF_Field) :: sweField + type(ESMF_Field) :: snodField + real, pointer :: swe(:) + real, pointer :: snod(:) + real :: dsneqv,dsnowh + integer :: t + integer :: status + integer :: ncount(LIS_rc%ngrid(n)) + integer :: tid, gid + + call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) + call LIS_verify(status) + call ESMF_StateGet(LSM_State,"Snowdepth",snodField,rc=status) + call LIS_verify(status) + + call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) + call LIS_verify(status) + call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) + call LIS_verify(status) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + + dsneqv = swe(t) - noahmp401_struc(n)%noahmp401(t)%sneqv !in mm + dsnowh = snod(t) - noahmp401_struc(n)%noahmp401(t)%snowh !in m + + ! update + call noahmp401_snodep_update(n, t, dsneqv, dsnowh) + + enddo + + if (LIS_rc%snowsrc(n) .gt. 0) then + + ncount = 0 ! Number of tiles per grid id (over land) + LIS_snow_struc(n)%snowdepth = 0 ! At grid points + LIS_snow_struc(n)%sneqv = 0 ! At tiles + + ! Collect SWE at tiles + do t = 1, LIS_rc%npatch(n, LIS_rc%lsm_index) + tid = LIS_surface(n, LIS_rc%lsm_index)%tile(t)%tile_id + LIS_snow_struc(n)%sneqv(tid) = LIS_snow_struc(n)%sneqv(tid) + & + noahmp401_struc(n)%noahmp401(t)%sneqv + end do + + ! Collect mean snow depth at grid points + do t = 1, LIS_rc%npatch(n, LIS_rc%lsm_index) + gid = LIS_surface(n,LIS_rc%lsm_index)%tile(t)%index + LIS_snow_struc(n)%snowdepth(gid) = & + LIS_snow_struc(n)%snowdepth(gid) + & + noahmp401_struc(n)%noahmp401(t)%snowh + ncount(gid) = ncount(gid) + 1 + end do + do t = 1, LIS_rc%ngrid(n) + if (ncount(t).gt.0) then + LIS_snow_struc(n)%snowdepth(t) = & + LIS_snow_struc(n)%snowdepth(t) / ncount(t) + else + LIS_snow_struc(n)%snowdepth(t) = 0.0 + endif + end do + end if + +end subroutine noahmp401_setsnodepvars + + diff --git a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_snodep_update.F90 b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_snodep_update.F90 new file mode 100644 index 000000000..e8cff9847 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_snodep_update.F90 @@ -0,0 +1,355 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_snodep_update +! \label{noahmp401_snodep_update} +! +! !REVISION HISTORY: +! 13 Aug 2017: Sujay Kumar; Initial specification +! 14 Dec 2018: Yeosang Yoon; Modified code for NoahMP 4.0.1 +! +! !INTERFACE +subroutine noahmp401_snodep_update(n, t, dsneqv, dsnowh) + + use LIS_coreMod + use NoahMP401_lsmMod + USE MODULE_SF_NOAHMPLSM_401 + USE NOAHMP_TABLES_401 + + implicit none +! +! !DESCRIPTION: +! This subroutine updates relevant snow prognostics based +! on the update to the total SWE (dsneqv) and total +! snow depth (dsnowh). The updated variables include +! number of snow layers, snice, snliq, snow temperature +! and snow thickness. +! +! !ARGUMENTS: + integer, intent(in) :: n + integer, intent(in) :: t + real :: dsneqv !mm + real :: dsnowh !m +!EOP + + real, allocatable, dimension(:) :: zsoil + real, allocatable, dimension(:) :: ficeold + real, allocatable, dimension(:) :: snice + real, allocatable, dimension(:) :: snliq + real, allocatable, dimension(:) :: stc + real, allocatable, dimension(:) :: supercool + real, allocatable, dimension(:) :: mice + real, allocatable, dimension(:) :: mliq + real, allocatable, dimension(:) :: dzsnso + real, allocatable, dimension(:) :: zsnso + + integer, allocatable, dimension(:) :: imelt !phase change index + real, allocatable, dimension(:) :: sice + + integer :: snl_idx,i,j,iz + integer :: iloc, jloc ! needed, but not use + real :: smp,sneqv,snowh + real :: sneqv1,snowh1 + real :: ponding1,ponding2 + integer :: newnode + integer :: isnow, nsoil, nsnow, soiltype(4), isoil + +! local + real :: SNOFLOW, BDSNOW + type (noahmp_parameters) :: parameters + + isnow = noahmp401_struc(n)%noahmp401(t)%isnow + nsoil = noahmp401_struc(n)%nsoil + nsnow = noahmp401_struc(n)%nsnow + + allocate(ficeold(-nsnow+1:0)) + allocate(snice(-nsnow+1:0)) + allocate(snliq(-nsnow+1:0)) + allocate(stc(-nsnow+1:nsoil)) + allocate(imelt(-nsnow+1:nsoil)) + allocate(supercool(-nsnow+1:nsoil)) + allocate(mice(-nsnow+1:nsoil)) + allocate(mliq(-nsnow+1:nsoil)) + allocate(dzsnso(-nsnow+1:nsoil)) + allocate(zsnso(-nsnow+1:nsoil)) + allocate(sice(nsoil)) + + imelt = 0 + + !set empty snow layers to zero + do iz = -nsnow+1, isnow + snice(iz) = 0. + snliq(iz) = 0. + stc(iz) = 0. + dzsnso(iz)= 0. + zsnso(iz) = 0. + enddo + + ! initialize the variables + soiltype = noahmp401_struc(n)%noahmp401(t)%soiltype + do isoil = 1, size(soiltype) + parameters%BEXP(isoil) = BEXP_TABLE (SOILTYPE(isoil)) + parameters%PSISAT(isoil) = PSISAT_TABLE (SOILTYPE(isoil)) + parameters%SMCMAX(isoil) = SMCMAX_TABLE (SOILTYPE(isoil)) + end do + + sneqv = noahmp401_struc(n)%noahmp401(t)%sneqv + snowh = noahmp401_struc(n)%noahmp401(t)%snowh + + zsnso(-nsnow+1:nsoil) = noahmp401_struc(n)%noahmp401(t)%zss(1:nsnow+nsoil) + +! snow/soil layer thickness (m) + do iz = isnow+1, nsoil + if(iz == isnow+1) then + dzsnso(iz) = - zsnso(iz) + else + dzsnso(iz) = zsnso(iz-1) - zsnso(iz) + end if + end do + + ! set ZSOIL + allocate(zsoil(nsoil)) + ! zsoil is negative. + zsoil(1) = -NOAHMP401_struc(n)%sldpth(1) + do i = 2, nsoil + zsoil(i) = zsoil(i-1) - NOAHMP401_struc(n)%sldpth(i) + enddo + + + ! state variables + snice(-nsnow+1:0) = & + NOAHMP401_struc(n)%noahmp401(t)%snowice(1:nsnow) + snliq(-nsnow+1:0) = & + NOAHMP401_struc(n)%noahmp401(t)%snowliq(1:nsnow) + stc(-nsnow+1:0) = & + NOAHMP401_struc(n)%noahmp401(t)%tsno(1:nsnow) + ! soil temperature + stc(1:nsoil) = & + NOAHMP401_struc(n)%noahmp401(t)%tslb(1:nsoil) + + + ! from snowfall routine + ! creating a new layer + IF(ISNOW == 0.and.(dsneqv.gt.0.and.dsnowh.gt.0)) THEN + SNOWH = SNOWH + dsnowh + SNEQV = SNEQV + dsneqv + END IF + + NEWNODE = 0 + + IF(ISNOW == 0 .AND. SNOWH >= 0.025.and.& + (dsneqv.gt.0.and.dsnowh.gt.0)) THEN !MB: change limit + ISNOW = -1 + NEWNODE = 1 + DZSNSO(0)= SNOWH + SNOWH = 0. + STC(0) = MIN(273.16, NOAHMP401_struc(n)%noahmp401(t)%sfctmp) ! temporary setup + SNICE(0) = SNEQV + SNLIQ(0) = 0. + END IF + + ! snow with layers + IF(ISNOW < 0 .AND. NEWNODE == 0 .and. & + (dsneqv.gt.0.and.dsnowh.gt.0)) then + SNICE(ISNOW+1) = SNICE(ISNOW+1) + dsneqv + DZSNSO(ISNOW+1) = DZSNSO(ISNOW+1) + dsnowh + ENDIF + + if(dsneqv.lt.0.and.dsnowh.lt.0) then + snowh1 = snowh + dsnowh + sneqv1 = sneqv + dsneqv + if(snowh1.ge.0.and.sneqv1.ge.0) then + SNOWH = SNOWH + dsnowh + SNEQV = SNEQV + dsneqv +! Update dzsnso +! how do you determine the thickness of a layer? + if(snowh.le.dzsnso(0)) then + isnow = 0 + dzsnso(-nsnow+1:(isnow-1)) = 0 + dzsnso(isnow) = snowh + elseif(snowh.le.(dzsnso(0)+dzsnso(-1))) then + isnow = -1 + dzsnso(-nsnow+1:(isnow-1)) = 0 + dzsnso(isnow) = snowh -dzsnso(isnow+1) + elseif(snowh.le.(dzsnso(0)+dzsnso(-1)+dzsnso(-2))) then + isnow = -2 + dzsnso(-nsnow+1:(isnow-2)) = 0 + dzsnso(isnow) = snowh -dzsnso(isnow+2) + endif + endif + endif + + ! ice fraction at the last timestep, add check for both snice and snliq are 0.0 + do snl_idx=isnow+1,0 + if(snice(snl_idx)+snliq(snl_idx)>0.0) then + ficeold(snl_idx) = snice(snl_idx) / (snice(snl_idx)+snliq(snl_idx)) + else + ficeold(snl_idx) = 0.0 + endif + enddo + + sice(:) = max(0.0, NOAHMP401_struc(n)%noahmp401(t)%smc(:)& + - NOAHMP401_struc(n)%noahmp401(t)%sh2o(:)) + + !imelt + do j = -nsnow+1, nsoil + supercool(j) = 0.0 + end do + + do j = isnow+1,0 ! all layers + mice(j) = snice(j) + mliq(j) = snliq(j) + end do + + do j = 1, nsoil ! soil + mliq(j) = NOAHMP401_struc(n)%noahmp401(t)%sh2o(j) * dzsnso(j) * 1000. + mice(j) = (NOAHMP401_struc(n)%noahmp401(t)%smc(j) - & + NOAHMP401_struc(n)%noahmp401(t)%sh2o(j)) * dzsnso(j) * 1000. + end do + + do j = isnow+1,nsoil ! all layers + imelt(j) = 0 + enddo + + do j = 1,nsoil +! if (opt_frz == 1) then +! Assuming the use of option 1 for now + if(stc(j) < tfrz) then + smp = hfus*(tfrz-stc(j))/(grav*stc(j)) !(m) + SUPERCOOL(J) = parameters%SMCMAX(J)*(SMP/parameters%PSISAT(J))**(-1./parameters%BEXP(J)) + SUPERCOOL(J) = SUPERCOOL(J)*DZSNSO(J)*1000. !(mm) + end if +! end if +! if (opt_frz == 2) then +! call frh2o (supercool(j),& +! NOAHMP401_struc(n)%noahmp401(t)%sstc(j),& +! NOAHMP401_struc(n)%noahmp401(t)%smc(j),& +! NOAHMP401_struc(n)%noahmp401(t)%sh2o(j)) +! supercool(j) = supercool(j)*dzsnso(j)*1000. !(mm) +! end if + enddo + + do j = isnow+1,nsoil + if (mice(j) > 0. .and. stc(j) >= tfrz) then !melting + imelt(j) = 1 + endif + if (mliq(j) > supercool(j) .and. stc(j) < tfrz) then + imelt(j) = 2 + endif + + ! If snow exists, but its thickness is not enough to create a layer + if (isnow == 0 & + .and. sneqv > 0. .and. j == 1) then + if (stc(j) >= tfrz) then + imelt(j) = 1 + endif + endif + enddo + + ! from SNOWWATER + SNOFLOW = 0.0 + ponding1 = 0.0 + ponding2 = 0.0 + + if(isnow < 0) & ! when multi-layer + call compact (parameters, nsnow, nsoil, noahmp401_struc(n)%ts, & !in + stc, snice, snliq, zsoil, imelt, ficeold, iloc, jloc, & !in + isnow, dzsnso ,zsnso) !inout + if(isnow < 0) & + call combine (parameters, nsnow, nsoil ,iloc, jloc, & !in + isnow, noahmp401_struc(n)%noahmp401(t)%sh2o, & !inout + stc, snice, snliq, dzsnso, sice, snowh, sneqv, & !inout + ponding1, ponding2) !out + if(isnow < 0) & + call divide (parameters, nsnow, nsoil, & !in + isnow, stc, snice, snliq, dzsnso) !inout + + !set empty snow layers to zero + do iz = -nsnow+1, isnow + snice(iz) = 0. + snliq(iz) = 0. + stc(iz) = 0. + dzsnso(iz)= 0. + zsnso(iz) = 0. + enddo + + !to obtain equilibrium state of snow in glacier region + IF(SNEQV > 2000.) THEN ! 2000 mm -> maximum water depth + BDSNOW = SNICE(0) / DZSNSO(0) + SNOFLOW = (SNEQV - 2000.) + SNICE(0) = SNICE(0) - SNOFLOW + DZSNSO(0) = DZSNSO(0) - SNOFLOW/BDSNOW + !SNOFLOW = SNOFLOW / DT + END IF + + ! sum up snow mass for layered snow + IF(ISNOW < 0) THEN ! MB: only do for multi-layer + SNEQV = 0. + SNOWH = 0. ! Yeosang Yoon + DO IZ = ISNOW+1,0 + SNEQV = SNEQV + SNICE(IZ) + SNLIQ(IZ) + SNOWH = SNOWH + DZSNSO(IZ) ! Yeosang Yoon + ENDDO + END IF + + ! Yeosag Yoon, no snow layer case, limit snow density to 1000 + IF (ISNOW == 0 .AND. SNEQV > 0. .AND. SNOWH > 0.) THEN + BDSNOW = SNEQV/SNOWH + IF (BDSNOW >= DENH2O) THEN + SNOWH = SNOWH*(BDSNOW/1000.) ! change unit, SNEQV=[mm] SNOWH=[m] + END IF + END IF + + ! Reset ZSNSO and layer thinkness DZSNSO + DO IZ = ISNOW+1, 0 + DZSNSO(IZ) = -DZSNSO(IZ) + END DO + + DZSNSO(1) = ZSOIL(1) + DO IZ = 2,NSOIL + DZSNSO(IZ) = (ZSOIL(IZ) - ZSOIL(IZ-1)) + END DO + + ZSNSO(ISNOW+1) = DZSNSO(ISNOW+1) + DO IZ = ISNOW+2 ,NSOIL + ZSNSO(IZ) = ZSNSO(IZ-1) + DZSNSO(IZ) + ENDDO + + DO IZ = ISNOW+1 ,NSOIL + DZSNSO(IZ) = -DZSNSO(IZ) + END DO + + ! update state vars + noahmp401_struc(n)%noahmp401(t)%isnow = isnow + noahmp401_struc(n)%noahmp401(t)%sneqv = sneqv + noahmp401_struc(n)%noahmp401(t)%snowh = snowh + + NOAHMP401_struc(n)%noahmp401(t)%zss(1:nsnow+& + nsoil) = zsnso(-nsnow+1:nsoil) + NOAHMP401_struc(n)%noahmp401(t)%snowice(1:nsnow) = & + snice(-nsnow+1:0) + NOAHMP401_struc(n)%noahmp401(t)%snowliq(1:nsnow) = & + snliq(-nsnow+1:0) + NOAHMP401_struc(n)%noahmp401(t)%tsno(1:nsnow) = stc(-nsnow+1:0) + NOAHMP401_struc(n)%noahmp401(t)%tslb(1:nsoil) = stc(1:nsoil) + + deallocate(ficeold) + deallocate(snice) + deallocate(snliq) + deallocate(stc) + deallocate(imelt) + deallocate(supercool) + deallocate(mice) + deallocate(mliq) + deallocate(dzsnso) + deallocate(zsnso) + deallocate(sice) + +end subroutine noahmp401_snodep_update diff --git a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_transform_snodep.F90 b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_transform_snodep.F90 new file mode 100755 index 000000000..f7796c12f --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_transform_snodep.F90 @@ -0,0 +1,74 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_transform_snodep +! \label{noahmp401_transform_snodep} +! +! !REVISION HISTORY: +! 25Jun2006: Sujay Kumar: Initial Specification +! 02 Mar 2010: Sujay Kumar; Modified for Noah 3.1 +! 21 Jul 2011: James Geiger; Modified for Noah 3.2 +! 03 Oct 2018; Yeosang Yoon; Modified for NoahMP 3.6 +! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 +! +! !INTERFACE: +subroutine noahmp401_transform_snodep(n,OBS_State) + +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc + use LIS_logMod, only : LIS_verify + use noahmp401_lsmMod + use SNODEPobs_Mod, only : SNODEP_obs_obj +!EOP + implicit none + + integer, intent(in) :: n + type(ESMF_State) :: OBS_State +! +! !DESCRIPTION: +! +! This subroutine transforms the SNODEP state +! (mm) to the lsm state +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[OBS\_State] ESMF state container for observations \newline +! \end{description} +!EOP + type(ESMF_Field) :: obs_snodep_field + real, pointer :: snodepobs(:) + integer :: t + integer :: N_obs_size + integer :: status + + call ESMF_AttributeGet(OBS_State,name="Number Of Observations",& + value=N_obs_size,rc=status) + call LIS_verify(status, 'attributeget error in noahmp401_transform_snodep') + call ESMF_StateGet(OBS_State,"Observation01",obs_snodep_field,& + rc=status) + call LIS_verify(status,'stateget error in noahmp401_transform_snodep') + call ESMF_FieldGet(obs_snodep_field,localDE=0,farrayPtr=snodepobs,rc=status) + call LIS_verify(status,'fieldget error in noahmp401_transform_snodep') + + ! If using 8th mesh SNODEP data, convert it from inches to meters. + ! 16th mesh SNODEP data are already in meters. + if ( SNODEP_obs_obj(n)%mesh == 8 ) then + do t=1,N_obs_size + if(snodepobs(t).ne.LIS_rc%udef) then + if(snodepobs(t).gt.408.0) then + snodepobs(t) = 0.0 + endif + snodepobs(t) = snodepobs(t)*2.54E-2 !inches to meters + endif + enddo + endif +end subroutine noahmp401_transform_snodep diff --git a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_updatesnodepvars.F90 b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_updatesnodepvars.F90 new file mode 100644 index 000000000..3a41edc43 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_updatesnodepvars.F90 @@ -0,0 +1,173 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_updatesnodepvars +! \label{noahmp401_updatesnodepvars} +! +! !REVISION HISTORY: +! 27Feb2005: Sujay Kumar; Initial Specification +! 25Jun2006: Sujay Kumar: Updated for the ESMF design +! 02 Mar 2010: Sujay Kumar; Modified for Noah 3.1 +! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 +! 09 Jan 2020: Yeosang Yoon; Updated QC +! +! !INTERFACE: +subroutine noahmp401_updatesnodepvars(n, LSM_State, LSM_Incr_State) +! !USES: + use ESMF + use LIS_coreMod + use noahmp401_lsmMod + use LIS_logMod, only : LIS_logunit, LIS_verify + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM_State + type(ESMF_State) :: LSM_Incr_State +! +! !DESCRIPTION: +! +! Returns the snow related state prognostic variables for +! data assimilation +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[LSM\_State] ESMF State container for LSM state variables \newline +! \item[LSM\_Incr\_State] ESMF State container for LSM state increments \newline +! \end{description} +! +!EOP + + type(ESMF_Field) :: sweField, sweIncrField + type(ESMF_Field) :: snodField, snodIncrField + + integer :: t, gid + integer :: status + real, pointer :: swe(:), sweincr(:) + real, pointer :: snod(:), snodincr(:) + real :: swetmp, snodtmp,sndens + logical :: update_flag(LIS_rc%ngrid(n)) + real :: perc_violation(LIS_rc%ngrid(n)) + + real :: snodmean(LIS_rc%ngrid(n)) + integer :: nsnodmean(LIS_rc%ngrid(n)) + + call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) + call LIS_verify(status) + call ESMF_StateGet(LSM_State,"Snowdepth",snodField,rc=status) + call LIS_verify(status) + + call ESMF_StateGet(LSM_Incr_State,"SWE",sweIncrField,rc=status) + call LIS_verify(status) + call ESMF_StateGet(LSM_Incr_State,"Snowdepth",snodIncrField,rc=status) + call LIS_verify(status) + + + call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) + call LIS_verify(status) + call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) + call LIS_verify(status) + + call ESMF_FieldGet(sweIncrField,localDE=0,farrayPtr=sweincr,rc=status) + call LIS_verify(status) + call ESMF_FieldGet(snodIncrField,localDE=0,farrayPtr=snodincr,rc=status) + call LIS_verify(status) + + update_flag = .true. + perc_violation = 0.0 + snodmean = 0.0 + nsnodmean = 0 + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + + gid = LIS_domain(n)%gindex(& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col,& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) + + swetmp = swe(t) + sweincr(t) + snodtmp = snod(t) + snodincr(t) + + if((snodtmp.lt.0 .or. swetmp.lt.0)) then + update_flag(gid) = .false. + perc_violation(gid) = perc_violation(gid) +1 + endif + + enddo + + do gid=1,LIS_rc%ngrid(n) + perc_violation(gid) = perc_violation(gid) / real(LIS_rc%nensem(n)) + enddo + +! For ensembles that are unphysical, compute the ensemble average after excluding them. This +! is done only if the majority of the ensemble members are good (>80%) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + + gid = LIS_domain(n)%gindex(& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col,& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) + + if(.not.update_flag(gid)) then ! false + if(perc_violation(gid).lt.0.2) then + if(snod(t)+snodincr(t).ge.0) then + snodmean(gid) = snodmean(gid) + snod(t)+snodincr(t) + nsnodmean(gid) = nsnodmean(gid) + 1 + else + snodmean(gid) = 0.0 + endif + endif + endif + enddo + + do gid=1,LIS_rc%ngrid(n) + if(nsnodmean(gid).gt.0) then + snodmean(gid) = snodmean(gid) / real(nsnodmean(gid)) + endif + enddo + +! If the update is unphysical, simply set to the average of +! the good ensemble members. If all else fails, do not update. + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + gid = LIS_domain(n)%gindex(& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col,& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) + + + snodtmp = snod(t) + snodincr(t) + swetmp = swe(t) + sweincr(t) + +!Use the model's snow density from the previous timestep + sndens = 0.0 + if(noahmp401_struc(n)%noahmp401(t)%snowh.gt.0) then + sndens = noahmp401_struc(n)%noahmp401(t)%sneqv/noahmp401_struc(n)%noahmp401(t)%snowh + endif + + if(update_flag(gid)) then + snod(t) = snodtmp + swe(t) = swetmp + elseif(perc_violation(gid).lt.0.2) then + if(snodtmp.lt.0.0) then ! average of the good ensemble members + snod(t) = snodmean(gid) + swe(t) = snodmean(gid)*sndens + else + snod(t) = snodtmp + swe(t) = swetmp + endif + else ! do not update + snod(t) = noahmp401_struc(n)%noahmp401(t)%snowh + swe(t) = noahmp401_struc(n)%noahmp401(t)%sneqv + end if + + enddo + +end subroutine noahmp401_updatesnodepvars + diff --git a/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_dasnow_Mod.F90 b/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_dasnow_Mod.F90 new file mode 100755 index 000000000..0c869bd91 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_dasnow_Mod.F90 @@ -0,0 +1,49 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +#include "LIS_misc.h" +module noahmp401_dasnow_Mod +!BOP +! +! !MODULE: noahmp401_dasnow_Mod +! +! !DESCRIPTION: +! +! !REVISION HISTORY: +! +! !USES: + + implicit none + + PRIVATE +!----------------------------------------------------------------------------- +! !PUBLIC MEMBER FUNCTIONS: +!----------------------------------------------------------------------------- + public :: noahmp401_dasnow_init +!----------------------------------------------------------------------------- +! !PUBLIC TYPES: +!----------------------------------------------------------------------------- +!EOP + + SAVE +contains +!BOP +! +! !ROUTINE: noahmp401_dasnow_init +! \label{noahmp401_dasnow_init} +! +! !INTERFACE: + subroutine noahmp401_dasnow_init() +! !USES: +! !DESCRIPTION: +! +!EOP + implicit none + end subroutine noahmp401_dasnow_init +end module noahmp401_dasnow_Mod diff --git a/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_descale_snow.F90 b/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_descale_snow.F90 new file mode 100755 index 000000000..9a363f08d --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_descale_snow.F90 @@ -0,0 +1,59 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_descale_snow +! \label{noahmp401_descale_snow} +! +! !REVISION HISTORY: +! 27Feb2005: Sujay Kumar; Initial Specification +! 25Jun2006: Sujay Kumar: Updated for the ESMF design +! 02 Mar 2010: Sujay Kumar; Modified for Noah 3.1 +! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 and SNODEP +! 15 May 2019: Yeosang Yoon; Modified for NoahMP 4.0.1 and LDTSI +! 13 Dec 2019: Eric Kemp; Replaced LDTSI with SNOW +! +! !INTERFACE: +subroutine noahmp401_descale_snow(n, LSM_State, LSM_Incr_State) + +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc + use noahmp401_lsmMod + use LIS_logMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM_State + type(ESMF_State) :: LSM_Incr_State +! +! !DESCRIPTION: +! +! Returns the snow related state prognostic variables for +! data assimilation +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[LSM\_State] ESMF State container for LSM state variables \newline +! \end{description} +!EOP + + type(ESMF_Field) :: sweField + type(ESMF_Field) :: snodField + + integer :: t + integer :: status + real, pointer :: swe(:) + real, pointer :: snod(:) + + +end subroutine noahmp401_descale_snow + diff --git a/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_getsnowpred.F90 b/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_getsnowpred.F90 new file mode 100755 index 000000000..6fa842c3c --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_getsnowpred.F90 @@ -0,0 +1,59 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_getsnowpred +! \label{noahmp401_getsnowpred} +! +! !REVISION HISTORY: +! 27Feb2005: Sujay Kumar; Initial Specification +! 25Jun2006: Sujay Kumar: Updated for the ESMF design +! 02 Mar 2010: Sujay Kumar; Modified for Noah 3.1 +! 01 May 2014: Yuqiong Liu; modifed to include mesh8, mesh16, and 0p25 SNODEP data +! 24 May 2017: Yeosang Yoon: updated the file to work with the DA observation +! space updates. +! 03 Oct 2018: Yeosang Yoon; Modified for NoahMP 3.6 +! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 and SNODEP +! 15 May 2019: Yeosang Yoon; Modified for NoahMP 4.0.1 and LDTSI +! 13 Dec 2019: Eric Kemp; Replaced LDTSI with SNOW +! +! !INTERFACE: +subroutine noahmp401_getsnowpred(n, k, obs_pred) + +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc,LIS_surface + use noahmp401_lsmMod + use LIS_DAobservationsMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + integer, intent(in) :: k + real :: obs_pred(LIS_rc%ngrid(n),LIS_rc%nensem(n)) + real :: snwd(LIS_rc%npatch(n,LIS_rc%lsm_index)) +!EOP + +! !DESCRIPTION: +! This routine computes the obspred ('Hx') term for SNOW DA assimilation +! instances. + + integer :: t + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + snwd(t) = noahmp401_struc(n)%noahmp401(t)%snowh ! Keep in meters + enddo + + call LIS_convertPatchSpaceToObsEnsSpace(n,k,& + LIS_rc%lsm_index, & + snwd,& + obs_pred) + +end subroutine noahmp401_getsnowpred + diff --git a/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_getsnowvars.F90 b/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_getsnowvars.F90 new file mode 100755 index 000000000..50e2ca540 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_getsnowvars.F90 @@ -0,0 +1,72 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_getsnowvars +! \label{noahmp401_getsnowvars} +! +! !REVISION HISTORY: +! 27Feb2005: Sujay Kumar; Initial Specification +! 25Jun2006: Sujay Kumar: Updated for the ESMF design +! 02 Mar 2010: Sujay Kumar; Modified for Noah 3.1 +! 03OC2018: Yeosang Yoon; Modified for NoahMP 3.6 +! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 and SNODEP +! 15 May 2019: Yeosang Yoon; Modified for NoahMP 4.0.1 and LDTSI +! 13 Dec 2019: Eric Kemp; Replaced LDTSI with SNOW +! +! !INTERFACE: +! +subroutine noahmp401_getsnowvars(n, LSM_State) +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc + use LIS_logMod, only : LIS_verify + use noahmp401_lsmMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM_State +! +! !DESCRIPTION: +! +! Returns the snow related state prognostic variables for +! data assimilation +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[LSM\_State] ESMF State container for LSM state variables \newline +! \end{description} +! +!EOP + type(ESMF_Field) :: sweField + type(ESMF_Field) :: snodField + + integer :: t + integer :: status + real, pointer :: swe(:) + real, pointer :: snod(:) + + call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) + call LIS_verify(status) + call ESMF_StateGet(LSM_State,"Snowdepth",snodField,rc=status) + call LIS_verify(status) + + call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) + call LIS_verify(status) + call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) + call LIS_verify(status) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + swe(t) = noahmp401_struc(n)%noahmp401(t)%sneqv + snod(t) = noahmp401_struc(n)%noahmp401(t)%snowh + enddo +end subroutine noahmp401_getsnowvars + diff --git a/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_getswepred.F90 b/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_getswepred.F90 new file mode 100644 index 000000000..5ffb0c359 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_getswepred.F90 @@ -0,0 +1,48 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_getswepred +! \label{noahmp401_getswepred} +! +! !REVISION HISTORY: +! 27Feb2005: Sujay Kumar; Initial Specification +! 25Jun2006: Sujay Kumar: Updated for the ESMF design +! 02 Mar 2010: Sujay Kumar; Modified for Noah 3.1 +! +! !INTERFACE: +subroutine noahmp401_getswepred(n, k, obs_pred) + +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc,LIS_surface + use noahmp401_lsmMod + use LIS_DAobservationsMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + integer, intent(in) :: k + real :: obs_pred(LIS_rc%ngrid(n),LIS_rc%nensem(n)) + real :: swe(LIS_rc%npatch(n,LIS_rc%lsm_index)) +!EOP + + integer :: t + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + swe(t) = noahmp401_struc(n)%noahmp401(t)%sneqv !obs in mm + enddo + + call LIS_convertPatchSpaceToObsEnsSpace(n,k,& + LIS_rc%lsm_index, & + swe,& + obs_pred) + +end subroutine noahmp401_getswepred + diff --git a/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_qc_snowobs.F90 b/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_qc_snowobs.F90 new file mode 100755 index 000000000..4849d1b66 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_qc_snowobs.F90 @@ -0,0 +1,109 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_qc_snowobs +! \label{noahmp401_qc_snowobs} +! +! !REVISION HISTORY: +! 27Feb2005: Sujay Kumar; Initial Specification +! 25Jun2006: Sujay Kumar: Updated for the ESMF design +! 02 Mar 2010: Sujay Kumar; Modified for Noah 3.1 +! 21 Jul 2011: James Geiger; Modified for Noah 3.2 +! 30 Jan 2015: Yuqiong Liu; added additional QC +! 03 Oct 2018: Yeosang Yoon; Modified for NoahMP 3.6 +! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 +! 15 May 2019: Yeosang Yoon; Modified for NoahMP 4.0.1 and LDTSI +! 13 Dec 2019: Eric Kemp; Replaced LDTSI with SNOW +! +! !INTERFACE: +subroutine noahmp401_qc_snowobs(n,k,OBS_State) +! !USES: + use ESMF + use LIS_coreMod + use LIS_logMod, only : LIS_verify + use LIS_constantsMod, only : LIS_CONST_TKFRZ + use LIS_DAobservationsMod + use noahmp401_lsmMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + integer, intent(in) :: k + type(ESMF_State) :: OBS_State +! +! !DESCRIPTION: +! +! This subroutine performs any model-based QC of the observation +! prior to data assimilation. Here the snow observations +! are flagged when LSM indicates that (1) rain is falling (2) +! ground is fully or partially covered with snow. +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[OBS\_State] ESMF state container for observations \newline +! \end{description} +! +!EOP + type(ESMF_Field) :: obs_snow_field + + real, pointer :: snowobs(:) + integer :: t + integer :: gid + integer :: status + real :: stc1(LIS_rc%npatch(n,LIS_rc%lsm_index)) + real :: vegt(LIS_rc%npatch(n,LIS_rc%lsm_index)) + real :: fveg_obs(LIS_rc%obs_ngrid(k)) + real :: tv_obs(LIS_rc%obs_ngrid(k)) + real :: stc1_obs(LIS_rc%obs_ngrid(k)) + real :: vegt_obs(LIS_rc%obs_ngrid(k)) + + call ESMF_StateGet(OBS_State,"Observation01",obs_snow_field,rc=status) + call LIS_verify(status,& + "ESMF_StateGet failed in noahmp401_qc_snowobs") + call ESMF_FieldGet(obs_snow_field,localDE=0,farrayPtr=snowobs,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet failed in noahmp401_qc_snowobs") + + do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) + !stc1(t) = noahmp401_struc(n)%noahmp401(t)%sstc(1) ! get snow/veg temp. + stc1(t) = noahmp401_struc(n)%noahmp401(t)%tslb(1) ! get snow/veg temp. + vegt(t) = LIS_surface(n,1)%tile(t)%vegt + enddo + + call LIS_convertPatchSpaceToObsSpace(n,k,& + LIS_rc%lsm_index, noahmp401_struc(n)%noahmp401(:)%tv,tv_obs) !tv: vegetation temperature. unit: K + call LIS_convertPatchSpaceToObsSpace(n,k,LIS_rc%lsm_index, & !fveg: green vegetation fraction. unit: - + noahmp401_struc(n)%noahmp401(:)%fveg,fveg_obs) + + call LIS_convertPatchSpaceToObsSpace(n,k,& + LIS_rc%lsm_index,stc1,stc1_obs) + call LIS_convertPatchSpaceToObsSpace(n,k,& + LIS_rc%lsm_index,vegt,vegt_obs) + + do t=1,LIS_rc%obs_ngrid(k) + if(snowobs(t).ne.LIS_rc%udef) then + if(fveg_obs(t).gt.0.7) then + snowobs(t) = LIS_rc%udef + elseif(vegt_obs(t).le.4) then !forest types + snowobs(t) = LIS_rc%udef + elseif(vegt_obs(t).eq.LIS_rc%glacierclass) then !TML: Eliminate Glaciers + snowobs(t) = LIS_rc%udef +!assume that snow will not form at 5 deg. celcius or higher ground temp. + elseif(tv_obs(t).ge.278.15) then + snowobs(t) = LIS_rc%udef + elseif(stc1_obs(t).ge.278.15) then + snowobs(t) = LIS_rc%udef + endif + endif + enddo + +end subroutine noahmp401_qc_snowobs + diff --git a/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_qcsnow.F90 b/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_qcsnow.F90 new file mode 100755 index 000000000..fe465f285 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_qcsnow.F90 @@ -0,0 +1,126 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_qcsnow +! \label{noahmp401_qcsnow} +! +! !REVISION HISTORY: +! 27Feb2005: Sujay Kumar; Initial Specification +! 25Jun2006: Sujay Kumar: Updated for the ESMF design +! 02 Mar 2010: Sujay Kumar; Modified for Noah 3.1 +! 21 Jul 2011: James Geiger; Modified for Noah 3.2 +! 30 Jan 2015: Yuqiong Liu; added additional QC +! 03 Oct 2018: Yeosang Yoon; Modified for NoahMP 3.6 +! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 and SNODEP +! 15 May 2019: Yeosang Yoon; Modified for NoahMP 4.0.1 and LDTSI +! 13 Dec 2019: Eric Kemp; Replaced LDTSI with SNOW +! 09 Jan 2020: Yeosang Yoon; update QC +! +! !INTERFACE: +subroutine noahmp401_qcsnow(n, LSM_State) + +! !USES: + use ESMF + use LIS_coreMod + use noahmp401_lsmMod + use LIS_logMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM_State +! +! !DESCRIPTION: +! +! QC's the related state prognostic variable objects for +! SNOW data assimilation +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[LSM\_State] ESMF State container for LSM state variables \newline +! \end{description} +!EOP + type(ESMF_Field) :: sweField + type(ESMF_Field) :: snodField + integer :: t, gid + integer :: status + real, pointer :: swe(:) + real, pointer :: snod(:) + + real :: swemax,snodmax + real :: swemin,snodmin + + real :: sndens + logical :: update_flag(LIS_rc%ngrid(n)) + + call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) + call LIS_verify(status) + call ESMF_StateGet(LSM_State,"Snowdepth",snodField,rc=status) + call LIS_verify(status) + + call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) + call LIS_verify(status) + call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) + call LIS_verify(status) + + call ESMF_AttributeGet(sweField,"Max Value",swemax,rc=status) + call LIS_verify(status) + call ESMF_AttributeGet(sweField,"Min Value",swemin,rc=status) + call LIS_verify(status) + call ESMF_AttributeGet(snodField,"Max Value",snodmax,rc=status) + call LIS_verify(status) + call ESMF_AttributeGet(snodField,"Min Value",snodmin,rc=status) + call LIS_verify(status) + + update_flag = .true. + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + + gid = LIS_domain(n)%gindex(& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col,& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) + + if((snod(t).lt.snodmin) .or. swe(t).lt.swemin) then + update_flag(gid) = .false. + endif + + enddo + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + gid = LIS_domain(n)%gindex(& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col,& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) + +!Use the model's snow density from the previous timestep + sndens = 0.0 + if(noahmp401_struc(n)%noahmp401(t)%snowh.gt.0) then + sndens = noahmp401_struc(n)%noahmp401(t)%sneqv/noahmp401_struc(n)%noahmp401(t)%snowh + endif + +!If the update is unphysical, do not update. + if(update_flag(gid)) then + snod(t) = snod(t) + swe(t) = snod(t)*sndens + else ! do not update + snod(t) = noahmp401_struc(n)%noahmp401(t)%snowh + swe(t) = noahmp401_struc(n)%noahmp401(t)%sneqv + end if + + if(swe(t).gt.swemax) then + swe(t) = swemax + endif + if(snod(t).gt.snodmax) then + snod(t) = snodmax + endif + + end do + +end subroutine noahmp401_qcsnow + diff --git a/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_scale_snow.F90 b/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_scale_snow.F90 new file mode 100755 index 000000000..2165f3a84 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_scale_snow.F90 @@ -0,0 +1,58 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_scale_snow +! \label{noahmp401_scale_snow} +! +! !REVISION HISTORY: +! 27Feb2005: Sujay Kumar; Initial Specification +! 25Jun2006: Sujay Kumar: Updated for the ESMF design +! 02 Mar 2010: Sujay Kumar; Modified for Noah 3.1 +! 03 Oct 2018: Yeosang Yoon; Modified for NoahMP 3.6 +! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 and SNODEP +! 15 May 2019: Yeosang Yoon; Modified for NoahMP 4.0.1 and LDTSI +! 13 Dec 2019: Eric Kemp; Replaced LDTSI with SNOW +! +! !INTERFACE: +subroutine noahmp401_scale_snow(n, LSM_State) + +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc + use noahmp401_lsmMod + use LIS_logMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM_State +! +! !DESCRIPTION: +! +! Returns the snow related state prognostic variables for +! data assimilation +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[LSM\_State] ESMF State container for LSM state variables \newline +! \end{description} +!EOP + + type(ESMF_Field) :: sweField + type(ESMF_Field) :: snodField + + integer :: t + integer :: status + real, pointer :: swe(:) + real, pointer :: snod(:) + +end subroutine noahmp401_scale_snow + diff --git a/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_setsnowvars.F90 b/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_setsnowvars.F90 new file mode 100755 index 000000000..b40e85c5b --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_setsnowvars.F90 @@ -0,0 +1,78 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_setsnowvars +! \label{noahmp401_setsnowvars} +! +! !REVISION HISTORY: +! 15 Aug 2017: Sujay Kumar; Initial Specification +! 03 Oct 2018: Yeosang Yoon; Modified for NoahMP 3.6 +! +! 27Feb2005: Sujay Kumar; Initial Specification +! 25Jun2006: Sujay Kumar: Updated for the ESMF design +! 02 Mar 2010: Sujay Kumar; Modified for Noah 3.1 +! 21 Jul 2011: James Geiger; Modified for Noah 3.2 +! 03 Oct 2018: Yeosang Yoon; Modified for NoahMP 3.6 +! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 and SNODEP +! 15 May 2019: Yeosang Yoon; Modified for NoahMP 4.0.1 and LDTSI +! 13 Dec 2019: Eric Kemp; Replaced LDTSI with SNOW +! +! !INTERFACE: +subroutine noahmp401_setsnowvars(n, LSM_State) +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc, LIS_domain, LIS_surface + use LIS_snowMod, only : LIS_snow_struc + use LIS_logMod, only : LIS_logunit, LIS_verify, LIS_endrun + use noahmp401_lsmMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM_State +! +! !DESCRIPTION: +! +! This routine assigns the snow progognostic variables to noah's +! model space. The state vector consists of total SWE and snow depth. +! This routine also updates other model prognostics (snice, snliq, +! snow thickness, snow temperature) based on the update. +! +!EOP + type(ESMF_Field) :: sweField + type(ESMF_Field) :: snodField + real, pointer :: swe(:) + real, pointer :: snod(:) + real :: dsneqv,dsnowh + integer :: t + integer :: status + + call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) + call LIS_verify(status) + call ESMF_StateGet(LSM_State,"Snowdepth",snodField,rc=status) + call LIS_verify(status) + + call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) + call LIS_verify(status) + call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) + call LIS_verify(status) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + + dsneqv = swe(t) - noahmp401_struc(n)%noahmp401(t)%sneqv !in mm + dsnowh = snod(t) - noahmp401_struc(n)%noahmp401(t)%snowh !in m + + ! update + call noahmp401_snow_update(n, t, dsneqv, dsnowh) + + enddo +end subroutine noahmp401_setsnowvars + + diff --git a/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_snow_update.F90 b/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_snow_update.F90 new file mode 100755 index 000000000..93e105177 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_snow_update.F90 @@ -0,0 +1,348 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_snow_update +! \label{noahmp401_snow_update} +! +! !REVISION HISTORY: +! 13 Aug 2017: Sujay Kumar; Initial specification +! 14 Dec 2018: Yeosang Yoon; Modified code for NoahMP 4.0.1 and SNODEP +! 15 May 2019: Yeosang Yoon; Modified for NoahMP 4.0.1 and LDTSI +! 13 Dec 2019: Eric Kemp; Replaced LDTSI with SNOW + +! +! !INTERFACE +subroutine noahmp401_snow_update(n, t, dsneqv, dsnowh) + + use LIS_coreMod + use NoahMP401_lsmMod + use module_sf_noahmplsm_401 + use noahmp_tables_401 + + implicit none +! +! !DESCRIPTION: +! This subroutine updates relevant snow prognostics based +! on the update to the total SWE (dsneqv) and total +! snow depth (dsnowh). The updated variables include +! number of snow layers, snice, snliq, snow temperature +! and snow thickness. +! +! !ARGUMENTS: + integer, intent(in) :: n + integer, intent(in) :: t + real :: dsneqv !mm + real :: dsnowh !m +!EOP + + real, allocatable, dimension(:) :: zsoil + real, allocatable, dimension(:) :: ficeold + real, allocatable, dimension(:) :: snice + real, allocatable, dimension(:) :: snliq + real, allocatable, dimension(:) :: stc + real, allocatable, dimension(:) :: supercool + real, allocatable, dimension(:) :: mice + real, allocatable, dimension(:) :: mliq + real, allocatable, dimension(:) :: dzsnso + real, allocatable, dimension(:) :: zsnso + + integer, allocatable, dimension(:) :: imelt !phase change index + real, allocatable, dimension(:) :: sice + + integer :: snl_idx,i,j,iz + integer :: iloc, jloc ! needed, but not use + real :: smp,sneqv,snowh + real :: sneqv1,snowh1 + real :: ponding1,ponding2 + integer :: newnode + integer :: isnow, nsoil, nsnow, soiltype(4), isoil + +! local + real :: SNOFLOW, BDSNOW + type (noahmp_parameters) :: parameters + + isnow = noahmp401_struc(n)%noahmp401(t)%isnow + nsoil = noahmp401_struc(n)%nsoil + nsnow = noahmp401_struc(n)%nsnow + + allocate(ficeold(-nsnow+1:0)) + allocate(snice(-nsnow+1:0)) + allocate(snliq(-nsnow+1:0)) + allocate(stc(-nsnow+1:nsoil)) + allocate(imelt(-nsnow+1:nsoil)) + allocate(supercool(-nsnow+1:nsoil)) + allocate(mice(-nsnow+1:nsoil)) + allocate(mliq(-nsnow+1:nsoil)) + allocate(dzsnso(-nsnow+1:nsoil)) + allocate(zsnso(-nsnow+1:nsoil)) + allocate(sice(nsoil)) + + imelt = 0 + + !set empty snow layers to zero + do iz = -nsnow+1, isnow + snice(iz) = 0. + snliq(iz) = 0. + stc(iz) = 0. + dzsnso(iz)= 0. + zsnso(iz) = 0. + enddo + + ! initialize the variables + soiltype = noahmp401_struc(n)%noahmp401(t)%soiltype + do isoil = 1, size(soiltype) + parameters%BEXP(isoil) = BEXP_TABLE (SOILTYPE(isoil)) + parameters%PSISAT(isoil) = PSISAT_TABLE (SOILTYPE(isoil)) + parameters%SMCMAX(isoil) = SMCMAX_TABLE (SOILTYPE(isoil)) + end do + + sneqv = noahmp401_struc(n)%noahmp401(t)%sneqv + snowh = noahmp401_struc(n)%noahmp401(t)%snowh + + zsnso(-nsnow+1:nsoil) = noahmp401_struc(n)%noahmp401(t)%zss(1:nsnow+nsoil) + +! snow/soil layer thickness (m) + do iz = isnow+1, nsoil + if(iz == isnow+1) then + dzsnso(iz) = - zsnso(iz) + else + dzsnso(iz) = zsnso(iz-1) - zsnso(iz) + end if + end do + + ! set ZSOIL + allocate(zsoil(nsoil)) + ! zsoil is negative. + zsoil(1) = -noahmp401_struc(n)%sldpth(1) + do i = 2, nsoil + zsoil(i) = zsoil(i-1) - NOAHMP401_struc(n)%sldpth(i) + enddo + + + ! state variables + snice(-nsnow+1:0) = & + noahmp401_struc(n)%noahmp401(t)%snowice(1:nsnow) + snliq(-nsnow+1:0) = & + noahmp401_struc(n)%noahmp401(t)%snowliq(1:nsnow) + stc(-nsnow+1:0) = & + noahmp401_struc(n)%noahmp401(t)%tsno(1:nsnow) + ! soil temperature + stc(1:nsoil) = & + noahmp401_struc(n)%noahmp401(t)%tslb(1:nsoil) + + + ! from snowfall routine + ! creating a new layer + if(isnow == 0.and.(dsneqv.gt.0.and.dsnowh.gt.0)) then + snowh = snowh + dsnowh + sneqv = sneqv + dsneqv + end if + + newnode = 0 + + if(isnow == 0 .and. snowh >= 0.025.and.& + (dsneqv.gt.0.and.dsnowh.gt.0)) then !mb: change limit + isnow = -1 + newnode = 1 + dzsnso(0)= snowh + snowh = 0. + stc(0) = min(273.16, noahmp401_struc(n)%noahmp401(t)%sfctmp) + snice(0) = sneqv + snliq(0) = 0. + end if + + ! snow with layers + if(isnow < 0 .and. newnode == 0 .and. & + (dsneqv.gt.0.and.dsnowh.gt.0)) then + snice(isnow+1) = snice(isnow+1) + dsneqv + dzsnso(isnow+1) = dzsnso(isnow+1) + dsnowh + endif + + if(dsneqv.lt.0.and.dsnowh.lt.0) then + snowh1 = snowh + dsnowh + sneqv1 = sneqv + dsneqv + if(snowh1.ge.0.and.sneqv1.ge.0) then + snowh = snowh + dsnowh + sneqv = sneqv + dsneqv +! update dzsnso +! how do you determine the thickness of a layer? + if(snowh.le.dzsnso(0)) then + isnow = 0 + dzsnso(-nsnow+1:(isnow-1)) = 0 + dzsnso(isnow) = snowh + elseif(snowh.le.(dzsnso(0)+dzsnso(-1))) then + isnow = -1 + dzsnso(-nsnow+1:(isnow-1)) = 0 + dzsnso(isnow) = snowh -dzsnso(isnow+1) + elseif(snowh.le.(dzsnso(0)+dzsnso(-1)+dzsnso(-2))) then + isnow = -2 + dzsnso(-nsnow+1:(isnow-2)) = 0 + dzsnso(isnow) = snowh -dzsnso(isnow+2) + endif + endif + endif + + ! ice fraction at the last timestep, add check for both snice and snliq are 0.0 + do snl_idx=isnow+1,0 + if(snice(snl_idx)+snliq(snl_idx)>0.0) then + ficeold(snl_idx) = snice(snl_idx) / (snice(snl_idx)+snliq(snl_idx)) + else + ficeold(snl_idx) = 0.0 + endif + enddo + + sice(:) = max(0.0, noahmp401_struc(n)%noahmp401(t)%smc(:)& + - noahmp401_struc(n)%noahmp401(t)%sh2o(:)) + + !imelt + do j = -nsnow+1, nsoil + supercool(j) = 0.0 + end do + + do j = isnow+1,0 ! all layers + mice(j) = snice(j) + mliq(j) = snliq(j) + end do + + do j = 1, nsoil ! soil + mliq(j) = noahmp401_struc(n)%noahmp401(t)%sh2o(j) * dzsnso(j) * 1000. + mice(j) = (noahmp401_struc(n)%noahmp401(t)%smc(j) - & + noahmp401_struc(n)%noahmp401(t)%sh2o(j)) * dzsnso(j) * 1000. + end do + + do j = isnow+1,nsoil ! all layers + imelt(j) = 0 + enddo + + do j = 1,nsoil + if(stc(j) < tfrz) then + smp = hfus*(tfrz-stc(j))/(grav*stc(j)) !(m) + supercool(j) = parameters%smcmax(j)*(smp/parameters%psisat(j))**(-1./parameters%bexp(j)) + supercool(j) = supercool(j)*dzsnso(j)*1000. !(mm) + end if + enddo + + do j = isnow+1,nsoil + if (mice(j) > 0. .and. stc(j) >= tfrz) then !melting + imelt(j) = 1 + endif + if (mliq(j) > supercool(j) .and. stc(j) < tfrz) then + imelt(j) = 2 + endif + + ! if snow exists, but its thickness is not enough to create a layer + if (isnow == 0 & + .and. sneqv > 0. .and. j == 1) then + if (stc(j) >= tfrz) then + imelt(j) = 1 + endif + endif + enddo + + ! from snowwater + snoflow = 0.0 + ponding1 = 0.0 + ponding2 = 0.0 + + if(isnow < 0) & ! when multi-layer + call compact (parameters, nsnow, nsoil, noahmp401_struc(n)%ts, & !in + stc, snice, snliq, zsoil, imelt, ficeold, iloc, jloc, & !in + isnow, dzsnso ,zsnso) !inout + if(isnow < 0) & + call combine (parameters, nsnow, nsoil ,iloc, jloc, & !in + isnow, noahmp401_struc(n)%noahmp401(t)%sh2o, & !inout + stc, snice, snliq, dzsnso, sice, snowh, sneqv, & !inout + ponding1, ponding2) !out + if(isnow < 0) & + call divide (parameters, nsnow, nsoil, & !in + isnow, stc, snice, snliq, dzsnso) !inout + + !set empty snow layers to zero + do iz = -nsnow+1, isnow + snice(iz) = 0. + snliq(iz) = 0. + stc(iz) = 0. + dzsnso(iz)= 0. + zsnso(iz) = 0. + enddo + + !to obtain equilibrium state of snow in glacier region + if(sneqv > 2000.) then ! 2000 mm -> maximum water depth + bdsnow = snice(0) / dzsnso(0) + snoflow = (sneqv - 2000.) + snice(0) = snice(0) - snoflow + dzsnso(0) = dzsnso(0) - snoflow/bdsnow + !snoflow = snoflow / dt + end if + + ! sum up snow mass for layered snow + if(isnow < 0) then ! mb: only do for multi-layer + sneqv = 0. + snowh = 0. ! yeosang yoon + do iz = isnow+1,0 + sneqv = sneqv + snice(iz) + snliq(iz) + snowh = snowh + dzsnso(iz) ! yeosang yoon + enddo + end if + + ! no snow layer case, limit snow density to 1000 + if (isnow == 0 .and. sneqv > 0. .and. snowh > 0.) then + bdsnow = sneqv/snowh + if (bdsnow >= denh2o) then + snowh = snowh*(bdsnow/1000.) ! change unit, sneqv=[mm] snowh=[m] + end if + end if + + ! reset zsnso and layer thinkness dzsnso + do iz = isnow+1, 0 + dzsnso(iz) = -dzsnso(iz) + end do + + dzsnso(1) = zsoil(1) + do iz = 2,nsoil + dzsnso(iz) = (zsoil(iz) - zsoil(iz-1)) + end do + + zsnso(isnow+1) = dzsnso(isnow+1) + do iz = isnow+2 ,nsoil + zsnso(iz) = zsnso(iz-1) + dzsnso(iz) + enddo + + do iz = isnow+1 ,nsoil + dzsnso(iz) = -dzsnso(iz) + end do + + ! update state vars + noahmp401_struc(n)%noahmp401(t)%isnow = isnow + noahmp401_struc(n)%noahmp401(t)%sneqv = sneqv + noahmp401_struc(n)%noahmp401(t)%snowh = snowh + + noahmp401_struc(n)%noahmp401(t)%zss(1:nsnow+& + nsoil) = zsnso(-nsnow+1:nsoil) + noahmp401_struc(n)%noahmp401(t)%snowice(1:nsnow) = & + snice(-nsnow+1:0) + noahmp401_struc(n)%noahmp401(t)%snowliq(1:nsnow) = & + snliq(-nsnow+1:0) + noahmp401_struc(n)%noahmp401(t)%tsno(1:nsnow) = stc(-nsnow+1:0) + noahmp401_struc(n)%noahmp401(t)%tslb(1:nsoil) = stc(1:nsoil) + + deallocate(ficeold) + deallocate(snice) + deallocate(snliq) + deallocate(stc) + deallocate(imelt) + deallocate(supercool) + deallocate(mice) + deallocate(mliq) + deallocate(dzsnso) + deallocate(zsnso) + deallocate(sice) + +end subroutine noahmp401_snow_update diff --git a/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_updatesnowvars.F90 b/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_updatesnowvars.F90 new file mode 100755 index 000000000..35afc3c87 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_updatesnowvars.F90 @@ -0,0 +1,176 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_updatesnowvars +! \label{noahmp401_updatesnowvars} +! +! !REVISION HISTORY: +! 27Feb2005: Sujay Kumar; Initial Specification +! 25Jun2006: Sujay Kumar: Updated for the ESMF design +! 02 Mar 2010: Sujay Kumar; Modified for Noah 3.1 +! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 and SNODEP +! 15 May 2019: Yeosang Yoon; Modified for NoahMP 4.0.1 and LDTSI +! 13 Dec 2019: Eric Kemp; Replaced LDTSI with SNOW +! 09 Jan 2020: Yeosang Yoon; Updated QC +! +! !INTERFACE: +subroutine noahmp401_updatesnowvars(n, LSM_State, LSM_Incr_State) +! !USES: + use ESMF + use LIS_coreMod + use noahmp401_lsmMod + use LIS_logMod, only : LIS_logunit, LIS_verify + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM_State + type(ESMF_State) :: LSM_Incr_State +! +! !DESCRIPTION: +! +! Returns the snow related state prognostic variables for +! data assimilation +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[LSM\_State] ESMF State container for LSM state variables \newline +! \item[LSM\_Incr\_State] ESMF State container for LSM state increments \newline +! \end{description} +! +!EOP + + type(ESMF_Field) :: sweField, sweIncrField + type(ESMF_Field) :: snodField, snodIncrField + + integer :: t, gid + integer :: status + real, pointer :: swe(:), sweincr(:) + real, pointer :: snod(:), snodincr(:) + real :: swetmp, snodtmp,sndens + logical :: update_flag(LIS_rc%ngrid(n)) + real :: perc_violation(LIS_rc%ngrid(n)) + + real :: snodmean(LIS_rc%ngrid(n)) + integer :: nsnodmean(LIS_rc%ngrid(n)) + + call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) + call LIS_verify(status) + call ESMF_StateGet(LSM_State,"Snowdepth",snodField,rc=status) + call LIS_verify(status) + + call ESMF_StateGet(LSM_Incr_State,"SWE",sweIncrField,rc=status) + call LIS_verify(status) + call ESMF_StateGet(LSM_Incr_State,"Snowdepth",snodIncrField,rc=status) + call LIS_verify(status) + + + call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) + call LIS_verify(status) + call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) + call LIS_verify(status) + + call ESMF_FieldGet(sweIncrField,localDE=0,farrayPtr=sweincr,rc=status) + call LIS_verify(status) + call ESMF_FieldGet(snodIncrField,localDE=0,farrayPtr=snodincr,rc=status) + call LIS_verify(status) + + + update_flag = .true. + perc_violation = 0.0 + snodmean = 0.0 + nsnodmean = 0 + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + + gid = LIS_domain(n)%gindex(& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col,& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) + + swetmp = swe(t) + sweincr(t) + snodtmp = snod(t) + snodincr(t) + + if((snodtmp.lt.0 .or. swetmp.lt.0)) then + update_flag(gid) = .false. + perc_violation(gid) = perc_violation(gid) +1 + endif + + enddo + + do gid=1,LIS_rc%ngrid(n) + perc_violation(gid) = perc_violation(gid) / real(LIS_rc%nensem(n)) + enddo + +! For ensembles that are unphysical, compute the ensemble average after excluding them. This +! is done only if the majority of the ensemble members are good (>80%) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + + gid = LIS_domain(n)%gindex(& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col,& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) + + if(.not.update_flag(gid)) then ! false + if(perc_violation(gid).lt.0.2) then + if(snod(t)+snodincr(t).ge.0) then + snodmean(gid) = snodmean(gid) + snod(t)+snodincr(t) + nsnodmean(gid) = nsnodmean(gid) + 1 + else + snodmean(gid) = 0.0 + endif + endif + endif + enddo + + do gid=1,LIS_rc%ngrid(n) + if(nsnodmean(gid).gt.0) then + snodmean(gid) = snodmean(gid) / real(nsnodmean(gid)) + endif + enddo + +! If the update is unphysical, simply set to the average of +! the good ensemble members. If all else fails, do not update. + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + gid = LIS_domain(n)%gindex(& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col,& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) + + + snodtmp = snod(t) + snodincr(t) + swetmp = swe(t) + sweincr(t) + +!Use the model's snow density from the previous timestep + sndens = 0.0 + if(noahmp401_struc(n)%noahmp401(t)%snowh.gt.0) then + sndens = noahmp401_struc(n)%noahmp401(t)%sneqv/noahmp401_struc(n)%noahmp401(t)%snowh + endif + + if(update_flag(gid)) then + snod(t) = snodtmp + swe(t) = swetmp + elseif(perc_violation(gid).lt.0.2) then + if(snodtmp.lt.0.0) then ! average of the good ensemble members + snod(t) = snodmean(gid) + swe(t) = snodmean(gid)*sndens + else + snod(t) = snodtmp + swe(t) = swetmp + endif + else ! do not update + snod(t) = noahmp401_struc(n)%noahmp401(t)%snowh + swe(t) = noahmp401_struc(n)%noahmp401(t)%sneqv + end if + + enddo + +end subroutine noahmp401_updatesnowvars + diff --git a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_dasoilm_Mod.F90 b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_dasoilm_Mod.F90 new file mode 100644 index 000000000..38e7e3e84 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_dasoilm_Mod.F90 @@ -0,0 +1,118 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +#include "LIS_misc.h" +module NoahMP401_dasoilm_Mod +!BOP +! +! !MODULE: NoahMP401_dasoilm_Mod +! +! !DESCRIPTION: +! +! !REVISION HISTORY: + +! 15 Dec 2018: Mahdi Navari, Sujay Kumar ; Modified for NoahMP401 ! + +! !USES: + use ESMF + use LIS_coreMod + use LIS_dataAssimMod + use LIS_logMod + use LIS_constantsMod, only : LIS_CONST_PATH_LEN + + implicit none + + PRIVATE +!----------------------------------------------------------------------------- +! !PUBLIC MEMBER FUNCTIONS: +!----------------------------------------------------------------------------- + public :: NoahMP401_dasoilm_init +!----------------------------------------------------------------------------- +! !PUBLIC TYPES: +!----------------------------------------------------------------------------- + public :: noahmp401_dasm_struc +!EOP + + type, public :: dasm_dec + real, allocatable :: model_xrange(:,:,:) + real, allocatable :: model_cdf(:,:,:) + real, allocatable :: model_mu(:) + + integer :: nbins + integer :: ntimes + integer :: scal + + end type dasm_dec + + type(dasm_dec), allocatable :: noahmp401_dasm_struc(:) + +contains +!BOP +! +! !ROUTINE: NoahMP401_dasoilm_init +! \label{NoahMP401_dasoilm_init} +! +! !INTERFACE: + subroutine NoahMP401_dasoilm_init(k) +! !USES: +! !DESCRIPTION: +! +!EOP + + + implicit none + integer :: k + integer :: n + character(len=LIS_CONST_PATH_LEN) :: modelcdffile(LIS_rc%nnest) + integer :: status + integer :: ngrid + + if(.not.allocated(noahmp401_dasm_struc)) then + allocate(noahmp401_dasm_struc(LIS_rc%nnest)) + endif + +!TBD: SVK +#if 0 + if(LIS_rc%dascaloption(k).eq."Linear scaling") then + call ESMF_ConfigFindLabel(LIS_config,"Noah-MP.3.6 soil moisture CDF file:",& + rc=status) + do n=1,LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config,modelcdffile(n),rc=status) + call LIS_verify(status, 'Noah-MP.3.6 soil moisture CDF file: not defined') + enddo + + do n=1,LIS_rc%nnest + +!Hardcoded for now. + noahmp401_dasm_struc(n)%nbins = 100 + + call LIS_getCDFattributes(modelcdffile(n),& + noahmp401_dasm_struc(n)%ntimes, ngrid) + + allocate(noahmp401_dasm_struc(n)%model_xrange(& + LIS_rc%ngrid(n), noahmp401_dasm_struc(n)%ntimes, & + noahmp401_dasm_struc(n)%nbins)) + allocate(noahmp401_dasm_struc(n)%model_cdf(& + LIS_rc%ngrid(n), noahmp401_dasm_struc(n)%ntimes, & + noahmp401_dasm_struc(n)%nbins)) + + call LIS_readCDFdata(n,& + noahmp401_dasm_struc(n)%nbins, & + noahmp401_dasm_struc(n)%ntimes, & + ngrid, & + modelcdffile(n), & + "SoilMoist",& + noahmp401_dasm_struc(n)%model_xrange,& + noahmp401_dasm_struc(n)%model_cdf) + enddo + endif +#endif + + end subroutine NoahMP401_dasoilm_init +end module NoahMP401_dasoilm_Mod diff --git a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_descale_soilm.F90 b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_descale_soilm.F90 new file mode 100644 index 000000000..c0531e090 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_descale_soilm.F90 @@ -0,0 +1,48 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: NoahMP401_descale_soilm +! \label{NoahMP401_descale_soilm} +! +! !REVISION HISTORY: +! 27Feb2005: Sujay Kumar; Initial Specification +! 25Jun2006: Sujay Kumar: Updated for the ESMF design +! 15 Dec 2018: Mahdi Navari; Modified for NoahMP401 +! +! !INTERFACE: +subroutine NoahMP401_descale_soilm(n, LSM_State, LSM_Incr_State) + +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc + use LIS_logMod, only : LIS_verify + use NoahMP401_lsmMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM_State + type(ESMF_State) :: LSM_Incr_State +! +! !DESCRIPTION: +! +! Descales soilmoisture related state prognostic variables for +! data assimilation +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[LSM\_State] ESMF State container for LSM state variables \newline +! \end{description} +!EOP + + +end subroutine NoahMP401_descale_soilm + diff --git a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_getsmpred.F90 b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_getsmpred.F90 new file mode 100644 index 000000000..3662eae99 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_getsmpred.F90 @@ -0,0 +1,122 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: NoahMP401_getsmpred +! \label{NoahMP401_getsmpred} +! +! !REVISION HISTORY: +! 27Feb2005: Sujay Kumar; Initial Specification +! 25Jun2006: Sujay Kumar: Updated for the ESMF design +! 9 Sep 2016: Mahdi Navari; Modified for NoahMP401 +! +! !INTERFACE: +subroutine NoahMP401_getsmpred(n, k,obs_pred) +! !USES: + use ESMF + use LIS_constantsMod + use LIS_coreMod + use LIS_dataAssimMod + use LIS_DAobservationsMod + use NoahMP401_lsmMod + use NoahMP401_dasoilm_Mod +!EOP + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + integer, intent(in) :: k + real :: obs_pred(LIS_rc%obs_ngrid(k),LIS_rc%nensem(n)) +! +! !DESCRIPTION: +! +! Returns the Soil moisture obs pred (model's estimate of +! observations) for data assimilation +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[obs\_pred] model's estimate of observations \newline +! \end{description} +!EOP + real :: obs_tmp + integer :: i,t,m,gid,kk + real :: inputs_tp(6), sm_out + character*50 :: units_tp(6) + real :: smc1(LIS_rc%npatch(n,LIS_rc%lsm_index)) + + + do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) + smc1(t) = noahmp401_struc(n)%noahmp401(t)%smc(1) + enddo + call LIS_convertPatchSpaceToObsEnsSpace(n,k,& + LIS_rc%lsm_index, & + smc1,& + obs_pred) + +#if 0 + if(LIS_rc%useANNinDA(n).ne.1) then +!rescaling to relative wetness space. + if(LIS_rc%dascaloption(k).eq."Linear scaling") then + + if(noahmp401_dasm_struc(n)%ntimes.gt.1) then + kk = LIS_rc%mo + else + kk = 1 + endif + + do i=1,LIS_rc%obs_ngrid(k) + do m=1,LIS_rc%nensem(n) + obs_tmp = (obs_pred(i,m) - noahmp401_dasm_struc(n)%model_xrange(i,kk,1))/& + (noahmp401_dasm_struc(n)%model_xrange(i,kk,noahmp401_dasm_struc(n)%nbins) - & + noahmp401_dasm_struc(n)%model_xrange(i,kk,1)) + obs_pred(i,m) = obs_tmp + enddo + enddo + endif + + else + obs_pred = 0.0 + count1 = 0 + do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index),LIS_rc%nensem(n) + do m=1,LIS_rc%nensem(n) + t = i+m-1 + gid = LIS_surface(n,LIS_rc%lsm_index)%tile(t)%index + + inputs_tp(1) = noahmp401_struc(n)%noahmp401(t)%smc(1) + inputs_tp(2) = noahmp401_struc(n)%noahmp401(t)%prcp*(1-noahmp401_struc(n)%noahmp401(t)%fpice) !Noah33 rainf + inputs_tp(3) = noahmp401_struc(n)%noahmp401(t)%prcp*noahmp401_struc(n)%noahmp401(t)%fpice !Noah33 snowf + !MN: NOTE: noahmp401 --> prcp (total precip), fpice (snow fraction in precipitation [-]) + inputs_tp(4) = noahmp401_struc(n)%noahmp401(t)%fveg !Noah33 shdfac + inputs_tp(5) = noahmp401_struc(n)%noahmp401(t)%sstc(noahmp401_struc(n)%nsnow+1) !Noah33 stc(1) + inputs_tp(6) = noahmp401_struc(n)%noahmp401(t)%sneqv*LIS_CONST_RHOFW + + units_tp(1) = "m^3 m-3" + units_tp(2) = "kg m-2 s-1" + units_tp(3) = "kg m-2 s-1" + units_tp(4) = "1" + units_tp(5) = "K" + units_tp(6) = "kg m-2" + + call LIS_forwardEstimate_with_ANN(n, gid, inputs_tp, & + units_tp, sm_out) + obs_pred(gid,m) = obs_pred(gid,m) + sm_out + count1(gid,m) = count1(gid,m) + 1 + enddo + enddo + + do i=1,LIS_rc%ngrid(n) + do m=1,LIS_rc%nensem(n) + obs_pred(i,m) = obs_pred(i,m)/(count1(i,m)) + enddo + enddo + endif +#endif +end subroutine NoahMP401_getsmpred + diff --git a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_getsoilm.F90 b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_getsoilm.F90 new file mode 100644 index 000000000..d461f2091 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_getsoilm.F90 @@ -0,0 +1,83 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: NoahMP401_getsoilm +! \label{NoahMP401_getsoilm} +! +! !REVISION HISTORY: +! 27Feb2005: Sujay Kumar; Initial Specification +! 25Jun2006: Sujay Kumar: Updated for the ESMF design +! 15 Dec 2018: Mahdi Navari; Modified for NoahMP401 + +! !INTERFACE: +subroutine NoahMP401_getsoilm(n, LSM_State) + +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc + use LIS_logMod, only : LIS_verify + use NoahMP401_lsmMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM_State +! +! !DESCRIPTION: +! +! Returns the soilmoisture related state prognostic variables for +! data assimilation +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[LSM\_State] ESMF State container for LSM state variables \newline +! \end{description} +!EOP + type(ESMF_Field) :: sm1Field + type(ESMF_Field) :: sm2Field + type(ESMF_Field) :: sm3Field + type(ESMF_Field) :: sm4Field + integer :: t + integer :: status + real, pointer :: soilm1(:) + real, pointer :: soilm2(:) + real, pointer :: soilm3(:) + real, pointer :: soilm4(:) + character*100 :: lsm_state_objs(4) + + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 1",sm1Field,rc=status) + call LIS_verify(status,'ESMF_StateGet failed for sm1 in NoahMP401_getsoilm') + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 2",sm2Field,rc=status) + call LIS_verify(status,'ESMF_StateGet failed for sm2 in NoahMP401_getsoilm') + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 3",sm3Field,rc=status) + call LIS_verify(status,'ESMF_StateGet failed for sm3 in NoahMP401_getsoilm') + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 4",sm4Field,rc=status) + call LIS_verify(status,'ESMF_StateGet failed for sm4 in NoahMP401_getsoilm') + + call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm1,rc=status) + call LIS_verify(status,'ESMF_FieldGet failed for sm1 in NoahMP401_getsoilm') + call ESMF_FieldGet(sm2Field,localDE=0,farrayPtr=soilm2,rc=status) + call LIS_verify(status,'ESMF_FieldGet failed for sm2 in NoahMP401_getsoilm') + call ESMF_FieldGet(sm3Field,localDE=0,farrayPtr=soilm3,rc=status) + call LIS_verify(status,'ESMF_FieldGet failed for sm3 in NoahMP401_getsoilm') + call ESMF_FieldGet(sm4Field,localDE=0,farrayPtr=soilm4,rc=status) + call LIS_verify(status,'ESMF_FieldGet failed for sm4 in NoahMP401_getsoilm') + + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + soilm1(t) = noahmp401_struc(n)%noahmp401(t)%smc(1) + soilm2(t) = noahmp401_struc(n)%noahmp401(t)%smc(2) + soilm3(t) = noahmp401_struc(n)%noahmp401(t)%smc(3) + soilm4(t) = noahmp401_struc(n)%noahmp401(t)%smc(4) + enddo + +end subroutine NoahMP401_getsoilm + diff --git a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_qc_soilmobs.F90 b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_qc_soilmobs.F90 new file mode 100644 index 000000000..17bdef5dd --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_qc_soilmobs.F90 @@ -0,0 +1,279 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: NoahMP401_qc_soilmobs +! \label{NoahMP401_qc_soilmobs} +! +! !REVISION HISTORY: +! 25Feb2008: Sujay Kumar: Initial Specification +! 15 Dec 2018: Mahdi Navari; Modified for NoahMP401 +! 15 Jun 2020: Yonghwan Kwon: Modified vegetation fraction threshold +! +! !INTERFACE: +subroutine NoahMP401_qc_soilmobs(n,k,OBS_State) +! !USES: + use ESMF + use LIS_coreMod + use LIS_logMod, only : LIS_verify + use LIS_constantsMod, only : LIS_CONST_TKFRZ + use LIS_DAobservationsMod + use NoahMP401_lsmMod + !use module_sf_noahlsm_36 !, only: MAXSMC !MN + !use module_sf_noahmpdrv_401, only: parameters + use NOAHMP_TABLES_401, ONLY : SMCMAX_TABLE,SMCWLT_TABLE + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + integer, intent(in) :: k + type(ESMF_State) :: OBS_State +! +! !DESCRIPTION: +! +! This subroutine performs any model-based QC of the observation +! prior to data assimilation. Here the soil moisture observations +! are flagged when LSM indicates that (1) rain is falling (2) +! soil is frozen or (3) ground is fully or partially covered +! with snow MN:(4) ground is covered with vegatation (more than 50%). +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[OBS\_State] ESMF state container for observations \newline +! \end{description} +! +!EOP + type(ESMF_Field) :: obs_sm_field + + real, pointer :: smobs(:) + integer :: t + integer :: gid + integer :: status + real :: lat,lon + +! mn + integer :: SOILTYP ! soil type index [-] + real :: smc1(LIS_rc%npatch(n,LIS_rc%lsm_index)) + real :: smc2(LIS_rc%npatch(n,LIS_rc%lsm_index)) + real :: smc3(LIS_rc%npatch(n,LIS_rc%lsm_index)) + real :: smc4(LIS_rc%npatch(n,LIS_rc%lsm_index)) + real :: sh2o1(LIS_rc%npatch(n,LIS_rc%lsm_index)) + real :: sh2o2(LIS_rc%npatch(n,LIS_rc%lsm_index)) + real :: sh2o3(LIS_rc%npatch(n,LIS_rc%lsm_index)) + real :: sh2o4(LIS_rc%npatch(n,LIS_rc%lsm_index)) + real :: stc1(LIS_rc%npatch(n,LIS_rc%lsm_index)) + real :: stc2(LIS_rc%npatch(n,LIS_rc%lsm_index)) + real :: stc3(LIS_rc%npatch(n,LIS_rc%lsm_index)) + real :: stc4(LIS_rc%npatch(n,LIS_rc%lsm_index)) + real :: vegt(LIS_rc%npatch(n,LIS_rc%lsm_index)) + real :: SMCMAX(LIS_rc%npatch(n,LIS_rc%lsm_index)) + real :: SMCWLT(LIS_rc%npatch(n,LIS_rc%lsm_index)) + + real :: rainf_obs(LIS_rc%obs_ngrid(k)) + real :: sneqv_obs(LIS_rc%obs_ngrid(k)) + real :: sca_obs(LIS_rc%obs_ngrid(k)) + real :: shdfac_obs(LIS_rc%obs_ngrid(k)) + real :: t1_obs(LIS_rc%obs_ngrid(k)) + real :: smcwlt_obs(LIS_rc%obs_ngrid(k)) + real :: smcmax_obs(LIS_rc%obs_ngrid(k)) + real :: smc1_obs(LIS_rc%obs_ngrid(k)) + real :: smc2_obs(LIS_rc%obs_ngrid(k)) + real :: smc3_obs(LIS_rc%obs_ngrid(k)) + real :: smc4_obs(LIS_rc%obs_ngrid(k)) + real :: sh2o1_obs(LIS_rc%obs_ngrid(k)) + real :: sh2o2_obs(LIS_rc%obs_ngrid(k)) + real :: sh2o3_obs(LIS_rc%obs_ngrid(k)) + real :: sh2o4_obs(LIS_rc%obs_ngrid(k)) + real :: stc1_obs(LIS_rc%obs_ngrid(k)) + real :: stc2_obs(LIS_rc%obs_ngrid(k)) + real :: stc3_obs(LIS_rc%obs_ngrid(k)) + real :: stc4_obs(LIS_rc%obs_ngrid(k)) + real :: vegt_obs(LIS_rc%obs_ngrid(k)) + + + call ESMF_StateGet(OBS_State,"Observation01",obs_sm_field,& + rc=status) + call LIS_verify(status,& + "ESMF_StateGet failed in NoahMP401_qc_soilmobs") + call ESMF_FieldGet(obs_sm_field,localDE=0,farrayPtr=smobs,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet failed in NoahMP401_qc_soilmobs") + + do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) + smc1(t) = noahmp401_struc(n)%noahmp401(t)%smc(1) + smc2(t) = noahmp401_struc(n)%noahmp401(t)%smc(2) + smc3(t) = noahmp401_struc(n)%noahmp401(t)%smc(3) + smc4(t) = noahmp401_struc(n)%noahmp401(t)%smc(4) + + sh2o1(t) = noahmp401_struc(n)%noahmp401(t)%sh2o(1) + sh2o2(t) = noahmp401_struc(n)%noahmp401(t)%sh2o(2) + sh2o3(t) = noahmp401_struc(n)%noahmp401(t)%sh2o(3) + sh2o4(t) = noahmp401_struc(n)%noahmp401(t)%sh2o(4) +!--------------------------------------------------------------------------------------------------------- + ! MN NOTE:sstc contain soil and snow temperature first snow + ! temperature and then soil temeprature. + ! But the number of snow layers changes from 0 to 3 +!--------------------------------------------------------------------------------------------------------- + ! stc1(t) = noahmp401_struc(n)%noahmp401(t)%sstc(noahmp401_struc(n)%nsnow+1) + ! stc2(t) = noahmp401_struc(n)%noahmp401(t)%sstc(noahmp401_struc(n)%nsnow+2) + ! stc3(t) = noahmp401_struc(n)%noahmp401(t)%sstc(noahmp401_struc(n)%nsnow+3) + ! stc4(t) = noahmp401_struc(n)%noahmp401(t)%sstc(noahmp401_struc(n)%nsnow+4) + + stc1(t) = noahmp401_struc(n)%noahmp401(t)%tslb(1) + stc2(t) = noahmp401_struc(n)%noahmp401(t)%tslb(2) + stc3(t) = noahmp401_struc(n)%noahmp401(t)%tslb(3) + stc4(t) = noahmp401_struc(n)%noahmp401(t)%tslb(4) + + vegt(t) = noahmp401_struc(n)%noahmp401(t)%vegetype + + !SOILTYP = noahmp401_struc(n)%noahmp401(t)%soiltype + !SMCMAX(t) = parameters%SMCMAX(SOILTYP) ! SMCMAX(t) = MAXSMC (SOILTYP) + !SMCWLT(t) = parameters%SMCWLT(SOILTYP) ! SMCWLT(t) = WLTSMC (SOILTYP) + SOILTYP = NOAHMP401_struc(n)%noahmp401(t)%soiltype + SMCMAX(t) = SMCMAX_TABLE(SOILTYP) + SMCWLT(t) = SMCWLT_TABLE(SOILTYP) + enddo + + call LIS_convertPatchSpaceToObsSpace(n,k,& + LIS_rc%lsm_index, & + noahmp401_struc(n)%noahmp401(:)%prcp,& + rainf_obs) ! MN prcp is total precip + call LIS_convertPatchSpaceToObsSpace(n,k,& + LIS_rc%lsm_index, & + noahmp401_struc(n)%noahmp401(:)%sneqv,& + sneqv_obs) + call LIS_convertPatchSpaceToObsSpace(n,k,& + LIS_rc%lsm_index, & + noahmp401_struc(n)%noahmp401(:)%snowc,& ! MP36 fsno + sca_obs) + call LIS_convertPatchSpaceToObsSpace(n,k,& + LIS_rc%lsm_index, & + noahmp401_struc(n)%noahmp401(:)%fveg,& + shdfac_obs) + call LIS_convertPatchSpaceToObsSpace(n,k,& + LIS_rc%lsm_index, & + noahmp401_struc(n)%noahmp401(:)%tg,& + t1_obs) + call LIS_convertPatchSpaceToObsSpace(n,k,& + LIS_rc%lsm_index, & + smcmax, & + smcmax_obs) + call LIS_convertPatchSpaceToObsSpace(n,k,& + LIS_rc%lsm_index, & + smcwlt,& + smcwlt_obs) + call LIS_convertPatchSpaceToObsSpace(n,k,& + LIS_rc%lsm_index, & + smc1,& + smc1_obs) + call LIS_convertPatchSpaceToObsSpace(n,k,& + LIS_rc%lsm_index, & + smc2,& + smc2_obs) + call LIS_convertPatchSpaceToObsSpace(n,k,& + LIS_rc%lsm_index, & + smc3,& + smc3_obs) + call LIS_convertPatchSpaceToObsSpace(n,k,& + LIS_rc%lsm_index, & + smc4,& + smc4_obs) + call LIS_convertPatchSpaceToObsSpace(n,k,& + LIS_rc%lsm_index, & + sh2o1,& + sh2o1_obs) + call LIS_convertPatchSpaceToObsSpace(n,k,& + LIS_rc%lsm_index, & + sh2o2,& + sh2o2_obs) + call LIS_convertPatchSpaceToObsSpace(n,k,& + LIS_rc%lsm_index, & + sh2o3,& + sh2o3_obs) + call LIS_convertPatchSpaceToObsSpace(n,k,& + LIS_rc%lsm_index, & + sh2o4,& + sh2o4_obs) + call LIS_convertPatchSpaceToObsSpace(n,k,& + LIS_rc%lsm_index, & + stc1,& + stc1_obs) + call LIS_convertPatchSpaceToObsSpace(n,k,& + LIS_rc%lsm_index, & + stc2,& + stc2_obs) + call LIS_convertPatchSpaceToObsSpace(n,k,& + LIS_rc%lsm_index, & + stc3,& + stc3_obs) + call LIS_convertPatchSpaceToObsSpace(n,k,& + LIS_rc%lsm_index, & + stc4,& + stc4_obs) + + call LIS_convertPatchSpaceToObsSpace(n,k,& + LIS_rc%lsm_index, & + vegt,& + vegt_obs) + + do t = 1,LIS_rc%obs_ngrid(k) + + if(smobs(t).ne.LIS_rc%udef) then +! MN: check for rain + if(rainf_obs(t).gt.3E-6) then ! Var name Noah36 --> rainf + smobs(t) = LIS_rc%udef +! print*, 'rainf ',gid,t,noahmp401_struc(n)%noahmp401(t)%prcp +! MN: check for frozen soil + elseif(abs(smc1_obs(t)- & + sh2o1_obs(t)).gt.0.0001) then + smobs(t) = LIS_rc%udef + elseif(abs(smc2_obs(t)- & + sh2o2_obs(t)).gt.0.0001) then + smobs(t) = LIS_rc%udef + elseif(abs(smc3_obs(t)- & + sh2o3_obs(t)).gt.0.0001) then + smobs(t) = LIS_rc%udef + elseif(abs(smc4_obs(t)- & + sh2o4_obs(t)).gt.0.0001) then + smobs(t) = LIS_rc%udef + elseif(stc1_obs(t).le.LIS_CONST_TKFRZ) then + smobs(t) = LIS_rc%udef + elseif(stc2_obs(t).le.LIS_CONST_TKFRZ) then + smobs(t) = LIS_rc%udef + elseif(stc3_obs(t).le.LIS_CONST_TKFRZ) then + smobs(t) = LIS_rc%udef + elseif(stc4_obs(t).le.LIS_CONST_TKFRZ) then + smobs(t) = LIS_rc%udef + elseif(t1_obs(t).le.LIS_CONST_TKFRZ) then ! Var name Noah36 --> t1 + smobs(t) = LIS_rc%udef + elseif(vegt_obs(t).le.4) then !forest types ! Var name Noah36 --> vegt + smobs(t) = LIS_rc%udef + ! MN: check for snow + elseif(sneqv_obs(t).gt.0.001) then + smobs(t) = LIS_rc%udef + elseif(sca_obs(t).gt.0.0001) then ! Var name sca + smobs(t) = LIS_rc%udef + ! MN: check for green vegetation fraction NOTE: threshold incerased from 0.5 to 0.7 + elseif(shdfac_obs(t).gt.0.9) then ! var name Noah36 shdfac 12-month green veg. frac. + ! The threshold has been tuned for spatial coverage + ! Higher than Noah.3.9 because max greenness is used for shdfac in Noah-MP.4.0.1 + ! while Noah3.9 uses monthly climatological greenness. + smobs(t) = LIS_rc%udef +!too close to the tails, could be due to scaling, so reject. + elseif(smcmax_obs(t)-smobs(t).lt.0.02) then + smobs(t) = LIS_rc%udef + elseif(smobs(t) - smcwlt_obs(t).lt.0.02) then + smobs(t) = LIS_rc%udef + endif + endif + enddo + +end subroutine NoahMP401_qc_soilmobs + diff --git a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_qcsoilm.F90 b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_qcsoilm.F90 new file mode 100644 index 000000000..7e7a3b3ed --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_qcsoilm.F90 @@ -0,0 +1,80 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: NoahMP401_qcsoilm +! \label{NoahMP401_qcsoilm} +! +! !REVISION HISTORY: +! 27Feb2005: Sujay Kumar; Initial Specification +! 25Jun2006: Sujay Kumar: Updated for the ESMF design +! 15 Dec 2018: Mahdi Navari; Modified for NoahMP401 +! +! !INTERFACE: +subroutine NoahMP401_qcsoilm(n, LSM_State) + +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc + use LIS_logMod, only : LIS_verify + use NoahMP401_lsmMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM_State +! +! !DESCRIPTION: +! +! Returns the soilmoisture related state prognostic variables for +! data assimilation +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[LSM\_State] ESMF State container for LSM state variables \newline +! \end{description} +!EOP + type(ESMF_Field) :: sm1Field +! type(ESMF_Field) :: sm2Field +! type(ESMF_Field) :: sm3Field +! type(ESMF_Field) :: sm4Field + integer :: t + integer :: status + real, pointer :: soilm1(:) +! real, pointer :: soilm2(:) +! real, pointer :: soilm3(:) +! real, pointer :: soilm4(:) + real :: smmax1!,smmax2,smmax3,smmax4 + real :: smmin1!,smmin2,smmin3,smmin4 + + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 1",sm1Field,rc=status) + call LIS_verify(status,& + "ESMF_StateGet for Soil Moisture Layer 1 failed in NoahMP401_qcsoilm") + + call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm1,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet for Soil Moisture Layer 1 failed in NoahMP401_qcsoilm") + + call ESMF_AttributeGet(sm1Field,"Max Value",smmax1,rc=status) + call LIS_verify(status,& + "ESMF_AttributeGet: Max Value failed in NoahMP401_qcsoilm") + + call ESMF_AttributeGet(sm1Field,"Min Value",smmin1,rc=status) + call LIS_verify(status,& + "ESMF_AttributeGet: Min Value failed in NoahMP401_qcsoilm") + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + + if(soilm1(t).gt.smmax1) soilm1(t) = smmax1 + if(soilm1(t).lt.smmin1) soilm1(t) = smmin1 + enddo + +end subroutine NoahMP401_qcsoilm + diff --git a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_scale_soilm.F90 b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_scale_soilm.F90 new file mode 100644 index 000000000..0595e7553 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_scale_soilm.F90 @@ -0,0 +1,47 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: NoahMP401_scale_soilm +! \label{NoahMP401_scale_soilm} +! +! !REVISION HISTORY: +! 27Feb2005: Sujay Kumar; Initial Specification +! 25Jun2006: Sujay Kumar: Updated for the ESMF design +! 15 Dec 2018: Mahdi Navari; Modified for NoahMP401 +! +! !INTERFACE: +subroutine NoahMP401_scale_soilm(n, LSM_State) + +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc + use LIS_logMod, only : LIS_verify + use NoahMP401_lsmMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM_State +! +! !DESCRIPTION: +! +! Scales soilmoisture related state prognostic variables for +! data assimilation +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[LSM\_State] ESMF State container for LSM state variables \newline +! \end{description} +!EOP + + +end subroutine NoahMP401_scale_soilm + diff --git a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_setsoilm.F90 b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_setsoilm.F90 new file mode 100644 index 000000000..045bde466 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_setsoilm.F90 @@ -0,0 +1,515 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: NoahMP401_setsoilm +! \label{NoahMP401_setsoilm} +! +! !REVISION HISTORY: +! 27Feb2005: Sujay Kumar; Initial Specification +! 25Jun2006: Sujay Kumar: Updated for the ESMF design +! 15 Dec 2018: Mahdi Navari: Modified for NoahMP401 +! +! Apply the update if it met the update conditions +! Update conditions: +! 1- Prior SM(sh2o) + increment > MIN_THRESHOLD +! 2- Prior SM(sh2o) + increment < sm_threshold +! There are 3 cases +! 1- If all the ensemble members met the update conditions --> apply the update +! 2- If more than 50% of the ensemble members met the update condition --> +! apply the update for that members and set the other member to the mean +! value of the ensemble (i.e. mean of the members that met the conditions) +! 3- If less then 50% of the ensemble members met the update conditions --> +! adjust the states + + +! !INTERFACE: +subroutine NoahMP401_setsoilm(n, LSM_State) +! !USES: + use ESMF + use LIS_coreMod + use LIS_logMod + use NoahMP401_lsmMod + !use module_sf_noahlsm_36 !MN + !use module_sf_noahmpdrv_401, only: parameters + use NOAHMP_TABLES_401, ONLY : SMCMAX_TABLE,SMCWLT_TABLE + + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM_State +! +! !DESCRIPTION: +! +! This routine assigns the soil moisture prognostic variables to noah's +! model space. +! +!EOP + real, parameter :: MIN_THRESHOLD = 0.02 + real :: MAX_threshold + real :: sm_threshold + type(ESMF_Field) :: sm1Field + type(ESMF_Field) :: sm2Field + type(ESMF_Field) :: sm3Field + type(ESMF_Field) :: sm4Field + real, pointer :: soilm1(:) + real, pointer :: soilm2(:) + real, pointer :: soilm3(:) + real, pointer :: soilm4(:) + integer :: t, j,i, gid, m, t_unpert + integer :: status + real :: delta(4) + real :: delta1,delta2,delta3,delta4 + real :: tmpval + logical :: bounds_violation + integer :: nIter + logical :: update_flag(LIS_rc%ngrid(n)) + logical :: ens_flag(LIS_rc%nensem(n)) +! mn + integer :: SOILTYP ! soil type index [-] + real :: SMCMAX , SMCWLT + real :: tmp(LIS_rc%nensem(n)), tmp0(LIS_rc%nensem(n)) + real :: tmp1(LIS_rc%nensem(n)),tmp2(LIS_rc%nensem(n)),tmp3(LIS_rc%nensem(n)),tmp4(LIS_rc%nensem(n)) + logical :: update_flag_tile(LIS_rc%npatch(n,LIS_rc%lsm_index)) + logical :: flag_ens(LIS_rc%ngrid(n)) + logical :: flag_tmp(LIS_rc%nensem(n)) + logical :: update_flag_ens(LIS_rc%ngrid(n)) + logical :: update_flag_new(LIS_rc%ngrid(n)) + integer :: RESULT, pcount, icount + real :: MaxEnsSM1 ,MaxEnsSM2 ,MaxEnsSM3 ,MaxEnsSM4 + real :: MinEnsSM1 ,MinEnsSM2 ,MinEnsSM3 ,MinEnsSM4 + real :: MaxEns_sh2o1, MaxEns_sh2o2, MaxEns_sh2o3, MaxEns_sh2o4 + real :: smc_rnd, smc_tmp + real :: sh2o_tmp, sh2o_rnd + INTEGER, DIMENSION (1) :: seed + + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 1",sm1Field,rc=status) + call LIS_verify(status,& + "ESMF_StateSet: Soil Moisture Layer 1 failed in NoahMP401_setsoilm") + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 2",sm2Field,rc=status) + call LIS_verify(status,& + "ESMF_StateSet: Soil Moisture Layer 2 failed in NoahMP401_setsoilm") + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 3",sm3Field,rc=status) + call LIS_verify(status,& + "ESMF_StateSet: Soil Moisture Layer 3 failed in NoahMP401_setsoilm") + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 4",sm4Field,rc=status) + call LIS_verify(status,& + "ESMF_StateSet: Soil Moisture Layer 4 failed in NoahMP401_setsoilm") + + call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm1,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet: Soil Moisture Layer 1 failed in NoahMP401_setsoilm") + call ESMF_FieldGet(sm2Field,localDE=0,farrayPtr=soilm2,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet: Soil Moisture Layer 2 failed in NoahMP401_setsoilm") + call ESMF_FieldGet(sm3Field,localDE=0,farrayPtr=soilm3,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet: Soil Moisture Layer 3 failed in NoahMP401_setsoilm") + call ESMF_FieldGet(sm4Field,localDE=0,farrayPtr=soilm4,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet: Soil Moisture Layer 4 failed in NoahMP401_setsoilm") + + update_flag = .true. + update_flag_tile= .true. + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + + ! MN: NOTE: SMCMAX and SMCWLT are not stored in the data structure but we + ! can get module variables MAXSMC and WLTSMC from the module_sf_noahlsm_36 + ! In NoahMP401 module variables MAXSMC and WLTSMC from module_sf_noahmpdrv_401 + SOILTYP = noahmp401_struc(n)%noahmp401(t)%soiltype + MAX_THRESHOLD = SMCMAX_TABLE(SOILTYP) ! MAXSMC (SOILTYP) + sm_threshold = SMCMAX_TABLE(SOILTYP) - 0.02 ! MAXSMC (SOILTYP) - 0.02 + + gid = LIS_domain(n)%gindex(& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col,& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) + + !MN: delta = X(+) - X(-) + !NOTE: "noahmp401_updatesoilm.F90" updates the soilm_(t) + delta1 = soilm1(t)-noahmp401_struc(n)%noahmp401(t)%smc(1) + delta2 = soilm2(t)-noahmp401_struc(n)%noahmp401(t)%smc(2) + delta3 = soilm3(t)-noahmp401_struc(n)%noahmp401(t)%smc(3) + delta4 = soilm4(t)-noahmp401_struc(n)%noahmp401(t)%smc(4) + + ! MN: check MIN_THRESHOLD < volumetric liquid soil moisture < threshold + if(noahmp401_struc(n)%noahmp401(t)%sh2o(1)+delta1.gt.MIN_THRESHOLD .and.& + noahmp401_struc(n)%noahmp401(t)%sh2o(1)+delta1.lt.& + sm_threshold) then + update_flag(gid) = update_flag(gid).and.(.true.) + ! MN save the flag for each tile (col*row*ens) (64*44)*20 + update_flag_tile(t) = update_flag_tile(t).and.(.true.) + else + update_flag(gid) = update_flag(gid).and.(.false.) + update_flag_tile(t) = update_flag_tile(t).and.(.false.) + endif + if(noahmp401_struc(n)%noahmp401(t)%sh2o(2)+delta2.gt.MIN_THRESHOLD .and.& + noahmp401_struc(n)%noahmp401(t)%sh2o(2)+delta2.lt.sm_threshold) then + update_flag(gid) = update_flag(gid).and.(.true.) + update_flag_tile(t) = update_flag_tile(t).and.(.true.) + else + update_flag(gid) = update_flag(gid).and.(.false.) + update_flag_tile(t) = update_flag_tile(t).and.(.false.) + endif + if(noahmp401_struc(n)%noahmp401(t)%sh2o(3)+delta3.gt.MIN_THRESHOLD .and.& + noahmp401_struc(n)%noahmp401(t)%sh2o(3)+delta3.lt.sm_threshold) then + update_flag(gid) = update_flag(gid).and.(.true.) + update_flag_tile(t) = update_flag_tile(t).and.(.true.) + else + update_flag(gid) = update_flag(gid).and.(.false.) + update_flag_tile(t) = update_flag_tile(t).and.(.false.) + endif + if(noahmp401_struc(n)%noahmp401(t)%sh2o(4)+delta4.gt.MIN_THRESHOLD .and.& + noahmp401_struc(n)%noahmp401(t)%sh2o(4)+delta4.lt.sm_threshold) then + update_flag(gid) = update_flag(gid).and.(.true.) + update_flag_tile(t) = update_flag_tile(t).and.(.true.) + else + update_flag(gid) = update_flag(gid).and.(.false.) + update_flag_tile(t) = update_flag_tile(t).and.(.false.) + endif + enddo + +!----------------------------------------------------------------------------------------- +! MN create new falg: if update falg for 50% of the ensemble members is true +! then update the state variabels +!----------------------------------------------------------------------------------------- + update_flag_ens = .True. + do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index),LIS_rc%nensem(n) + gid = LIS_domain(n)%gindex(& + LIS_surface(n,LIS_rc%lsm_index)%tile(i)%col,& + LIS_surface(n,LIS_rc%lsm_index)%tile(i)%row) + flag_tmp=update_flag_tile(i:i+LIS_rc%nensem(n)-1) + !flag_tmp=update_flag_tile((i-1)*LIS_rc%nensem(n)+1:(i)*LIS_rc%nensem(n)) + pcount = COUNT(flag_tmp) ! Counts the number of .TRUE. elements + if (pcount.lt.LIS_rc%nensem(n)*0.5) then ! 50% + update_flag_ens(gid)= .False. + endif + update_flag_new(gid)= update_flag(gid).or.update_flag_ens(gid) ! new flag + enddo + + ! MN print +#if 0 +if(i.eq.66) then !i=66 ! --> domain's center 1376 + if(LIS_rc%hr.eq.12) then + write(2001,'(I4, 2x, 3(I2,x), 2x, 23(L1,2x))'),& + i, LIS_rc%mo, LIS_rc%da, LIS_rc%hr,update_flag_tile& + ((i-1)*LIS_rc%nensem(n)+1:(i)*LIS_rc%nensem(n)),& + update_flag_ens(i), update_flag_new(i), update_flag(i) + endif !mn + endif +#endif + + ! update step + ! loop over grid points + do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index),LIS_rc%nensem(n) + + gid = LIS_domain(n)%gindex(& + LIS_surface(n,LIS_rc%lsm_index)%tile(i)%col,& + LIS_surface(n,LIS_rc%lsm_index)%tile(i)%row) + + !if(update_flag(gid)) then + if(update_flag_new(gid)) then +!----------------------------------------------------------------------------------------- + ! 1- update the states + ! 1-1- if update flag for tile is TRUE --> apply the DA update + ! 1-2- if update flag for tile is FALSE --> resample the states + ! 2- adjust the states +!----------------------------------------------------------------------------------------- + ! store update value for cases that update_flag_tile & update_flag_new are TRUE + ! update_flag_tile = TRUE --> means met the both min and max threshold + + tmp1 = LIS_rc%udef + tmp2 = LIS_rc%udef + tmp3 = LIS_rc%udef + tmp4 = LIS_rc%udef + !icount = 1 + do m=1,LIS_rc%nensem(n) + t = i+m-1 + !t = (i-1)*LIS_rc%nensem(n)+m + + if(update_flag_tile(t)) then + + tmp1(m) = soilm1(t) + tmp2(m) = soilm2(t) + tmp3(m) = soilm3(t) + tmp4(m) = soilm4(t) + !icount = icount + 1 + endif + enddo + + MaxEnsSM1 = -10000 + MaxEnsSM2 = -10000 + MaxEnsSM3 = -10000 + MaxEnsSM4 = -10000 + + MinEnsSM1 = 10000 + MinEnsSM2 = 10000 + MinEnsSM3 = 10000 + MinEnsSM4 = 10000 + + do m=1,LIS_rc%nensem(n) + if(tmp1(m).ne.LIS_rc%udef) then + MaxEnsSM1 = max(MaxEnsSM1, tmp1(m)) + MaxEnsSM2 = max(MaxEnsSM2, tmp2(m)) + MaxEnsSM3 = max(MaxEnsSM3, tmp3(m)) + MaxEnsSM4 = max(MaxEnsSM4, tmp4(m)) + + MinEnsSM1 = min(MinEnsSM1, tmp1(m)) + MinEnsSM2 = min(MinEnsSM2, tmp2(m)) + MinEnsSM3 = min(MinEnsSM3, tmp3(m)) + MinEnsSM4 = min(MinEnsSM4, tmp4(m)) + + endif + enddo + + + ! loop over tile + do m=1,LIS_rc%nensem(n) + t = i+m-1 + !t = (i-1)*LIS_rc%nensem(n)+m + + ! MN check update status for each tile + if(update_flag_tile(t)) then + + delta1 = soilm1(t)-noahmp401_struc(n)%noahmp401(t)%smc(1) + delta2 = soilm2(t)-noahmp401_struc(n)%noahmp401(t)%smc(2) + delta3 = soilm3(t)-noahmp401_struc(n)%noahmp401(t)%smc(3) + delta4 = soilm4(t)-noahmp401_struc(n)%noahmp401(t)%smc(4) + + noahmp401_struc(n)%noahmp401(t)%sh2o(1) = noahmp401_struc(n)%noahmp401(t)%sh2o(1)+& + delta1 + noahmp401_struc(n)%noahmp401(t)%smc(1) = soilm1(t) + if(soilm1(t).lt.0) then + print*, 'setsoilm1 ',t,soilm1(t) + stop + endif + if(noahmp401_struc(n)%noahmp401(t)%sh2o(2)+delta2.gt.MIN_THRESHOLD .and.& + noahmp401_struc(n)%noahmp401(t)%sh2o(2)+delta2.lt.sm_threshold) then + noahmp401_struc(n)%noahmp401(t)%sh2o(2) = noahmp401_struc(n)%noahmp401(t)%sh2o(2)+& + soilm2(t)-noahmp401_struc(n)%noahmp401(t)%smc(2) + noahmp401_struc(n)%noahmp401(t)%smc(2) = soilm2(t) + if(soilm2(t).lt.0) then + print*, 'setsoilm2 ',t,soilm2(t) + stop + endif + endif + + if(noahmp401_struc(n)%noahmp401(t)%sh2o(3)+delta3.gt.MIN_THRESHOLD .and.& + noahmp401_struc(n)%noahmp401(t)%sh2o(3)+delta3.lt.sm_threshold) then + noahmp401_struc(n)%noahmp401(t)%sh2o(3) = noahmp401_struc(n)%noahmp401(t)%sh2o(3)+& + soilm3(t)-noahmp401_struc(n)%noahmp401(t)%smc(3) + noahmp401_struc(n)%noahmp401(t)%smc(3) = soilm3(t) + if(soilm3(t).lt.0) then + print*, 'setsoilm3 ',t,soilm3(t) + stop + endif + endif + + if(noahmp401_struc(n)%noahmp401(t)%sh2o(4)+delta4.gt.MIN_THRESHOLD .and.& + noahmp401_struc(n)%noahmp401(t)%sh2o(4)+delta4.lt.sm_threshold) then + noahmp401_struc(n)%noahmp401(t)%sh2o(4) = noahmp401_struc(n)%noahmp401(t)%sh2o(4)+& + soilm4(t)-noahmp401_struc(n)%noahmp401(t)%smc(4) + noahmp401_struc(n)%noahmp401(t)%smc(4) = soilm4(t) + + if(soilm4(t).lt.0) then + print*, 'setsoilm4 ',t,soilm4(t) + stop + endif + endif + + +!----------------------------------------------------------------------------------------- + ! randomly resample the smc from [MIN_THRESHOLD, Max value from DA @ that tiem step] +!----------------------------------------------------------------------------------------- + else + +!----------------------------------------------------------------------------------------- +! set the soil moisture to the ensemble mean +!----------------------------------------------------------------------------------------- + + ! use mean value + ! Assume sh2o = smc (i.e. ice content=0) + smc_tmp = (MaxEnsSM1 - MinEnsSM1)/2 + MinEnsSM1 + noahmp401_struc(n)%noahmp401(t)%sh2o(1) = smc_tmp + noahmp401_struc(n)%noahmp401(t)%smc(1) = smc_tmp + + smc_tmp = (MaxEnsSM2 - MinEnsSM2)/2 + MinEnsSM2 + noahmp401_struc(n)%noahmp401(t)%sh2o(2) = smc_tmp + noahmp401_struc(n)%noahmp401(t)%smc(2) = smc_tmp + + smc_tmp = (MaxEnsSM3 - MinEnsSM3)/2 + MinEnsSM3 + noahmp401_struc(n)%noahmp401(t)%sh2o(3) = smc_tmp + noahmp401_struc(n)%noahmp401(t)%smc(3) = smc_tmp + + smc_tmp = (MaxEnsSM4 - MinEnsSM4)/2 + MinEnsSM4 + noahmp401_struc(n)%noahmp401(t)%sh2o(4) = smc_tmp + noahmp401_struc(n)%noahmp401(t)%smc(4) = smc_tmp + + + endif ! flag for each tile + + enddo ! loop over tile + + else ! if update_flag_new(gid) is FALSE + if(LIS_rc%pert_bias_corr.eq.1) then + !-------------------------------------------------------------------------- + ! if no update is made, then we need to readjust the ensemble if pert bias + ! correction is turned on because the forcing perturbations may cause + ! biases to persist. + !-------------------------------------------------------------------------- + bounds_violation = .true. + nIter = 0 + ens_flag = .true. + + do while(bounds_violation) + niter = niter + 1 + !t_unpert = i*LIS_rc%nensem(n) + t_unpert = i+LIS_rc%nensem(n)-1 + do j=1,4 + delta(j) = 0.0 + do m=1,LIS_rc%nensem(n)-1 + t = i+m-1 + !t = (i-1)*LIS_rc%nensem(n)+m + + if(m.ne.LIS_rc%nensem(n)) then + delta(j) = delta(j) + & + (noahmp401_struc(n)%noahmp401(t)%sh2o(j) - & + noahmp401_struc(n)%noahmp401(t_unpert)%sh2o(j)) + endif + + enddo + enddo + + do j=1,4 + delta(j) =delta(j)/(LIS_rc%nensem(n)-1) + do m=1,LIS_rc%nensem(n)-1 + t = i+m-1 + !t = (i-1)*LIS_rc%nensem(n)+m + SOILTYP = noahmp401_struc(n)%noahmp401(t)%soiltype + MAX_THRESHOLD = SMCMAX_TABLE(SOILTYP) + sm_threshold = SMCMAX_TABLE(SOILTYP) - 0.02 + + tmpval = noahmp401_struc(n)%noahmp401(t)%sh2o(j) - & + delta(j) + if(tmpval.le.MIN_THRESHOLD) then + noahmp401_struc(n)%noahmp401(t)%sh2o(j) = & + max(noahmp401_struc(n)%noahmp401(t_unpert)%sh2o(j),& + MIN_THRESHOLD) + noahmp401_struc(n)%noahmp401(t)%smc(j) = & + max(noahmp401_struc(n)%noahmp401(t_unpert)%smc(j),& + MIN_THRESHOLD) + ens_flag(m) = .false. + elseif(tmpval.ge.sm_threshold) then + noahmp401_struc(n)%noahmp401(t)%sh2o(j) = & + min(noahmp401_struc(n)%noahmp401(t_unpert)%sh2o(j),& + sm_threshold) + noahmp401_struc(n)%noahmp401(t)%smc(j) = & + min(noahmp401_struc(n)%noahmp401(t_unpert)%smc(j),& + sm_threshold) + ens_flag(m) = .false. + endif + enddo + enddo + + !-------------------------------------------------------------------------- + ! Recalculate the deltas and adjust the ensemble + !-------------------------------------------------------------------------- + do j=1,4 + delta(j) = 0.0 + do m=1,LIS_rc%nensem(n)-1 + t = i+m-1 + !t = (i-1)*LIS_rc%nensem(n)+m + if(m.ne.LIS_rc%nensem(n)) then + delta(j) = delta(j) + & + (noahmp401_struc(n)%noahmp401(t)%sh2o(j) - & + noahmp401_struc(n)%noahmp401(t_unpert)%sh2o(j)) + endif + enddo + enddo + + do j=1,4 + delta(j) =delta(j)/(LIS_rc%nensem(n)-1) + do m=1,LIS_rc%nensem(n)-1 + t = i+m-1 + !t = (i-1)*LIS_rc%nensem(n)+m + + if(ens_flag(m)) then + tmpval = noahmp401_struc(n)%noahmp401(t)%sh2o(j) - & + delta(j) + SOILTYP = noahmp401_struc(n)%noahmp401(t)%soiltype + MAX_THRESHOLD = SMCMAX_TABLE(SOILTYP) + + if(.not.(tmpval.le.0.0 .or.& + tmpval.gt.(MAX_THRESHOLD))) then + + noahmp401_struc(n)%noahmp401(t)%smc(j) = & + noahmp401_struc(n)%noahmp401(t)%smc(j) - delta(j) + noahmp401_struc(n)%noahmp401(t)%sh2o(j) = & + noahmp401_struc(n)%noahmp401(t)%sh2o(j) - delta(j) + bounds_violation = .false. + endif + endif + + tmpval = noahmp401_struc(n)%noahmp401(t)%sh2o(j) + SOILTYP = noahmp401_struc(n)%noahmp401(t)%soiltype + MAX_THRESHOLD = SMCMAX_TABLE(SOILTYP) + + if(tmpval.le.0.0 .or.& + tmpval.gt.(MAX_THRESHOLD)) then + bounds_violation = .true. + else + bounds_violation = .false. + endif + enddo + enddo + + if(nIter.gt.10.and.bounds_violation) then + !-------------------------------------------------------------------------- + ! All else fails, set to the bounds + !-------------------------------------------------------------------------- + + write(LIS_logunit,*) '[ERR] Ensemble structure violates physical bounds ' + write(LIS_logunit,*) '[ERR] Please adjust the perturbation settings ..' + + do j=1,4 + do m=1,LIS_rc%nensem(n) + t = i+m-1 + !t = (i-1)*LIS_rc%nensem(n)+m + + SOILTYP = noahmp401_struc(n)%noahmp401(t)%soiltype + MAX_THRESHOLD = SMCMAX_TABLE(SOILTYP) + + if(noahmp401_struc(n)%noahmp401(t)%sh2o(j).gt.MAX_THRESHOLD.or.& + noahmp401_struc(n)%noahmp401(t)%smc(j).gt.MAX_THRESHOLD) then + noahmp401_struc(n)%noahmp401(t)%sh2o(j) = MAX_THRESHOLD + noahmp401_struc(n)%noahmp401(t)%smc(j) = MAX_THRESHOLD + endif + + if(noahmp401_struc(n)%noahmp401(t)%sh2o(j).lt.MIN_THRESHOLD.or.& + noahmp401_struc(n)%noahmp401(t)%smc(j).lt.MIN_THRESHOLD) then + noahmp401_struc(n)%noahmp401(t)%sh2o(j) = MIN_THRESHOLD + noahmp401_struc(n)%noahmp401(t)%smc(j) = MIN_THRESHOLD + endif +! print*, i, m +! print*, 'smc',t, noahmp401_struc(n)%noahmp401(t)%smc(:) +! print*, 'sh2o ',t,noahmp401_struc(n)%noahmp401(t)%sh2o(:) +! print*, 'max ',t,MAX_THRESHOLD !noahmp401_struc(n)%noahmp401(t)%smcmax + enddo +! call LIS_endrun() + enddo + endif + end do + endif + endif + enddo + + +end subroutine NoahMP401_setsoilm + diff --git a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_updatesoilm.F90 b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_updatesoilm.F90 new file mode 100644 index 000000000..7e0b0e198 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_updatesoilm.F90 @@ -0,0 +1,119 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: NoahMP401_updatesoilm +! \label{NoahMP401_updatesoilm} +! +! !REVISION HISTORY: +! 27Feb2005: Sujay Kumar; Initial Specification +! 25Jun2006: Sujay Kumar: Updated for the ESMF design +! 15 Dec 2018: Mahdi Navari; Modified for NoahMP401 +! +! !INTERFACE: +subroutine NoahMP401_updatesoilm(n, LSM_State, LSM_Incr_State) +! !USES: + use ESMF + use LIS_coreMod + use LIS_logMod + use NoahMP401_lsmMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM_State + type(ESMF_State) :: LSM_Incr_State +! +! !DESCRIPTION: +! +! This routine assigns the soil moisture prognostic variables to noah's +! model space. +! +!EOP + + type(ESMF_Field) :: sm1Field + type(ESMF_Field) :: sm2Field + type(ESMF_Field) :: sm3Field + type(ESMF_Field) :: sm4Field + type(ESMF_Field) :: sm1IncrField + type(ESMF_Field) :: sm2IncrField + type(ESMF_Field) :: sm3IncrField + type(ESMF_Field) :: sm4IncrField + + real, pointer :: soilm1(:) + real, pointer :: soilm2(:) + real, pointer :: soilm3(:) + real, pointer :: soilm4(:) + real, pointer :: soilmIncr1(:) + real, pointer :: soilmIncr2(:) + real, pointer :: soilmIncr3(:) + real, pointer :: soilmIncr4(:) + integer :: t,i,m + integer :: status + + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 1",sm1Field,rc=status) + call LIS_verify(status,& + "ESMF_StateGet: Soil Moisture Layer 1 failed in NoahMP401_updatesoilm") + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 2",sm2Field,rc=status) + call LIS_verify(status,& + "ESMF_StateGet: Soil Moisture Layer 2 failed in NoahMP401_updatesoilm") + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 3",sm3Field,rc=status) + call LIS_verify(status,& + "ESMF_StateGet: Soil Moisture Layer 3 failed in NoahMP401_updatesoilm") + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 4",sm4Field,rc=status) + call LIS_verify(status,& + "ESMF_StateGet: Soil Moisture Layer 4 failed in NoahMP401_updatesoilm") + + call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm1,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet: Soil Moisture Layer 1 failed in NoahMP401_updatesoilm") + call ESMF_FieldGet(sm2Field,localDE=0,farrayPtr=soilm2,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet: Soil Moisture Layer 2 failed in NoahMP401_updatesoilm") + call ESMF_FieldGet(sm3Field,localDE=0,farrayPtr=soilm3,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet: Soil Moisture Layer 3 failed in NoahMP401_updatesoilm") + call ESMF_FieldGet(sm4Field,localDE=0,farrayPtr=soilm4,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet: Soil Moisture Layer 4 failed in NoahMP401_updatesoilm") + + call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 1",sm1IncrField,rc=status) + call LIS_verify(status,& + "ESMF_StateGet: Soil Moisture Layer 1 failed in NoahMP401_updatesoilm") + call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 2",sm2IncrField,rc=status) + call LIS_verify(status,& + "ESMF_StateGet: Soil Moisture Layer 2 failed in NoahMP401_updatesoilm") + call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 3",sm3IncrField,rc=status) + call LIS_verify(status,& + "ESMF_StateGet: Soil Moisture Layer 3 failed in NoahMP401_updatesoilm") + call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 4",sm4IncrField,rc=status) + call LIS_verify(status,& + "ESMF_StateGet: Soil Moisture Layer 4 failed in NoahMP401_updatesoilm") + + call ESMF_FieldGet(sm1IncrField,localDE=0,farrayPtr=soilmIncr1,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet: Soil Moisture Layer 1 failed in NoahMP401_updatesoilm") + call ESMF_FieldGet(sm2IncrField,localDE=0,farrayPtr=soilmIncr2,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet: Soil Moisture Layer 2 failed in NoahMP401_updatesoilm") + call ESMF_FieldGet(sm3IncrField,localDE=0,farrayPtr=soilmIncr3,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet: Soil Moisture Layer 3 failed in NoahMP401_updatesoilm") + call ESMF_FieldGet(sm4IncrField,localDE=0,farrayPtr=soilmIncr4,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet: Soil Moisture Layer 4 failed in NoahMP401_updatesoilm") + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + soilm1(t) = soilm1(t) + soilmIncr1(t) + soilm2(t) = soilm2(t) + soilmIncr2(t) + soilm3(t) = soilm3(t) + soilmIncr3(t) + soilm4(t) = soilm4(t) + soilmIncr4(t) + enddo +end subroutine NoahMP401_updatesoilm + diff --git a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_write_soilm.F90 b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_write_soilm.F90 new file mode 100644 index 000000000..ecbb563dc --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_write_soilm.F90 @@ -0,0 +1,71 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: NoahMP401_write_soilm +! \label{NoahMP401_write_soilm} +! +! !REVISION HISTORY: +! 27Feb2005: Sujay Kumar; Initial Specification +! 25Jun2006: Sujay Kumar: Updated for the ESMF design +! 15 Dec 2018: Mahdi Navari; Modified for NoahMP401 +! +! !INTERFACE: +subroutine NoahMP401_write_soilm(ftn,n, LSM_State) + +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc + use NoahMP401_lsmMod + use LIS_historyMod, only : LIS_writevar_restart + implicit none +! !ARGUMENTS: + integer, intent(in) :: ftn + integer, intent(in) :: n + type(ESMF_State) :: LSM_State +! +! !DESCRIPTION: +! +! Returns the soilmoisture related state prognostic variables for +! data assimilation +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[LSM\_State] ESMF State container for LSM state variables \newline +! \end{description} +!EOP + integer :: t + real, allocatable :: tmp(:) + + allocate(tmp(LIS_rc%npatch(n,LIS_rc%lsm_index))) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + tmp(t) = noahmp401_struc(n)%noahmp401(t)%smc(1) + enddo + call LIS_writevar_restart(ftn,n,1,tmp) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + tmp(t) = noahmp401_struc(n)%noahmp401(t)%smc(2) + enddo + call LIS_writevar_restart(ftn,n,1,tmp) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + tmp(t) = noahmp401_struc(n)%noahmp401(t)%smc(3) + enddo + call LIS_writevar_restart(ftn,n,1,tmp) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + tmp(t) = noahmp401_struc(n)%noahmp401(t)%smc(4) + enddo + call LIS_writevar_restart(ftn,n,1,tmp) + deallocate(tmp) + +end subroutine NoahMP401_write_soilm + diff --git a/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_datws_Mod.F90 b/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_datws_Mod.F90 new file mode 100755 index 000000000..960ed91d5 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_datws_Mod.F90 @@ -0,0 +1,81 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!29 May 2020: Bailing Li created for Noah-MP.4.0.1 +#include "LIS_misc.h" +module noahmp401_datws_Mod +!BOP +! +! !MODULE: noahmp401_datws_Mod +! +! !DESCRIPTION: +! +! !REVISION HISTORY: +! +! 14 Mar 2017: Sujay Kumar; Initial Specification + +! !USES: + use ESMF + use LIS_coreMod + use LIS_dataAssimMod + use LIS_logMod + + implicit none + + PRIVATE +!----------------------------------------------------------------------------- +! !PUBLIC MEMBER FUNCTIONS: +!----------------------------------------------------------------------------- + public :: noahmp401_datws_init +!----------------------------------------------------------------------------- +! !PUBLIC TYPES: +!----------------------------------------------------------------------------- + public :: noahmp401_dasm_struc +!EOP + + type, public :: dasm_dec + real, allocatable :: model_xrange(:,:,:) + real, allocatable :: model_cdf(:,:,:) + real, allocatable :: model_mu(:) + + integer :: nbins + integer :: ntimes + integer :: scal + + end type dasm_dec + + type(dasm_dec), allocatable :: noahmp401_dasm_struc(:) + +contains +!BOP +! +! !ROUTINE: noahmp401_datws_init +! \label{noahmp401_datws_init} +! +! !INTERFACE: + subroutine noahmp401_datws_init(k) +! !USES: +! !DESCRIPTION: +! +!EOP + + use LIS_constantsMod, only : LIS_CONST_PATH_LEN + implicit none + integer :: k + integer :: n + character(len=LIS_CONST_PATH_LEN) :: modelcdffile(LIS_rc%nnest) + integer :: status + integer :: ngrid + + if(.not.allocated(noahmp401_dasm_struc)) then + allocate(noahmp401_dasm_struc(LIS_rc%nnest)) + endif + + end subroutine noahmp401_datws_init +end module noahmp401_datws_Mod diff --git a/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_descale_tws.F90 b/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_descale_tws.F90 new file mode 100755 index 000000000..49567ac11 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_descale_tws.F90 @@ -0,0 +1,179 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_descale_tws +! \label{noahmp401_descale_tws} +! +! !REVISION HISTORY: +! 14 Mar 2017: Sujay Kumar; Initial Specification +! 29 May 2020: Bailing Li; created for Noah-MP4.0.1 +! +! !INTERFACE: +subroutine noahmp401_descale_tws(n, LSM_State, LSM_Incr_State) + +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc + use LIS_logMod, only : LIS_verify + use noahmp401_lsmMod + use module_sf_noahmplsm_401 + use LIS_constantsMod, only : LIS_CONST_RHOFW ! Natt + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM_State + type(ESMF_State) :: LSM_Incr_State +! +! !DESCRIPTION: +! +! Descales twsoisture related state prognostic variables for +! data assimilation +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[LSM\_State] ESMF State container for LSM state variables \newline +! \end{description} +!EOP + +!Wanshu + + type(ESMF_Field) :: gwField + real, pointer :: gws(:) + type(ESMF_Field) :: gwIncrField + real, pointer :: gwsIncr(:) + integer :: t + integer :: status + +! Natt + type(ESMF_Field) :: sm1Field + type(ESMF_Field) :: sm2Field + type(ESMF_Field) :: sm3Field + type(ESMF_Field) :: sm4Field + type(ESMF_Field) :: sweField + type(ESMF_Field) :: snodField + type(ESMF_Field) :: sm1IncrField + type(ESMF_Field) :: sm2IncrField + type(ESMF_Field) :: sm3IncrField + type(ESMF_Field) :: sm4IncrField + type(ESMF_Field) :: sweIncrField + type(ESMF_Field) :: snodIncrField + real, pointer :: soilm1(:) + real, pointer :: soilm2(:) + real, pointer :: soilm3(:) + real, pointer :: soilm4(:) + real, pointer :: swe(:) + real, pointer :: snod(:) + real, pointer :: soilmIncr1(:) + real, pointer :: soilmIncr2(:) + real, pointer :: soilmIncr3(:) + real, pointer :: soilmIncr4(:) + real, pointer :: sweincr(:) + real, pointer :: snodincr(:) + integer :: SOILTYP ! soil type index [-] + real :: MAX_THRESHOLD , MIN_THRESHOLD + +#if 0 + ! Natt + ! Descale TWS states + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 1",sm1Field,rc=status) + call LIS_verify(status,'ESMF_StateGet failed for sm1 in noahmp401_descale_tws') + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 2",sm2Field,rc=status) + call LIS_verify(status,'ESMF_StateGet failed for sm2 in noahmp401_descale_tws') + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 3",sm3Field,rc=status) + call LIS_verify(status,'ESMF_StateGet failed for sm3 in noahmp401_descale_tws') + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 4",sm4Field,rc=status) + call LIS_verify(status,'ESMF_StateGet failed for sm4 in noahmp401_descale_tws') + call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) + call LIS_verify(status,'ESMF_StateGet failed for SWE in noahmp401_descale_tws') + call ESMF_StateGet(LSM_State,"Snowdepth",snodField,rc=status) + call LIS_verify(status,'ESMF_StateGet failed for Snowdepth in noahmp401_descale_tws') + + call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm1,rc=status) + call LIS_verify(status,'ESMF_FieldGet failed for sm1 in noahmp401_descale_tws') + call ESMF_FieldGet(sm2Field,localDE=0,farrayPtr=soilm2,rc=status) + call LIS_verify(status,'ESMF_FieldGet failed for sm2 in noahmp401_descale_tws') + call ESMF_FieldGet(sm3Field,localDE=0,farrayPtr=soilm3,rc=status) + call LIS_verify(status,'ESMF_FieldGet failed for sm3 in noahmp401_descale_tws') + call ESMF_FieldGet(sm4Field,localDE=0,farrayPtr=soilm4,rc=status) + call LIS_verify(status,'ESMF_FieldGet failed for sm4 in noahmp401_descale_tws') + call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) + call LIS_verify(status,'ESMF_FieldGet failed for SWE in noahmp401_descale_tws') + call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) + call LIS_verify(status,'ESMF_FieldGet failed for Snowdepth in noahmp401_descale_tws') + + ! Natt + ! Descale TWS state increment + call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 1",sm1IncrField,rc=status) + call LIS_verify(status,& + "ESMF_StateGet: Soil Moisture Layer 1 failed in noahmp401_descale_tws") + call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 2",sm2IncrField,rc=status) + call LIS_verify(status,& + "ESMF_StateGet: Soil Moisture Layer 2 failed in noahmp401_descale_tws") + call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 3",sm3IncrField,rc=status) + call LIS_verify(status,& + "ESMF_StateGet: Soil Moisture Layer 3 failed in noahmp401_descale_tws") + call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 4",sm4IncrField,rc=status) + call LIS_verify(status,& + "ESMF_StateGet: Soil Moisture Layer 4 failed in noahmp401_descale_tws") + call ESMF_StateGet(LSM_Incr_State,"SWE",sweIncrField,rc=status) + call LIS_verify(status) + call ESMF_StateGet(LSM_Incr_State,"Snowdepth",snodIncrField,rc=status) + call LIS_verify(status) + + call ESMF_FieldGet(sm1IncrField,localDE=0,farrayPtr=soilmIncr1,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet: Soil Moisture Layer 1 failed in noahmp401_descale_tws") + call ESMF_FieldGet(sm2IncrField,localDE=0,farrayPtr=soilmIncr2,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet: Soil Moisture Layer 2 failed in noahmp401_descale_tws") + call ESMF_FieldGet(sm3IncrField,localDE=0,farrayPtr=soilmIncr3,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet: Soil Moisture Layer 3 failed in noahmp401_descale_tws") + call ESMF_FieldGet(sm4IncrField,localDE=0,farrayPtr=soilmIncr4,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet: Soil Moisture Layer 4 failed in noahmp401_descale_tws") + call ESMF_FieldGet(sweIncrField,localDE=0,farrayPtr=sweincr,rc=status) + call LIS_verify(status) + call ESMF_FieldGet(snodIncrField,localDE=0,farrayPtr=snodincr,rc=status) + call LIS_verify(status) + + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + !SOILTYP = NOAHMP401_struc(n)%noahmp401(t)%soiltype + !MAX_THRESHOLD = MAXSMC (SOILTYP) + !MIN_THRESHOLD = WLTSMC(SOILTYP) + soilm1(t) = soilm1(t) / (NOAHMP401_struc(n)%sldpth(1)*1000.0) ! mm -> m3m-3 + soilm2(t) = soilm2(t) / (NOAHMP401_struc(n)%sldpth(2)*1000.0) ! mm -> m3m-3 + soilm3(t) = soilm3(t) / (NOAHMP401_struc(n)%sldpth(3)*1000.0) ! mm -> m3m-3 + soilm4(t) = soilm4(t) / (NOAHMP401_struc(n)%sldpth(4)*1000.0) ! mm -> m3m-3 + !if (soilm1(t) .lt. MIN_THRESHOLD) soilm1(t) = MIN_THRESHOLD + !if (soilm2(t) .lt. MIN_THRESHOLD) soilm2(t) = MIN_THRESHOLD + !if (soilm3(t) .lt. MIN_THRESHOLD) soilm3(t) = MIN_THRESHOLD + !if (soilm4(t) .lt. MIN_THRESHOLD) soilm4(t) = MIN_THRESHOLD + !if (soilm1(t) .gt. MAX_THRESHOLD) soilm1(t) = MAX_THRESHOLD + !if (soilm2(t) .gt. MAX_THRESHOLD) soilm2(t) = MAX_THRESHOLD + !if (soilm3(t) .gt. MAX_THRESHOLD) soilm3(t) = MAX_THRESHOLD + !if (soilm4(t) .gt. MAX_THRESHOLD) soilm4(t) = MAX_THRESHOLD + swe(t) = swe(t) / 1000.0 ! mm -> m + snod(t) = snod(t) / 1000.0 ! mm -> m + + soilmIncr1(t) = soilmIncr1(t) / (NOAHMP401_struc(n)%sldpth(1)*1000.0) ! mm -> m3m-3 + soilmIncr2(t) = soilmIncr2(t) / (NOAHMP401_struc(n)%sldpth(2)*1000.0) ! mm -> m3m-3 + soilmIncr3(t) = soilmIncr3(t) / (NOAHMP401_struc(n)%sldpth(3)*1000.0) ! mm -> m3m-3 + soilmIncr4(t) = soilmIncr4(t) / (NOAHMP401_struc(n)%sldpth(4)*1000.0) ! mm -> m3m-3 + sweincr(t) = sweincr(t) / 1000.0 ! mm -> m + snodincr(t) = snodincr(t) / 1000.0 ! mm -> m + + enddo +#endif + +end subroutine noahmp401_descale_tws diff --git a/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_gettws.F90 b/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_gettws.F90 new file mode 100755 index 000000000..d78e2f4ae --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_gettws.F90 @@ -0,0 +1,103 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_gettws +! \label{noahmp401_gettws} +! +! !REVISION HISTORY: +! 14 Mar 2017: Sujay Kumar; Initial Specification +! 18 Aug 2017: Wanshu Nie; Add groundwater component +! 29 May 2020: Bailing Li; created for Noah-MP4.0.1 + +! !INTERFACE: +subroutine noahmp401_gettws(n, LSM_State) + +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc + use LIS_logMod, only : LIS_verify + use noahmp401_lsmMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM_State +! +! !DESCRIPTION: +! +! Returns the soilmoisture and groundwater related state prognostic variables for +! data assimilation +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[LSM\_State] ESMF State container for LSM state variables \newline +! \end{description} +!EOP + type(ESMF_Field) :: sm1Field + type(ESMF_Field) :: sm2Field + type(ESMF_Field) :: sm3Field + type(ESMF_Field) :: sm4Field + type(ESMF_Field) :: gwField + type(ESMF_Field) :: sweField + type(ESMF_Field) :: snodField + integer :: t + integer :: status + real, pointer :: soilm1(:) + real, pointer :: soilm2(:) + real, pointer :: soilm3(:) + real, pointer :: soilm4(:) + real, pointer :: gws(:) + real, pointer :: swe(:) + real, pointer :: snod(:) + character*100 :: lsm_state_objs(4) + + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 1",sm1Field,rc=status) + call LIS_verify(status,'ESMF_StateGet failed for sm1 in noahmp401_gettws') + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 2",sm2Field,rc=status) + call LIS_verify(status,'ESMF_StateGet failed for sm2 in noahmp401_gettws') + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 3",sm3Field,rc=status) + call LIS_verify(status,'ESMF_StateGet failed for sm3 in noahmp401_gettws') + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 4",sm4Field,rc=status) + call LIS_verify(status,'ESMF_StateGet failed for sm4 in noahmp401_gettws') + call ESMF_StateGet(LSM_State,"Groundwater Storage",gwField,rc=status) + call LIS_verify(status,'ESMF_StateGet failed for gw in noahmp401_gettws') + call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) + call LIS_verify(status,'ESMF_StateGet failed for SWE in noahmp401_gettws') + call ESMF_StateGet(LSM_State,"Snowdepth",snodField,rc=status) + call LIS_verify(status,'ESMF_StateGet failed for Snowdepth in noahmp401_gettws') + + call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm1,rc=status) + call LIS_verify(status,'ESMF_FieldGet failed for sm1 in noahmp401_gettws') + call ESMF_FieldGet(sm2Field,localDE=0,farrayPtr=soilm2,rc=status) + call LIS_verify(status,'ESMF_FieldGet failed for sm2 in noahmp401_gettws') + call ESMF_FieldGet(sm3Field,localDE=0,farrayPtr=soilm3,rc=status) + call LIS_verify(status,'ESMF_FieldGet failed for sm3 in noahmp401_gettws') + call ESMF_FieldGet(sm4Field,localDE=0,farrayPtr=soilm4,rc=status) + call LIS_verify(status,'ESMF_FieldGet failed for sm4 in noahmp401_gettws') + call ESMF_FieldGet(gwField,localDE=0,farrayPtr=gws,rc=status) + call LIS_verify(status,'ESMF_FieldGet failed for gw in noahmp401_gettws') + call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) + call LIS_verify(status,'ESMF_FieldGet failed for SWE in noahmp401_gettws') + call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) + call LIS_verify(status,'ESMF_FieldGet failed for Snowdepth in noahmp401_gettws') + + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) !to mm + soilm1(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(1) + soilm2(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(2) + soilm3(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(3) + soilm4(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(4) + gws(t) = NOAHMP401_struc(n)%noahmp401(t)%wa + swe(t) = noahmp401_struc(n)%noahmp401(t)%sneqv + snod(t) = noahmp401_struc(n)%noahmp401(t)%snowh + enddo + +end subroutine noahmp401_gettws diff --git a/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_gettwspred.F90 b/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_gettwspred.F90 new file mode 100755 index 000000000..02a3f19e4 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_gettwspred.F90 @@ -0,0 +1,59 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_gettwspred +! \label{noahmp401_gettwspred} +! +! !REVISION HISTORY: +! 14 Mar 2017: Sujay Kumar; Initial Specification +! 29 May 2020: Baiing Li; Created for Noah-MP4.0.1 +! +! !INTERFACE: +subroutine noahmp401_gettwspred(n, k,obs_pred) +! !USES: + use ESMF + use LIS_coreMod + use LIS_logMod + use LIS_DAobservationsMod + use noahmp401_tws_DAlogMod + use noahmp401_lsmMod + +!EOP + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + integer, intent(in) :: k + real :: obs_pred(LIS_rc%obs_ngrid(k),LIS_rc%nensem(n)) +! +! !DESCRIPTION: +! +! Returns the Soil moisture obs pred (model's estimate of +! observations) for data assimilation +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[obs\_pred] model's estimate of observations \newline +! \end{description} +!EOP + integer :: t + real :: tws(LIS_rc%npatch(n,LIS_rc%lsm_index)) + + do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) + tws(t) = (NOAHMPpred_struc(n)%clmnwater(1,t) + & + NOAHMPpred_struc(n)%clmnwater(2,t)+& + NOAHMPpred_struc(n)%clmnwater(3,t))/3. + enddo + call LIS_convertPatchSpaceToObsEnsSpace(n,k,& + LIS_rc%lsm_index, & + tws,& + obs_pred) +end subroutine noahmp401_gettwspred diff --git a/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_qc_twsobs.F90 b/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_qc_twsobs.F90 new file mode 100755 index 000000000..82dd50ea4 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_qc_twsobs.F90 @@ -0,0 +1,50 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp36_qc_twsobs +! \label{noahmp36_qc_twsobs} +! +! !REVISION HISTORY: +! 14 Mar 2017: Sujay Kumar: Initial Specification +! +! !INTERFACE: +subroutine noahmp401_qc_twsobs(n,k,OBS_State) +! !USES: + use ESMF + use LIS_coreMod + use LIS_logMod, only : LIS_verify + use LIS_constantsMod, only : LIS_CONST_TKFRZ + use LIS_DAobservationsMod + use noahmp401_lsmMod + use module_sf_noahmplsm_401 !, only: MAXSMC !MN + + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + integer, intent(in) :: k + type(ESMF_State) :: OBS_State +! +! !DESCRIPTION: +! +! This subroutine performs any model-based QC of the observation +! prior to data assimilation. Here the soil moisture observations +! are flagged when LSM indicates that (1) rain is falling (2) +! soil is frozen or (3) ground is fully or partially covered +! with snow MN:(4) ground is covered with vegatation (more than 50%). +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[OBS\_State] ESMF state container for observations \newline +! \end{description} +! +!EOP +end subroutine noahmp401_qc_twsobs diff --git a/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_qctws.F90 b/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_qctws.F90 new file mode 100755 index 000000000..ab1d0be44 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_qctws.F90 @@ -0,0 +1,234 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_qctws +! \label{noahmp401_qctws} +! +! !REVISION HISTORY: +! 14 Mar 2017: Sujay Kumar; Initial Specification +! 29 May 2020: Bailing Li; Created for Noah-MP4.0.1 +! +! !INTERFACE: +subroutine noahmp401_qctws(n, LSM_State) + +! !USES: + use ESMF + use LIS_coreMod + use LIS_logMod, only : LIS_verify + use noahmp401_lsmMod + !use module_sf_noahmplsm_401 + use NOAHMP_TABLES_401, ONLY : SMCMAX_TABLE,SMCWLT_TABLE + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM_State +! +! !DESCRIPTION: +! +! Returns the soilmoisture related state prognostic variables for +! data assimilation +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[LSM\_State] ESMF State container for LSM state variables \newline +! \end{description} +!EOP + integer :: t,gid + integer :: status + real, pointer :: soilm1(:) + real, pointer :: soilm2(:) + real, pointer :: soilm3(:) + real, pointer :: soilm4(:) + real :: smmax + real :: smmin + + type(ESMF_Field) :: sm1Field + type(ESMF_Field) :: sm2Field + type(ESMF_Field) :: sm3Field + type(ESMF_Field) :: sm4Field + +!Wanshu + type(ESMF_Field) :: gwField, sweField, snodField + real, pointer :: gws(:) + real :: gwsmax, gwsmin + real :: MIN_THRESHOLD,MAX_threshold,sm_threshold + integer :: SOILTYP + + real, pointer :: swe(:) + real, pointer :: snod(:) + + real :: swemax,snodmax + real :: swemin,snodmin + + real :: sndens + logical :: update_flag(LIS_rc%ngrid(n)) +!------- + + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 1",sm1Field,rc=status) + call LIS_verify(status,& + "ESMF_StateGet for Soil Moisture Layer 1 failed in noahmp401_qctws") + + call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm1,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet for Soil Moisture Layer 1 failed in noahmp401_qctws") + + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 2",sm2Field,rc=status) + call LIS_verify(status,& + "ESMF_StateGet for Soil Moisture Layer 2 failed in noahmp401_qctws") + + call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm2,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet for Soil Moisture Layer 2 failed in noahmp401_qctws") + + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 3",sm3Field,rc=status) + call LIS_verify(status,& + "ESMF_StateGet for Soil Moisture Layer 3 failed in noahmp401_qctws") + + call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm3,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet for Soil Moisture Layer 3 failed in noahmp401_qctws") + + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 4",sm4Field,rc=status) + call LIS_verify(status,& + "ESMF_StateGet for Soil Moisture Layer 4 failed in noahmp401_qctws") + + call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm4,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet for Soil Moisture Layer 4 failed in noahmp401_qctws") + + !Wanshu + call ESMF_StateGet(LSM_State,"Groundwater Storage",gwField,rc=status) + call LIS_verify(status,'ESMF_StateGet failed for gw in noahmp401_qctws') + + call ESMF_FieldGet(gwField,localDE=0,farrayPtr=gws,rc=status) + call LIS_verify(status,'ESMF_FieldGet failed for gw in noahmp401_qctws') + + call ESMF_AttributeGet(gwField,"Max Value",gwsmax,rc=status) + call LIS_verify(status,& + "ESMF_AttributeGet: Max Value failed in noahmp401_qctws") + + call ESMF_AttributeGet(gwField,"Min Value",gwsmin,rc=status) + call LIS_verify(status,& + "ESMF_AttributeGet: Min Value failed in noahmp401_qctws") + + call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) + call LIS_verify(status) + call ESMF_StateGet(LSM_State,"Snowdepth",snodField,rc=status) + call LIS_verify(status) + + call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) + call LIS_verify(status) + call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) + call LIS_verify(status) + + call ESMF_AttributeGet(sweField,"Max Value",swemax,rc=status) + call LIS_verify(status) + call ESMF_AttributeGet(sweField,"Min Value",swemin,rc=status) + call LIS_verify(status) + call ESMF_AttributeGet(snodField,"Max Value",snodmax,rc=status) + call LIS_verify(status) + call ESMF_AttributeGet(snodField,"Min Value",snodmin,rc=status) + call LIS_verify(status) + + !------- + + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + !Bailing Li: max min soil moisture should be retrieved based on soil type + SOILTYP = NOAHMP401_struc(n)%noahmp401(t)%soiltype + MAX_THRESHOLD = SMCMAX_TABLE(SOILTYP) + MIN_THRESHOLD = SMCWLT_TABLE(SOILTYP) + sm_threshold = MAX_THRESHOLD - 0.02 + + + if(soilm1(t).gt.sm_threshold) then + soilm1(t) = sm_threshold + endif + + if(soilm1(t).lt.MIN_THRESHOLD) then + soilm1(t) = MIN_THRESHOLD + endif + + if(soilm2(t).gt.sm_threshold) then + soilm2(t) = sm_threshold + endif + if(soilm2(t).lt.MIN_THRESHOLD) then + soilm2(t) = MIN_THRESHOLD + endif + + if(soilm3(t).gt.sm_threshold) then + soilm3(t) = sm_threshold + endif + if(soilm3(t).lt.MIN_THRESHOLD) then + soilm3(t) = MIN_THRESHOLD + endif + + if(soilm4(t).gt.sm_threshold) then + soilm4(t) = sm_threshold + endif + if(soilm4(t).lt.MIN_THRESHOLD) then + soilm4(t) = MIN_THRESHOLD + endif + !Wanshu + if(gws(t).gt.gwsmax) then + gws(t) = gwsmax + endif + if(gws(t).lt.gwsmin) then + gws(t) = gwsmin + endif + !------ + enddo + + + update_flag = .true. + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + + gid = LIS_domain(n)%gindex(& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col,& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) + + if((snod(t).lt.snodmin) .or. swe(t).lt.swemin) then + update_flag(gid) = .false. + endif + + enddo + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + gid = LIS_domain(n)%gindex(& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col,& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) + +!Use the model's snow density from the previous timestep + sndens = 0.0 + if(noahmp401_struc(n)%noahmp401(t)%snowh.gt.0) then + sndens = noahmp401_struc(n)%noahmp401(t)%sneqv/noahmp401_struc(n)%noahmp401(t)%snowh + endif + +!If the update is unphysical, do not update. + if(update_flag(gid)) then + snod(t) = snod(t) + swe(t) = snod(t)*sndens + else ! do not update + snod(t) = noahmp401_struc(n)%noahmp401(t)%snowh + swe(t) = noahmp401_struc(n)%noahmp401(t)%sneqv + end if + + if(swe(t).gt.swemax) then + swe(t) = swemax + endif + if(snod(t).gt.snodmax) then + snod(t) = snodmax + endif + + end do + +end subroutine noahmp401_qctws diff --git a/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_scale_tws.F90 b/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_scale_tws.F90 new file mode 100755 index 000000000..2dfed965a --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_scale_tws.F90 @@ -0,0 +1,106 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_scale_tws +! \label{noahmp401_scale_tws} +! +! !REVISION HISTORY: +! 14 Mar 2017: Sujay Kumar; Initial Specification +! 29 May 2020: Bailing Li; created for Noah-MP4.0.1 +! +! !INTERFACE: +subroutine noahmp401_scale_tws(n, LSM_State) + +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc + use LIS_logMod, only : LIS_verify + use noahmp401_lsmMod + use LIS_constantsMod, only : LIS_CONST_RHOFW ! Natt + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM_State +! +! !DESCRIPTION: +! +! Scales twsoisture related state prognostic variables for +! data assimilation +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[LSM\_State] ESMF State container for LSM state variables \newline +! \end{description} +!EOP + +!Wanshu + + type(ESMF_Field) :: gwField + real, pointer :: gws(:) + integer :: t + integer :: status + +! Natt + type(ESMF_Field) :: sm1Field + type(ESMF_Field) :: sm2Field + type(ESMF_Field) :: sm3Field + type(ESMF_Field) :: sm4Field + type(ESMF_Field) :: sweField + type(ESMF_Field) :: snodField + real, pointer :: soilm1(:) + real, pointer :: soilm2(:) + real, pointer :: soilm3(:) + real, pointer :: soilm4(:) + real, pointer :: swe(:) + real, pointer :: snod(:) + + +#if 0 + ! Natt + ! Scale TWS states to mm (Note, GWS is already in mm) + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 1",sm1Field,rc=status) + call LIS_verify(status,'ESMF_StateGet failed for sm1 in noahmp401_scale_tws') + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 2",sm2Field,rc=status) + call LIS_verify(status,'ESMF_StateGet failed for sm2 in noahmp401_scale_tws') + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 3",sm3Field,rc=status) + call LIS_verify(status,'ESMF_StateGet failed for sm3 in noahmp401_scale_tws') + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 4",sm4Field,rc=status) + call LIS_verify(status,'ESMF_StateGet failed for sm4 in noahmp401_scale_tws') + call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) + call LIS_verify(status,'ESMF_StateGet failed for SWE in noahmp401_scale_tws') + call ESMF_StateGet(LSM_State,"Snowdepth",snodField,rc=status) + call LIS_verify(status,'ESMF_StateGet failed for Snowdepth in noahmp401_scale_tws') + + call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm1,rc=status) + call LIS_verify(status,'ESMF_FieldGet failed for sm1 in noahmp401_scale_tws') + call ESMF_FieldGet(sm2Field,localDE=0,farrayPtr=soilm2,rc=status) + call LIS_verify(status,'ESMF_FieldGet failed for sm2 in noahmp401_scale_tws') + call ESMF_FieldGet(sm3Field,localDE=0,farrayPtr=soilm3,rc=status) + call LIS_verify(status,'ESMF_FieldGet failed for sm3 in noahmp401_scale_tws') + call ESMF_FieldGet(sm4Field,localDE=0,farrayPtr=soilm4,rc=status) + call LIS_verify(status,'ESMF_FieldGet failed for sm4 in noahmp401_scale_tws') + call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) + call LIS_verify(status,'ESMF_FieldGet failed for SWE in noahmp401_scale_tws') + call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) + call LIS_verify(status,'ESMF_FieldGet failed for Snowdepth in noahmp401_scale_tws') + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + soilm1(t) = soilm1(t) * NOAHMP401_struc(n)%sldpth(1)*1000.0 ! m3m-3 -> mm + soilm2(t) = soilm2(t) * NOAHMP401_struc(n)%sldpth(2)*1000.0 ! m3m-3 -> mm + soilm3(t) = soilm3(t) * NOAHMP401_struc(n)%sldpth(3)*1000.0 ! m3m-3 -> mm + soilm4(t) = soilm4(t) * NOAHMP401_struc(n)%sldpth(4)*1000.0 ! m3m-3 -> mm + swe(t) = swe(t) * 1000.0 ! m -> mm + snod(t) = snod(t) * 1000.0 ! m -> mm + enddo +#endif + +end subroutine noahmp401_scale_tws diff --git a/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_settws.F90 b/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_settws.F90 new file mode 100755 index 000000000..629cdacd3 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_settws.F90 @@ -0,0 +1,346 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_settws +! \label{noahmp401_settws} +! +! !REVISION HISTORY: +! 14 Mar 2017: Sujay Kumar; Initial Specification +! 29 May 2020: Bailing Li; created for Noah-MP4.0.1 +! +! !INTERFACE: +subroutine noahmp401_settws(n, LSM_State) +! !USES: + use ESMF + use LIS_coreMod + use LIS_logMod + use noahMP401_lsmMod + use NOAHMP_TABLES_401, ONLY : SMCMAX_TABLE,SMCWLT_TABLE + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM_State +! +! !DESCRIPTION: +! +! This routine assigns the soil moisture prognostic variables to noah's +! model space. +! +!EOP + real, parameter :: MIN_GWS_THRESHOLD = 0.00 + real, parameter :: MAX_GWS_THRESHOLD = 7000.0 + real, parameter :: MAX_WA = 7000.0 + real, parameter :: ZSOIL = 2 !mm + real, parameter :: ROUS = 0.2 ! specific yield + !Bailing changed this to be WLTSMC +! real, parameter :: MIN_THRESHOLD = 0.02 + real :: MIN_THRESHOLD + real :: MAX_THRESHOLD + real :: sm_threshold + type(ESMF_Field) :: sm1Field + type(ESMF_Field) :: sm2Field + type(ESMF_Field) :: sm3Field + type(ESMF_Field) :: sm4Field + type(ESMF_Field) :: gwField + type(ESMF_Field) :: sweField + type(ESMF_Field) :: snodField + + real, pointer :: soilm1(:) + real, pointer :: soilm2(:) + real, pointer :: soilm3(:) + real, pointer :: soilm4(:) + real, pointer :: gws(:) + real, pointer :: swe(:) + real, pointer :: snod(:) + + real :: delta + logical :: diffCheck(LIS_rc%ngrid(n)) + logical :: ensCheck(LIS_rc%ngrid(n)) + logical :: largeSM(LIS_rc%ngrid(n)) + integer :: i, c,r,t,m + integer :: SOILTYP ! soil type index [-] + real :: sh2o_tmp, sh2o_rnd + real :: dsneqv,dsnowh,swe_old, snowh_old + integer :: status + logical :: rc1,rc2,rc3,rc4,rc5 + + + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 1",sm1Field,rc=status) + call LIS_verify(status,& + "ESMF_StateSet: Soil Moisture Layer 1 failed in noahmp401_settws") + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 2",sm2Field,rc=status) + call LIS_verify(status,& + "ESMF_StateSet: Soil Moisture Layer 2 failed in noahmp401_settws") + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 3",sm3Field,rc=status) + call LIS_verify(status,& + "ESMF_StateSet: Soil Moisture Layer 3 failed in noahmp401_settws") + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 4",sm4Field,rc=status) + call LIS_verify(status,& + "ESMF_StateSet: Soil Moisture Layer 4 failed in noahmp401_settws") + call ESMF_StateGet(LSM_State,"Groundwater Storage",gwField,rc=status) + call LIS_verify(status,& + "ESMF_StateSet: Groundwater Storage failed in noahmp401_settws") + call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) + call LIS_verify(status,& + "ESMF_StateSet: SWE failed in noahmp401_settws") + call ESMF_StateGet(LSM_State,"Snowdepth",snodField,rc=status) + call LIS_verify(status,& + "ESMF_StateSet: Snowdepth failed in noahmp401_settws") + + + call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm1,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet: Soil Moisture Layer 1 failed in noahmp401_settws") + call ESMF_FieldGet(sm2Field,localDE=0,farrayPtr=soilm2,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet: Soil Moisture Layer 2 failed in noahmp401_settws") + call ESMF_FieldGet(sm3Field,localDE=0,farrayPtr=soilm3,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet: Soil Moisture Layer 3 failed in noahmp401_settws") + call ESMF_FieldGet(sm4Field,localDE=0,farrayPtr=soilm4,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet: Soil Moisture Layer 4 failed in noahmp401_settws") + call ESMF_FieldGet(gwField,localDE=0,farrayPtr=gws,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet: Groundwater Storage failed in noahmp401_settws") + call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet: SWE failed in noahmp401_settws") + call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet: Snowdepth failed in noahmp401_settws") + + + ensCheck = .true. + diffCheck = .false. + largeSM = .false. + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + + c = LIS_domain(n)%tile(t)%col + r = LIS_domain(n)%tile(t)%row + i = LIS_domain(n)%gindex(c,r) + + SOILTYP = NOAHMP401_struc(n)%noahmp401(t)%soiltype + MAX_THRESHOLD = SMCMAX_TABLE(SOILTYP) + + !locations with large soil moisture values are ice points. + !we turn off the increments in such locations. + if(noahmp401_struc(n)%noahmp401(t)%smc(1).gt.MAX_THRESHOLD.or.& + noahmp401_struc(n)%noahmp401(t)%smc(1).gt.0.50) then + largeSM(i) = .true. + endif + enddo + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + + c = LIS_domain(n)%tile(t)%col + r = LIS_domain(n)%tile(t)%row + i = LIS_domain(n)%gindex(c,r) + if(largeSM(i)) then + soilm1(t) = noahmp401_struc(n)%noahmp401(t)%smc(1) + soilm2(t) = noahmp401_struc(n)%noahmp401(t)%smc(2) + soilm3(t) = noahmp401_struc(n)%noahmp401(t)%smc(3) + soilm4(t) = noahmp401_struc(n)%noahmp401(t)%smc(4) + gws(t) = NOAHMP401_struc(n)%noahmp401(t)%wa + snod(t) = noahmp401_struc(n)%noahmp401(t)%snowh + swe(t) = noahmp401_struc(n)%noahmp401(t)%sneqv + endif + enddo + + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + + c = LIS_domain(n)%tile(t)%col + r = LIS_domain(n)%tile(t)%row + i = LIS_domain(n)%gindex(c,r) + + SOILTYP = NOAHMP401_struc(n)%noahmp401(t)%soiltype + MAX_THRESHOLD = SMCMAX_TABLE(SOILTYP) + MIN_THRESHOLD = 0.02 !SMCWLT_TABLE(SOILTYP) + sm_threshold = MAX_THRESHOLD - 0.02 + + if((soilm1(t).lt.MIN_THRESHOLD.or.& + soilm1(t).gt.MAX_THRESHOLD).or.& + (soilm2(t).lt.MIN_THRESHOLD.or.& + soilm2(t).gt.MAX_THRESHOLD).or.& + (soilm3(t).lt.MIN_THRESHOLD.or.& + soilm3(t).gt.MAX_THRESHOLD).or.& + (soilm4(t).lt.MIN_THRESHOLD.or.& + soilm4(t).gt.MAX_THRESHOLD).or.& + (gws(t).lt.MIN_GWS_THRESHOLD.or.& + gws(t).gt.MAX_GWS_THRESHOLD)) then + ensCheck(i) = .false. + endif + if((soilm1(t).ne.soilm1(i*LIS_rc%nensem(n))).and.& + (soilm2(t).ne.soilm2(i*LIS_rc%nensem(n))).and.& + (soilm3(t).ne.soilm3(i*LIS_rc%nensem(n))).and.& + (soilm4(t).ne.soilm4(i*LIS_rc%nensem(n))).and.& + (gws(t).ne.gws(i*LIS_rc%nensem(n)))) then + diffCheck(i) = .true. + endif + enddo + + do i=1,LIS_rc%ngrid(n) + rc1 = .true. + rc2 = .true. + rc3 = .true. + rc4 = .true. + rc5 = .true. + if(.not.ensCheck(i).and.diffCheck(i).and.(.not.largeSM(i))) then + call noahmp401_tws_reorderEnsForOutliers(i,& + LIS_rc%nensem(n),& + soilm1((i-1)*LIS_rc%nensem(n)+1:i*LIS_rc%nensem(n)),& + MIN_THRESHOLD, MAX_THRESHOLD,rc1) + call noahmp401_tws_reorderEnsForOutliers(i,& + LIS_rc%nensem(n),& + soilm2((i-1)*LIS_rc%nensem(n)+1:i*LIS_rc%nensem(n)),& + MIN_THRESHOLD, MAX_THRESHOLD,rc2) + call noahmp401_tws_reorderEnsForOutliers(i,& + LIS_rc%nensem(n),& + soilm3((i-1)*LIS_rc%nensem(n)+1:i*LIS_rc%nensem(n)),& + MIN_THRESHOLD, MAX_THRESHOLD,rc3) + call noahmp401_tws_reorderEnsForOutliers(i,& + LIS_rc%nensem(n),& + soilm4((i-1)*LIS_rc%nensem(n)+1:i*LIS_rc%nensem(n)),& + MIN_THRESHOLD, MAX_THRESHOLD,rc4) + call noahmp401_tws_reorderEnsForOutliers(i,& + LIS_rc%nensem(n),& + gws((i-1)*LIS_rc%nensem(n)+1:i*LIS_rc%nensem(n)),& + MIN_GWS_THRESHOLD, MAX_GWS_THRESHOLD,rc5) + endif + if(.not.rc1.or.& + .not.rc2.or.& + .not.rc3.or.& + .not.rc4.or.& + .not.rc5) then + + do m=1,LIS_rc%nensem(n) + t = (i-1)*LIS_rc%nensem(n)+m + soilm1(t) = noahmp401_struc(n)%noahmp401(t)%smc(1) + soilm2(t) = noahmp401_struc(n)%noahmp401(t)%smc(2) + soilm3(t) = noahmp401_struc(n)%noahmp401(t)%smc(3) + soilm4(t) = noahmp401_struc(n)%noahmp401(t)%smc(4) + gws(t) = NOAHMP401_struc(n)%noahmp401(t)%wa + snod(t) = noahmp401_struc(n)%noahmp401(t)%snowh + swe(t) = noahmp401_struc(n)%noahmp401(t)%sneqv + enddo + endif + enddo + + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + delta = soilm1(t) - NOAHMP401_struc(n)%noahmp401(t)%smc(1) + NOAHMP401_struc(n)%noahmp401(t)%smc(1) = soilm1(t) + NOAHMP401_struc(n)%noahmp401(t)%sh2o(1) = & + NOAHMP401_struc(n)%noahmp401(t)%sh2o(1) + delta + + delta = soilm2(t) - NOAHMP401_struc(n)%noahmp401(t)%smc(2) + NOAHMP401_struc(n)%noahmp401(t)%smc(2) = soilm2(t) + NOAHMP401_struc(n)%noahmp401(t)%sh2o(2) = & + NOAHMP401_struc(n)%noahmp401(t)%sh2o(2) + delta + + delta = soilm3(t) - NOAHMP401_struc(n)%noahmp401(t)%smc(3) + NOAHMP401_struc(n)%noahmp401(t)%smc(3) = soilm3(t) + NOAHMP401_struc(n)%noahmp401(t)%sh2o(3) = & + NOAHMP401_struc(n)%noahmp401(t)%sh2o(3) + delta + + delta = soilm4(t) - NOAHMP401_struc(n)%noahmp401(t)%smc(4) + NOAHMP401_struc(n)%noahmp401(t)%smc(4) = soilm4(t) + NOAHMP401_struc(n)%noahmp401(t)%sh2o(4) = & + NOAHMP401_struc(n)%noahmp401(t)%sh2o(4) + delta + + NOAHMP401_struc(n)%noahmp401(t)%wa=gws(t) + enddo + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + swe_old = noahmp401_struc(n)%noahmp401(t)%sneqv + snowh_old = noahmp401_struc(n)%noahmp401(t)%snowh + + dsneqv = swe(t) - noahmp401_struc(n)%noahmp401(t)%sneqv !in mm + dsnowh = snod(t) - noahmp401_struc(n)%noahmp401(t)%snowh !in m + + !alternate option + call noahmp401_snow_update(n, t, dsneqv, dsnowh) + + if(noahmp401_struc(n)%noahmp401(t)%sneqv.eq.0.or.& + noahmp401_struc(n)%noahmp401(t)%snowh.eq.0) then + noahmp401_struc(n)%noahmp401(t)%sneqv = 0 + noahmp401_struc(n)%noahmp401(t)%snowh = 0 + endif + enddo + +end subroutine noahmp401_settws + + +subroutine noahmp401_tws_reorderEnsForOutliers(i,nensem, statevec, & + minvalue,maxvalue, status) + + use LIS_coreMod + + implicit none + integer :: i + integer :: nensem + real :: statevec(nensem) + real :: minvalue,maxvalue + logical :: status + + real :: minvT, maxvT, minvG, maxvG + integer :: k + real :: spread_total, spread_good, spread_ratio + + !Ensemble spread (total and with 'good' ensemble members + minvT = 1E10 + maxvT = -1E10 + minvG = 1E10 + maxvG = -1E10 + status = .true. + + do k=1,nensem + + if(statevec(k).lt.minvT) then + minvT = statevec(k) + endif + if(statevec(k).gt.maxvT) then + maxvT = statevec(k) + endif + + if(statevec(k).gt.minvalue.and.statevec(k).lt.maxvalue) then + if(statevec(k).lt.minvG) then + minvG = statevec(k) + endif + if(statevec(k).gt.maxvG) then + maxvG = statevec(k) + endif + endif + enddo + + if(minvG.eq.1E10.and.maxvG.eq.-1E10) then + !all members are unphysical. + + statevec = minvalue + status = .false. + + else + spread_total = (maxvT - minvT) + spread_good = (maxvG - minvG) + + spread_ratio = spread_good/spread_total + + !rescale the ensemble + + do k=1,nensem-1 + statevec(k) = statevec(nensem) + & + (statevec(k) - statevec(nensem))*spread_ratio + enddo + endif + +end subroutine noahmp401_tws_reorderEnsForOutliers diff --git a/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_tws_DAlogMod.F90 b/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_tws_DAlogMod.F90 new file mode 100755 index 000000000..31d6ebdd5 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_tws_DAlogMod.F90 @@ -0,0 +1,186 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +! +! 16Feb12 Ben Zaitchik; Initial Specification +! 29 May 2020: Bailing Li; created for Noah-MP4.0.1 +! + +module noahmp401_tws_DAlogMod + + use LIS_constantsMod, only : LIS_CONST_RHOFW + use ESMF +! !PUBLIC MEMBER FUNCTIONS: +!------------------------------------------ + public :: noahmp401_tws_DAlog +!----------------------------------------- +! !PUBLIC TYPES: +!----------------------------------------- + public :: NOAHMPpred_struc +!EOP + + type, public ::NOAHMPpred_dec + + real,allocatable ::clmnwater(:,:) + + end type NOAHMPpred_dec + + type (NOAHMPpred_dec),allocatable :: NOAHMPpred_struc(:) + +contains + + subroutine noahmp401_tws_DAlog(n) + + ! USES: + use LIS_coreMod, only : LIS_rc,LIS_surface + use LIS_timeMgrMod + use noahmp401_lsmMod + use LIS_logMod, only : LIS_logunit, LIS_verify + ! use smootherDA_runMod, only : smootherDA_increments_mode + + ! ARGUMENTS: + integer, intent(in) :: n + + ! DESCRIPTION: + ! Calculates total column water storage three times per month, to + ! approximate the GRACE return frequency + + integer :: i,m,t,gid,d + integer :: yr,mo,da,hr,mn,ss + integer :: yr1, mo1, da1 + integer :: yr2, mo2, da2 + integer :: yr3, mo3, da3 + integer :: tw_tmp1, tw_tmp2 + type(ESMF_Time) :: tTime1,tTime2,tTime3 + type(ESMF_TimeInterval) :: tw1, tw2 + integer :: status + + if(LIS_rc%DAincrMode(n).eq.0) then + if(LIS_rc%twInterval.eq.2592000.0) then + if((LIS_rc%da.eq.1).and.(LIS_rc%hr.eq.12).and.(LIS_rc%mn.eq.0)) then + if(.not.allocated(NOAHMPpred_struc)) then + allocate(NOAHMPpred_struc(LIS_rc%nnest)) + allocate(NOAHMPpred_struc(n)%clmnwater(3,& + LIS_rc%npatch(n,LIS_rc%lsm_index))) + endif + NOAHMPpred_struc(n)%clmnwater = 0.0 + end if + + if(((LIS_rc%da.eq.5).and.(LIS_rc%hr.eq.4).and.(LIS_rc%mn.eq.0)).or. & + ((LIS_rc%da.eq.15).and.(LIS_rc%hr.eq.12).and.(LIS_rc%mn.eq.0)).or. & + ((LIS_rc%da.eq.25).and.(LIS_rc%hr.eq.18).and.(LIS_rc%mn.eq.0))) then + + d = (LIS_rc%da+5)/10 + write(LIS_logunit,*)'[INFO] logging obspred data for GRACE-DA' + + NOAHMPpred_struc(n)%clmnwater(d,:) = 0.0 + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + NOAHMPpred_struc(n)%clmnwater(d,t)= & + NOAHMPpred_struc(n)%clmnwater(d,t) + & + NOAHMP401_struc(n)%noahmp401(t)%sneqv + & + (NOAHMP401_struc(n)%noahmp401(t)%canliq + & + NOAHMP401_struc(n)%noahmp401(t)%canice) + & + (NOAHMP401_struc(n)%noahmp401(t)%smc(1) * & + NOAHMP401_struc(n)%sldpth(1)*LIS_CONST_RHOFW) + & + (NOAHMP401_struc(n)%noahmp401(t)%smc(2) * & + NOAHMP401_struc(n)%sldpth(2)*LIS_CONST_RHOFW) + & + (NOAHMP401_struc(n)%noahmp401(t)%smc(3) * & + NOAHMP401_struc(n)%sldpth(3)*LIS_CONST_RHOFW) + & + (NOAHMP401_struc(n)%noahmp401(t)%smc(4) * & + NOAHMP401_struc(n)%sldpth(4)*LIS_CONST_RHOFW) + & + NOAHMP401_struc(n)%noahmp401(t)%wa + enddo + endif + + else + call ESMF_TimeGet(LIS_twMidTime, yy = yr, & + mm = mo, & + dd = da, & + h = hr, & + m = mn,& + s = ss, & + calendar = LIS_calendar, & + rc = status) + + if((LIS_rc%mo.eq.mo).and.(LIS_rc%da.eq.da) & + .and.(LIS_rc%hr.eq.12).and.(LIS_rc%mn.eq.0)) then + if(.not.allocated(NOAHMPpred_struc)) then + allocate(NOAHMPpred_struc(LIS_rc%nnest)) + allocate(NOAHMPpred_struc(n)%clmnwater(3,& + LIS_rc%npatch(n,LIS_rc%lsm_index))) + endif + NOAHMPpred_struc(n)%clmnwater = 0.0 + end if + + tw_tmp1 = nint(LIS_rc%twInterval/3.0) + tw_tmp2 = tw_tmp1/2 + call ESMF_TimeIntervalSet(tw1,s=tw_tmp1,rc=status) + call ESMF_TimeIntervalSet(tw2,s=tw_tmp2,rc=status) + + tTime1 = LIS_twMidTime + tw2 + tTime2 = tTime1 + tw1 + tTime3 = tTime2 + tw1 + + call ESMF_TimeGet(tTime1,yy=yr1,mm=mo1,dd=da1,calendar=LIS_calendar,& + rc=status) + call ESMF_TimeGet(tTime2,yy=yr2,mm=mo2,dd=da2,calendar=LIS_calendar,& + rc=status) + call ESMF_TimeGet(tTime3,yy=yr3,mm=mo3,dd=da3,calendar=LIS_calendar,& + rc=status) + + if(& + ((LIS_rc%yr.eq.yr1).and.(LIS_rc%mo.eq.mo1).and.(LIS_rc%da.eq.da1)& + .and.(LIS_rc%hr.eq.12).and.(LIS_rc%mn.eq.0)).or. & + ((LIS_rc%yr.eq.yr2).and.(LIS_rc%mo.eq.mo2).and.(LIS_rc%da.eq.da2)& + .and.(LIS_rc%hr.eq.12).and.(LIS_rc%mn.eq.0)).or. & + ((LIS_rc%yr.eq.yr3).and.(LIS_rc%mo.eq.mo3).and.(LIS_rc%da.eq.da3)& + .and.(LIS_rc%hr.eq.12).and.(LIS_rc%mn.eq.0)) & + ) then + + d = -1 + if((LIS_rc%yr.eq.yr1).and.(LIS_rc%mo.eq.mo1).and.(LIS_rc%da.eq.da1)& + .and.(LIS_rc%hr.eq.12).and.(LIS_rc%mn.eq.0)) then + d = 1 + elseif((LIS_rc%yr.eq.yr2).and.(LIS_rc%mo.eq.mo2).and.(LIS_rc%da.eq.da2)& + .and.(LIS_rc%hr.eq.12).and.(LIS_rc%mn.eq.0)) then + d = 2 + elseif((LIS_rc%yr.eq.yr3).and.(LIS_rc%mo.eq.mo3).and.(LIS_rc%da.eq.da3)& + .and.(LIS_rc%hr.eq.12).and.(LIS_rc%mn.eq.0)) then + d = 3 + endif + write(LIS_logunit,*)'[INFO] logging obspred data for GRACE-DA' + NOAHMPpred_struc(n)%clmnwater(d,:) = 0.0 + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + NOAHMPpred_struc(n)%clmnwater(d,t)= & + NOAHMPpred_struc(n)%clmnwater(d,t) + & + NOAHMP401_struc(n)%noahmp401(t)%sneqv + & + (NOAHMP401_struc(n)%noahmp401(t)%canliq + & + NOAHMP401_struc(n)%noahmp401(t)%canice) + & + (NOAHMP401_struc(n)%noahmp401(t)%smc(1) * & + NOAHMP401_struc(n)%sldpth(1)*LIS_CONST_RHOFW) + & + (NOAHMP401_struc(n)%noahmp401(t)%smc(2) * & + NOAHMP401_struc(n)%sldpth(2)*LIS_CONST_RHOFW) + & + (NOAHMP401_struc(n)%noahmp401(t)%smc(3) * & + NOAHMP401_struc(n)%sldpth(3)*LIS_CONST_RHOFW) + & + (NOAHMP401_struc(n)%noahmp401(t)%smc(4) * & + NOAHMP401_struc(n)%sldpth(4)*LIS_CONST_RHOFW) + & + NOAHMP401_struc(n)%noahmp401(t)%wa + + enddo + + endif + + endif + endif + + end subroutine noahmp401_tws_DAlog + +end module noahmp401_tws_DAlogMod diff --git a/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_updatetws.F90 b/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_updatetws.F90 new file mode 100755 index 000000000..e0c031cc9 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_updatetws.F90 @@ -0,0 +1,261 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_updatetws +! \label{noahmp401_updatetws} +! +! !REVISION HISTORY: +! 14 Mar 2017: Sujay Kumar; Initial Specification +! 29 May 2020: Bailing Li; created for Noah-MP4.0.1 +! +! !INTERFACE: +subroutine noahmp401_updatetws(n, LSM_State, LSM_Incr_State) +! !USES: + use ESMF + use LIS_coreMod + use LIS_logMod + use noahmp401_lsmMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM_State + type(ESMF_State) :: LSM_Incr_State +! +! !DESCRIPTION: +! +! This routine assigns the soil moisture prognostic variables to noah's +! model space. +! +!EOP + + type(ESMF_Field) :: sm1Field + type(ESMF_Field) :: sm2Field + type(ESMF_Field) :: sm3Field + type(ESMF_Field) :: sm4Field + type(ESMF_Field) :: sm1IncrField + type(ESMF_Field) :: sm2IncrField + type(ESMF_Field) :: sm3IncrField + type(ESMF_Field) :: sm4IncrField + type(ESMF_Field) :: sweField, sweIncrField + type(ESMF_Field) :: snodField, snodIncrField + + !Wanshu + type(ESMF_Field) :: gwField + type(ESMF_Field) :: gwIncrField + real, pointer :: gws(:) + real, pointer :: gwsIncr(:) + + real, pointer :: soilm1(:) + real, pointer :: soilm2(:) + real, pointer :: soilm3(:) + real, pointer :: soilm4(:) + real, pointer :: soilmIncr1(:) + real, pointer :: soilmIncr2(:) + real, pointer :: soilmIncr3(:) + real, pointer :: soilmIncr4(:) + real, pointer :: swe(:), sweincr(:) + real, pointer :: snod(:), snodincr(:) + integer :: t,i,m,gid + integer :: status + real :: swetmp, snodtmp,sndens + logical :: update_flag(LIS_rc%ngrid(n)) + real :: perc_violation(LIS_rc%ngrid(n)) + + real :: snodmean(LIS_rc%ngrid(n)) + integer :: nsnodmean(LIS_rc%ngrid(n)) + + + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 1",sm1Field,rc=status) + call LIS_verify(status,& + "ESMF_StateGet: Soil Moisture Layer 1 failed in noahmp401_updatetws") + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 2",sm2Field,rc=status) + call LIS_verify(status,& + "ESMF_StateGet: Soil Moisture Layer 2 failed in noahmp401_updatetws") + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 3",sm3Field,rc=status) + call LIS_verify(status,& + "ESMF_StateGet: Soil Moisture Layer 3 failed in noahmp401_updatetws") + call ESMF_StateGet(LSM_State,"Soil Moisture Layer 4",sm4Field,rc=status) + call LIS_verify(status,& + "ESMF_StateGet: Soil Moisture Layer 4 failed in noahmp401_updatetws") + + call ESMF_StateGet(LSM_State,"Groundwater Storage",gwField,rc=status) + call LIS_verify(status,& + "ESMF_StateSet: Groundwater Storage failed in noahmp401_updatetws") + + call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) + call LIS_verify(status) + call ESMF_StateGet(LSM_State,"Snowdepth",snodField,rc=status) + call LIS_verify(status) + + + call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 1",sm1IncrField,rc=status) + call LIS_verify(status,& + "ESMF_StateGet: Soil Moisture Layer 1 failed in noahmp401_updatetws") + call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 2",sm2IncrField,rc=status) + call LIS_verify(status,& + "ESMF_StateGet: Soil Moisture Layer 2 failed in noahmp401_updatetws") + call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 3",sm3IncrField,rc=status) + call LIS_verify(status,& + "ESMF_StateGet: Soil Moisture Layer 3 failed in noahmp401_updatetws") + call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 4",sm4IncrField,rc=status) + call LIS_verify(status,& + "ESMF_StateGet: Soil Moisture Layer 4 failed in noahmp401_updatetws") + + call ESMF_StateGet(LSM_Incr_State, "Groundwater Storage",gwIncrField,rc=status) + call LIS_verify(status,& + "ESMF_StateSet: Groundwater Storage failed in noahmp401_updatetws") + call ESMF_StateGet(LSM_Incr_State,"SWE",sweIncrField,rc=status) + call LIS_verify(status) + call ESMF_StateGet(LSM_Incr_State,"Snowdepth",snodIncrField,rc=status) + call LIS_verify(status) + + + !------------------- + call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm1,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet: Soil Moisture Layer 1 failed in noahmp401_updatetws") + call ESMF_FieldGet(sm2Field,localDE=0,farrayPtr=soilm2,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet: Soil Moisture Layer 2 failed in noahmp401_updatetws") + call ESMF_FieldGet(sm3Field,localDE=0,farrayPtr=soilm3,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet: Soil Moisture Layer 3 failed in noahmp401_updatetws") + call ESMF_FieldGet(sm4Field,localDE=0,farrayPtr=soilm4,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet: Soil Moisture Layer 4 failed in noahmp401_updatetws") + call ESMF_FieldGet(gwField,localDE=0,farrayPtr=gws,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet: Groundwater Storage failed in noahmp401_updatetws") + call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) + call LIS_verify(status) + call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) + call LIS_verify(status) + + + call ESMF_FieldGet(sm1IncrField,localDE=0,farrayPtr=soilmIncr1,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet: Soil Moisture Layer 1 failed in noahmp401_updatetws") + call ESMF_FieldGet(sm2IncrField,localDE=0,farrayPtr=soilmIncr2,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet: Soil Moisture Layer 2 failed in noahmp401_updatetws") + call ESMF_FieldGet(sm3IncrField,localDE=0,farrayPtr=soilmIncr3,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet: Soil Moisture Layer 3 failed in noahmp401_updatetws") + call ESMF_FieldGet(sm4IncrField,localDE=0,farrayPtr=soilmIncr4,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet: Soil Moisture Layer 4 failed in noahmp401_updatetws") + call ESMF_FieldGet(gwIncrField, localDE=0, farrayPtr=gwsIncr,rc=status) + call LIS_verify(status,& + "ESMF_StateSet: Groundwater Storage failed in noahmp401_updatetws") + call ESMF_FieldGet(sweIncrField,localDE=0,farrayPtr=sweincr,rc=status) + call LIS_verify(status) + call ESMF_FieldGet(snodIncrField,localDE=0,farrayPtr=snodincr,rc=status) + call LIS_verify(status) + + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + + soilm1(t) = soilm1(t) + soilmIncr1(t) + soilm2(t) = soilm2(t) + soilmIncr2(t) + soilm3(t) = soilm3(t) + soilmIncr3(t) + soilm4(t) = soilm4(t) + soilmIncr4(t) + gws(t) = gws(t) + gwsIncr(t) + enddo + + + update_flag = .true. + perc_violation = 0.0 + snodmean = 0.0 + nsnodmean = 0 + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + gid = LIS_domain(n)%gindex(& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col,& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) + + swetmp = swe(t) + sweincr(t) + snodtmp = snod(t) + snodincr(t) + + if((snodtmp.lt.0 .or. swetmp.lt.0)) then + update_flag(gid) = .false. + perc_violation(gid) = perc_violation(gid) +1 + endif + + enddo + + do gid=1,LIS_rc%ngrid(n) + perc_violation(gid) = perc_violation(gid) / real(LIS_rc%nensem(n)) + enddo + +! For ensembles that are unphysical, compute the ensemble average after excluding them. This +! is done only if the majority of the ensemble members are good (>80%) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + + gid = LIS_domain(n)%gindex(& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col,& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) + + if(.not.update_flag(gid)) then ! false + if(perc_violation(gid).lt.0.2) then + if(snod(t)+snodincr(t).ge.0) then + snodmean(gid) = snodmean(gid) + snod(t)+snodincr(t) + nsnodmean(gid) = nsnodmean(gid) + 1 + else + snodmean(gid) = 0.0 + endif + endif + endif + enddo + + do gid=1,LIS_rc%ngrid(n) + if(nsnodmean(gid).gt.0) then + snodmean(gid) = snodmean(gid) / real(nsnodmean(gid)) + endif + enddo + +! If the update is unphysical, simply set to the average of +! the good ensemble members. If all else fails, do not update. + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + gid = LIS_domain(n)%gindex(& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col,& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) + + + snodtmp = snod(t) + snodincr(t) + swetmp = swe(t) + sweincr(t) + +!Use the model's snow density from the previous timestep + sndens = 0.0 + if(noahmp401_struc(n)%noahmp401(t)%snowh.gt.0) then + sndens = noahmp401_struc(n)%noahmp401(t)%sneqv/noahmp401_struc(n)%noahmp401(t)%snowh + endif + + if(update_flag(gid)) then + snod(t) = snodtmp + swe(t) = swetmp + elseif(perc_violation(gid).lt.0.2) then + if(snodtmp.lt.0.0) then ! average of the good ensemble members + snod(t) = snodmean(gid) + swe(t) = snodmean(gid)*sndens + else + snod(t) = snodtmp + swe(t) = swetmp + endif + else ! do not update + snod(t) = noahmp401_struc(n)%noahmp401(t)%snowh + swe(t) = noahmp401_struc(n)%noahmp401(t)%sneqv + end if + + enddo + +end subroutine noahmp401_updatetws diff --git a/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_write_tws.F90 b/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_write_tws.F90 new file mode 100755 index 000000000..8ae4e18df --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_write_tws.F90 @@ -0,0 +1,75 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_write_tws +! \label{noahmp401_write_tws} +! +! !REVISION HISTORY: +! 14 Mar 2017: Sujay Kumar; Initial Specification +! +! !INTERFACE: +subroutine noahmp401_write_tws(ftn,n, LSM_State) + +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc + use noahmp401_lsmMod + use LIS_historyMod, only : LIS_writevar_restart + + implicit none +! !ARGUMENTS: + integer, intent(in) :: ftn + integer, intent(in) :: n + type(ESMF_State) :: LSM_State +! +! !DESCRIPTION: +! +! Returns the twsoisture related state prognostic variables for +! data assimilation +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[LSM\_State] ESMF State container for LSM state variables \newline +! \end{description} +!EOP + integer :: t + real, allocatable :: tmp(:) + + allocate(tmp(LIS_rc%npatch(n,LIS_rc%lsm_index))) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + tmp(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(1) + enddo + call LIS_writevar_restart(ftn,n,1,tmp) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + tmp(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(2) + enddo + call LIS_writevar_restart(ftn,n,1,tmp) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + tmp(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(3) + enddo + call LIS_writevar_restart(ftn,n,1,tmp) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + tmp(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(4) + enddo + call LIS_writevar_restart(ftn,n,1,tmp) + !Wanshu + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + tmp(t) = NOAHMP401_struc(n)%noahmp401(t)%wa + enddo + call LIS_writevar_restart(ftn,n,1,tmp) + !--------- + deallocate(tmp) + +end subroutine noahmp401_write_tws diff --git a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_dausafsi_Mod.F90 b/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_dausafsi_Mod.F90 new file mode 100755 index 000000000..f2f27ac91 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_dausafsi_Mod.F90 @@ -0,0 +1,50 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +#include "LIS_misc.h" +module noahmpnew_dausafsi_Mod +!BOP +! +! !MODULE: noahmpnew_dausafsi_Mod +! +! !DESCRIPTION: +! +! !REVISION HISTORY: +! May 2023: Cenlin He; update to work with refactored NoahMP (v5.0 and newer) +! +! !USES: + + implicit none + + PRIVATE +!----------------------------------------------------------------------------- +! !PUBLIC MEMBER FUNCTIONS: +!----------------------------------------------------------------------------- + public :: noahmpnew_dausafsi_init +!----------------------------------------------------------------------------- +! !PUBLIC TYPES: +!----------------------------------------------------------------------------- +!EOP + + SAVE +contains +!BOP +! +! !ROUTINE: noahmpnew_dausafsi_init +! \label{noahmpnew_dausafsi_init} +! +! !INTERFACE: + subroutine noahmpnew_dausafsi_init() +! !USES: +! !DESCRIPTION: +! +!EOP + implicit none + end subroutine noahmpnew_dausafsi_init +end module noahmpnew_dausafsi_Mod diff --git a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_descale_usafsi.F90 b/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_descale_usafsi.F90 new file mode 100755 index 000000000..620cd3c67 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_descale_usafsi.F90 @@ -0,0 +1,75 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmpnew_descale_usafsi +! \label{noahmpnew_descale_usafsi} +! +! !REVISION HISTORY: +! 27Feb2005: Sujay Kumar; Initial Specification +! 25Jun2006: Sujay Kumar: Updated for the ESMF design +! 02 Mar 2010: Sujay Kumar; Modified for Noah 3.1 +! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 and SNODEP +! 15 May 2019: Yeosang Yoon; Modified for NoahMP 4.0.1 and LDTSI +! 13 Dec 2019: Eric Kemp; Replaced LDTSI with USAFSI +! May 2023: Cenlin He; update to work with refactored NoahMP (v5.0 and newer) +! +! !INTERFACE: +subroutine noahmpnew_descale_usafsi(n, LSM_State, LSM_Incr_State) + +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc + use NoahMPnew_lsmMod + use LIS_logMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM_State + type(ESMF_State) :: LSM_Incr_State +! +! !DESCRIPTION: +! +! Returns the snow related state prognostic variables for +! data assimilation +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[LSM\_State] ESMF State container for LSM state variables \newline +! \end{description} +!EOP + + type(ESMF_Field) :: sweField + type(ESMF_Field) :: snodField + + integer :: t + integer :: status + real, pointer :: swe(:) + real, pointer :: snod(:) + +#if 0 + call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) + call LIS_verify(status) + call ESMF_StateGet(LSM_State,"Snowdepth",snodField,rc=status) + call LIS_verify(status) + + call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) + call LIS_verify(status) + call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) + call LIS_verify(status) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + swe(t) = swe(t)*1000.0 + enddo +#endif + +end subroutine noahmpnew_descale_usafsi + diff --git a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_getusafsipred.F90 b/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_getusafsipred.F90 new file mode 100755 index 000000000..e8f8009b1 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_getusafsipred.F90 @@ -0,0 +1,60 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmpnew_getusafsipred +! \label{noahmpnew_getusafsipred} +! +! !REVISION HISTORY: +! 27Feb2005: Sujay Kumar; Initial Specification +! 25Jun2006: Sujay Kumar: Updated for the ESMF design +! 02 Mar 2010: Sujay Kumar; Modified for Noah 3.1 +! 01 May 2014: Yuqiong Liu; modifed to include mesh8, mesh16, and 0p25 SNODEP data +! 24 May 2017: Yeosang Yoon: updated the file to work with the DA observation +! space updates. +! 03 Oct 2018: Yeosang Yoon; Modified for NoahMP 3.6 +! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 and SNODEP +! 15 May 2019: Yeosang Yoon; Modified for NoahMP 4.0.1 and LDTSI +! 13 Dec 2019: Eric Kemp; Replaced LDTSI with USAFSI +! May 2023: Cenlin He; update to work with refactored NoahMP (v5.0 and newer) +! +! !INTERFACE: +subroutine noahmpnew_getusafsipred(n, k, obs_pred) + +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc,LIS_surface + use NoahMPnew_lsmMod + use LIS_DAobservationsMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + integer, intent(in) :: k + real :: obs_pred(LIS_rc%ngrid(n),LIS_rc%nensem(n)) + real :: snwd(LIS_rc%npatch(n,LIS_rc%lsm_index)) +!EOP + +! !DESCRIPTION: +! This routine computes the obspred ('Hx') term for USAFSI DA assimilation +! instances. + + integer :: t + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + snwd(t) = NoahmpNew_struc(n)%noahmpnew(t)%snowh ! Keep in meters + enddo + + call LIS_convertPatchSpaceToObsEnsSpace(n,k,& + LIS_rc%lsm_index, & + snwd,& + obs_pred) + +end subroutine noahmpnew_getusafsipred + diff --git a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_getusafsivars.F90 b/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_getusafsivars.F90 new file mode 100755 index 000000000..6f6bc9ce9 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_getusafsivars.F90 @@ -0,0 +1,73 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmpnew_getusafsivars +! \label{noahmpnew_getusafsivars} +! +! !REVISION HISTORY: +! 27Feb2005: Sujay Kumar; Initial Specification +! 25Jun2006: Sujay Kumar: Updated for the ESMF design +! 02 Mar 2010: Sujay Kumar; Modified for Noah 3.1 +! 03OC2018: Yeosang Yoon; Modified for NoahMP 3.6 +! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 and SNODEP +! 15 May 2019: Yeosang Yoon; Modified for NoahMP 4.0.1 and LDTSI +! 13 Dec 2019: Eric Kemp; Replaced LDTSI with USAFSI +! May 2023: Cenlin He, update to work with refactored NoahMP (v5.0 and newer) + +! !INTERFACE: +! +subroutine noahmpnew_getusafsivars(n, LSM_State) +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc + use LIS_logMod, only : LIS_verify + use NoahMPnew_lsmMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM_State +! +! !DESCRIPTION: +! +! Returns the snow related state prognostic variables for +! data assimilation +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[LSM\_State] ESMF State container for LSM state variables \newline +! \end{description} +! +!EOP + type(ESMF_Field) :: sweField + type(ESMF_Field) :: snodField + + integer :: t + integer :: status + real, pointer :: swe(:) + real, pointer :: snod(:) + + call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) + call LIS_verify(status) + call ESMF_StateGet(LSM_State,"Snowdepth",snodField,rc=status) + call LIS_verify(status) + + call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) + call LIS_verify(status) + call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) + call LIS_verify(status) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + swe(t) = NoahmpNew_struc(n)%noahmpnew(t)%sneqv + snod(t) = NoahmpNew_struc(n)%noahmpnew(t)%snowh + enddo +end subroutine noahmpnew_getusafsivars + diff --git a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_map_usafsi.F90 b/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_map_usafsi.F90 new file mode 100755 index 000000000..1a2ca3c8f --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_map_usafsi.F90 @@ -0,0 +1,137 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmpnew_map_usafsi +! \label{noahmpnew_map_usafsi} +! +! !REVISION HISTORY: +! 27Feb2005: Sujay Kumar; Initial Specification +! 25Jun2006: Sujay Kumar: Updated for the ESMF design +! 02 Mar 2010: Sujay Kumar; Modified for Noah 3.1 +! 21 Jul 2011: James Geiger; Modified for Noah 3.2 +! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 and SNODEP +! 15 May 2019: Yeosang Yoon; Modified for NoahMP 4.0.1 and LDTSI +! 31 Dec 2019: Eric Kemp; Replaced LDTSI with USAFSI +! May 2023: Cenlin He, update to work with refactored NoahMP (v5.0 and newer) + +! !INTERFACE: +subroutine noahmpnew_map_usafsi(n,k,OBS_State,LSM_Incr_State) +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc, LIS_surface + use LIS_constantsMod, only : LIS_CONST_TKFRZ + use LIS_logMod, only : LIS_logunit, LIS_verify + use LIS_lsmMod + use NoahMPnew_lsmMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + integer, intent(in) :: k + type(ESMF_State) :: OBS_State + type(ESMF_State) :: LSM_Incr_State +! !DESCRIPTION: +! +! This subroutine directly maps the observation state to the corresponding +! variables in the LSM state for USAFSI data assimilation. +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[OBS\_State] ESMF State for observations \newline +! \item[LSM\_State] ESMF State for LSM state variables \newline +! \end{description} +! +!EOP + type(ESMF_Field) :: sweIncrField + type(ESMF_Field) :: obs_usafsi_field + real, pointer :: sweincr(:) + type(ESMF_Field) :: snodIncrField + real, pointer :: snodincr(:) + real :: tmpsneqv + real, pointer :: usafsiobs(:) + integer :: t + integer :: status + integer :: obs_state_count + integer :: st_id, en_id + character*100,allocatable :: obs_state_objs(:) + real, allocatable :: noahmpnew_swe(:) + real, allocatable :: noahmpnew_snod(:) + real, allocatable :: snod(:) + + allocate(noahmpnew_swe(LIS_rc%npatch(n,LIS_rc%lsm_index))) + allocate(noahmpnew_snod(LIS_rc%npatch(n,LIS_rc%lsm_index))) + allocate(snod(LIS_rc%npatch(n,LIS_rc%lsm_index))) + + call ESMF_StateGet(LSM_Incr_State,"SWE",sweIncrField,rc=status) + call LIS_verify(status) + + call ESMF_FieldGet(sweIncrField,localDE=0,farrayPtr=sweincr,rc=status) + call LIS_verify(status) + + call ESMF_StateGet(LSM_Incr_State,"Snowdepth",snodincrField,rc=status) + call LIS_verify(status) + + call ESMF_FieldGet(snodincrField,localDE=0,farrayPtr=snodincr,rc=status) + call LIS_verify(status) + + call ESMF_StateGet(OBS_State,itemCount=obs_state_count,rc=status) + call LIS_verify(status) + allocate(obs_state_objs(obs_state_count)) + + call ESMF_StateGet(OBS_State,itemNameList=obs_state_objs,rc=status) + call LIS_verify(status) + + call ESMF_StateGet(OBS_State,obs_state_objs(1),obs_usafsi_field,& + rc=status) + call LIS_verify(status) + call ESMF_FieldGet(obs_usafsi_field,localDE=0,farrayPtr=usafsiobs,rc=status) + call LIS_verify(status) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + noahmpnew_swe(t) = NoahmpNew_struc(n)%noahmpnew(t)%sneqv + noahmpnew_snod(t) = NoahmpNew_struc(n)%noahmpnew(t)%snowh + enddo + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + + call LIS_lsm_DAmapTileSpaceToObsSpace(n,k,t,st_id,en_id) +! Assume here that st_id and en_id are the same and that we are +! working with an model grid finer than the observation grid + + if(usafsiobs(st_id).ge.0) then + if(noahmpnew_snod(t).gt.1e-6) then + tmpsneqv = noahmpnew_swe(t)/noahmpnew_snod(t) + else + tmpsneqv = 0.0 + endif + + snod(t) = usafsiobs(st_id) + +! Based on USAFSI, we manually update SWE + if(snod(t).lt.2.54E-3) tmpsneqv = 0.0 + if(snod(t).ge.2.54E-3.and.tmpsneqv.lt.0.001) then + tmpsneqv = 0.20 + endif + sweincr(t) = tmpsneqv*snod(t) - noahmpnew_swe(t) + snodincr(t) = snod(t) - noahmpnew_snod(t) + else + sweincr(t) = 0 + snodincr(t) = 0 + endif + enddo + + deallocate(obs_state_objs) + deallocate(noahmpnew_swe) + deallocate(noahmpnew_snod) + deallocate(snod) + +end subroutine noahmpnew_map_usafsi + diff --git a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_qc_usafsiobs.F90 b/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_qc_usafsiobs.F90 new file mode 100755 index 000000000..36c068ec3 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_qc_usafsiobs.F90 @@ -0,0 +1,108 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmpnew_qc_usafsiobs +! \label{noahmpnew_qc_usafsiobs} +! +! !REVISION HISTORY: +! 27Feb2005: Sujay Kumar; Initial Specification +! 25Jun2006: Sujay Kumar: Updated for the ESMF design +! 02 Mar 2010: Sujay Kumar; Modified for Noah 3.1 +! 21 Jul 2011: James Geiger; Modified for Noah 3.2 +! 30 Jan 2015: Yuqiong Liu; added additional QC +! 03 Oct 2018: Yeosang Yoon; Modified for NoahMP 3.6 +! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 +! 15 May 2019: Yeosang Yoon; Modified for NoahMP 4.0.1 and LDTSI +! 13 Dec 2019: Eric Kemp; Replaced LDTSI with USAFSI +! May 2023: Cenlin He; update to work with refactored NoahMP (v5.0 and newer) +! +! !INTERFACE: +subroutine noahmpnew_qc_usafsiobs(n,k,OBS_State) +! !USES: + use ESMF + use LIS_coreMod + use LIS_logMod, only : LIS_verify + use LIS_constantsMod, only : LIS_CONST_TKFRZ + use LIS_DAobservationsMod + use NoahMPnew_lsmMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + integer, intent(in) :: k + type(ESMF_State) :: OBS_State +! +! !DESCRIPTION: +! +! This subroutine performs any model-based QC of the observation +! prior to data assimilation. Here the snow observations +! are flagged when LSM indicates that (1) rain is falling (2) +! ground is fully or partially covered with snow. +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[OBS\_State] ESMF state container for observations \newline +! \end{description} +! +!EOP + type(ESMF_Field) :: obs_snow_field + + real, pointer :: snowobs(:) + integer :: t + integer :: gid + integer :: status + real :: stc1(LIS_rc%npatch(n,LIS_rc%lsm_index)) + real :: vegt(LIS_rc%npatch(n,LIS_rc%lsm_index)) + real :: fveg_obs(LIS_rc%obs_ngrid(k)) + real :: tv_obs(LIS_rc%obs_ngrid(k)) + real :: stc1_obs(LIS_rc%obs_ngrid(k)) + real :: vegt_obs(LIS_rc%obs_ngrid(k)) + + call ESMF_StateGet(OBS_State,"Observation01",obs_snow_field,rc=status) + call LIS_verify(status,& + "ESMF_StateGet failed in noahmpnew_qc_usafsiobs") + call ESMF_FieldGet(obs_snow_field,localDE=0,farrayPtr=snowobs,rc=status) + call LIS_verify(status,& + "ESMF_FieldGet failed in noahmpnew_qc_usafsiobs") + + do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) + !stc1(t) = NoahmpNew_struc(n)%noahmpnew(t)%sstc(1) ! get snow/veg temp. + stc1(t) = NoahmpNew_struc(n)%noahmpnew(t)%tslb(1) ! get snow/veg temp. + vegt(t) = LIS_surface(n,1)%tile(t)%vegt + enddo + + call LIS_convertPatchSpaceToObsSpace(n,k,& + LIS_rc%lsm_index, NoahmpNew_struc(n)%noahmpnew(:)%tv,tv_obs) !tv: vegetation temperature. unit: K + call LIS_convertPatchSpaceToObsSpace(n,k,LIS_rc%lsm_index, & !fveg: green vegetation fraction. unit: - + NoahmpNew_struc(n)%noahmpnew(:)%fveg,fveg_obs) + + call LIS_convertPatchSpaceToObsSpace(n,k,& + LIS_rc%lsm_index,stc1,stc1_obs) + call LIS_convertPatchSpaceToObsSpace(n,k,& + LIS_rc%lsm_index,vegt,vegt_obs) + +! do t=1,LIS_rc%obs_ngrid(k) +! if(snowobs(t).ne.LIS_rc%udef) then +! if(fveg_obs(t).gt.0.7) then +! snowobs(t) = LIS_rc%udef +! ! elseif(vegt_obs(t).le.4) then !forest types +! ! snowobs(t) = LIS_rc%udef +! !assume that snow will not form at 5 deg. celcius or higher ground temp. +! elseif(tv_obs(t).ge.278.15) then +! snowobs(t) = LIS_rc%udef +! elseif(stc1_obs(t).ge.278.15) then +! snowobs(t) = LIS_rc%udef +! endif +! endif +! enddo + +end subroutine noahmpnew_qc_usafsiobs + diff --git a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_qcusafsi.F90 b/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_qcusafsi.F90 new file mode 100755 index 000000000..c0a599b9b --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_qcusafsi.F90 @@ -0,0 +1,127 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmpnew_qcusafsi +! \label{noahmpnew_qcsnow} +! +! !REVISION HISTORY: +! 27Feb2005: Sujay Kumar; Initial Specification +! 25Jun2006: Sujay Kumar: Updated for the ESMF design +! 02 Mar 2010: Sujay Kumar; Modified for Noah 3.1 +! 21 Jul 2011: James Geiger; Modified for Noah 3.2 +! 30 Jan 2015: Yuqiong Liu; added additional QC +! 03 Oct 2018: Yeosang Yoon; Modified for NoahMP 3.6 +! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 and SNODEP +! 15 May 2019: Yeosang Yoon; Modified for NoahMP 4.0.1 and LDTSI +! 13 Dec 2019: Eric Kemp; Replaced LDTSI with USAFSI +! 09 Jan 2020: Yeosang Yoon; update QC +! May 2023: Cenlin He; update to work with refactored NoahMP (v5.0 and newer) +! +! !INTERFACE: +subroutine noahmpnew_qcusafsi(n, LSM_State) + +! !USES: + use ESMF + use LIS_coreMod + use NoahMPnew_lsmMod + use LIS_logMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM_State +! +! !DESCRIPTION: +! +! QC's the related state prognostic variable objects for +! USAFSI data assimilation +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[LSM\_State] ESMF State container for LSM state variables \newline +! \end{description} +!EOP + type(ESMF_Field) :: sweField + type(ESMF_Field) :: snodField + integer :: t, gid + integer :: status + real, pointer :: swe(:) + real, pointer :: snod(:) + + real :: swemax,snodmax + real :: swemin,snodmin + + real :: sndens + logical :: update_flag(LIS_rc%ngrid(n)) + + call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) + call LIS_verify(status) + call ESMF_StateGet(LSM_State,"Snowdepth",snodField,rc=status) + call LIS_verify(status) + + call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) + call LIS_verify(status) + call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) + call LIS_verify(status) + + call ESMF_AttributeGet(sweField,"Max Value",swemax,rc=status) + call LIS_verify(status) + call ESMF_AttributeGet(sweField,"Min Value",swemin,rc=status) + call LIS_verify(status) + call ESMF_AttributeGet(snodField,"Max Value",snodmax,rc=status) + call LIS_verify(status) + call ESMF_AttributeGet(snodField,"Min Value",snodmin,rc=status) + call LIS_verify(status) + + update_flag = .true. + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + + gid = LIS_domain(n)%gindex(& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col,& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) + + if((snod(t).lt.snodmin) .or. swe(t).lt.swemin) then + update_flag(gid) = .false. + endif + + enddo + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + gid = LIS_domain(n)%gindex(& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col,& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) + +!Use the model's snow density from the previous timestep + sndens = 0.0 + if(NoahmpNew_struc(n)%noahmpnew(t)%snowh.gt.0) then + sndens = NoahmpNew_struc(n)%noahmpnew(t)%sneqv/NoahmpNew_struc(n)%noahmpnew(t)%snowh + endif + +!If the update is unphysical, do not update. + if(update_flag(gid)) then + snod(t) = snod(t) + swe(t) = snod(t)*sndens + else ! do not update + snod(t) = NoahmpNew_struc(n)%noahmpnew(t)%snowh + swe(t) = NoahmpNew_struc(n)%noahmpnew(t)%sneqv + end if + + if(swe(t).gt.swemax) then + swe(t) = swemax + endif + if(snod(t).gt.snodmax) then + snod(t) = snodmax + endif + + end do + +end subroutine noahmpnew_qcusafsi + diff --git a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_scale_usafsi.F90 b/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_scale_usafsi.F90 new file mode 100755 index 000000000..848510f9c --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_scale_usafsi.F90 @@ -0,0 +1,75 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmpnew_scale_usafsi +! \label{noahmpnew_scale_usafsi} +! +! !REVISION HISTORY: +! 27Feb2005: Sujay Kumar; Initial Specification +! 25Jun2006: Sujay Kumar: Updated for the ESMF design +! 02 Mar 2010: Sujay Kumar; Modified for Noah 3.1 +! 03 Oct 2018: Yeosang Yoon; Modified for NoahMP 3.6 +! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 and SNODEP +! 15 May 2019: Yeosang Yoon; Modified for NoahMP 4.0.1 and LDTSI +! 13 Dec 2019: Eric Kemp; Replaced LDTSI with USAFSI +! May 2023: Cenlin He; update to work with refactored NoahMP (v5.0 and newer) +! +! !INTERFACE: +subroutine noahmpnew_scale_usafsi(n, LSM_State) + +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc + use NoahMPnew_lsmMod + use LIS_logMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM_State +! +! !DESCRIPTION: +! +! Returns the snow related state prognostic variables for +! data assimilation +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[LSM\_State] ESMF State container for LSM state variables \newline +! \end{description} +!EOP + + type(ESMF_Field) :: sweField + type(ESMF_Field) :: snodField + + integer :: t + integer :: status + real, pointer :: swe(:) + real, pointer :: snod(:) + +#if 0 + call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) + call LIS_verify(status) + call ESMF_StateGet(LSM_State,"Snowdepth",snodField,rc=status) + call LIS_verify(status) + + call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) + call LIS_verify(status) + call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) + call LIS_verify(status) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + swe(t) = swe(t)/1000.0 + enddo +#endif + +end subroutine noahmpnew_scale_usafsi + diff --git a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_setusafsivars.F90 b/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_setusafsivars.F90 new file mode 100755 index 000000000..a007eba46 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_setusafsivars.F90 @@ -0,0 +1,112 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmpnew_setusafsivars +! \label{noahmpnew_setusafsivars} +! +! !REVISION HISTORY: +! 15 Aug 2017: Sujay Kumar; Initial Specification +! 03 Oct 2018: Yeosang Yoon; Modified for NoahMP 3.6 +! +! 27Feb2005: Sujay Kumar; Initial Specification +! 25Jun2006: Sujay Kumar: Updated for the ESMF design +! 02 Mar 2010: Sujay Kumar; Modified for Noah 3.1 +! 21 Jul 2011: James Geiger; Modified for Noah 3.2 +! 03 Oct 2018: Yeosang Yoon; Modified for NoahMP 3.6 +! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 and SNODEP +! 15 May 2019: Yeosang Yoon; Modified for NoahMP 4.0.1 and LDTSI +! 13 Dec 2019: Eric Kemp; Replaced LDTSI with USAFSI +! 10 Nov 2020: Eric Kemp; Update LIS_snow_struc +! May 2023: Cenlin He; update to work with refactored NoahMP (v5.0 and newer) +! +! !INTERFACE: +subroutine noahmpnew_setusafsivars(n, LSM_State) +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc, LIS_domain, LIS_surface + use LIS_logMod, only : LIS_logunit, LIS_verify, LIS_endrun + use LIS_snowMod, only : LIS_snow_struc + use NoahMPnew_lsmMod + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM_State +! +! !DESCRIPTION: +! +! This routine assigns the snow progognostic variables to noah's +! model space. The state vector consists of total SWE and snow depth. +! This routine also updates other model prognostics (snice, snliq, +! snow thickness, snow temperature) based on the update. +! +!EOP + type(ESMF_Field) :: sweField + type(ESMF_Field) :: snodField + real, pointer :: swe(:) + real, pointer :: snod(:) + real :: dsneqv,dsnowh + integer :: t + integer :: status + integer :: ncount(LIS_rc%ngrid(n)) + integer :: tid, gid + + call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) + call LIS_verify(status) + call ESMF_StateGet(LSM_State,"Snowdepth",snodField,rc=status) + call LIS_verify(status) + + call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) + call LIS_verify(status) + call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) + call LIS_verify(status) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + + dsneqv = swe(t) - NoahmpNew_struc(n)%noahmpnew(t)%sneqv !in mm + dsnowh = snod(t) - NoahmpNew_struc(n)%noahmpnew(t)%snowh !in m + + ! update + call noahmpnew_usafsi_update(n, t, dsneqv, dsnowh) + + enddo + + if (LIS_rc%snowsrc(n) .gt. 0) then + + ncount = 0 ! Number of tiles per grid id (over land) + LIS_snow_struc(n)%snowdepth = 0 ! At grid points + LIS_snow_struc(n)%sneqv = 0 ! At tiles + + ! Collect SWE at tiles + do t = 1, LIS_rc%npatch(n, LIS_rc%lsm_index) + tid = LIS_surface(n, LIS_rc%lsm_index)%tile(t)%tile_id + LIS_snow_struc(n)%sneqv(tid) = LIS_snow_struc(n)%sneqv(tid) + & + NoahmpNew_struc(n)%noahmpnew(t)%sneqv + end do + + ! Collect mean snow depth at grid points + do t = 1, LIS_rc%npatch(n, LIS_rc%lsm_index) + gid = LIS_surface(n,LIS_rc%lsm_index)%tile(t)%index + LIS_snow_struc(n)%snowdepth(gid) = & + LIS_snow_struc(n)%snowdepth(gid) + & + NoahmpNew_struc(n)%noahmpnew(t)%snowh + ncount(gid) = ncount(gid) + 1 + end do + do t = 1, LIS_rc%ngrid(n) + if (ncount(t).gt.0) then + LIS_snow_struc(n)%snowdepth(t) = & + LIS_snow_struc(n)%snowdepth(t) / ncount(t) + else + LIS_snow_struc(n)%snowdepth(t) = 0.0 + endif + end do + end if + +end subroutine noahmpnew_setusafsivars diff --git a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_transform_usafsi.F90 b/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_transform_usafsi.F90 new file mode 100755 index 000000000..289526183 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_transform_usafsi.F90 @@ -0,0 +1,52 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmpnew_transform_usafsi +! \label{noahmpnew_transform_usafsi} +! +! !REVISION HISTORY: +! 25Jun2006: Sujay Kumar: Initial Specification +! 02 Mar 2010: Sujay Kumar; Modified for Noah 3.1 +! 21 Jul 2011: James Geiger; Modified for Noah 3.2 +! 03 Oct 2018; Yeosang Yoon; Modified for NoahMP 3.6 +! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 +! 15 May 2019: Yeosang Yoon; Modified for NoahMP 4.0.1 and LDTSI +! 13 Dec 2019: Eric Kemp; Replaced LDTSI with USAFSI +! May 2023: Cenlin He; update to work with refactored NoahMP (v5.0 and newer) +! +! !INTERFACE: +subroutine noahmpnew_transform_usafsi(n,OBS_State) + +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc + use LIS_logMod, only : LIS_verify + use NoahMPnew_lsmMod +!EOP + implicit none + + integer, intent(in) :: n + type(ESMF_State) :: OBS_State +! +! !DESCRIPTION: +! +! This subroutine transforms the USAFSI state +! (mm) to the lsm state +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[OBS\_State] ESMF state container for observations \newline +! \end{description} +!EOP + + ! Since USAFSI is already in meters, no work is needed here. + +end subroutine noahmpnew_transform_usafsi diff --git a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_updateusafsivars.F90 b/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_updateusafsivars.F90 new file mode 100755 index 000000000..dfc13f4a1 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_updateusafsivars.F90 @@ -0,0 +1,177 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmpnew_updateusafsivars +! \label{noahmpnew_updateusafsivars} +! +! !REVISION HISTORY: +! 27Feb2005: Sujay Kumar; Initial Specification +! 25Jun2006: Sujay Kumar: Updated for the ESMF design +! 02 Mar 2010: Sujay Kumar; Modified for Noah 3.1 +! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 and SNODEP +! 15 May 2019: Yeosang Yoon; Modified for NoahMP 4.0.1 and LDTSI +! 13 Dec 2019: Eric Kemp; Replaced LDTSI with USAFSI +! 09 Jan 2020: Yeosang Yoon; Updated QC +! May 2023: Cenlin He; update to work with refactored NoahMP (v5.0 and newer) +! +! !INTERFACE: +subroutine noahmpnew_updateusafsivars(n, LSM_State, LSM_Incr_State) +! !USES: + use ESMF + use LIS_coreMod + use NoahMPnew_lsmMod + use LIS_logMod, only : LIS_logunit, LIS_verify + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + type(ESMF_State) :: LSM_State + type(ESMF_State) :: LSM_Incr_State +! +! !DESCRIPTION: +! +! Returns the snow related state prognostic variables for +! data assimilation +! +! The arguments are: +! \begin{description} +! \item[n] index of the nest \newline +! \item[LSM\_State] ESMF State container for LSM state variables \newline +! \item[LSM\_Incr\_State] ESMF State container for LSM state increments \newline +! \end{description} +! +!EOP + + type(ESMF_Field) :: sweField, sweIncrField + type(ESMF_Field) :: snodField, snodIncrField + + integer :: t, gid + integer :: status + real, pointer :: swe(:), sweincr(:) + real, pointer :: snod(:), snodincr(:) + real :: swetmp, snodtmp,sndens + logical :: update_flag(LIS_rc%ngrid(n)) + real :: perc_violation(LIS_rc%ngrid(n)) + + real :: snodmean(LIS_rc%ngrid(n)) + integer :: nsnodmean(LIS_rc%ngrid(n)) + + call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) + call LIS_verify(status) + call ESMF_StateGet(LSM_State,"Snowdepth",snodField,rc=status) + call LIS_verify(status) + + call ESMF_StateGet(LSM_Incr_State,"SWE",sweIncrField,rc=status) + call LIS_verify(status) + call ESMF_StateGet(LSM_Incr_State,"Snowdepth",snodIncrField,rc=status) + call LIS_verify(status) + + + call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) + call LIS_verify(status) + call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) + call LIS_verify(status) + + call ESMF_FieldGet(sweIncrField,localDE=0,farrayPtr=sweincr,rc=status) + call LIS_verify(status) + call ESMF_FieldGet(snodIncrField,localDE=0,farrayPtr=snodincr,rc=status) + call LIS_verify(status) + + + update_flag = .true. + perc_violation = 0.0 + snodmean = 0.0 + nsnodmean = 0 + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + + gid = LIS_domain(n)%gindex(& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col,& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) + + swetmp = swe(t) + sweincr(t) + snodtmp = snod(t) + snodincr(t) + + if((snodtmp.lt.0 .or. swetmp.lt.0)) then + update_flag(gid) = .false. + perc_violation(gid) = perc_violation(gid) +1 + endif + + enddo + + do gid=1,LIS_rc%ngrid(n) + perc_violation(gid) = perc_violation(gid) / real(LIS_rc%nensem(n)) + enddo + +! For ensembles that are unphysical, compute the ensemble average after excluding them. This +! is done only if the majority of the ensemble members are good (>80%) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + + gid = LIS_domain(n)%gindex(& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col,& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) + + if(.not.update_flag(gid)) then ! false + if(perc_violation(gid).lt.0.2) then + if(snod(t)+snodincr(t).ge.0) then + snodmean(gid) = snodmean(gid) + snod(t)+snodincr(t) + nsnodmean(gid) = nsnodmean(gid) + 1 + else + snodmean(gid) = 0.0 + endif + endif + endif + enddo + + do gid=1,LIS_rc%ngrid(n) + if(nsnodmean(gid).gt.0) then + snodmean(gid) = snodmean(gid) / real(nsnodmean(gid)) + endif + enddo + +! If the update is unphysical, simply set to the average of +! the good ensemble members. If all else fails, do not update. + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + gid = LIS_domain(n)%gindex(& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col,& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) + + + snodtmp = snod(t) + snodincr(t) + swetmp = swe(t) + sweincr(t) + +!Use the model's snow density from the previous timestep + sndens = 0.0 + if(NoahmpNew_struc(n)%noahmpnew(t)%snowh.gt.0) then + sndens = NoahmpNew_struc(n)%noahmpnew(t)%sneqv/NoahmpNew_struc(n)%noahmpnew(t)%snowh + endif + + if(update_flag(gid)) then + snod(t) = snodtmp + swe(t) = swetmp + elseif(perc_violation(gid).lt.0.2) then + if(snodtmp.lt.0.0) then ! average of the good ensemble members + snod(t) = snodmean(gid) + swe(t) = snodmean(gid)*sndens + else + snod(t) = snodtmp + swe(t) = swetmp + endif + else ! do not update + snod(t) = NoahmpNew_struc(n)%noahmpnew(t)%snowh + swe(t) = NoahmpNew_struc(n)%noahmpnew(t)%sneqv + end if + + enddo + +end subroutine noahmpnew_updateusafsivars + diff --git a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_usafsi_update.F90 b/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_usafsi_update.F90 new file mode 100755 index 000000000..489b50b34 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_usafsi_update.F90 @@ -0,0 +1,372 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmpnew_usafsi_update +! \label{noahmpnew_usafsi_update} +! +! !REVISION HISTORY: +! 13 Aug 2017: Sujay Kumar; Initial specification +! 14 Dec 2018: Yeosang Yoon; Modified code for NoahMP 4.0.1 and SNODEP +! 15 May 2019: Yeosang Yoon; Modified for NoahMP 4.0.1 and LDTSI +! 13 Dec 2019: Eric Kemp; Replaced LDTSI with USAFSI +! May 2023: Cenlin He; update to work with refactored NoahMP (v5.0 and newer) +! +! !INTERFACE +subroutine noahmpnew_usafsi_update(n, t, dsneqv, dsnowh, NoahmpIO, noahmp) + + use LIS_coreMod + use NoahMPnew_lsmMod + use NoahmpIOVarType + use NoahmpVarType + use SnowpackCompactionMod, only : SnowpackCompaction + use SnowLayerCombineMod, only : SnowLayerCombine + use SnowLayerDivideMod, only : SnowLayerDivide + + + implicit none +! +! !DESCRIPTION: +! This subroutine updates relevant snow prognostics based +! on the update to the total SWE (dsneqv) and total +! snow depth (dsnowh). The updated variables include +! number of snow layers, snice, snliq, snow temperature +! and snow thickness. +! +! !ARGUMENTS: + integer, intent(in) :: n + integer, intent(in) :: t + real :: dsneqv !mm + real :: dsnowh !m + type(NoahmpIO_type) , intent(in) :: NoahmpIO + type(noahmp_type), intent(inout) :: noahmp + +!EOP + real, parameter :: tfrz = 273.16 + real, allocatable, dimension(:) :: zsoil + real, allocatable, dimension(:) :: ficeold + real, allocatable, dimension(:) :: snice + real, allocatable, dimension(:) :: snliq + real, allocatable, dimension(:) :: stc + real, allocatable, dimension(:) :: supercool + real, allocatable, dimension(:) :: mice + real, allocatable, dimension(:) :: mliq + real, allocatable, dimension(:) :: dzsnso + real, allocatable, dimension(:) :: zsnso + real, allocatable, dimension(:) :: BEXP + real, allocatable, dimension(:) :: PSISAT + real, allocatable, dimension(:) :: SMCMAX + + integer, allocatable, dimension(:) :: imelt !phase change index + real, allocatable, dimension(:) :: sice + + integer :: snl_idx,i,j,iz + integer :: iloc, jloc ! needed, but not use + real :: smp,sneqv,snowh + real :: sneqv1,snowh1 + real :: ponding1,ponding2 + integer :: newnode + integer :: isnow, nsoil, nsnow, soiltype(4), isoil + +! local + real :: SNOFLOW, BDSNOW + + isnow = NoahmpNew_struc(n)%noahmpnew(t)%isnow + nsoil = NoahmpNew_struc(n)%nsoil + nsnow = NoahmpNew_struc(n)%nsnow + + allocate(ficeold(-nsnow+1:0)) + allocate(snice(-nsnow+1:0)) + allocate(snliq(-nsnow+1:0)) + allocate(stc(-nsnow+1:nsoil)) + allocate(imelt(-nsnow+1:nsoil)) + allocate(supercool(-nsnow+1:nsoil)) + allocate(mice(-nsnow+1:nsoil)) + allocate(mliq(-nsnow+1:nsoil)) + allocate(dzsnso(-nsnow+1:nsoil)) + allocate(zsnso(-nsnow+1:nsoil)) + allocate(sice(nsoil)) + allocate(BEXP(nsoil)) + allocate(PSISAT(nsoil)) + allocate(SMCMAX(nsoil)) + + imelt = 0 + + !set empty snow layers to zero + do iz = -nsnow+1, isnow + snice(iz) = 0. + snliq(iz) = 0. + stc(iz) = 0. + dzsnso(iz)= 0. + zsnso(iz) = 0. + enddo + + ! initialize the variables + soiltype = NoahmpNew_struc(n)%noahmpnew(t)%soiltype + do isoil = 1, size(soiltype) + BEXP(isoil) = NoahmpIO%BEXP_TABLE (SOILTYPE(isoil)) + PSISAT(isoil) = NoahmpIO%PSISAT_TABLE (SOILTYPE(isoil)) + SMCMAX(isoil) = NoahmpIO%SMCMAX_TABLE (SOILTYPE(isoil)) + end do + + sneqv = NoahmpNew_struc(n)%noahmpnew(t)%sneqv + snowh = NoahmpNew_struc(n)%noahmpnew(t)%snowh + + zsnso(-nsnow+1:nsoil) = NoahmpNew_struc(n)%noahmpnew(t)%zss(1:nsnow+nsoil) + +! snow/soil layer thickness (m) + do iz = isnow+1, nsoil + if(iz == isnow+1) then + dzsnso(iz) = - zsnso(iz) + else + dzsnso(iz) = zsnso(iz-1) - zsnso(iz) + end if + end do + + ! set ZSOIL + allocate(zsoil(nsoil)) + ! zsoil is negative. + zsoil(1) = -NoahmpNew_struc(n)%sldpth(1) + do i = 2, nsoil + zsoil(i) = zsoil(i-1) - NoahmpNew_struc(n)%sldpth(i) + enddo + + + ! state variables + snice(-nsnow+1:0) = & + NoahmpNew_struc(n)%noahmpnew(t)%snowice(1:nsnow) + snliq(-nsnow+1:0) = & + NoahmpNew_struc(n)%noahmpnew(t)%snowliq(1:nsnow) + stc(-nsnow+1:0) = & + NoahmpNew_struc(n)%noahmpnew(t)%tsno(1:nsnow) + ! soil temperature + stc(1:nsoil) = & + NoahmpNew_struc(n)%noahmpnew(t)%tslb(1:nsoil) + + + ! from snowfall routine + ! creating a new layer + IF(ISNOW == 0.and.(dsneqv.gt.0.and.dsnowh.gt.0)) THEN + SNOWH = SNOWH + dsnowh + SNEQV = SNEQV + dsneqv + END IF + + NEWNODE = 0 + + IF(ISNOW == 0 .AND. SNOWH >= 0.025.and.& + (dsneqv.gt.0.and.dsnowh.gt.0)) THEN !MB: change limit + ISNOW = -1 + NEWNODE = 1 + DZSNSO(0)= SNOWH + SNOWH = 0. + STC(0) = MIN(273.16, NoahmpNew_struc(n)%noahmpnew(t)%sfctmp) ! temporary setup + SNICE(0) = SNEQV + SNLIQ(0) = 0. + END IF + + ! snow with layers + IF(ISNOW < 0 .AND. NEWNODE == 0 .and. & + (dsneqv.gt.0.and.dsnowh.gt.0)) then + SNICE(ISNOW+1) = SNICE(ISNOW+1) + dsneqv + DZSNSO(ISNOW+1) = DZSNSO(ISNOW+1) + dsnowh + ENDIF + + if(dsneqv.lt.0.and.dsnowh.lt.0) then + snowh1 = snowh + dsnowh + sneqv1 = sneqv + dsneqv + if(snowh1.ge.0.and.sneqv1.ge.0) then + SNOWH = SNOWH + dsnowh + SNEQV = SNEQV + dsneqv +! Update dzsnso +! how do you determine the thickness of a layer? + if(snowh.le.dzsnso(0)) then + isnow = 0 + dzsnso(-nsnow+1:(isnow-1)) = 0 + dzsnso(isnow) = snowh + elseif(snowh.le.(dzsnso(0)+dzsnso(-1))) then + isnow = -1 + dzsnso(-nsnow+1:(isnow-1)) = 0 + dzsnso(isnow) = snowh -dzsnso(isnow+1) + elseif(snowh.le.(dzsnso(0)+dzsnso(-1)+dzsnso(-2))) then + isnow = -2 + dzsnso(-nsnow+1:(isnow-2)) = 0 + dzsnso(isnow) = snowh -dzsnso(isnow+2) + endif + endif + endif + + ! ice fraction at the last timestep, add check for both snice and snliq are 0.0 + do snl_idx=isnow+1,0 + if(snice(snl_idx)+snliq(snl_idx)>0.0) then + ficeold(snl_idx) = snice(snl_idx) / (snice(snl_idx)+snliq(snl_idx)) + else + ficeold(snl_idx) = 0.0 + endif + enddo + + sice(:) = max(0.0, NoahmpNew_struc(n)%noahmpnew(t)%smc(:)& + - NoahmpNew_struc(n)%noahmpnew(t)%sh2o(:)) + + !imelt + do j = -nsnow+1, nsoil + supercool(j) = 0.0 + end do + + do j = isnow+1,0 ! all layers + mice(j) = snice(j) + mliq(j) = snliq(j) + end do + + do j = 1, nsoil ! soil + mliq(j) = NoahmpNew_struc(n)%noahmpnew(t)%sh2o(j) * dzsnso(j) * 1000. + mice(j) = (NoahmpNew_struc(n)%noahmpnew(t)%smc(j) - & + NoahmpNew_struc(n)%noahmpnew(t)%sh2o(j)) * dzsnso(j) * 1000. + end do + + do j = isnow+1,nsoil ! all layers + imelt(j) = 0 + enddo + + do j = 1,nsoil +! if (opt_frz == 1) then +! Assuming the use of option 1 for now + if(stc(j) < tfrz) then + smp = hfus*(tfrz-stc(j))/(grav*stc(j)) !(m) + SUPERCOOL(J) = SMCMAX(J)*(SMP/PSISAT(J))**(-1./BEXP(J)) + SUPERCOOL(J) = SUPERCOOL(J)*DZSNSO(J)*1000. !(mm) + end if +! end if +! if (opt_frz == 2) then +! call frh2o (supercool(j),& +! NoahmpNew_struc(n)%noahmpnew(t)%sstc(j),& +! NoahmpNew_struc(n)%noahmpnew(t)%smc(j),& +! NoahmpNew_struc(n)%noahmpnew(t)%sh2o(j)) +! supercool(j) = supercool(j)*dzsnso(j)*1000. !(mm) +! end if + enddo + + do j = isnow+1,nsoil + if (mice(j) > 0. .and. stc(j) >= tfrz) then !melting + imelt(j) = 1 + endif + if (mliq(j) > supercool(j) .and. stc(j) < tfrz) then + imelt(j) = 2 + endif + + ! If snow exists, but its thickness is not enough to create a layer + if (isnow == 0 & + .and. sneqv > 0. .and. j == 1) then + if (stc(j) >= tfrz) then + imelt(j) = 1 + endif + endif + enddo + + ! from SNOWWATER + SNOFLOW = 0.0 + ponding1 = 0.0 + ponding2 = 0.0 + +! TODO: may need a variable mapping from local to noahmp or direct associate noahmp type to local variables +! TODO: or directly copy paste the original compact, combine, divide subroutine to this da folder. + if(isnow < 0) call SnowpackCompaction(noahmp) +! call compact (parameters, nsnow, nsoil, noahmpnew_struc(n)%ts, & !in +! stc, snice, snliq, zsoil, imelt, ficeold, iloc, jloc, & !in +! isnow, dzsnso ,zsnso) !inout + if(isnow < 0) call SnowLayerCombine(noahmp) +! call combine (parameters, nsnow, nsoil ,iloc, jloc, & !in +! isnow, noahmpnew_struc(n)%noahmpnew(t)%sh2o, & !inout +! stc, snice, snliq, dzsnso, sice, snowh, sneqv, & !inout +! ponding1, ponding2) !out + if(isnow < 0) call SnowLayerDivide(noahmp) +! call divide (parameters, nsnow, nsoil, & !in +! isnow, stc, snice, snliq, dzsnso) !inout + + !set empty snow layers to zero + do iz = -nsnow+1, isnow + snice(iz) = 0. + snliq(iz) = 0. + stc(iz) = 0. + dzsnso(iz)= 0. + zsnso(iz) = 0. + enddo + + !to obtain equilibrium state of snow in glacier region + IF(SNEQV > 2000.) THEN ! 2000 mm -> maximum water depth + BDSNOW = SNICE(0) / DZSNSO(0) + SNOFLOW = (SNEQV - 2000.) + SNICE(0) = SNICE(0) - SNOFLOW + DZSNSO(0) = DZSNSO(0) - SNOFLOW/BDSNOW + !SNOFLOW = SNOFLOW / DT + END IF + + ! sum up snow mass for layered snow + IF(ISNOW < 0) THEN ! MB: only do for multi-layer + SNEQV = 0. + SNOWH = 0. ! Yeosang Yoon + DO IZ = ISNOW+1,0 + SNEQV = SNEQV + SNICE(IZ) + SNLIQ(IZ) + SNOWH = SNOWH + DZSNSO(IZ) ! Yeosang Yoon + ENDDO + END IF + + ! Yeosag Yoon, no snow layer case, limit snow density to 1000 + IF (ISNOW == 0 .AND. SNEQV > 0. .AND. SNOWH > 0.) THEN + BDSNOW = SNEQV/SNOWH + IF (BDSNOW >= DENH2O) THEN + SNOWH = SNOWH*(BDSNOW/1000.) ! change unit, SNEQV=[mm] SNOWH=[m] + END IF + END IF + + ! Reset ZSNSO and layer thinkness DZSNSO + DO IZ = ISNOW+1, 0 + DZSNSO(IZ) = -DZSNSO(IZ) + END DO + + DZSNSO(1) = ZSOIL(1) + DO IZ = 2,NSOIL + DZSNSO(IZ) = (ZSOIL(IZ) - ZSOIL(IZ-1)) + END DO + + ZSNSO(ISNOW+1) = DZSNSO(ISNOW+1) + DO IZ = ISNOW+2 ,NSOIL + ZSNSO(IZ) = ZSNSO(IZ-1) + DZSNSO(IZ) + ENDDO + + DO IZ = ISNOW+1 ,NSOIL + DZSNSO(IZ) = -DZSNSO(IZ) + END DO + + ! update state vars + NoahmpNew_struc(n)%noahmpnew(t)%isnow = isnow + NoahmpNew_struc(n)%noahmpnew(t)%sneqv = sneqv + NoahmpNew_struc(n)%noahmpnew(t)%snowh = snowh + + NoahmpNew_struc(n)%noahmpnew(t)%zss(1:nsnow+& + nsoil) = zsnso(-nsnow+1:nsoil) + NoahmpNew_struc(n)%noahmpnew(t)%snowice(1:nsnow) = & + snice(-nsnow+1:0) + NoahmpNew_struc(n)%noahmpnew(t)%snowliq(1:nsnow) = & + snliq(-nsnow+1:0) + NoahmpNew_struc(n)%noahmpnew(t)%tsno(1:nsnow) = stc(-nsnow+1:0) + NoahmpNew_struc(n)%noahmpnew(t)%tslb(1:nsoil) = stc(1:nsoil) + + deallocate(ficeold) + deallocate(snice) + deallocate(snliq) + deallocate(stc) + deallocate(imelt) + deallocate(supercool) + deallocate(mice) + deallocate(mliq) + deallocate(dzsnso) + deallocate(zsnso) + deallocate(sice) + +end subroutine noahmpnew_usafsi_update diff --git a/lis/surfacemodels/land/noahmp.new/irrigation/noahmpnew_getirrigationstates.F90 b/lis/surfacemodels/land/noahmp.new/irrigation/noahmpnew_getirrigationstates.F90 new file mode 100755 index 000000000..ca3af7682 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/irrigation/noahmpnew_getirrigationstates.F90 @@ -0,0 +1,517 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +#include "LIS_misc.h" + +!BOP +! +! !ROUTINE: noahmpnew_getirrigationstates +! \label{noahmpnew_getirrigationstates} +! +! !INTERFACE: +subroutine noahmpnew_getirrigationstates(n,irrigState,NoahmpIO) +! !USES: + use ESMF + use LIS_coreMod + use LIS_logMod + use NoahMP401_lsmMod + use LIS_vegDataMod, only: LIS_read_shdmin, LIS_read_shdmax + use NoahmpIOVarType + +! !DESCRIPTION: +! +! Calculate water requirement and apply the amount to precipitation. +! +! Irrigate when root zone soil moisture falls below 50 % of +! the field capacity (reference soil moiture) at 6 am LST. +! The root zone is actual maximum root depth rather than NOAH root zone. +! Method of irrigation is by precipitation between 6-10 am LST. +! +! Irrigation amount is scaled to grid total crop fraction when intensity +! is less than the fraction. Irrigation is expanded to non-crop, non-forest, +! non-baresoil/urban tiles if intensity exceeds grid total crop fraction. +! In latter case, scaled irrigation is applied to grassland first, +! then further applied over the rest of tiles equally if the intensity +! exceeds grassland fraction as well. +! +! Optionally efficiency correction is applied to account for field loss. +! +! Optionally outputs amount of water put into the system to a text file. +! +! This version includes modifications to irr4 as follows: +! 1) Use location specific growing season threshold (40% of GFRAC range) +! 2) Allow irrigation in non-crop/non-forest tiles when irrigation +! intensity exceeds total crop fraction +! +! REVISION HISTORY: +! +! Aug 2008: Hiroko Kato; Initial code +! Nov 2012: Sujay Kumar, Incorporated into LIS +! Jun 2014: Ben Zaitchik; Added flood scheme +! Aug 2016: Wanshu Nie; Incorporated into NoahMP +! May 2018: Wanshu Nie; Add temperature check for GRACE-DA purpose +! May 2019: Jessica Erlingis; Incorporate W. Nie's updates into LIS +! and add optional flag for groundwater abstraction +! Feb 2020: Jessica Erlingis; Correct sprinkler scheme so that it checks moisture +! at otimess and applies constant rate for irrhrs +! March 2020: Jessica Erlingis; Add to Noah-MP 4.0.1 +! Apr 2021: Wanshu Nie; Add option to interact with DVEG +! May 2021: Wanshu Nie; update irrigation using ensemble mean when runing with DA. +! May 2023: Cenlin He; update to work with Noah-MP refactored code (v5.0 and later) + +!EOP + implicit none + ! Sprinkler parameters + real, parameter :: otimess = 6.0 ! local trigger check start time [hour] + real, parameter :: irrhrs = 4. ! duration of irrigation hours + ! Drip parameters (not currently implemented) + real, parameter :: otimeds = 6.0 ! local trigger check start time [hour] + real, parameter :: irrhrd = 12.0 ! duration of irrigation hours + ! Flood parameters + real, parameter :: otimefs = 6.0 ! local trigger check start time [hour] + real, parameter :: irrhrf = 1.0 ! duration of irrigation hours + !!!real, parameter :: ffreq = 0.0 ! frequency of flood irrig [days] set to 0.0 to use thresh instead + + real, parameter :: efcor = 0.0 ! Efficiency Correction (%) + integer, parameter :: nsoil = 4 + + integer :: n + integer :: rc + integer :: t,k,gid,vegt,l + type(ESMF_State) :: irrigState + type(ESMF_Field) :: irrigRateField,irrigFracField + type(ESMF_Field) :: irrigRootDepthField,irrigScaleField + type(NoahmpIO_type) , intent(in) :: NoahmpIO + + + real, pointer :: irrigRate(:), irrigFrac(:) + real, pointer :: irrigRootDepth(:), irrigScale(:) + integer :: chhr, lhr + integer :: soiltyp ! soil type index [-] + real :: asmc, tsmcwlt, tsmcref, ma, otimes, otimee, irrhr + real :: sldpth(nsoil) + real :: rdpth(nsoil) + real :: zdpth(nsoil) + real :: water(nsoil) + real :: twater, twater1, twater2 + real :: ippix, crootd + real :: smcmax, smcref, smcwlt + !real :: smcref1, smcwlt1, shdfac + real :: smhigh, smlow + integer :: lroot,veg_index1,veg_index2 + real :: gsthresh, ltime + real :: shdfac, shdmin, shdmax + real :: timestep, shift_otimes, shift_otimee + real :: AWS + real :: Dtime + real, allocatable :: placeshdmax(:,:), placeshdmin(:,:) + real :: sfctemp, tempcheck + + type(ESMF_Field) :: irriggwratioField + real, pointer :: irriggwratio(:) + + integer :: i, m + real :: sfctemp_avg + real :: shdfac_avg + real :: smc_avg(nsoil) + + call ESMF_StateGet(irrigState, "Irrigation rate",irrigRateField,rc=rc) + call LIS_verify(rc,'ESMF_StateGet failed for Irrigation rate') + call ESMF_FieldGet(irrigRateField, localDE=0,farrayPtr=irrigRate,rc=rc) + call LIS_verify(rc,'ESMF_FieldGet failed for Irrigation rate') + + call ESMF_StateGet(irrigState, "Irrigation frac",& + irrigFracField,rc=rc) + call LIS_verify(rc,'ESMF_StateGet failed for Irrigation frac') + call ESMF_FieldGet(irrigFracField, localDE=0,& + farrayPtr=irrigFrac,rc=rc) + call LIS_verify(rc,'ESMF_FieldGet failed for Irrigation frac') + + call ESMF_StateGet(irrigState, "Irrigation max root depth",& + irrigRootDepthField,rc=rc) + call LIS_verify(rc,'ESMF_StateGet failed for Irrigation max root depth') + call ESMF_FieldGet(irrigRootDepthField, localDE=0,& + farrayPtr=irrigRootDepth,rc=rc) + call LIS_verify(rc,'ESMF_FieldGet failed for Irrigation root depth') + + call ESMF_StateGet(irrigState, "Irrigation scale",& + irrigScaleField,rc=rc) + call LIS_verify(rc,'ESMF_StateGet failed for Irrigation scale') + call ESMF_FieldGet(irrigScaleField, localDE=0,& + farrayPtr=irrigScale,rc=rc) + call LIS_verify(rc,'ESMF_FieldGet failed for Irrigation scale') + + call ESMF_StateGet(irrigState, "Groundwater irrigation ratio",& + irriggwratioField,rc=rc) + call LIS_verify(rc,'ESMF_StateGet failed for Groundwater irrigation ratio') + call ESMF_FieldGet(irriggwratioField, localDE=0,& + farrayPtr=irriggwratio,rc=rc) + call LIS_verify(rc,'ESMF_FieldGet failed for Groundwater irrigation ratio') + + allocate(placeshdmax(LIS_rc%lnc(n),LIS_rc%lnr(n))) + allocate(placeshdmin(LIS_rc%lnc(n),LIS_rc%lnr(n))) + + call LIS_read_shdmax(n,placeshdmax) + call LIS_read_shdmin(n,placeshdmin) + +!---------------------------------------------------------------------- +! Set start and end times for selected irrigation type +!---------------------------------------------------------------------- + if(LIS_rc%irrigation_type.eq."Sprinkler") then + otimes = otimess + irrhr = irrhrs + otimee = otimess + irrhrs + elseif(LIS_rc%irrigation_type.eq."Drip") then + otimes = otimeds + irrhr = irrhrd + otimee = otimeds + irrhrd + elseif(LIS_rc%irrigation_type.eq."Flood") then + otimes = otimefs + irrhr = irrhrf + otimee = otimefs + irrhrf + endif + + + + do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index)/LIS_rc%nensem(n) + + sfctemp_avg = 0. + shdfac_avg = 0. + smc_avg = 0. + + do m=1,LIS_rc%nensem(n) + + t=(i-1)*LIS_rc%nensem(n)+m + + sfctemp_avg=sfctemp_avg+NoahmpNew_struc(n)%noahmpnew(t)%sfctmp + shdfac_avg=shdfac_avg+NoahmpNew_struc(n)%noahmpnew(t)%fveg + + do k=1,nsoil + + smc_avg(k)=smc_avg(k)+NoahmpNew_struc(n)%noahmpnew(t)%smc(k) + + end do + + end do + + sfctemp_avg=sfctemp_avg/LIS_rc%nensem(n) + shdfac_avg=shdfac_avg/LIS_rc%nensem(n) + + do k=1,nsoil + + smc_avg(k)=smc_avg(k)/LIS_rc%nensem(n) + + end do + + + do m=1,LIS_rc%nensem(n) + + t=(i-1)*LIS_rc%nensem(n)+m + + timestep = NoahmpNew_struc(n)%dt + soiltyp = NoahmpNew_struc(n)%noahmpnew(t)%soiltype + + + ! Adjust bounds by timestep to account for the fact that LIS_rc%hr, etc. + ! will represents the END of the integration timestep window + + + shift_otimes = otimes + (timestep/3600.) + shift_otimee = otimee + (timestep/3600.) + + twater = 0.0 + water = 0.0 + asmc = 0.0 + tsmcwlt = 0.0 + tsmcref = 0.0 + ma = 0.0 + crootd = 0.0 + lroot = 0 + + !JE this code block will need to be changed to account for variable + ! soil layers in Noah-MP + + sldpth(1) = 0.1 ! Soil layer thicknesses (m) + sldpth(2) = 0.3 + sldpth(3) = 0.6 + sldpth(4) = 1.0 + zdpth(1) = sldpth(1) ! Soil layer depth from top (m) + zdpth(2) = sldpth(1) + sldpth(2) + zdpth(3) = sldpth(1) + sldpth(2) + sldpth(3) + zdpth(4) = sldpth(1) + sldpth(2) + sldpth(3) + sldpth(4) + + smcmax = NoahmpIO%SMCMAX_TABLE(soiltyp) + smcref = NoahmpIO%SMCREF_TABLE(soiltyp) + smcwlt = NoahmpIO%SMCWLT_TABLE(soiltyp) + + ! sfctemp = NoahmpNew_struc(n)%noahmpnew(t)%sfctmp + tempcheck = 273.16 + 2.5 + + gid = LIS_surface(n,LIS_rc%lsm_index)%tile(t)%index + chhr = nint(24.0*(LIS_domain(n)%grid(gid)%lon/360.0)) + if((LIS_domain(n)%grid(gid)%lon.lt.0.0).and.& + (abs(mod(LIS_domain(n)%grid(gid)%lon,15.0)).ge.0.0001)) & + chhr = chhr -1 + lhr = LIS_rc%hr +chhr + if(lhr.ge.24) lhr = lhr-24 + if(lhr.lt.0) lhr = lhr+24 + + ltime = real(lhr)+real(LIS_rc%mn)/60.0+real(LIS_rc%ss)/3600.0 + + if((DVEG == 2 .OR. DVEG == 5 .OR. DVEG == 6) .AND. LIS_rc%irrigation_dveg == 1) then + shdfac = shdfac_avg + + else + shdfac = NoahmpNew_struc(n)%noahmpnew(t)%shdfac_monthly(LIS_rc%mo) + end if + + + ! If we are outside of the irrigation window, set rate to 0 + if ((ltime.gt.shift_otimee).or.(ltime.lt.shift_otimes)) then + irrigRate(t) = 0.0 + endif + +! Calculate vegetation and root depth parameters + +! JE This temperature check avoids irrigating at temperatures near or below 0C + if((ltime.ge.shift_otimes).and.(ltime.le.shift_otimee).and. & + (sfctemp_avg.gt.tempcheck)) then +!------------------------------------ + vegt = LIS_surface(n,LIS_rc%lsm_index)%tile(t)%vegt + !---------------------------------------------------------------------- + ! Proceed if it is non-forest, non-baresoil, non-urban + !---------------------------------------------------------------------- + if(LIS_rc%lcscheme.eq."UMD") then !UMD + veg_index1 = 6 + veg_index2 = 11 + elseif(LIS_rc%lcscheme.eq."MODIS".or.LIS_rc%lcscheme.eq."IGBPNCEP") & + then + veg_index1 = 6 + veg_index2 = 14 + elseif(LIS_rc%lcscheme.eq."USGS") then !UMD + veg_index1 = 2 + veg_index2 = 10 + else + write(LIS_logunit,*) '[ERR] The landcover scheme ',& + trim(LIS_rc%lcscheme),' is not supported for irrigation ' + call LIS_endrun() + endif + + if(vegt.ge.veg_index1.and.vegt.le.veg_index2& + .and.vegt.ne.LIS_rc%bareclass.and.& + vegt.ne.LIS_rc%urbanclass) then + if(irrigFrac(t).gt.0) then + ippix = irrigFrac(t)*0.01 + + ! Determine the amount of irrigation to apply if irrigated tile + if( IrrigScale(t).gt.0.0 ) then ! irrigated tile +! if(ippix.gt.0.0) then ! irrigated tile + + !shdmin = minval(NOAHMP36_struc(n)%noahmp36(t)%shdfac_monthly) + !shdmax = maxval(NOAHMP36_struc(n)%noahmp36(t)%shdfac_monthly) + shdmin =placeshdmin(LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col, & + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) + shdmax =placeshdmax(LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col, & + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) + + ! let gsthresh be a function of the range, which means the larger + ! the range is, the higher GVF threshold will be for this grid. + ! JE Gsthresh is a GVF threshold used to identify a growing season for each + ! pixel and allow irrigation during that time + gsthresh = shdmin + & + (LIS_rc%irrigation_GVFparam1 + LIS_rc%irrigation_GVFparam2*& + (shdmax-shdmin)) * (shdmax - shdmin) + + + !JE Changes needed to this code block to account for variable soil layers + ! in Noah-MP + + if(shdfac .ge. gsthresh) then + crootd = irrigRootdepth(t)*shdfac + if(crootd.gt.0.and.crootd.lt.zdpth(1)) then + lroot = 1 + rdpth(1) = crootd + elseif(crootd .ge. zdpth(1).and.crootd .lt. zdpth(2) ) then + lroot = 2 + rdpth(1) = sldpth(1) + rdpth(2) = crootd - zdpth(1) + elseif ( crootd.ge.zdpth(2).and.crootd .lt. zdpth(3) ) then + lroot = 3 + rdpth(1) = sldpth(1) + rdpth(2) = sldpth(2) + rdpth(3) = crootd - zdpth(2) + elseif ( crootd.ge.zdpth(3).and.crootd .lt. zdpth(4) ) then + lroot = 4 + rdpth(1) = sldpth(1) + rdpth(2) = sldpth(2) + rdpth(3) = sldpth(3) + rdpth(4) = crootd - zdpth(3) +! else +! print*,'error getting root depth' +! stop + endif + + !!!!! SPRINKLER IRRIGATION + if(LIS_rc%irrigation_type.eq."Sprinkler") then + !---------------------------------------------------------------------- + ! Set the irrigation rate at start time; keep the value till next day + ! If local time at the tile fall in the irrigation check + ! hour then check the root zone average soil moisture + !---------------------------------------------------------------------- + if(ltime.eq.shift_otimes) then !Check moisture availability at otimes only + !------------------------------------------------------------- + ! Compute the root zone accumlative soil moisture [mm], + ! field capacity [mm], and wilting point [mm] + !------------------------------------------------------------- + if(lroot.gt.0) then + do k=1,lroot + asmc = asmc + smc_avg(k)*rdpth(k)*1000.0 + tsmcwlt = tsmcwlt + smcwlt * rdpth(k)*1000.0 + tsmcref = tsmcref + smcref * rdpth(k)*1000.0 + enddo + !--------------------------------------------------------------- + ! Get the root zone moisture availability to the plant + !--------------------------------------------------------------- + ma = (asmc-tsmcwlt) /(tsmcref - tsmcwlt) + if(ma.le.LIS_rc%irrigation_thresh) then + do k=1,lroot + water(k) = & + (smcref-smc_avg(k))*rdpth(k)*1000.0 + twater = twater + water(k) + enddo + + !----------------------------------------------------------------------------- + ! Scale the irrigation intensity to the crop % when intensity < crop%. + ! Expand irrigation for non-crop, non-forest when intensity > crop % + ! in preference order of grassland first then rest. + ! *scale is pre-computed for each tile in getirrpmapetc module in a way + ! that is transparent to every tile irrigated or non-irrigated + !----------------------------------------------------------------------------- + twater1 = twater + twater = twater * irrigScale(t) + + !----------------------------------------------------------------------------- + ! Apply efficiency correction + !----------------------------------------------------------------------------- + twater2 = twater + twater = twater*(100.0/(100.0-efcor)) + !----------------------------------------------------------------------------- + ! Compute irrigation rate + irrigRate(t) = twater/(irrhr*3600.0) + + endif + endif + endif + !!!!! DRIP IRRIGATION (NOT CURRENTLY IMPLEMENTED) + elseif(LIS_rc%irrigation_type.eq."Drip") then + ! Need to get crop coefficient so that we can caculate unstressed Transp + ! RC=RSMIN/(XLAI*RCS*RCT*RCQ) + ! PCIRR=(RR+DELTA)/(RR*(1.+RC*CH)+DELTA) + ! CALL TRANSP (with PCIRR) + + ! Then add enough water to get from actual Transp to unstressed Transp + twater = 0.0 + !----------------------------------------------------------------------------- + ! Apply efficiency correction + !----------------------------------------------------------------------------- + twater2 = twater + twater = twater*(100.0/(100.0-efcor)) + !----------------------------------------------------------------------------- + ! Compute irrigation rate + !----------------------------------------------------------------------------- + irrigRate(t) = twater ! for drip calculation, twater is a rate [kg/m2/s] + NoahmpNew_struc(n)%noahmpnew(t)%smc(1) = & + NoahmpNew_struc(n)%noahmpnew(t)%smc(1) + (twater-twater2)/(sldpth(1)*1000.0) !! check this with Sujay + + !!!!! FLOOD IRRIGATION + elseif(LIS_rc%irrigation_type.eq."Flood") then + !------------------------------------------------------------- + ! Compute the root zone accumlative soil moisture [mm], + ! field capacity [mm], and wilting point [mm] + !------------------------------------------------------------- + if(lroot.gt.0) then + do k=1,lroot + asmc = asmc + NoahmpNew_struc(n)%noahmpnew(t)%smc(k)*& + rdpth(k)*1000.0 + tsmcwlt = tsmcwlt + smcwlt * rdpth(k)*1000.0 + tsmcref = tsmcref + smcref * rdpth(k)*1000.0 + enddo + !--------------------------------------------------------------- + ! Get the root zone moisture availability to the plant + !--------------------------------------------------------------- +! ma = (asmc-tsmcwlt) /(tsmcref - tsmcwlt) ! Original + ma = (asmc-tsmcwlt) /(tsmcref - tsmcwlt)/IrrigScale(t) ! BZ added IrrigScale + + if( ma .le. LIS_rc%irrigation_thresh ) then + do l = 1, LIS_rc%irrigation_mxsoildpth + if( l == 1 ) then + twater = (SMCMAX - NoahmpNew_struc(n)%noahmpnew(t)%smc(l))*sldpth(l)*1000.0 + else + ! BZ modification 4/2/2015 to saturate entire column and apply ippix + twater = twater + (smcmax - NoahmpNew_struc(n)%noahmpnew(t)%smc(l))*sldpth(l)*1000.0 +! twater = twater + (smcmax - noah33_struc(n)%noah(t)%smc(2))*sldpth(2)*1000.0 +! twater = twater + (smcmax - noah33_struc(n)%noah(t)%smc(3))*sldpth(3)*1000.0 +! twater = twater + (smcmax - noah33_struc(n)%noah(t)%smc(4))*sldpth(4)*1000.0 + endif + end do + + !----------------------------------------------------------------------------- + ! Scale the irrigation intensity to the crop % when intensity < crop%. + ! Expand irrigation for non-crop, non-forest when intensity > crop % + ! in preference order of grassland first then rest. + ! *scale is pre-computed for each tile in getirrpmapetc module in a way + ! that is transparent to every tile irrigated or non-irrigated + !----------------------------------------------------------------------------- + twater1 = twater + twater = twater * irrigScale(t) + !----------------------------------------------------------------------------- + ! Apply efficiency correction + !----------------------------------------------------------------------------- + twater2 = twater + twater = twater*(100.0/(100.0-efcor)) + !----------------------------------------------------------------------------- + ! Compute irrigation rate + !----------------------------------------------------------------------------- + irrigRate(t) = twater/LIS_rc%ts + + ! BZ modification 4/2/2015 to account for ippix and all soil layers: + do l = 1, LIS_rc%irrigation_mxsoildpth + NoahmpNew_struc(n)%noahmpnew(t)%smc(l) = IrrigScale(t)*smcmax + & + (1-IrrigScale(t))*NoahmpNew_struc(n)%noahmpnew(t)%smc(l) + end do + endif + endif + + endif + + endif + end if + end if + end if + + ! Remove irrigated water from groundwater + !JE Add in flag to turn groundwater abstraction on/off + if (LIS_rc%irrigation_GWabstraction.eq.1) then + AWS = NoahmpNew_struc(n)%noahmpnew(t)%wa + Dtime = NoahmpNew_struc(n)%ts + if (LIS_rc%irrigation_SourcePartition.eq.1) then + if(irriggwratio(t).gt.0) then + NoahmpNew_struc(n)%noahmpnew(t)%wa = AWS - irrigRate(t)*Dtime*irriggwratio(t)/100 + + end if + else + NoahmpNew_struc(n)%noahmpnew(t)%wa = AWS - irrigRate(t)*Dtime + end if + end if + end if + + end do + end do + + end subroutine noahmpnew_getirrigationstates diff --git a/lis/surfacemodels/land/noahmp.new/kwm_date_utilities_401.F90 b/lis/surfacemodels/land/noahmp.new/kwm_date_utilities_401.F90 new file mode 100644 index 000000000..e5d02bb70 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/kwm_date_utilities_401.F90 @@ -0,0 +1,822 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +module kwm_date_utilities_401 +contains + subroutine geth_newdate (ndate, odate, idt) + implicit none + +! From old date ('YYYY-MM-DD HH:MM:SS.ffff') and +! delta-time, compute the new date. + +! on entry - odate - the old hdate. +! idt - the change in time + +! on exit - ndate - the new hdate. + + integer, intent(in) :: idt + character (len=*), intent(out) :: ndate + character (len=*), intent(in) :: odate + + +! Local Variables + +! yrold - indicates the year associated with "odate" +! moold - indicates the month associated with "odate" +! dyold - indicates the day associated with "odate" +! hrold - indicates the hour associated with "odate" +! miold - indicates the minute associated with "odate" +! scold - indicates the second associated with "odate" + +! yrnew - indicates the year associated with "ndate" +! monew - indicates the month associated with "ndate" +! dynew - indicates the day associated with "ndate" +! hrnew - indicates the hour associated with "ndate" +! minew - indicates the minute associated with "ndate" +! scnew - indicates the second associated with "ndate" + +! mday - a list assigning the number of days in each month + +! i - loop counter +! nday - the integer number of days represented by "idt" +! nhour - the integer number of hours in "idt" after taking out +! all the whole days +! nmin - the integer number of minutes in "idt" after taking out +! all the whole days and whole hours. +! nsec - the integer number of minutes in "idt" after taking out +! all the whole days, whole hours, and whole minutes. + + integer :: nlen, olen + integer :: yrnew, monew, dynew, hrnew, minew, scnew, frnew + integer :: yrold, moold, dyold, hrold, miold, scold, frold + integer :: mday(12), nday, nhour, nmin, nsec, nfrac, i, ifrc + logical :: opass + character (len=10) :: hfrc + character (len=1) :: sp + + logical :: punctuated + logical :: idtdy, idthr, idtmin, idtsec, idtfrac + +! Assign the number of days in a months + + mday( 1) = 31 + mday( 2) = 28 + mday( 3) = 31 + mday( 4) = 30 + mday( 5) = 31 + mday( 6) = 30 + mday( 7) = 31 + mday( 8) = 31 + mday( 9) = 30 + mday(10) = 31 + mday(11) = 30 + mday(12) = 31 + +! Determine if the date is "punctuated" or just a string of numbers. + if ( odate(5:5) == "-") then + punctuated = .TRUE. + else + punctuated = .FALSE. + endif + +! Break down old hdate into parts + + hrold = 0 + miold = 0 + scold = 0 + frold = 0 + olen = len(odate) + if (punctuated) then + if (olen.ge.11) then + sp = odate(11:11) + else + sp = ' ' + end if + endif + +! Use internal READ statements to convert the CHARACTER string +! date into INTEGER components. + + idtdy = .FALSE. + idthr = .FALSE. + idtmin = .FALSE. + idtsec = .FALSE. + idtfrac = .FALSE. + read(odate(1:4), '(i4)') yrold + if (punctuated) then + read(odate(6:7), '(i2)') moold + read(odate(9:10), '(i2)') dyold + idtdy = .TRUE. + if (olen.ge.13) then + idthr = .TRUE. + read(odate(12:13),'(i2)') hrold + if (olen.ge.16) then + idtmin = .TRUE. + read(odate(15:16),'(i2)') miold + if (olen.ge.19) then + idtsec = .TRUE. + read(odate(18:19),'(i2)') scold + if (olen.gt.20) then + idtfrac = .TRUE. + read(odate(21:olen),*) frold + end if + end if + end if + end if + else ! Not punctuated + read(odate(5:6), '(i2)') moold + read(odate(7:8), '(i2)') dyold + idtdy = .TRUE. + if (olen.ge.10) then + idthr = .TRUE. + read(odate(9:10),'(i2)') hrold + if (olen.ge.12) then + idtmin = .TRUE. + read(odate(11:12),'(i2)') miold + if (olen.ge.14) then + idtsec = .TRUE. + read(odate(13:14),'(i2)') scold + if (olen.ge.15) then + idtfrac = .TRUE. + read(odate(15:olen),*) frold + end if + end if + end if + end if + endif + +! Set the number of days in February for that year. + + mday(2) = nfeb(yrold) + +! Check that ODATE makes sense. + + opass = .TRUE. + +! Check that the month of ODATE makes sense. + + if ((moold.gt.12).or.(moold.lt.1)) then + write(*,*) 'GETH_NEWDATE: Month of ODATE = ', moold + opass = .FALSE. + end if + +! Check that the day of ODATE makes sense. + + if ((dyold.gt.mday(moold)).or.(dyold.lt.1)) then + write(*,*) 'GETH_NEWDATE: Day of ODATE = ', dyold + opass = .FALSE. + end if + +! Check that the hour of ODATE makes sense. + + if ((hrold.gt.23).or.(hrold.lt.0)) then + write(*,*) 'GETH_NEWDATE: Hour of ODATE = ', hrold + opass = .FALSE. + end if + +! Check that the minute of ODATE makes sense. + + if ((miold.gt.59).or.(miold.lt.0)) then + write(*,*) 'GETH_NEWDATE: Minute of ODATE = ', miold + opass = .FALSE. + end if + +! Check that the second of ODATE makes sense. + + if ((scold.gt.59).or.(scold.lt.0)) then + write(*,*) 'GETH_NEWDATE: Second of ODATE = ', scold + opass = .FALSE. + end if + +! Check that the fractional part of ODATE makes sense. + +!KWM IF ((scold.GT.59).or.(scold.LT.0)) THEN +!KWM WRITE(*,*) 'GETH_NEWDATE: Second of ODATE = ', scold +!KWM opass = .FALSE. +!KWM END IF + + if (.not.opass) then + write(*,*) 'Crazy ODATE: ', odate(1:olen), olen + call abort() + end if + +! Date Checks are completed. Continue. + + +! Compute the number of days, hours, minutes, and seconds in idt + + if (idtfrac) then !idt should be in fractions of seconds + if (punctuated) then + ifrc = olen-14 + else + ifrc = olen-20 + endif + ifrc = 10**ifrc + nday = abs(idt)/(86400*ifrc) + nhour = mod(abs(idt),86400*ifrc)/(3600*ifrc) + nmin = mod(abs(idt),3600*ifrc)/(60*ifrc) + nsec = mod(abs(idt),60*ifrc)/(ifrc) + nfrac = mod(abs(idt), ifrc) + else if (idtsec) then !idt should be in seconds + ifrc = 1 + nday = abs(idt)/86400 ! integer number of days in delta-time + nhour = mod(abs(idt),86400)/3600 + nmin = mod(abs(idt),3600)/60 + nsec = mod(abs(idt),60) + nfrac = 0 + else if (idtmin) then !idt should be in minutes + ifrc = 1 + nday = abs(idt)/1440 ! integer number of days in delta-time + nhour = mod(abs(idt),1440)/60 + nmin = mod(abs(idt),60) + nsec = 0 + nfrac = 0 + else if (idthr) then !idt should be in hours + ifrc = 1 + nday = abs(idt)/24 ! integer number of days in delta-time + nhour = mod(abs(idt),24) + nmin = 0 + nsec = 0 + nfrac = 0 + else if (idtdy) then !idt should be in days + ifrc = 1 + nday = abs(idt) ! integer number of days in delta-time + nhour = 0 + nmin = 0 + nsec = 0 + nfrac = 0 + else + write(*,'(''GETH_NEWDATE: Strange length for ODATE: '', i3)') & + olen + write(*,*) odate(1:olen) + call abort() + end if + + if (idt.ge.0) then + + frnew = frold + nfrac + if (frnew.ge.ifrc) then + frnew = frnew - ifrc + nsec = nsec + 1 + end if + + scnew = scold + nsec + if (scnew .ge. 60) then + scnew = scnew - 60 + nmin = nmin + 1 + end if + + minew = miold + nmin + if (minew .ge. 60) then + minew = minew - 60 + nhour = nhour + 1 + end if + + hrnew = hrold + nhour + if (hrnew .ge. 24) then + hrnew = hrnew - 24 + nday = nday + 1 + end if + + dynew = dyold + monew = moold + yrnew = yrold + do i = 1, nday + dynew = dynew + 1 + if (dynew.gt.mday(monew)) then + dynew = dynew - mday(monew) + monew = monew + 1 + if (monew .gt. 12) then + monew = 1 + yrnew = yrnew + 1 + ! If the year changes, recompute the number of days in February + mday(2) = nfeb(yrnew) + end if + end if + end do + + else if (idt.lt.0) then + + frnew = frold - nfrac + if (frnew .lt. 0) then + frnew = frnew + ifrc + nsec = nsec + 1 + end if + + scnew = scold - nsec + if (scnew .lt. 00) then + scnew = scnew + 60 + nmin = nmin + 1 + end if + + minew = miold - nmin + if (minew .lt. 00) then + minew = minew + 60 + nhour = nhour + 1 + end if + + hrnew = hrold - nhour + if (hrnew .lt. 00) then + hrnew = hrnew + 24 + nday = nday + 1 + end if + + dynew = dyold + monew = moold + yrnew = yrold + do i = 1, nday + dynew = dynew - 1 + if (dynew.eq.0) then + monew = monew - 1 + if (monew.eq.0) then + monew = 12 + yrnew = yrnew - 1 + ! If the year changes, recompute the number of days in February + mday(2) = nfeb(yrnew) + end if + dynew = mday(monew) + end if + end do + end if + +! Now construct the new mdate + + nlen = LEN(ndate) + + if (punctuated) then + + if (nlen.gt.20) then + write(ndate(1:19),19) yrnew, monew, dynew, hrnew, minew, scnew + write(hfrc,'(i10)') frnew+1000000000 + ndate = ndate(1:19)//'.'//hfrc(31-nlen:10) + + else if (nlen.eq.19.or.nlen.eq.20) then + write(ndate(1:19),19) yrnew, monew, dynew, hrnew, minew, scnew +19 format(i4,'-',i2.2,'-',i2.2,'_',i2.2,':',i2.2,':',i2.2) + if (nlen.eq.20) ndate = ndate(1:19)//'.' + + else if (nlen.eq.16) then + write(ndate,16) yrnew, monew, dynew, hrnew, minew +16 format(i4,'-',i2.2,'-',i2.2,'_',i2.2,':',i2.2) + + else if (nlen.eq.13) then + write(ndate,13) yrnew, monew, dynew, hrnew +13 format(i4,'-',i2.2,'-',i2.2,'_',i2.2) + + else if (nlen.eq.10) then + write(ndate,10) yrnew, monew, dynew +10 format(i4,'-',i2.2,'-',i2.2) + + end if + + if (olen.ge.11) ndate(11:11) = sp + + else + + if (nlen.gt.20) then + write(ndate(1:14),14) yrnew, monew, dynew, hrnew, minew, scnew + write(hfrc,'(i10)') frnew+1000000000 + ndate = ndate(1:18)//hfrc(31-nlen:10) + + else if (nlen.eq.14) then + write(ndate(1:14),14) yrnew, monew, dynew, hrnew, minew, scnew +14 format(i4,i2.2,i2.2,i2.2,i2.2,i2.2) + + else if (nlen.eq.12) then + write(ndate,12) yrnew, monew, dynew, hrnew, minew +12 format(i4,i2.2,i2.2,i2.2,i2.2) + + else if (nlen.eq.10) then + write(ndate,210) yrnew, monew, dynew, hrnew +210 format(i4,i2.2,i2.2,i2.2) + + else if (nlen.eq.8) then + write(ndate,8) yrnew, monew, dynew +8 format(i4,i2.2,i2.2) + + else + stop "DATELEN PROBLEM" + end if + endif + + end subroutine geth_newdate + + subroutine geth_idts (newdate, olddate, idt) + implicit none + +! From 2 input mdates ('YYYY-MM-DD HH:MM:SS.ffff'), +! compute the time difference. + +! on entry - newdate - the new hdate. +! olddate - the old hdate. + +! on exit - idt - the change in time. +! Units depend on length of date strings. + + character (len=*) , intent(in) :: newdate, olddate + integer , intent(out) :: idt + +! Local Variables + +! yrnew - indicates the year associated with "ndate" +! yrold - indicates the year associated with "odate" +! monew - indicates the month associated with "ndate" +! moold - indicates the month associated with "odate" +! dynew - indicates the day associated with "ndate" +! dyold - indicates the day associated with "odate" +! hrnew - indicates the hour associated with "ndate" +! hrold - indicates the hour associated with "odate" +! minew - indicates the minute associated with "ndate" +! miold - indicates the minute associated with "odate" +! scnew - indicates the second associated with "ndate" +! scold - indicates the second associated with "odate" +! i - loop counter +! mday - a list assigning the number of days in each month + +! ndate, odate: local values of newdate and olddate + character(len=24) :: ndate, odate + + character (len=24) :: tdate + integer :: olen, nlen + integer :: yrnew, monew, dynew, hrnew, minew, scnew, frnew + integer :: yrold, moold, dyold, hrold, miold, scold, frold + integer :: mday(12), i, newdys, olddys + logical :: npass, opass + integer :: isign + integer :: ifrc + + logical :: punctuated + + olen = len(olddate) + nlen = len(newdate) + if (nlen.ne.olen) then + write(*,'("GETH_IDTS: NLEN /= OLEN: ", A, 3x, A)') newdate(1:nlen), olddate(1:olen) + call abort + endif + + if (olddate.gt.newdate) then + isign = -1 + + ifrc = olen + olen = nlen + nlen = ifrc + + ndate = olddate + odate = newdate + else + isign = 1 + ndate = newdate + odate = olddate + end if + +! Assign the number of days in a months + + mday( 1) = 31 + mday( 2) = 28 + mday( 3) = 31 + mday( 4) = 30 + mday( 5) = 31 + mday( 6) = 30 + mday( 7) = 31 + mday( 8) = 31 + mday( 9) = 30 + mday(10) = 31 + mday(11) = 30 + mday(12) = 31 + +! Determine if the date is "punctuated" or just a string of numbers. + if ( odate(5:5) == "-") then + punctuated = .TRUE. + else + punctuated = .FALSE. + endif + + +! Break down old and new hdates into parts + + + hrold = 0 + miold = 0 + scold = 0 + frold = 0 + + hrnew = 0 + minew = 0 + scnew = 0 + frnew = 0 + + read(odate(1:4), '(i4)') yrold + read(ndate(1:4), '(i4)') yrnew + + if (punctuated) then + +! Break down old hdate into parts + + read(odate(6:7), '(i2)') moold + read(odate(9:10), '(i2)') dyold + if (olen.ge.13) then + read(odate(12:13),'(i2)') hrold + if (olen.ge.16) then + read(odate(15:16),'(i2)') miold + if (olen.ge.19) then + read(odate(18:19),'(i2)') scold + if (olen.gt.20) then + if (olen.eq.21) then + read(odate(21:21),'(i1)') frold + else if (olen.eq.22) then + read(odate(21:22),'(i2)') frold + else if (olen.eq.23) then + read(odate(21:23),'(i3)') frold + else if (olen.eq.24) then + read(odate(21:24),'(i4)') frold + endif + end if + end if + end if + end if + +! Break down new hdate into parts + + read(ndate(6:7), '(i2)') monew + read(ndate(9:10), '(i2)') dynew + if (nlen.ge.13) then + read(ndate(12:13),'(i2)') hrnew + if (nlen.ge.16) then + read(ndate(15:16),'(i2)') minew + if (nlen.ge.19) then + read(ndate(18:19),'(i2)') scnew + if (nlen.gt.20) then + read(ndate(21:nlen),*) frnew + end if + end if + end if + end if + else + +! Break down old hdate into parts + + read(odate(5:6), '(i2)') moold + read(odate(7:8), '(i2)') dyold + if (olen.ge.10) then + read(odate(9:10),'(i2)') hrold + if (olen.ge.12) then + read(odate(11:12),'(i2)') miold + if (olen.ge.14) then + read(odate(13:14),'(i2)') scold + if (olen.ge.15) then + read(odate(15:olen),*) frold + end if + end if + end if + end if + +! Break down new hdate into parts + + read(ndate(5:6), '(i2)') monew + read(ndate(7:8), '(i2)') dynew + if (nlen.ge.10) then + read(ndate(9:10),'(i2)') hrnew + if (nlen.ge.12) then + read(ndate(11:12),'(i2)') minew + if (nlen.ge.14) then + read(ndate(13:14),'(i2)') scnew + if (nlen.ge.15) then + read(ndate(15:nlen),*) frnew + end if + end if + end if + end if + endif + +! Check that the dates make sense. + + npass = .true. + opass = .true. + +! Check that the month of NDATE makes sense. + + if ((monew.gt.12).or.(monew.lt.1)) then + print*, 'GETH_IDTS: Month of NDATE = ', monew + npass = .false. + end if + +! Check that the month of ODATE makes sense. + + if ((moold.gt.12).or.(moold.lt.1)) then + print*, 'GETH_IDTS: Month of ODATE = ', moold + opass = .false. + end if + +! Check that the day of NDATE makes sense. + + if (monew.ne.2) then + ! ...... For all months but February + if ((dynew.gt.mday(monew)).or.(dynew.lt.1)) then + print*, 'GETH_IDTS: Day of NDATE = ', dynew + npass = .false. + end if + else if (monew.eq.2) then + ! ...... For February + if ((dynew > nfeb(yrnew)).or.(dynew < 1)) then + print*, 'GETH_IDTS: Day of NDATE = ', dynew + npass = .false. + end if + endif + +! Check that the day of ODATE makes sense. + + if (moold.ne.2) then + ! ...... For all months but February + if ((dyold.gt.mday(moold)).or.(dyold.lt.1)) then + print*, 'GETH_IDTS: Day of ODATE = ', dyold + opass = .false. + end if + else if (moold.eq.2) then + ! ....... For February + if ((dyold > nfeb(yrold)).or.(dyold < 1)) then + print*, 'GETH_IDTS: Day of ODATE = ', dyold + opass = .false. + end if + end if + +! Check that the hour of NDATE makes sense. + + if ((hrnew.gt.23).or.(hrnew.lt.0)) then + print*, 'GETH_IDTS: Hour of NDATE = ', hrnew + npass = .false. + end if + +! Check that the hour of ODATE makes sense. + + if ((hrold.gt.23).or.(hrold.lt.0)) then + print*, 'GETH_IDTS: Hour of ODATE = ', hrold + opass = .false. + end if + +! Check that the minute of NDATE makes sense. + + if ((minew.gt.59).or.(minew.lt.0)) then + print*, 'GETH_IDTS: Minute of NDATE = ', minew + npass = .false. + end if + +! Check that the minute of ODATE makes sense. + + if ((miold.gt.59).or.(miold.lt.0)) then + print*, 'GETH_IDTS: Minute of ODATE = ', miold + opass = .false. + end if + +! Check that the second of NDATE makes sense. + + if ((scnew.gt.59).or.(scnew.lt.0)) then + print*, 'GETH_IDTS: SECOND of NDATE = ', scnew + npass = .false. + end if + +! Check that the second of ODATE makes sense. + + if ((scold.gt.59).or.(scold.lt.0)) then + print*, 'GETH_IDTS: Second of ODATE = ', scold + opass = .false. + end if + + if (.not. npass) then + print*, 'Screwy NDATE: ', ndate(1:nlen) + call abort() + end if + + if (.not. opass) then + print*, 'Screwy ODATE: ', odate(1:olen) + call abort() + end if + +! Date Checks are completed. Continue. + +! Compute number of days from 1 January ODATE, 00:00:00 until ndate +! Compute number of hours from 1 January ODATE, 00:00:00 until ndate +! Compute number of minutes from 1 January ODATE, 00:00:00 until ndate + + newdys = 0 + do i = yrold, yrnew - 1 + newdys = newdys + 337 + nfeb(i) + end do + + if (monew .gt. 1) then + mday(2) = nfeb(yrnew) + do i = 1, monew - 1 + newdys = newdys + mday(i) + end do + mday(2) = 28 + end if + + newdys = newdys + dynew - 1 + +! Compute number of hours from 1 January ODATE, 00:00:00 until odate +! Compute number of minutes from 1 January ODATE, 00:00:00 until odate + + olddys = 0 + + if (moold .gt. 1) then + mday(2) = nfeb(yrold) + do i = 1, moold - 1 + olddys = olddys + mday(i) + end do + mday(2) = 28 + end if + + olddys = olddys + dyold -1 + +! Determine the time difference + + idt = (newdys - olddys) + if (punctuated) then + if (olen.gt.10) then + idt = idt*24 + (hrnew - hrold) + if (olen.gt.13) then + idt = idt*60 + (minew - miold) + if (olen.gt.16) then + idt = idt*60 + (scnew - scold) + if (olen.gt.20) then + ifrc = olen-20 + ifrc = 10**ifrc + idt = idt * ifrc + (frnew-frold) + endif + endif + endif + endif + else + if (olen.gt.8) then + idt = idt*24 + (hrnew - hrold) + if (olen.gt.10) then + idt = idt*60 + (minew - miold) + if (olen.gt.12) then + idt = idt*60 + (scnew - scold) + if (olen.gt.14) then + ifrc = olen-14 + ifrc = 10**ifrc + idt = idt * ifrc + (frnew-frold) + endif + endif + endif + endif + endif + + if (isign .eq. -1) then + idt = idt * isign + end if + + end subroutine geth_idts + + + integer function nfeb(year) +! +! Compute the number of days in February for the given year. +! + implicit none + integer, intent(in) :: year ! Four-digit year + + nfeb = 28 ! By default, February has 28 days ... + if (mod(year,4).eq.0) then + nfeb = 29 ! But every four years, it has 29 days ... + if (mod(year,100).eq.0) then + nfeb = 28 ! Except every 100 years, when it has 28 days ... + if (mod(year,400).eq.0) then + nfeb = 29 ! Except every 400 years, when it has 29 days ... + if (mod(year,3600).eq.0) then + nfeb = 28 ! Except every 3600 years, when it has 28 days. + endif + endif + endif + endif + end function nfeb + + integer function nmdays(hdate) +! +! Compute the number of days in the month of given date hdate. +! + implicit none + character(len=*), intent(in) :: hdate + + integer :: year, month + integer, dimension(12), parameter :: ndays = (/ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 /) + + if (hdate(5:5) == "-") then + read(hdate(1:7), '(I4,1x,I2)') year, month + else + read(hdate(1:6), '(I4,I2)') year, month + endif + + if (month == 2) then + nmdays = nfeb(year) + else + nmdays = ndays(month) + endif + end function nmdays +end module kwm_date_utilities_401 diff --git a/lis/surfacemodels/land/noahmp.new/noahmp_driver_401.F90 b/lis/surfacemodels/land/noahmp.new/noahmp_driver_401.F90 new file mode 100644 index 000000000..88c747a5f --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/noahmp_driver_401.F90 @@ -0,0 +1,1149 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +! Oct 15 2018 Shugong Wang started for implementing Noah-MP 4.0.1 based on the version of 3.6 +! Oct 15 2018 Zhuo Wang modifed for implementing Noah-MP 4.0.1 + +#undef LIS_NoahMP_TEST +! !INTERFACE +subroutine noahmp_driver_401(n, ttile, itimestep, & + latitude, longitude, & + year , month , day , hour , minute , & + dz8w , & ! new in : model configuration + dt , sldpth , nsoil , nsnow , & ! in : model configuration + vegetype, soiltype, shdfac_monthly , tbot , & ! in : Vegetation/Soil characteristics + urban_vegetype, & ! in + cropcat, planting, harvest ,season_gdd, & ! in : Vegetation/Soil characteristics + dveg_opt, crs_opt, btr_opt, run_opt, sfc_opt, frz_opt, & ! in : User options + inf_opt, rad_opt, alb_opt , snf_opt, tbot_opt, stc_opt, & ! in : User options + gla_opt, sndpth_gla_opt, rsf_opt, soil_opt, pedo_opt, & ! in : new options + crop_opt, iz0tlnd, urban_opt, & ! in : new options + soilcomp, soilcL1, soilcL2, soilcL3, soilcL4, & ! in : new options + tair , psurf , wind_e , wind_n , qair , & ! in : forcing + swdown , lwdown , prcp , & ! in : forcing + tsk , hfx , qfx , lh , grdflx , & ! in/out LSM eqv + sfcrunoff, udrunoff, albedo , qsnbot , subsnow , & ! in/out LSM eqv + snowc , smc , pah , & ! in/out LSM eqv + sh2o , tslb , sneqv , snowh , canwat , acsnom , & ! in/out LSM eqv + acsnow , emiss , rs , & ! in/out LSM eqv + isnow , tv , tg , canice , canliq , eah , & ! in/out Noah MP only + tah , cm , ch , fwet , sneqvo , albold , & ! in/out Noah MP only + qsnow , wslake , zwt , wa , wt , tsno , & ! in/out Noah MP only + zss , snowice , snowliq , lfmass , rtmass , stmass , & ! in/out Noah MP only + wood , stblcp , fastcp , lai , sai , tauss , & ! in/out Noah MP only + smoiseq , smcwtd ,deeprech , rech , & ! in/out Noah MP only + grain , gdd , pgs , & ! in/out Noah MP only for crop model + gecros_state, & ! in/out gecros model + t2mv , t2mb , q2mv , q2mb , & ! out Noah MP only + trad , nee , gpp , npp , fveg , runsf , & ! out Noah MP only + runsb , ecan , edir , etran , & ! out Noah MP only + rainf , snowf , fsa , fira , & ! out Noah MP only + apar , psn , sav , sag , rssun , rssha , & ! out Noah MP only + bgap , wgap , tgb , tgv , chv , chb , & ! out Noah MP only + shg , shc , shb , evg , evb , ghv , & ! out Noah MP only + ghb , irg , irc , irb , tr , evc , & ! out Noah MP only + fgev_pet, fcev_pet, fctr_pet, & ! PET + chleaf , chuc , chv2 , chb2 , relsmc, & + !ag (12Sep2019) + rivsto, fldsto, fldfrc,& + parameters , & ! out Noah MP only + sfcheadrt , INFXSRT, soldrain) ! For WRF-Hydro + + use module_sf_noahmpdrv_401, only: noahmplsm_401 + use module_sf_noahmplsm_401 + use LIS_coreMod, only : LIS_rc + use LIS_logMod, only : LIS_logunit, LIS_endrun + use LIS_timeMgrMod, only : LIS_date2time, LIS_tick + + implicit none + integer, intent(in) :: n ! nest id + integer, intent(in) :: ttile ! tile id + integer, intent(in) :: itimestep ! timestep number + real, intent(in) :: latitude ! latitude in decimal degree [-] + real, intent(in) :: longitude ! longitude in decimal degree [-] + integer, intent(in) :: year ! year of the current time step [-] + integer, intent(in) :: month ! month of the current time step [-] + integer, intent(in) :: day ! day of the current time step [-] + integer, intent(in) :: hour ! hour of the current time step [-] + integer, intent(in) :: minute ! minute of the current time step [-] + real, intent(in) :: dt ! timestep [s] + + ! Revised by Zhuo Wang and Shugong Wang + real, intent(in) :: dz8w ! thickness of atmo layers [m] + + integer, intent(in) :: nsoil ! number of soil layers [-] + real, intent(in) :: sldpth(nsoil) ! thickness of soil layers [m] + integer, intent(in) :: nsnow ! maximum number of snow layers (e.g. 3) [-] + integer, intent(in) :: vegetype ! vegetation type [-] + integer, intent(in) :: soiltype ! soil type [-] + integer, intent(in) :: urban_vegetype ! urban land cover type index [-] + real, intent(in) :: shdfac_monthly(12) ! monthly values for green vegetation fraction [-] + real, intent(in) :: tbot ! deep soil temperature [K] + + ! Crop Model + integer, intent(in) :: cropcat ! crop catagory + real, intent(in) :: planting ! planting date + real, intent(in) :: harvest ! harvest date + real, intent(in) :: season_gdd ! growing season GDD + real, intent(inout) :: gdd ! growing degree days XING (based on 10C) + real, intent(inout) :: grain ! mass of grain XING [g/m2] + integer, intent(inout) :: pgs + + ! gecros model + real, intent(inout) :: gecros_state(60) ! gecros crop + + integer, intent(in) :: dveg_opt ! dynamic vegetation (1 -> off ; 2 -> on) with opt_crs = 1 + ! vegetation model ( 1->prescribed [table LAI, shdfac=FVEG]; 2->dynamic; 3->table LAI, calculate FVEG 4->table LAI, shdfac=maximum) + integer, intent(in) :: crs_opt ! canopy stomatal resistance (1-> Ball-Berry; 2->Jarvis) + integer, intent(in) :: btr_opt ! soil moisture factor for stomatal resistance (1-> Noah; 2-> CLM; 3-> SSiB) + integer, intent(in) :: run_opt ! runoff and groundwater (1->SIMGM; 2->SIMTOP; 3->Schaake96; 4->BATS) + integer, intent(in) :: sfc_opt ! surface layer drag coeff (CH & CM) (1->M-O; 2->Chen97) + integer, intent(in) :: frz_opt ! supercooled liquid water (1-> NY06; 2->Koren99) + integer, intent(in) :: inf_opt ! frozen soil permeability (1-> NY06; 2->Koren99) + integer, intent(in) :: rad_opt ! radiation transfer (1->gap=F(3D,cosz); 2->gap=0; 3->gap=1--Fveg) + integer, intent(in) :: alb_opt ! snow surface albedo (1->BATS; 2->CLASS) + integer, intent(in) :: snf_opt ! precipitation partitioning between snow and rain + ! (1-Jordan91; 2->BATS: Snow when SFCTMP < TFRZ+2.2; + ! 3->Noah: Snow when SFCTMP < TFRZ; + ! 4->Use WRF precipitation partitioning ) + integer, intent(in) :: tbot_opt ! lower boundary of soil temperature (1->zero-flux; 2->Noah) + integer, intent(in) :: stc_opt ! snow/soil temperature time scheme (1->semi-implicit; 2->fully implicit) + + ! Added by Zhuo Wang and Shugong Wang + integer, intent(in) :: gla_opt ! glacier option (1->phase change; 2->simple) + integer, intent(in) :: sndpth_gla_opt ! snow depth max for glacier model [mm] + integer, intent(in) :: rsf_opt ! surface resistance (1->Sakaguchi/Zeng; 2->Seller; 3->mod Sellers; 4->1+snow) + integer, intent(in) :: soil_opt ! soil configuration option + integer, intent(in) :: pedo_opt ! soil pedotransfer function option + integer, intent(in) :: crop_opt ! crop model option (0->none; 1->Liu et al.; 2->Gecros) + integer, intent(in) :: iz0tlnd ! option of Chen adjustment of Czil (not used) + integer, intent(in) :: urban_opt ! urban physics option + real, intent(in) :: soilcomp(8) ! soil sand and clay percentage + real, intent(in) :: soilcL1 ! soil texture in layer 1 + real, intent(in) :: soilcL2 ! soil texture in layer 2 + real, intent(in) :: soilcL3 ! soil texture in layer 3 + real, intent(in) :: soilcL4 ! soil texture in layer 4 + + real, intent(in) :: tair ! air temperature [K] + real, intent(in) :: psurf ! air pressure [Pa] + real, intent(in) :: wind_e ! U wind component [m s-1] + real, intent(in) :: wind_n ! V wind component [m s-1] + + real, intent(in) :: qair ! specific humidity [kg/kg]; mv/(mv+md) + + real, intent(in) :: swdown ! downward solar radiation [w/m2] + real, intent(in) :: lwdown ! downward longwave radiation [w/m2] + real, intent(in) :: prcp ! total precipitatin (rainfall+snowfall) [mm] + + ! Modified by Zhuo Wang and Shugong Wang + ! in/out (with generic LSM equivalent) + real, intent(out) :: tsk ! surface radiative temperature [K] + real, intent(out) :: hfx ! sensible heat flux [W m-2] + real, intent(out) :: qfx ! latent heat flux [kg s-1 m-2] + real, intent(out) :: lh ! latent heat flux [W m-2] + real, intent(out) :: grdflx ! ground/snow heat flux [W m-2] + real, intent(inout) :: sfcrunoff ! accumulated surface runoff [m] + real, intent(inout) :: udrunoff ! accumulated sub-surface runoff [m] + real, intent(out) :: albedo ! total grid albedo [] + real, intent(out) :: qsnbot ! snowmelt out the bottom layer [kg s-1 m-2] + real, intent(out) :: subsnow ! snow sublimation [kg s-1 m-2] + real, intent(out) :: pah ! precipitation advected heat - total (W/m2) + real, intent(out) :: snowc ! snow cover fraction [] + real, intent(inout) :: smc(nsoil) ! volumetric soil moisture, ice + liquid [m3/m3] + real, intent(inout) :: sh2o(nsoil) ! volumetric liquid soil moisture [m3/m3] + real, intent(inout) :: tslb(nsoil) ! soil temperature [K] + real, intent(inout) :: sneqv ! snow water equivalent [mm] + real, intent(inout) :: snowh ! physical snow depth [m] + real, intent(inout) :: canwat ! total canopy water + ice [mm] + real, intent(inout) :: acsnom ! accumulated snow melt leaving pack + real, intent(inout) :: acsnow ! accumulated snow on grid + real, intent(out) :: emiss ! surface bulk emissivity + real, intent(out) :: rs ! Total stomatal resistance (s/m) + ! In module_sf_noahmpdrv_401.F, it is defined as inout variable (with generic LSM equivalent), but it is also in the + ! output list as NoahMP out only. Which one is correct??????/ + + ! in/out Noah MP only + integer, intent(inout) :: isnow ! actual no. of snow layers + real, intent(inout) :: tv ! vegetation leaf temperature + real, intent(inout) :: tg ! bulk ground surface temperature + real, intent(inout) :: canice ! canopy-intercepted ice (mm) + real, intent(inout) :: canliq ! canopy-intercepted liquid water (mm) + real, intent(inout) :: eah ! canopy air vapor pressure (pa) + real, intent(inout) :: tah ! canopy air temperature (k) + real, intent(inout) :: cm ! bulk momentum drag coefficient + real, intent(inout) :: ch ! bulk sensible heat exchange coefficient + real, intent(inout) :: fwet ! wetted or snowed fraction of the canopy (-) + real, intent(inout) :: sneqvo ! snow mass at last time step(mm h2o) + real, intent(inout) :: albold ! snow albedo at last time step (-) + real, intent(inout) :: qsnow ! snowfall on the ground [mm/s] + real, intent(inout) :: wslake ! lake water storage [mm] + real, intent(inout) :: zwt ! water table depth [m] + real, intent(inout) :: wa ! water in the "aquifer" [mm] + real, intent(inout) :: wt ! groundwater storage [mm] + real, intent(inout) :: tsno(nsnow) ! snow temperature [K] + real, intent(inout) :: zss(nsnow+nsoil) ! snow/soil layer-bottom depth from snow surface [m] + real, intent(inout) :: snowice(nsnow) ! snow layer ice [mm] + real, intent(inout) :: snowliq(nsnow) ! snow layer liquid water [mm] + real, intent(inout) :: lfmass ! leaf mass [g/m2] + real, intent(inout) :: rtmass ! mass of fine roots [g/m2] + real, intent(inout) :: stmass ! stem mass [g/m2] + real, intent(inout) :: wood ! mass of wood (incl. woody roots) [g/m2] + real, intent(inout) :: stblcp ! stable carbon in deep soil [g/m2] + real, intent(inout) :: fastcp ! short-lived carbon, shallow soil [g/m2] + real, intent(inout) :: lai ! leaf area index + real, intent(inout) :: sai ! stem area index + real, intent(inout) :: tauss ! snow age factor + real, intent(inout) :: smoiseq(nsoil) ! eq volumetric soil moisture [m3/m3] + real, intent(inout) :: smcwtd ! soil moisture content in the layer to the water table when deep + real, intent(inout) :: deeprech ! recharge to the water table when deep + real, intent(inout) :: rech ! recharge to the water table (diagnostic) + + ! OUT (with no Noah LSM equivalent) + real, intent(out) :: t2mv ! 2m temperature of vegetation part + real, intent(out) :: t2mb ! 2m temperature of bare ground part + real, intent(out) :: q2mv ! 2m mixing ratio of vegetation part + real, intent(out) :: q2mb ! 2m mixing ratio of bare ground part + real, intent(out) :: trad ! surface radiative temperature (k) + real, intent(out) :: nee ! net ecosys exchange (g/m2/s CO2) + real, intent(out) :: gpp ! gross primary assimilation [g/m2/s C] + real, intent(out) :: npp ! net primary productivity [g/m2/s C] + real, intent(out) :: fveg ! Noah-MP vegetation fraction [-] + real, intent(out) :: runsf ! surface runoff [mm/s] + real, intent(out) :: runsb ! subsurface runoff [mm/s] + real, intent(out) :: ecan ! evaporation of intercepted water (mm/s) + real, intent(out) :: edir ! soil surface evaporation rate (mm/s] + real, intent(out) :: etran ! transpiration rate (mm/s) + real, intent(out) :: rainf ! rainfall rate (kg/m2s) + real, intent(out) :: snowf ! snowfall rate (kg/m2s) + real, intent(out) :: fsa ! total absorbed solar radiation (w/m2) + real, intent(out) :: fira ! total net longwave rad (w/m2) [+ to atm] + real, intent(out) :: apar ! photosyn active energy by canopy (w/m2) + real, intent(out) :: psn ! total photosynthesis (umol co2/m2/s) [+] + real, intent(out) :: sav ! solar rad absorbed by veg. (w/m2) + real, intent(out) :: sag ! solar rad absorbed by ground (w/m2) + real, intent(out) :: rssun ! sunlit leaf stomatal resistance (s/m) + real, intent(out) :: rssha ! shaded leaf stomatal resistance (s/m) + real, intent(out) :: bgap ! between gap fraction + real, intent(out) :: wgap ! within gap fraction + real, intent(out) :: tgb ! bare ground temperature [K] + real, intent(out) :: tgv ! under canopy ground temperature[K] + real, intent(out) :: chv ! sensible heat exchange coefficient vegetated + real, intent(out) :: chb ! sensible heat exchange coefficient bare-ground + real, intent(out) :: shg ! veg ground sen. heat [w/m2] [+ to atm] + real, intent(out) :: shc ! canopy sen. heat [w/m2] [+ to atm] + real, intent(out) :: shb ! bare sensible heat [w/m2] [+ to atm] + real, intent(out) :: evg ! veg ground evap. heat [w/m2] [+ to atm] + real, intent(out) :: evb ! bare soil evaporation [w/m2] [+ to atm] + real, intent(out) :: ghv ! veg ground heat flux [w/m2] [+ to soil] + real, intent(out) :: ghb ! bare ground heat flux [w/m2] [+ to soil] + real, intent(out) :: irg ! veg ground net LW rad. [w/m2] [+ to atm] + real, intent(out) :: irc ! canopy net LW rad. [w/m2] [+ to atm] + real, intent(out) :: irb ! bare net longwave rad. [w/m2] [+ to atm] + real, intent(out) :: tr ! transpiration [w/m2] [+ to atm] + real, intent(out) :: evc ! canopy evaporation heat [w/m2] [+ to atm] + real, intent(out) :: fgev_pet + real, intent(out) :: fcev_pet + real, intent(out) :: fctr_pet + real, intent(out) :: chleaf ! leaf exchange coefficient + real, intent(out) :: chuc ! under canopy exchange coefficient + real, intent(out) :: chv2 ! veg 2m exchange coefficient + real, intent(out) :: chb2 ! bare 2m exchange coefficient + real, intent(out) :: relsmc(nsoil) ! relative soil moisture [-] + !ag (05Jan2021) + real, intent(in) :: rivsto ! river storage [m s-1] + real, intent(in) :: fldsto ! flood storage [m s-1] + real, intent(in) :: fldfrc ! flooded fraction [-] + + + type(noahmp_parameters) :: parameters + +! real, intent(inout) :: sfcheadrt,INFXSRT,soldrain ! for WRF-Hydro +!-------------------------------------------------------------------------------- + ! external function + real, external :: month_d_401 + + ! local variables + real :: qsfc ! bulk surface specific humidity + real :: smstav ! soil moisture avail. [not used], maintained for Noah consistency + real :: smstot ! total soil water [mm][not used], maintained for Noah consistency + + ! Added by Zhuo Wang and Shugong Wang + integer :: ids,ide, jds,jde, kds,kde ! d -> domain + integer :: ims,ime, jms,jme, kms,kme ! m -> memory + integer :: its,ite, jts,jte, kts,kte ! t -> tile + real :: sr ! input frozen precipitation ratio [-] + real :: fpice ! output frozen precipitation ratio [-] +! real, dimension(1:60) :: gecros1d ! gecros crop +! real, :: gecros_dd ,gecros_tbem,gecros_emb ,gecros_ema, & +! gecros_ds1,gecros_ds2 ,gecros_ds1x,gecros_ds2x + + real :: dx + character(len=12) :: nowdate + integer :: k + integer :: ice + integer :: ist + + ! Revised by Zhuo Wang and Shugong Wang + real :: xland ! = 2 ocean; = 1 land/seaice + real :: xice ! fraction of grid that is seaice + real :: xice_thres ! fraction of grid determining seaice +! integer :: isc + integer :: croptype + real :: vegfra ! vegetation fraction [] + real :: vegmax ! annual max vegetation fraction [] + + integer :: yearlen + real :: julian + real :: cosz + real :: lat, lon + real :: q2(2) ! water vapor mixing ratio [kg/kg_dry] + real :: sfctmp(2) + real :: uu(2) + real :: vv(2) + real :: soldn + real :: lwdn + real :: sfcprs(2) ! multiple layer is required + real, dimension(1,1) :: sfcheadrt,INFXSRT,soldrain ! For WRF-Hydro + real :: dz8w3d(2) + real, allocatable, dimension(:) :: zsoil + real, allocatable, dimension(:) :: zsnso + real, allocatable, dimension(:) :: snice + real, allocatable, dimension(:) :: snliq + + ! Added by Zhuo Wang and Shugong Wang on 10/30/2018 + real, allocatable, dimension(:) :: tsnow + + integer :: snl_idx + + ! Added by David Mocko on 11/19/2018 + logical :: Bondvillecheck + integer :: i,local_hour + integer :: locyr,locmo,locda,lochr,locmn,locss,locdoy + real*8 :: loctime + real :: locgmt,change + + !!!! local variables for dimension match + !!!! Added by Zhuo Wang and Shugong Wang on 10/30/2018 + real, dimension(1,1) :: coszin + real, dimension(1,1) :: latin + real, dimension(1,1) :: lonin + integer, dimension(1,1) :: vegetypein + integer, dimension(1,1) :: soiltypein + real, dimension(1,1) :: vegfrain + real, dimension(1,1) :: vegmaxin + real, dimension(1,1) :: tbotin + real, dimension(1,1) :: xlandin + real, dimension(1,1) :: xicein + integer, dimension(1,1) :: cropcatin + real, dimension(1,1) :: plantingin + real, dimension(1,1) :: harvestin + real, dimension(1,1) :: season_gddin + real, dimension(1,8,1) :: soilcompin + real, dimension(1,1) :: soilcL1in + real, dimension(1,1) :: soilcL2in + real, dimension(1,1) :: soilcL3in + real, dimension(1,1) :: soilcL4in + real, dimension(1,1) :: soldnin + real, dimension(1,1) :: lwdnin + real, dimension(1,1) :: prcpin + real, dimension(1,1) :: srin + real, dimension(1,1) :: tskinout + real, dimension(1,1) :: hfxinout + real, dimension(1,1) :: qfxinout + real, dimension(1,1) :: lhinout + real, dimension(1,1) :: grdflxinout + real, dimension(1,1) :: smstavinout + real, dimension(1,1) :: smstotinout + real, dimension(1,1) :: sfcrunoffinout + real, dimension(1,1) :: udrunoffinout +! real, dimension(1,1) :: albedoinout + real, dimension(1,1) :: albedoout + real, dimension(1,1) :: snowcinout + real, dimension(1,nsoil,1) :: smcinout + real, dimension(1,nsoil,1) :: sh2oinout + real, dimension(1,nsoil,1) :: tslbinout + real, dimension(1,1) :: sneqvinout + real, dimension(1,1) :: snowhinout + real, dimension(1,1) :: canwatinout + real, dimension(1,1) :: acsnominout + real, dimension(1,1) :: acsnowinout + real, dimension(1,1) :: emissinout + real, dimension(1,1) :: qsfcinout + real, dimension(1,1) :: z0inout + real, dimension(1,1) :: zntinout + integer, dimension(1,1) :: isnowinout + real, dimension(1,1) :: tvinout + real, dimension(1,1) :: tginout + real, dimension(1,1) :: caniceinout + real, dimension(1,1) :: canliqinout + real, dimension(1,1) :: eahinout + real, dimension(1,1) :: tahinout + real, dimension(1,1) :: cminout + real, dimension(1,1) :: chinout + real, dimension(1,1) :: fwetinout + real, dimension(1,1) :: sneqvoinout + real, dimension(1,1) :: alboldinout + real, dimension(1,1) :: qsnowinout + real, dimension(1,1) :: wslakeinout + real, dimension(1,1) :: zwtinout + real, dimension(1,1) :: wainout + real, dimension(1,1) :: wtinout + real, dimension(1,-nsnow+1:0,1) :: tsnowinout + real, dimension(1,-nsnow+1:nsoil,1) :: zsnsoinout + real, dimension(1,-nsnow+1:0,1) :: sniceinout + real, dimension(1,-nsnow+1:0,1) :: snliqinout + real, dimension(1,1) :: lfmassinout + real, dimension(1,1) :: rtmassinout + real, dimension(1,1) :: stmassinout + real, dimension(1,1) :: woodinout + real, dimension(1,1) :: stblcpinout + real, dimension(1,1) :: fastcpinout + real, dimension(1,1) :: laiinout + real, dimension(1,1) :: saiinout + real, dimension(1,1) :: taussinout + real, dimension(1,nsoil,1) :: smoiseqinout + real, dimension(1,1) :: smcwtdinout + real, dimension(1,1) :: deeprechinout + real, dimension(1,1) :: rechinout + real, dimension(1,1) :: graininout + real, dimension(1,1) :: gddinout + integer, dimension(1,1) :: pgsinout + real, dimension(1,60,1) :: gecros_stateinout + real, dimension(1,1) :: t2mvout + real, dimension(1,1) :: t2mbout + real, dimension(1,1) :: q2mvout + real, dimension(1,1) :: q2mbout + real, dimension(1,1) :: tradout + real, dimension(1,1) :: neeout + real, dimension(1,1) :: gppout + real, dimension(1,1) :: nppout + real, dimension(1,1) :: fvegout + real, dimension(1,1) :: runsfout + real, dimension(1,1) :: runsbout + real, dimension(1,1) :: ecanout + real, dimension(1,1) :: edirout + real, dimension(1,1) :: etranout + real, dimension(1,1) :: fsaout + real, dimension(1,1) :: firaout + real, dimension(1,1) :: aparout + real, dimension(1,1) :: psnout + real, dimension(1,1) :: savout + real, dimension(1,1) :: sagout + real, dimension(1,1) :: rssunout + real, dimension(1,1) :: rsshaout + real, dimension(1,1) :: bgapout + real, dimension(1,1) :: wgapout + real, dimension(1,1) :: tgvout + real, dimension(1,1) :: tgbout + real, dimension(1,1) :: chvout + real, dimension(1,1) :: chbout + real, dimension(1,1) :: shgout + real, dimension(1,1) :: shcout + real, dimension(1,1) :: shbout + real, dimension(1,1) :: evgout + real, dimension(1,1) :: evbout + real, dimension(1,1) :: ghvout + real, dimension(1,1) :: ghbout + real, dimension(1,1) :: irgout + real, dimension(1,1) :: ircout + real, dimension(1,1) :: irbout + real, dimension(1,1) :: trout + real, dimension(1,1) :: evcout + real, dimension(1,1) :: fgev_petout + real, dimension(1,1) :: fcev_petout + real, dimension(1,1) :: fctr_petout + real, dimension(1,1) :: chleafout + real, dimension(1,1) :: chucout + real, dimension(1,1) :: chv2out + real, dimension(1,1) :: chb2out + real, dimension(1,nsoil,1) :: relsmcout + real, dimension(1,1) :: rsout + !ag(05Jan2021) + real, dimension(1,1) :: rivstoin + real, dimension(1,1) :: fldstoin + real, dimension(1,1) :: fldfrcin + + + ids = 1 + ide = 1 + jds = 1 + jde = 1 + kds = 1 + kde = 1 + ims = 1 + ime = 1 + jms = 1 + jme = 1 + kms = 1 + kme = 2 + its = 1 + ite = 1 + jts = 1 + jte = 1 + kts = 1 + kte = 1 + + xland = 1 + xice = 0 + ! Fraction of grid determining seaice (from WRF and HRLDAS) + xice_thres = 0.5 + +#ifndef WRF_HYDRO + sfcheadrt = 0.0 +#endif +! SR = frozen precip fraction. For offline, it is set to zero. +! If running coupled to WRF, then SR is set by the WRF model. + if (snf_opt.ne.4) then + sr = 0.0 + else + write(LIS_logunit,*) "[ERR] SR should be set by the WRF model." + write(LIS_logunit,*) "[ERR] Code needs fixing. Stopping LIS." + call LIS_endrun + endif + + ! dx is horizontal grid spacing. dx is not used past this point, + ! but is used earlier when run_opt=5 (new groundwater scheme). + dx = 0.0 + + !!!!! print all the options not supported in offline mode + if (sfc_opt == 3) then + stop "(opt_sfc == 3) and (opt_sfc == 4) are not for offline use" + endif + + ! set ZSOIL + allocate(zsoil(nsoil)) + do k = 1,nsoil + zsoil(k) = sldpth(k) + enddo + + allocate(zsnso(-nsnow+1:nsoil)) + allocate(snice(-nsnow+1:0)) + allocate(snliq(-nsnow+1:0)) + allocate(tsnow(-nsnow+1:0)) ! Added by Zhuo Wang and Shugong Wang on 10/30/2018 + + smstav = 0.0 ! Not used + smstot = 0.0 ! Not used + + ! state variables + zsnso(-nsnow+1:nsoil) = zss(1:nsnow+nsoil) + snice(-nsnow+1:0) = snowice(1:nsnow) + snliq(-nsnow+1:0) = snowliq(1:nsnow) + tsnow(-nsnow+1:0) = tsno(1:nsnow) ! Added by Zhuo Wang and Shugong Wang on 10/30/2018 + + ! cosz, yearlen, and julian are calculated in subroutine calc_declin_401. + ! Be careful here!!!, LIS uses GMT; the date for calc_declin_401 should + ! be local time. Longitude is need to convert GMT into local time!!!. + ! This should only be done when using Bondville single_point forcing, + ! as the forcing file uses local time instead of GMT. + Bondvillecheck = .false. + do i=1,LIS_rc%nmetforc + if (trim(LIS_rc%metforc(i)).eq."Bondville") Bondvillecheck = .true. + enddo + +! For a true benchmark against the HRLDAS Noah-MP-4.0.1 testcase +! from NCAR, set "change = -21600.0". This line allows the code +! to _incorrectly_ run in the same way as the HRLDAS testcase, +! which runs on local time instead of on UTC time. The changes +! is 6 hours * 3600.0 seconds per hour, to go from GMT to the +! Bondville location in Illinois, which uses Central time. + change = 0.0 + if (Bondvillecheck) change = -21600.0 + locyr = LIS_rc%yr + locmo = LIS_rc%mo + locda = LIS_rc%da + lochr = LIS_rc%hr + locmn = LIS_rc%mn + locss = LIS_rc%ss + + call LIS_date2time(loctime,locdoy,locgmt,locyr,locmo,locda,lochr,locmn,locss) + call LIS_tick(loctime,locdoy,locgmt,locyr,locmo,locda,lochr,locmn,locss,change) + + write(nowdate,'(I4.4,4I2.2)') locyr, locmo, locda, lochr, locmn + call calc_declin_401(nowdate(1:4)//"-"//nowdate(5:6)//"-"//nowdate(7:8)//"_"//nowdate(9:10)//":"//nowdate(11:12)//":00", & + latitude, longitude, cosz, yearlen, julian) + + if ((dveg_opt.eq.1).or.(dveg_opt.eq.6).or.(dveg_opt.eq.7)) then + ! with dveg_opt==1/6/7, shdfac is fed directly to fveg + vegfra = month_d_401(shdfac_monthly, nowdate) + else + ! with dveg_opt==2/3/8, fveg is computed from lai and sai, and shdfac is unused + ! with dveg_opt==4/5/9, fveg is set to the maximum shdfac, and shdfac is unused + vegfra = -1.E36 ! To match with HRLDAS initialization + endif + vegmax = maxval(shdfac_monthly) + + ! assign forcing variables + dz8w3d(:) = dz8w + sfctmp(:) = tair + sfcprs(:) = psurf + q2(:) = qair/(1.0-qair) ! Convert specific humidity to water vapor mixing ratio + soldn = swdown + lwdn = lwdown + qsfc = qair + uu(:) = wind_e + vv(:) = wind_n + + !!!! set up local variables for dimension match + !!!! Added by Zhuo Wang and Shugong Wang on 10/30/2018 + coszin(1,1) = cosz + latin(1,1) = latitude + lonin(1,1) = longitude + vegetypein(1,1) = vegetype + soiltypein(1,1) = soiltype + vegfrain(1,1) = vegfra + vegmaxin(1,1) = vegmax + tbotin(1,1) = tbot + xlandin(1,1) = xland + xicein(1,1) = xice + cropcatin(1,1) = cropcat + plantingin(1,1) = planting + harvestin(1,1) = harvest + season_gddin(1,1) = season_gdd + soilcompin(1,:,1) = soilcomp(:) + soilcL1in(1,1) = soilcL1 + soilcL2in(1,1) = soilcL2 + soilcL3in(1,1) = soilcL3 + soilcL4in(1,1) = soilcL4 + soldnin(1,1) = soldn + lwdnin(1,1) = lwdn + prcpin(1,1) = prcp + srin(1,1) = sr + tskinout(1,1) = tsk + hfxinout(1,1) = hfx + qfxinout(1,1) = qfx + lhinout(1,1) = lh + grdflxinout(1,1) = grdflx + smstavinout(1,1) = smstav + smstotinout(1,1) = smstot + sfcrunoffinout(1,1) = sfcrunoff + udrunoffinout(1,1) = udrunoff +! albedoinout(1,1) = albedo + snowcinout(1,1) = snowc + smcinout(1,:,1) = smc(:) + sh2oinout(1,:,1) = sh2o(:) + tslbinout(1,:,1) = tslb(:) + sneqvinout(1,1) = sneqv + snowhinout(1,1) = snowh + canwatinout(1,1) = canwat + acsnominout(1,1) = acsnom + acsnowinout(1,1) = acsnow + emissinout(1,1) = emiss + qsfcinout(1,1) = qsfc +! If coupled to WRF, set these variables to realistic values, +! and then pass back to WRF after the call to noahmplsm_401. + z0inout(1,1) = 0.0 + zntinout(1,1) = 0.0 +! z0 and znt should be passed to WRF, if coupled. - dmm + isnowinout(1,1) = isnow + tvinout(1,1) = tv + tginout(1,1) = tg + caniceinout(1,1) = canice + canliqinout(1,1) = canliq + eahinout(1,1) = eah + tahinout(1,1) = tah + cminout(1,1) = cm + chinout(1,1) = ch + fwetinout(1,1) = fwet + sneqvoinout(1,1) = sneqvo + alboldinout(1,1) = albold + qsnowinout(1,1) = qsnow + wslakeinout(1,1) = wslake + zwtinout(1,1) = zwt + wainout(1,1) = wa + wtinout(1,1) = wt + tsnowinout(1,:,1) = tsnow(:) + zsnsoinout(1,:,1) = zsnso(:) + sniceinout(1,:,1) = snice(:) + snliqinout(1,:,1) = snliq(:) + lfmassinout(1,1) = lfmass + rtmassinout(1,1) = rtmass + stmassinout(1,1) = stmass + woodinout(1,1) = wood + stblcpinout(1,1) = stblcp + fastcpinout(1,1) = fastcp + laiinout(1,1) = lai + saiinout(1,1) = sai + taussinout(1,1) = tauss + smoiseqinout(1,:,1) = smoiseq(:) + smcwtdinout(1,1) = smcwtd + deeprechinout(1,1) = deeprech + rechinout(1,1) = rech + graininout(1,1) = grain + gddinout(1,1) = gdd + pgsinout(1,1) = pgs + gecros_stateinout(1,:,1) = gecros_state(:) + t2mvout(1,1) = t2mv + t2mbout(1,1) = t2mb + q2mvout(1,1) = q2mv + q2mbout(1,1) = q2mb + tradout(1,1) = trad + neeout(1,1) = nee + gppout(1,1) = gpp + nppout(1,1) = npp + fvegout(1,1) = fveg + runsfout(1,1) = runsf + runsbout(1,1) = runsb + ecanout(1,1) = ecan + edirout(1,1) = edir + etranout(1,1) = etran + fsaout(1,1) = fsa + firaout(1,1) = fira + aparout(1,1) = apar + psnout(1,1) = psn + savout(1,1) = sav + sagout(1,1) = sag + rssunout(1,1) = rssun + rsshaout(1,1) = rssha + bgapout(1,1) = bgap + wgapout(1,1) = wgap + tgvout(1,1) = tgv + tgbout(1,1) = tgb + chvout(1,1) = chv + chbout(1,1) = chb + shgout(1,1) = shg + shcout(1,1) = shc + shbout(1,1) = shb + evgout(1,1) = evg + evbout(1,1) = evb + ghvout(1,1) = ghv + ghbout(1,1) = ghb + irgout(1,1) = irg + ircout(1,1) = irc + irbout(1,1) = irb + trout(1,1) = tr + evcout(1,1) = evc + fgev_petout(1,1) = fgev_pet + fcev_petout(1,1) = fcev_pet + fctr_petout(1,1) = fctr_pet + chleafout(1,1) = chleaf + chucout(1,1) = chuc + chv2out(1,1) = chv2 + chb2out(1,1) = chb2 + relsmcout(1,:,1) = relsmc(:) + rsout(1,1) = rs + +! Code from module_NoahMP_hrldas_driver.F. Initial guess only. + if ((trim(LIS_rc%startcode).eq."coldstart").and.(itimestep.eq.1)) then + eahinout(1,1) = sfcprs(1) * (q2(1)/(0.622+q2(1))) + tahinout(1,1) = sfctmp(1) + cminout(1,1) = 0.1 + chinout(1,1) = 0.1 + endif + + !ag(05Jan2021) + rivstoin(1,1)=rivsto + fldstoin(1,1)=fldsto + fldfrcin(1,1)=fldfrc + + + call noahmplsm_401 (LIS_rc%udef, & ! in : LIS undefined value (David Mocko) + itimestep,yearlen , julian , coszin , latin , lonin , & ! in : time/space-related + dz8w3d(1), dt , zsoil , nsoil , dx , & ! in : model configuration + vegetypein, soiltypein, vegfrain, vegmaxin, tbotin , & ! in : Vegetation/Soil characteristics + xlandin , xicein , xice_thres, & ! in : Vegetation/Soil characteristics + cropcatin , plantingin, harvestin ,season_gddin, & + dveg_opt, crs_opt , btr_opt ,run_opt , sfc_opt , frz_opt, & ! in : user options + inf_opt , rad_opt , alb_opt ,snf_opt , tbot_opt, stc_opt, & ! in : user options + gla_opt , sndpth_gla_opt, rsf_opt , soil_opt,pedo_opt , crop_opt, & ! in : user options + iz0tlnd , urban_opt, & ! in : user options + soilcompin, soilcL1in, soilcL2in, soilcL3in, soilcL4in, & ! in : user options + sfctmp(1) , q2(1) , uu(1) , vv(1) , soldnin , lwdnin , & ! in : forcing + sfcprs(1) , prcpin , srin , & ! in : forcing + + tskinout, hfxinout, qfxinout, lhinout , grdflxinout , smstavinout , & ! in/out LSM eqv + + smstotinout ,sfcrunoffinout, udrunoffinout, albedoout , qsnbot , subsnow, & ! in/out LSM eqv + snowcinout , smcinout , pah, & ! in/out LSM eqv + sh2oinout , tslbinout , sneqvinout , snowhinout , canwatinout , acsnominout , & ! in/out LSM eqv + acsnowinout , emissinout , qsfcinout , z0inout , zntinout , & ! in/out LSM eqv + + isnowinout , tvinout , tginout , caniceinout , canliqinout , eahinout , & ! in/out Noah MP only + tahinout , cminout , chinout , fwetinout , sneqvoinout , alboldinout , & ! in/out Noah MP only + qsnowinout , wslakeinout , zwtinout , wainout , wtinout , tsnowinout , & ! in/out Noah MP only + zsnsoinout , sniceinout , snliqinout , lfmassinout , rtmassinout , stmassinout , & ! in/out Noah MP only + woodinout , stblcpinout , fastcpinout , laiinout , saiinout , taussinout , & ! in/out Noah MP only + smoiseqinout , smcwtdinout ,deeprechinout , rechinout , graininout , gddinout , & ! in/out Noah MP only + pgsinout , & ! in/out Noah MP only + gecros_stateinout, & ! in/out gecros model + + t2mvout , t2mbout , q2mvout , q2mbout , relsmcout, & ! out Noah MP only + tradout , neeout , gppout , nppout , fvegout , runsfout, & ! out Noah MP only + runsbout, ecanout , edirout , etranout, fsaout , firaout , & ! out Noah MP only + aparout , psnout , savout , sagout , rssunout, rsshaout, & ! out Noah MP only + bgapout , wgapout , tgvout , tgbout , chvout , chbout , & ! out Noah MP only + shgout , shcout , shbout , evgout , evbout , ghvout , & ! out Noah MP only + ghbout , irgout , ircout , irbout , trout , evcout , & ! out Noah MP only + fgev_petout, fcev_petout, fctr_petout, & ! PET + chleafout , chucout , chv2out , chb2out , rsout , fpice , & ! out Noah MP only + parameters, & + rivstoin,fldstoin,fldfrcin, & +#ifdef WRF_HYDRO + sfcheadrt, INFXSRT, soldrain, & +#endif + ids,ide, jds,jde, kds,kde, & + ims,ime, jms,jme, kms,kme, & + its,ite, jts,jte, kts,kte) + + ! Added by Zhuo Wang and Shugong on 10/30/2018 + tsk = tskinout(1,1) + hfx = hfxinout(1,1) + qfx = qfxinout(1,1) + lh = lhinout(1,1) + grdflx = grdflxinout(1,1) + smstav = smstavinout(1,1) + smstot = smstotinout(1,1) + sfcrunoff = sfcrunoffinout(1,1) + udrunoff = udrunoffinout(1,1) +! albedo = albedoinout(1,1) + albedo = albedoout(1,1) + snowc = snowcinout(1,1) + smc(:) = smcinout(1,:,1) + sh2o(:) = sh2oinout(1,:,1) + tslb(:) = tslbinout(1,:,1) + sneqv = sneqvinout(1,1) + snowh = snowhinout(1,1) + canwat = canwatinout(1,1) + acsnom = acsnominout(1,1) + acsnow = acsnowinout(1,1) + emiss = emissinout(1,1) + qsfc = qsfcinout(1,1) + isnow = isnowinout(1,1) + tv = tvinout(1,1) + tg = tginout(1,1) + canice = caniceinout(1,1) + canliq = canliqinout(1,1) + eah = eahinout(1,1) + tah = tahinout(1,1) + cm = cminout(1,1) + ch = chinout(1,1) + fwet = fwetinout(1,1) + sneqvo = sneqvoinout(1,1) + albold = alboldinout(1,1) + qsnow = qsnowinout(1,1) + wslake = wslakeinout(1,1) + zwt = zwtinout(1,1) + wa = wainout(1,1) + wt = wtinout(1,1) + + ! Modified by Zhuo Wang on 12/31/2018 + tsnow(-nsnow+1:0) = tsnowinout(1,-nsnow+1:0,1) + zsnso(-nsnow+1:nsoil) = zsnsoinout(1,-nsnow+1:nsoil,1) + snice(-nsnow+1:0) = sniceinout(1,-nsnow+1:0,1) + snliq(-nsnow+1:0) = snliqinout(1,-nsnow+1:0,1) + tsno(1:nsnow) = tsnow(-nsnow+1:0) + zss(1:nsnow+nsoil) = zsnso(-nsnow+1:nsoil) + snowice(1:nsnow) = snice(-nsnow+1:0) + snowliq(1:nsnow) = snliq(-nsnow+1:0) + + lfmass = lfmassinout(1,1) + rtmass = rtmassinout(1,1) + stmass = stmassinout(1,1) + wood = woodinout(1,1) + stblcp = stblcpinout(1,1) + fastcp = fastcpinout(1,1) + lai = laiinout(1,1) + sai = saiinout(1,1) + tauss = taussinout(1,1) + smoiseq(:) = smoiseqinout(1,:,1) + smcwtd = smcwtdinout(1,1) + deeprech = deeprechinout(1,1) + rech = rechinout(1,1) + grain = graininout(1,1) + gdd = gddinout(1,1) + pgs = pgsinout(1,1) + gecros_state(:) = gecros_stateinout(1,:,1) + t2mv = t2mvout(1,1) + t2mb = t2mbout(1,1) + q2mv = q2mvout(1,1) + q2mb = q2mbout(1,1) + trad = tradout(1,1) + nee = neeout(1,1) + gpp = gppout(1,1) + npp = nppout(1,1) + fveg = fvegout(1,1) + runsf = runsfout(1,1) + runsb = runsbout(1,1) + ecan = ecanout(1,1) + edir = edirout(1,1) + etran = etranout(1,1) + fsa = fsaout(1,1) + fira = firaout(1,1) + apar = aparout(1,1) + psn = psnout(1,1) + sav = savout(1,1) + sag = sagout(1,1) + rssun = rssunout(1,1) + rssha = rsshaout(1,1) + bgap = bgapout(1,1) + wgap = wgapout(1,1) + tgv = tgvout(1,1) + tgb = tgbout(1,1) + chv = chvout(1,1) + chb = chbout(1,1) + shg = shgout(1,1) + shc = shcout(1,1) + shb = shbout(1,1) + evg = evgout(1,1) + evb = evbout(1,1) + ghv = ghvout(1,1) + ghb = ghbout(1,1) + irg = irgout(1,1) + irc = ircout(1,1) + irb = irbout(1,1) + tr = trout(1,1) + evc = evcout(1,1) + chleaf = chleafout(1,1) + chuc = chucout(1,1) + chv2 = chv2out(1,1) + chb2 = chb2out(1,1) + relsmc(:) = relsmcout(1,:,1) + rs = rsout(1,1) + + rainf = prcp * (1.0 - fpice)/dt ! added by Shugong for LIS output + snowf = prcp * fpice/dt ! added by Shugong for LIS output + fgev_pet = fgev_petout(1,1) ! 08/30/2021 Shugong + fcev_pet = fcev_petout(1,1) + fctr_pet = fctr_petout(1,1) + +#ifndef WRF_HYDRO + INFXSRT = 0.0 + soldrain = 0.0 +#endif + + deallocate(zsoil) + deallocate(zsnso) + + deallocate(snice) + deallocate(snliq) + deallocate(tsnow) ! Added by Zhuo Wang and Shugong Wang on 10/30/2018 + +end subroutine noahmp_driver_401 + +real function month_d_401(a12, nowdate) result (nowval) + ! + ! Given a set of 12 values, taken to be valid on the fifteenth of each month (Jan through Dec) + ! and a date in the form .... + ! + ! Return a value valid for the day given in , as an interpolation from the 12 + ! monthly values. + ! + use kwm_date_utilities_401 + implicit none + real, dimension(12), intent(in) :: a12 ! 12 monthly values, taken to be valid on the 15th of + ! ! the month + character(len=12), intent(in) :: nowdate ! Date, in the form + integer :: nowy, nowm, nowd + integer :: prevm, postm + real :: factor + integer, dimension(12) :: ndays = (/ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 /) + ! + ! Handle leap year by setting the number of days in February for the year in question. + ! + read(nowdate(1:8),'(I4,I2,I2)') nowy, nowm, nowd + ndays(2) = nfeb(nowy) + + ! + ! Do interpolation between the fifteenth of two successive months. + ! + if (nowd == 15) then + nowval = a12(nowm) + return + else if (nowd < 15) then + postm = nowm + prevm = nowm - 1 + if (prevm == 0) prevm = 12 + factor = real(ndays(prevm)-15+nowd)/real(ndays(prevm)) + else if (nowd > 15) then + prevm = nowm + postm = nowm + 1 + if (postm == 13) postm = 1 + factor = real(nowd-15)/real(ndays(prevm)) + endif + + nowval = a12(prevm)*(1.0-factor) + a12(postm)*factor + +end function month_d_401 + +SUBROUTINE calc_declin_401 ( nowdate, latitude, longitude, cosz, yearlen, julian) + use kwm_date_utilities_401 +!--------------------------------------------------------------------- + IMPLICIT NONE +!--------------------------------------------------------------------- + +! !ARGUMENTS: + character(len=19), intent(in) :: nowdate ! YYYY-MM-DD_HH:mm:ss + real, intent(in) :: latitude + real, intent(in) :: longitude + real, intent(out) :: cosz + integer, intent(out) :: yearlen + real, intent(out) :: JULIAN + + REAL :: hrang + real :: DECLIN + real :: GMT + real :: tloctim + REAL :: OBECL + REAL :: SINOB + REAL :: SXLONG + REAL :: ARG + integer :: iyear + integer :: iday + integer :: ihour + integer :: iminute + integer :: isecond + + REAL, PARAMETER :: DEGRAD = 3.14159265/180. + REAL, PARAMETER :: DPD = 360./365. + + ! + ! Determine the number of days in the year + ! + + read(nowdate(1:4), '(I4)') iyear + yearlen = 365 + if (mod(iyear,4) == 0) then + yearlen = 366 + if (mod(iyear,100) == 0) then + yearlen = 365 + if (mod(iyear,400) == 0) then + yearlen = 366 + if (mod(iyear,3600) == 0) then + yearlen = 365 + endif + endif + endif + endif + + ! + ! Determine the Julian time (floating-point day of year). + ! + + call geth_idts(nowdate(1:10), nowdate(1:4)//"-01-01", iday) + read(nowdate(12:13), *) ihour + read(nowdate(15:16), *) iminute + read(nowdate(18:19), *) isecond + GMT = REAL(IHOUR) + IMINUTE/60.0 + ISECOND/3600.0 + JULIAN = REAL(IDAY) + GMT/24. + +! for short wave radiation + + DECLIN=0. + +!-----OBECL : OBLIQUITY = 23.5 DEGREE. + + OBECL=23.5*DEGRAD + SINOB=SIN(OBECL) + +!-----CALCULATE LONGITUDE OF THE SUN FROM VERNAL EQUINOX: + + IF(JULIAN.GE.80.)SXLONG=DPD*(JULIAN-80.)*DEGRAD + IF(JULIAN.LT.80.)SXLONG=DPD*(JULIAN+285.)*DEGRAD + ARG=SINOB*SIN(SXLONG) + DECLIN=ASIN(ARG) + + TLOCTIM = REAL(IHOUR) + REAL(IMINUTE)/60.0 + REAL(ISECOND)/3600.0 + LONGITUDE/15.0 ! Local time in hours + tloctim = AMOD(tloctim+24.0, 24.0) + HRANG=15.*(TLOCTIM-12.)*DEGRAD + COSZ=SIN(LATITUDE*DEGRAD)*SIN(DECLIN)+COS(LATITUDE*DEGRAD)*COS(DECLIN)*COS(HRANG) + COSZ=MIN(COSZ,1.0); !Added by kwH 3/1/16 to address floating point roundoff errors + COSZ=MAX(COSZ,-1.0); ! + +!KWM write(wrf_err_message,10)DECDEG/DEGRAD +!KWM10 FORMAT(1X,'*** SOLAR DECLINATION ANGLE = ',F6.2,' DEGREES.',' ***') +!KWM CALL wrf_debug (50, wrf_err_message) + +END SUBROUTINE calc_declin_401 + +! Subroutine SNOW_INIT grabbed from NOAH-MP-WRF +SUBROUTINE SNOW_INIT_401 ( jts, jtf, its, itf, ims, ime, jms, jme, NSNOW, NSOIL, ZSOIL, & + SWE, tgxy, SNODEP, ZSNSOXY, TSNOXY, SNICEXY, SNLIQXY, ISNOWXY) + +! ------------------------------------------------------------------------------------------ + IMPLICIT NONE +! ------------------------------------------------------------------------------------------ + INTEGER, INTENT(IN) :: jts,jtf,its,itf,ims,ime, jms,jme,NSNOW,NSOIL + REAL, INTENT(IN), DIMENSION(ims:ime, jms:jme) :: SWE + REAL, INTENT(IN), DIMENSION(ims:ime, jms:jme) :: SNODEP + REAL, INTENT(IN), DIMENSION(ims:ime, jms:jme) :: tgxy + REAL, INTENT(IN), DIMENSION(1:NSOIL) :: ZSOIL + + INTEGER, INTENT(OUT), DIMENSION(ims:ime, jms:jme) :: ISNOWXY + REAL, INTENT(OUT), DIMENSION(ims:ime, -NSNOW+1:NSOIL,jms:jme) :: ZSNSOXY + REAL, INTENT(OUT), DIMENSION(ims:ime, -NSNOW+1: 0,jms:jme) :: TSNOXY + REAL, INTENT(OUT), DIMENSION(ims:ime, -NSNOW+1: 0,jms:jme) :: SNICEXY + REAL, INTENT(OUT), DIMENSION(ims:ime, -NSNOW+1: 0,jms:jme) :: SNLIQXY + +!local + INTEGER :: I,J,IZ + REAL, DIMENSION(ims:ime, -NSNOW+1: 0,jms:jme) :: DZSNOXY + REAL, DIMENSION(ims:ime, -NSNOW+1:NSOIL,jms:jme) :: DZSNSOXY +! ------------------------------------------------------------------------------------------ + + + DO J = jts,jtf + DO I = its,itf + IF (SNODEP(I,J) < 0.025) THEN + ISNOWXY(I,J) = 0 + DZSNOXY(I,-NSNOW+1:0,J) = 0. + ELSE + IF ((SNODEP(I,J) >= 0.025) .AND. (SNODEP(I,J) <= 0.05)) THEN + ISNOWXY(I,J) = -1 + DZSNOXY(I,0,J) = SNODEP(I,J) + ELSE IF ((SNODEP(I,J) > 0.05) .AND. (SNODEP(I,J) <= 0.10)) THEN + ISNOWXY(I,J) = -2 + DZSNOXY(I,-1,J) = SNODEP(I,J)/2. + DZSNOXY(I, 0,J) = SNODEP(I,J)/2. + ELSE IF ((SNODEP(I,J) > 0.10) .AND. (SNODEP(I,J) <= 0.25)) THEN + ISNOWXY(I,J) = -2 + DZSNOXY(I,-1,J) = 0.05 + DZSNOXY(I, 0,J) = SNODEP(I,J) - DZSNOXY(I,-1,J) + ELSE IF ((SNODEP(I,J) > 0.25) .AND. (SNODEP(I,J) <= 0.35)) THEN + ISNOWXY(I,J) = -3 + DZSNOXY(I,-2,J) = 0.05 + DZSNOXY(I,-1,J) = 0.5*(SNODEP(I,J)-DZSNOXY(I,-2,J)) + DZSNOXY(I, 0,J) = 0.5*(SNODEP(I,J)-DZSNOXY(I,-2,J)) + ELSE IF (SNODEP(I,J) > 0.35) THEN + ISNOWXY(I,J) = -3 + DZSNOXY(I,-2,J) = 0.05 + DZSNOXY(I,-1,J) = 0.10 + DZSNOXY(I, 0,J) = SNODEP(I,J) - DZSNOXY(I,-1,J) - DZSNOXY(I,-2,J) + END IF + END IF + ENDDO + ENDDO + + DO J = jts,jtf + DO I = its,itf + TSNOXY( I,-NSNOW+1:0,J) = 0. + SNICEXY(I,-NSNOW+1:0,J) = 0. + SNLIQXY(I,-NSNOW+1:0,J) = 0. + DO IZ = ISNOWXY(I,J)+1, 0 + TSNOXY(I,IZ,J) = tgxy(I,J) ! [k] + SNLIQXY(I,IZ,J) = 0.00 + SNICEXY(I,IZ,J) = 1.00 * DZSNOXY(I,IZ,J) * (SWE(I,J)/SNODEP(I,J)) ! [kg/m3] + END DO + + DO IZ = ISNOWXY(I,J)+1, 0 + DZSNSOXY(I,IZ,J) = -DZSNOXY(I,IZ,J) + END DO + + DZSNSOXY(I,1,J) = ZSOIL(1) + DO IZ = 2,NSOIL + DZSNSOXY(I,IZ,J) = (ZSOIL(IZ) - ZSOIL(IZ-1)) + END DO + + ZSNSOXY(I,ISNOWXY(I,J)+1,J) = DZSNSOXY(I,ISNOWXY(I,J)+1,J) + DO IZ = ISNOWXY(I,J)+2 ,NSOIL + ZSNSOXY(I,IZ,J) = ZSNSOXY(I,IZ-1,J) + DZSNSOXY(I,IZ,J) + ENDDO + + END DO + END DO + +END SUBROUTINE SNOW_INIT_401 diff --git a/lis/surfacemodels/land/noahmp.new/pe/NoahMP401_peMod.F90 b/lis/surfacemodels/land/noahmp.new/pe/NoahMP401_peMod.F90 new file mode 100755 index 000000000..c70c9d026 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/pe/NoahMP401_peMod.F90 @@ -0,0 +1,713 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +module NoahMP401_peMod +!BOP +! +! !MODULE: NoahMP401_peMod +! +! !DESCRIPTION: +! This module contains the definitions of the NoahMP.4.0.1 model parameters +! used in parameter estimation. The data structure is used to expose +! the LSM parameters to be used in opt/ue. +! +! !REVISION HISTORY: +! 27 Apr 2020; Sujay Kumar, Initial Code +! !USES: + use ESMF + use LIS_numerRecipesMod, only : LIS_rand_func + use LIS_constantsMod, only : LIS_CONST_PATH_LEN + + implicit none + + PRIVATE +!----------------------------------------------------------------------------- +! !PUBLIC MEMBER FUNCTIONS: +!----------------------------------------------------------------------------- + public :: NoahMP401_setup_pedecvars +!----------------------------------------------------------------------------- +! !PUBLIC TYPES: +!----------------------------------------------------------------------------- + public :: NoahMP401_pe_struc + +!EOP + type, public :: NoahMP401_pe_dec + integer :: nparams + character*40, allocatable :: param_name(:) + integer , allocatable :: param_select(:) + real , allocatable :: param_min(:) + real , allocatable :: param_max(:) + end type NoahMP401_pe_dec + + type(NoahMP401_pe_dec), allocatable :: NoahMP401_pe_struc(:) + + SAVE +contains + +!BOP +! !ROUTINE: NoahMP401_setup_pedecvars +! \label{NoahMP401_setup_pedecvars} +! +! !REVISION HISTORY: +! 02 Feb 2018: Soni Yatheendradas; Initial Specification +! +! !INTERFACE: + subroutine NoahMP401_setup_pedecvars(DEC_State, Feas_State) +! !USES: + use LIS_coreMod + use LIS_logMod + use NoahMP401_lsmMod, only : NoahMP401_struc + + implicit none +! !ARGUMENTS: + character(len=LIS_CONST_PATH_LEN) :: decSpaceAttribsFile + type(ESMF_State) :: DEC_State + type(ESMF_State) :: Feas_State + +! +! !DESCRIPTION: +! +! This routine determines the list of parameters to be used in parameter +! estimation, initializes them, and updates the LIS decision space. +! +!EOP + + integer :: n + type(ESMF_ArraySpec) :: arrspec1 + type(ESMF_Field) :: varField + type(ESMF_Field) :: feasField + real, pointer :: vardata(:) + integer, pointer :: mod_flag(:) + integer :: i,t,m + integer :: status + integer, parameter :: seed_base=-1000 + integer :: seed + real :: rand + integer :: NT + character*100 :: vname + integer :: count + integer :: gid + + call ESMF_StateGet(Feas_State, "Feasibility Flag", feasField, rc=status) + call LIS_verify(status) + call ESMF_FieldGet(feasField,localDE=0,farrayPtr=mod_flag,rc=status) + call LIS_verify(status) + + call ESMF_ConfigGetAttribute(LIS_config,decSpaceAttribsFile,& + label="LSM Decision space attributes file:",rc=status) + call LIS_verify(status, "LSM Decision space attributes file: not defined") + + allocate(NoahMP401_pe_struc(LIS_rc%nnest)) + n = 1 + NoahMP401_pe_struc(n)%nparams = 76 + + allocate(NoahMP401_pe_struc(n)%param_name(NoahMP401_pe_struc(n)%nparams)) + allocate(NoahMP401_pe_struc(n)%param_select(NoahMP401_pe_struc(n)%nparams)) + allocate(NoahMP401_pe_struc(n)%param_min(NoahMP401_pe_struc(n)%nparams)) + allocate(NoahMP401_pe_struc(n)%param_max(NoahMP401_pe_struc(n)%nparams)) + + ! read the attributes file. + call LIS_readPEDecSpaceAttributes(decSpaceAttribsFile, & + NoahMP401_pe_struc(n)%nparams, & + NoahMP401_pe_struc(n)%param_name, & + NoahMP401_pe_struc(n)%param_select, & + NoahMP401_pe_struc(n)%param_min, & + NoahMP401_pe_struc(n)%param_max) + + call ESMF_ArraySpecSet(arrspec1,rank=1,typekind=ESMF_TYPEKIND_R4,& + rc=status) + call LIS_verify(status) + + do i=1,NoahMP401_pe_struc(n)%nparams + if(NoahMP401_pe_struc(n)%param_select(i).eq.1) then + vname=trim(NoahMP401_pe_struc(n)%param_name(i)) + varField = ESMF_FieldCreate(arrayspec=arrspec1, & + grid=LIS_vecPatch(n,LIS_rc%lsm_index),& + name=vname,& + rc=status) + call LIS_verify(status, & + 'problem with fieldcreate in NoahMP401_setup_pedecvars') + call ESMF_AttributeSet(varField,'MinRange',& + NoahMP401_pe_struc(n)%param_min(i),rc=status) + call LIS_verify(status, & + 'setting minrange to decspace obj in NoahMP401_setup_devars') + call ESMF_AttributeSet(varField,'MaxRange',& + NoahMP401_pe_struc(n)%param_max(i),rc=status) + call LIS_verify(status, & + 'setting maxrange to decspace obj in NoahMP401_setup_devars') + + call ESMF_StateAdd(DEC_State,(/varField/),rc=status) + call LIS_verify(status,& + 'stateadd in NoahMP401_setup_pedecvars') + + call ESMF_StateGet(DEC_State,vname,varField,rc=status) + call LIS_verify(status) + + call ESMF_FieldGet(varField,localDE=0,farrayPtr=vardata,& + rc=status) + call LIS_verify(status) + + !Put in vardata(:) the noah value + + NT=LIS_rc%npatch(n,LIS_rc%lsm_index) + if(vname.eq."TOPT") then + do t=1,NT; vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%topt + enddo + endif + + if(vname.eq."RGL") then + do t=1,NT; vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%rgl + enddo + endif + if(vname.eq."RSMAX") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%rsmax + enddo + endif + if(vname.eq."RSMIN") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%rsmin + enddo + endif + if(vname.eq."HS") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%hs + enddo + endif + + if(vname.eq."NROOT") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%nroot + enddo + endif + if(vname.eq."CSOIL") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%csoil + enddo + endif + + if(vname.eq."BEXP") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%bexp(1) + enddo + endif + + if(vname.eq."DKSAT") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%dksat(1) + enddo + endif + + if(vname.eq."DWSAT") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%dwsat(1) + enddo + endif + + if(vname.eq."PSISAT") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%psisat(1) + enddo + endif + + if(vname.eq."QUARTZ") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%quartz(1) + enddo + endif + + if(vname.eq."SMCMAX") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%smcmax(1) + enddo + endif + + if(vname.eq."SMCREF") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%smcref(1) + enddo + endif + + if(vname.eq."SMCWLT") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%smcwlt(1) + enddo + endif + + if(vname.eq."CZIL") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%czil + enddo + endif + + + if(vname.eq."SLOPE") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%slope + enddo + endif + + if(vname.eq."CH2OP") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%CH2OP + enddo + endif + + if(vname.eq."DLEAF") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%DLEAF + enddo + endif + + if(vname.eq."Z0MVT") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%Z0MVT + enddo + endif + + if(vname.eq."HVT") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%HVT + enddo + endif + + if(vname.eq."HVB") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%HVB + enddo + endif + if(vname.eq."RC") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%RC + enddo + endif + if(vname.eq."MFSNO") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%mfsno + enddo + endif + if(vname.eq."ALBSAT1") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%albsat(1) + enddo + endif + if(vname.eq."ALBSAT2") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%albsat(2) + enddo + endif + if(vname.eq."ALBDRY1") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%albdry(1) + enddo + endif + if(vname.eq."ALBDRY2") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%albdry(2) + enddo + endif + if(vname.eq."ALBICE1") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%albice(1) + enddo + endif + if(vname.eq."ALBICE2") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%albice(2) + enddo + endif + if(vname.eq."OMEGAS1") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%omegas(1) + enddo + endif + if(vname.eq."OMEGAS2") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%omegas(2) + enddo + endif + if(vname.eq."BETADS") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%betads + enddo + endif + if(vname.eq."BETAIS") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%betais + enddo + endif + if(vname.eq."EG1") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%eg(1) + enddo + endif + if(vname.eq."EG2") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%eg(2) + enddo + endif + if(vname.eq."EG2") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%eg(2) + enddo + endif + if(vname.eq."Z0SNO") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%z0sno + enddo + endif + if(vname.eq."SSI") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%ssi + enddo + endif + if(vname.eq."SWEMX") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%swemx + enddo + endif + if(vname.eq."RSURF_SNOW") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%rsurf_snow + enddo + endif + if(vname.eq."MNSNALB") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%mnsnalb + enddo + endif + if(vname.eq."MXSNALB") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%mxsnalb + enddo + endif + if(vname.eq."SNDECAYEXP") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%sndecayexp + enddo + endif + + if(vname.eq."T_ULIMIT") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%t_ulimit + enddo + endif + + if(vname.eq."T_LLIMIT") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%t_llimit + enddo + endif + + if(vname.eq."T_MLIMIT") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%t_mlimit + enddo + endif + + if(vname.eq."SNOWF_SCALEF") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%snowf_scalef + enddo + endif + + if(vname.eq."RHOL1") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%RHOL(1) + enddo + endif + + if(vname.eq."RHOL2") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%RHOL(2) + enddo + endif + + if(vname.eq."RHOS1") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%RHOS(1) + enddo + endif + + if(vname.eq."RHOS2") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%RHOS(2) + enddo + endif + + if(vname.eq."TAUL1") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%TAUL(1) + enddo + endif + + if(vname.eq."TAUL2") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%TAUL(2) + enddo + endif + + if(vname.eq."TAUS1") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%TAUS(1) + enddo + endif + + if(vname.eq."TAUS2") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%TAUS(2) + enddo + endif + + if(vname.eq."XL") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%XL + enddo + endif + + if(vname.eq."CWPVT") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%CWPVT + enddo + endif + + if(vname.eq."C3PSN") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%C3PSN + enddo + endif + + if(vname.eq."KC25") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%KC25 + enddo + endif + + if(vname.eq."AKC") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%AKC + enddo + endif + + if(vname.eq."KO25") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%KO25 + enddo + endif + + if(vname.eq."AKO") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%AKO + enddo + endif + + if(vname.eq."AVCMX") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%AVCMX + enddo + endif + + if(vname.eq."AQE") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%AQE + enddo + endif + + if(vname.eq."LTOVRC") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%LTOVRC + enddo + endif + + if(vname.eq."DILEFC") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%DILEFC + enddo + endif + + if(vname.eq."DILEFW") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%DILEFW + enddo + endif + + if(vname.eq."RMF25") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%RMF25 + enddo + endif + + if(vname.eq."SLA") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%SLA + enddo + endif + + if(vname.eq."FRAGR") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%FRAGR + enddo + endif + + if(vname.eq."TMIN") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%TMIN + enddo + endif + + if(vname.eq."VCMX25") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%VCMX25 + enddo + endif + + if(vname.eq."TDLEF") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%TDLEF + enddo + endif + + if(vname.eq."BP") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%BP + enddo + endif + + if(vname.eq."MP") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%MP + enddo + endif + + if(vname.eq."QE25") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%QE25 + enddo + endif + + if(vname.eq."RMS25") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%RMS25 + enddo + endif + + if(vname.eq."RMR25") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%RMR25 + enddo + endif + + if(vname.eq."ARM") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%ARM + enddo + endif + + if(vname.eq."FOLNMX") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%FOLNMX + enddo + endif + + if(vname.eq."WDPOOL") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%WDPOOL + enddo + endif + + if(vname.eq."WRRAT") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%WRRAT + enddo + endif + + if(vname.eq."MRP") then + do t=1,NT + vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%MRP + enddo + endif + + !Test whether any defaults are out of bounds + count=0 + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index)/LIS_rc%nensem(n) + do m=1,LIS_rc%nensem(n) + gid=(t-1)*LIS_rc%nensem(n)+m + if( (m.eq.1) & + .and. & + (count.eq.0) & + .and. & + ((vardata(gid) .lt. NoahMP401_pe_struc(n)%param_min(i)) & + .or. & + (vardata(gid) .gt. NoahMP401_pe_struc(n)%param_max(i))) ) then + count=count+1 + write(LIS_logunit,*) '*****************************************************************', ' ', & + 'WARNING: noah default value is out of LIS-OPT/UE bounds ' , ' ', & + 'for ', vname , ' ', & + 'at ' , ' ', & + 'col: ', LIS_surface(n,LIS_rc%lsm_index)%tile(gid)%col , ' ', & + 'row: ', LIS_surface(n,LIS_rc%lsm_index)%tile(gid)%row , ' ', & + 'vegt class: ', NoahMP401_struc(n)%noahmp401(gid)%vegetype , ' ', & + 'soiltype: ', NoahMP401_struc(n)%noahmp401(gid)%soiltype , ' ', & + 'default value: ', vardata(gid) , ' ', & + 'parameter min: ', NoahMP401_pe_struc(n)%param_min(i) , ' ', & + 'parameter max: ', NoahMP401_pe_struc(n)%param_max(i) , ' ', & + '*****************************************************************' + + endif + enddo + enddo + endif ! if(NoahMP401_pe_struc(n)%param_select(i).eq.1) then + enddo ! do i=1,NoahMP401_pe_struc(n)%nparams + + !random initialization + if(LIS_rc%decSpaceInitMode.eq.1) then !random initialization + seed=seed_base-LIS_localPet !seed must be negative number + call LIS_rand_func(seed,rand) !initialize random seed with negative number + + do i=1,NoahMP401_pe_struc(n)%nparams + if(NoahMP401_pe_struc(n)%param_select(i).eq.1) then + vname=trim(NoahMP401_pe_struc(n)%param_name(i)) + + call ESMF_StateGet(DEC_State,vname,varField,rc=status) + call LIS_verify(status) + + call ESMF_FieldGet(varField,localDE=0,farrayPtr=vardata,& + rc=status) + call LIS_verify(status) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index)/LIS_rc%nensem(n) + do m=1,LIS_rc%nensem(n) + if (m.eq.1) then + !nothing; leave ensemble 1 with default values + else + call LIS_rand_func(1,rand) + vardata((t-1)*LIS_rc%nensem(n)+m) = & + NoahMP401_pe_struc(n)%param_min(i) & + + rand * ( NoahMP401_pe_struc(n)%param_max(i) - NoahMP401_pe_struc(n)%param_min(i) ) + endif + enddo + enddo + if(vname.eq."NROOT") then !integer value + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index)/LIS_rc%nensem(n) + do m=1,LIS_rc%nensem(n) + vardata((t-1)*LIS_rc%nensem(n)+m) = & + nint(vardata((t-1)*LIS_rc%nensem(n)+m)) + enddo + enddo + + endif + endif + enddo + endif + + write(LIS_logunit,*) '[INFO] Finished setting up NoahMP 3.6 decision space ' + end subroutine NoahMP401_setup_pedecvars + +end module NoahMP401_peMod diff --git a/lis/surfacemodels/land/noahmp.new/pe/NoahMP401_set_pedecvars.F90 b/lis/surfacemodels/land/noahmp.new/pe/NoahMP401_set_pedecvars.F90 new file mode 100755 index 000000000..86af58f9a --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/pe/NoahMP401_set_pedecvars.F90 @@ -0,0 +1,523 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: NoahMP401_set_pedecvars +! \label{NoahMP401_set_pedecvars} +! +! !REVISION HISTORY: +! 02 Feb 2018: Soni Yatheendradas; Initial Specification +! + + +! !INTERFACE: +subroutine NoahMP401_set_pedecvars(DEC_State, Feas_State) +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc, LIS_surface + use LIS_logMod, only : LIS_logunit,LIS_verify + use NoahMP401_lsmMod, only : NoahMP401_struc + use NoahMP401_peMod, only : NoahMP401_pe_struc + + implicit none +! !ARGUMENTS: + type(ESMF_State) :: DEC_State + type(ESMF_State) :: Feas_State +! +! !DESCRIPTION: +! +! This routine assigns the decision space to NoahMP3.6 model variables. +! +!EOP + integer :: n + real, pointer :: vdata(:) + character*100 :: vname + integer, pointer :: mod_flag_NoahMP401(:) + integer :: i,t + integer :: status + + n = 1 + + allocate(mod_flag_NoahMP401(LIS_rc%npatch(n,LIS_rc%lsm_index))) + + mod_flag_NoahMP401 = 0 + + !set modflag based on bounds + allocate(vdata(LIS_rc%npatch(n,LIS_rc%lsm_index))) + do i=1,NoahMP401_pe_struc(n)%nparams + if(NoahMP401_pe_struc(n)%param_select(i).eq.1) then + vname=trim(NoahMP401_pe_struc(n)%param_name(i)) + call NoahMP401_getvardata(n,DEC_State,vname, vdata, status) + call LIS_verify(status) + call NoahMP401_checkBounds(n,DEC_State,vname, vdata, mod_flag_NoahMP401) + endif + enddo + deallocate(vdata) + + !update modflags based on constraints + call NoahMP401_checkConstraints(n,DEC_State, mod_flag_NoahMP401) + + !set variables given modflag; if flag set will leave values alone + call NoahMP401_setVars(n,DEC_State,mod_flag_NoahMP401) + + !send mod flag to ESMF state (feasibility flag) + call NoahMP401_setModFlag(n,DEC_State,Feas_State,mod_flag_NoahMP401) +end subroutine NoahMP401_set_pedecvars + +!BOP +! +! !ROUTINE: randArray +! \label{randArray} +! +! !INTERFACE: +subroutine NoahMP401_getvardata(n,DEC_State,vname, vdata, statusStateGet) +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc + use LIS_logMod, only : LIS_logunit,LIS_verify + + implicit none +! !ARGUMENTS: + integer :: n + type(ESMF_State) :: DEC_State + character*100 :: vname + real :: vdata(LIS_rc%npatch(n,LIS_rc%lsm_index)) +! +! !DESCRIPTION: +! +! This routine assigns the decision space to NoahMP3.6 model variables. +! +!EOP + real, pointer :: vardata(:) + type(ESMF_Field) :: varField + integer :: statusStateGet, statusFieldGet,i + + call ESMF_StateGet(DEC_State,vname,varField,rc=statusStateGet) +! call LIS_verify(status) + + if(statusStateGet.eq.0) then + call ESMF_FieldGet(varField,localDE=0,farrayPtr=vardata,& + rc=statusFieldGet) + call LIS_verify(statusFieldGet) + vdata=vardata + endif + +end subroutine NoahMP401_getvardata + +subroutine NoahMP401_checkBounds(n,DEC_State,vname, vardata, mod_flag_NoahMP401) +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc, LIS_surface + use LIS_logMod, only : LIS_logunit,LIS_verify + + implicit none +! !ARGUMENTS: + integer :: n + type(ESMF_State) :: DEC_State + character*100 :: vname + real :: vardata(LIS_rc%npatch(n,LIS_rc%lsm_index)) + integer :: mod_flag_NoahMP401(LIS_rc%npatch(n,LIS_rc%lsm_index)) +! +! !DESCRIPTION: +! +! This routine assigns the decision space to NoahMP3.6 model variables. +! +!EOP + type(ESMF_Field) :: varField + real :: vardata_min, vardata_max + integer :: status + integer :: t + + call ESMF_StateGet(DEC_State,vname,varField,rc=status) + call LIS_verify(status) + + call ESMF_AttributeGet(varField,'MinRange',vardata_min,rc=status) + call LIS_verify(status) + call ESMF_AttributeGet(varField,'MaxRange',vardata_max,rc=status) + call LIS_verify(status) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + if(vardata(t).lt.vardata_min) then + mod_flag_NoahMP401(t) = 1 + endif + if(vardata(t).gt.vardata_max) then + mod_flag_NoahMP401(t) = 1 + endif + enddo +end subroutine NoahMP401_checkBounds + +subroutine NoahMP401_checkConstraints(n,DEC_State,mod_flag_NoahMP401) +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc, LIS_surface + use NoahMP401_lsmMod, only : NoahMP401_struc + + implicit none +! !ARGUMENTS: + integer :: n + type(ESMF_State) :: DEC_State + integer :: mod_flag_NoahMP401(LIS_rc%npatch(n,LIS_rc%lsm_index)) +! +! !DESCRIPTION: +! +! This routine assigns the decision space to NoahMP3.6 model variables. +! +!EOP + type(ESMF_Field) :: varField + real :: vardata_min, vardata_max + character*100 :: vname + integer :: t + integer :: status1, status2 + real, allocatable :: vardata1(:) + real, allocatable :: vardata2(:) + real, allocatable :: vardata3(:) + + allocate(vardata1(LIS_rc%npatch(n,LIS_rc%lsm_index))) + allocate(vardata2(LIS_rc%npatch(n,LIS_rc%lsm_index))) + allocate(vardata3(LIS_rc%npatch(n,LIS_rc%lsm_index))) + + vname='SMCMAX' + call NoahMP401_getvardata(n,DEC_State,vname,vardata1, status1) + + if(status1.ne.0) vardata1=NoahMP401_struc(n)%noahmp401(:)%param%smcmax(1) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + if(vardata1(t).le.NoahMP401_struc(n)%noahmp401(t)%param%smcdry(1)) then + mod_flag_NoahMP401(t) = 1 + endif + enddo + + !SMCREF > SMCWLT + vname='SMCREF' + call NoahMP401_getvardata(n,DEC_State,vname,vardata1, status1) + vname='SMCWLT' + call NoahMP401_getvardata(n,DEC_State,vname,vardata2, status2) + if(status1.ne.0) vardata1=NoahMP401_struc(n)%noahmp401(:)%param%smcref(1) + if(status2.ne.0) vardata2=NoahMP401_struc(n)%noahmp401(:)%param%smcwlt(1) + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + if(vardata1(t).le.vardata2(t)) then + mod_flag_NoahMP401(t) = 1 + endif + enddo + + !SMCMAX > SMCREF + vname='SMCMAX' + call NoahMP401_getvardata(n,DEC_State,vname,vardata1, status1) + vname='SMCREF' + call NoahMP401_getvardata(n,DEC_State,vname,vardata2, status2) + if(status1.ne.0) vardata1=NoahMP401_struc(n)%noahmp401(:)%param%smcmax(1) + if(status2.ne.0) vardata2=NoahMP401_struc(n)%noahmp401(:)%param%smcref(1) + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + if(vardata1(t).le.vardata2(t)) then + mod_flag_NoahMP401(t) = 1 + endif + enddo + + !HVT > HVB + vname='HVT' + call NoahMP401_getvardata(n,DEC_State,vname,vardata1, status1) + vname='HVB' + call NoahMP401_getvardata(n,DEC_State,vname,vardata2, status2) + if(status1.ne.0) vardata1=NoahMP401_struc(n)%noahmp401(:)%param%HVT + if(status2.ne.0) vardata2=NoahMP401_struc(n)%noahmp401(:)%param%HVB + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + if(vardata1(t).lt.vardata2(t)) then ! SY: Note .lt. instead of .le., following some entries with HVT=HVB in MPTABLE_UMD.TBL + mod_flag_NoahMP401(t) = 1 + endif + enddo + + !HVT > Z0MVT + vname='HVT' + call NoahMP401_getvardata(n,DEC_State,vname,vardata1, status1) + vname='Z0MVT' + call NoahMP401_getvardata(n,DEC_State,vname,vardata2, status2) + if(status1.ne.0) vardata1=NoahMP401_struc(n)%noahmp401(:)%param%HVT + if(status2.ne.0) vardata2=NoahMP401_struc(n)%noahmp401(:)%param%Z0MVT + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + if(vardata1(t).le.vardata2(t)) then + mod_flag_NoahMP401(t) = 1 + endif + enddo + + + !HVT > Z0MVT + vname='MNSNALB' + call NoahMP401_getvardata(n,DEC_State,vname,vardata1, status1) + vname='MXSNALB' + call NoahMP401_getvardata(n,DEC_State,vname,vardata2, status2) + if(status1.ne.0) vardata1=NoahMP401_struc(n)%noahmp401(:)%param%MNSNALB + if(status2.ne.0) vardata2=NoahMP401_struc(n)%noahmp401(:)%param%MXSNALB + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + if(vardata1(t).ge.vardata2(t)) then + mod_flag_NoahMP401(t) = 1 + endif + enddo + + !HVT > Z0MVT + vname='T_ULIMIT' + call NoahMP401_getvardata(n,DEC_State,vname,vardata1, status1) + vname='T_MLIMIT' + call NoahMP401_getvardata(n,DEC_State,vname,vardata2, status2) + vname='T_LLIMIT' + call NoahMP401_getvardata(n,DEC_State,vname,vardata3, status2) + if(status1.ne.0) vardata1=NoahMP401_struc(n)%noahmp401(:)%param%T_ULIMIT + if(status2.ne.0) vardata2=NoahMP401_struc(n)%noahmp401(:)%param%T_MLIMIT + if(status2.ne.0) vardata3=NoahMP401_struc(n)%noahmp401(:)%param%T_LLIMIT + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + if((vardata3(t).gt.vardata2(t)).or.& + (vardata2(t).gt.vardata1(t)).or.& + (vardata3(t).gt.vardata1(t))) then + mod_flag_NoahMP401(t) = 1 + endif + enddo + + deallocate(vardata1) + deallocate(vardata2) + deallocate(vardata3) + +end subroutine NoahMP401_checkConstraints + +subroutine NoahMP401_setVars(n,DEC_State,mod_flag_NoahMP401) +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc, LIS_surface + use LIS_logMod, only : LIS_logunit,LIS_verify + use NoahMP401_lsmMod, only : NoahMP401_struc + use NoahMP401_peMod, only : NoahMP401_pe_struc + + implicit none +! !ARGUMENTS: + integer :: n + integer :: mod_flag_NoahMP401(LIS_rc%npatch(n,LIS_rc%lsm_index)) + type(ESMF_State) :: DEC_State +! +! !DESCRIPTION: +! +! This routine assigns the decision space to NoahMP3.6 model variables. +! Only does so if the proposed parameter set is feasible (meets bounds and constraints) +! +!EOP + real :: vardata(LIS_rc%npatch(n,LIS_rc%lsm_index)) + character*100 :: vname + integer :: i,t, status + + do i=1,NoahMP401_pe_struc(n)%nparams + if(NoahMP401_pe_struc(n)%param_select(i).eq.1) then + vname=trim(NoahMP401_pe_struc(n)%param_name(i)) + call NoahMP401_getvardata(n,DEC_State,vname,vardata, status) + call LIS_verify(status) + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + if(mod_flag_NoahMP401(t).eq.0) then + if(vname.eq."TOPT") & + NoahMP401_struc(n)%noahmp401(t)%param%topt = vardata(t) + if(vname.eq."RGL") & + NoahMP401_struc(n)%noahmp401(t)%param%rgl = vardata(t) + if(vname.eq."RSMAX") & + NoahMP401_struc(n)%noahmp401(t)%param%rsmax = vardata(t) + if(vname.eq."RSMIN") & + NoahMP401_struc(n)%noahmp401(t)%param%rsmin = vardata(t) + if(vname.eq."HS") & + NoahMP401_struc(n)%noahmp401(t)%param%hs = vardata(t) + if(vname.eq."NROOT") & + NoahMP401_struc(n)%noahmp401(t)%param%nroot = vardata(t) + if(vname.eq."CSOIL") & + NoahMP401_struc(n)%noahmp401(t)%param%csoil = vardata(t) + if(vname.eq."BEXP") & + NoahMP401_struc(n)%noahmp401(t)%param%bexp = vardata(t) + if(vname.eq."DKSAT") & + NoahMP401_struc(n)%noahmp401(t)%param%dksat = vardata(t) + if(vname.eq."DWSAT") & + NoahMP401_struc(n)%noahmp401(t)%param%dwsat = vardata(t) + if(vname.eq."PSISAT") & + NoahMP401_struc(n)%noahmp401(t)%param%psisat = vardata(t) + if(vname.eq."QUARTZ") & + NoahMP401_struc(n)%noahmp401(t)%param%quartz = vardata(t) + if(vname.eq."SMCMAX") & + NoahMP401_struc(n)%noahmp401(t)%param%smcmax = vardata(t) + if(vname.eq."SMCREF") & + NoahMP401_struc(n)%noahmp401(t)%param%smcref = vardata(t) + if(vname.eq."SMCWLT") & + NoahMP401_struc(n)%noahmp401(t)%param%smcwlt = vardata(t) + if(vname.eq."CZIL") & + NoahMP401_struc(n)%noahmp401(t)%param%czil = vardata(t) + if(vname.eq."SLOPE") & + NoahMP401_struc(n)%noahmp401(t)%param%slope = vardata(t) + if(vname.eq."CH2OP") & + NoahMP401_struc(n)%noahmp401(t)%param%CH2OP = vardata(t) + if(vname.eq."DLEAF") & + NoahMP401_struc(n)%noahmp401(t)%param%DLEAF = vardata(t) + if(vname.eq."Z0MVT") & + NoahMP401_struc(n)%noahmp401(t)%param%Z0MVT = vardata(t) + if(vname.eq."HVT") & + NoahMP401_struc(n)%noahmp401(t)%param%HVT = vardata(t) + if(vname.eq."HVB") & + NoahMP401_struc(n)%noahmp401(t)%param%HVB = vardata(t) + if(vname.eq."RC") & + NoahMP401_struc(n)%noahmp401(t)%param%RC = vardata(t) + if(vname.eq."MFSNO") & + NoahMP401_struc(n)%noahmp401(t)%param%MFSNO = vardata(t) + if(vname.eq."ALBSAT1") & + NoahMP401_struc(n)%noahmp401(t)%param%ALBSAT(1) = vardata(t) + if(vname.eq."ALBSAT2") & + NoahMP401_struc(n)%noahmp401(t)%param%ALBSAT(2) = vardata(t) + if(vname.eq."ALBDRY1") & + NoahMP401_struc(n)%noahmp401(t)%param%ALBDRY(1) = vardata(t) + if(vname.eq."ALBDRY2") & + NoahMP401_struc(n)%noahmp401(t)%param%ALBDRY(2) = vardata(t) + if(vname.eq."ALBICE1") & + NoahMP401_struc(n)%noahmp401(t)%param%ALBICE(1) = vardata(t) + if(vname.eq."ALBICE2") & + NoahMP401_struc(n)%noahmp401(t)%param%ALBICE(2) = vardata(t) + if(vname.eq."OMEGAS1") & + NoahMP401_struc(n)%noahmp401(t)%param%OMEGAS(1) = vardata(t) + if(vname.eq."OMEGAS2") & + NoahMP401_struc(n)%noahmp401(t)%param%OMEGAS(2) = vardata(t) + if(vname.eq."BETADS") & + NoahMP401_struc(n)%noahmp401(t)%param%BETADS = vardata(t) + if(vname.eq."BETAIS") & + NoahMP401_struc(n)%noahmp401(t)%param%BETAIS = vardata(t) + if(vname.eq."EG1") & + NoahMP401_struc(n)%noahmp401(t)%param%EG(1) = vardata(t) + if(vname.eq."EG2") & + NoahMP401_struc(n)%noahmp401(t)%param%EG(2) = vardata(t) + if(vname.eq."Z0SNO") & + NoahMP401_struc(n)%noahmp401(t)%param%Z0SNO = vardata(t) + if(vname.eq."SSI") & + NoahMP401_struc(n)%noahmp401(t)%param%SSI = vardata(t) + if(vname.eq."SWEMX") & + NoahMP401_struc(n)%noahmp401(t)%param%SWEMX = vardata(t) + if(vname.eq."RSURF_SNOW") & + NoahMP401_struc(n)%noahmp401(t)%param%RSURF_SNOW = vardata(t) + if(vname.eq."MNSNALB") & + NoahMP401_struc(n)%noahmp401(t)%param%MNSNALB = vardata(t) + if(vname.eq."MXSNALB") & + NoahMP401_struc(n)%noahmp401(t)%param%MXSNALB= vardata(t) + if(vname.eq."SNDECAYEXP") & + NoahMP401_struc(n)%noahmp401(t)%param%SNDECAYEXP = vardata(t) + if(vname.eq."T_ULIMIT") & + NoahMP401_struc(n)%noahmp401(t)%param%T_ULIMIT = vardata(t) + if(vname.eq."T_MLIMIT") & + NoahMP401_struc(n)%noahmp401(t)%param%T_MLIMIT = vardata(t) + if(vname.eq."T_LLIMIT") & + NoahMP401_struc(n)%noahmp401(t)%param%T_LLIMIT = vardata(t) + if(vname.eq."SNOWF_SCALEF") & + NoahMP401_struc(n)%noahmp401(t)%param%snowf_scalef = vardata(t) + if(vname.eq."RHOL1") & + NoahMP401_struc(n)%noahmp401(t)%param%RHOL(1) = vardata(t) + if(vname.eq."RHOL2") & + NoahMP401_struc(n)%noahmp401(t)%param%RHOL(2) = vardata(t) + if(vname.eq."RHOS1") & + NoahMP401_struc(n)%noahmp401(t)%param%RHOS(1) = vardata(t) + if(vname.eq."RHOS2") & + NoahMP401_struc(n)%noahmp401(t)%param%RHOS(2) = vardata(t) + if(vname.eq."TAUL1") & + NoahMP401_struc(n)%noahmp401(t)%param%TAUL(1) = vardata(t) + if(vname.eq."TAUL2") & + NoahMP401_struc(n)%noahmp401(t)%param%TAUL(2) = vardata(t) + if(vname.eq."TAUS1") & + NoahMP401_struc(n)%noahmp401(t)%param%TAUS(1) = vardata(t) + if(vname.eq."TAUS2") & + NoahMP401_struc(n)%noahmp401(t)%param%TAUS(2) = vardata(t) + if(vname.eq."XL") & + NoahMP401_struc(n)%noahmp401(t)%param%XL = vardata(t) + if(vname.eq."CWPVT") & + NoahMP401_struc(n)%noahmp401(t)%param%CWPVT = vardata(t) + if(vname.eq."C3PSN") & + NoahMP401_struc(n)%noahmp401(t)%param%C3PSN = vardata(t) + if(vname.eq."KC25") & + NoahMP401_struc(n)%noahmp401(t)%param%KC25 = vardata(t) + if(vname.eq."AKC") & + NoahMP401_struc(n)%noahmp401(t)%param%AKC = vardata(t) + if(vname.eq."KO25") & + NoahMP401_struc(n)%noahmp401(t)%param%KO25 = vardata(t) + if(vname.eq."AKO") & + NoahMP401_struc(n)%noahmp401(t)%param%AKO = vardata(t) + if(vname.eq."AVCMX") & + NoahMP401_struc(n)%noahmp401(t)%param%AVCMX = vardata(t) + if(vname.eq."AQE") & + NoahMP401_struc(n)%noahmp401(t)%param%AQE = vardata(t) + if(vname.eq."LTOVRC") & + NoahMP401_struc(n)%noahmp401(t)%param%LTOVRC = vardata(t) + if(vname.eq."DILEFC") & + NoahMP401_struc(n)%noahmp401(t)%param%DILEFC = vardata(t) + if(vname.eq."DILEFW") & + NoahMP401_struc(n)%noahmp401(t)%param%DILEFW = vardata(t) + if(vname.eq."RMF25") & + NoahMP401_struc(n)%noahmp401(t)%param%RMF25 = vardata(t) + if(vname.eq."SLA") & + NoahMP401_struc(n)%noahmp401(t)%param%SLA = vardata(t) + if(vname.eq."FRAGR") & + NoahMP401_struc(n)%noahmp401(t)%param%FRAGR = vardata(t) + if(vname.eq."TMIN") & + NoahMP401_struc(n)%noahmp401(t)%param%TMIN = vardata(t) + if(vname.eq."VCMX25") & + NoahMP401_struc(n)%noahmp401(t)%param%VCMX25 = vardata(t) + if(vname.eq."TDLEF") & + NoahMP401_struc(n)%noahmp401(t)%param%TDLEF = vardata(t) + if(vname.eq."BP") & + NoahMP401_struc(n)%noahmp401(t)%param%BP = vardata(t) + if(vname.eq."MP") & + NoahMP401_struc(n)%noahmp401(t)%param%MP = vardata(t) + if(vname.eq."QE25") & + NoahMP401_struc(n)%noahmp401(t)%param%QE25 = vardata(t) + if(vname.eq."RMS25") & + NoahMP401_struc(n)%noahmp401(t)%param%RMS25 = vardata(t) + if(vname.eq."RMR25") & + NoahMP401_struc(n)%noahmp401(t)%param%RMR25 = vardata(t) + if(vname.eq."ARM") & + NoahMP401_struc(n)%noahmp401(t)%param%ARM = vardata(t) + if(vname.eq."FOLNMX") & + NoahMP401_struc(n)%noahmp401(t)%param%FOLNMX = vardata(t) + if(vname.eq."WDPOOL") & + NoahMP401_struc(n)%noahmp401(t)%param%WDPOOL = vardata(t) + if(vname.eq."WRRAT") & + NoahMP401_struc(n)%noahmp401(t)%param%WRRAT = vardata(t) + if(vname.eq."MRP") & + NoahMP401_struc(n)%noahmp401(t)%param%MRP = vardata(t) + endif + enddo + endif + enddo +end subroutine NoahMP401_setVars + +subroutine NoahMP401_setModFlag(n,DEC_State,Feas_State,mod_flag_NoahMP401) +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc, LIS_surface + use LIS_logMod, only : LIS_logunit,LIS_verify + + implicit none +! !ARGUMENTS: + integer :: n + integer :: mod_flag_NoahMP401(LIS_rc%npatch(n,LIS_rc%lsm_index)) + type(ESMF_State) :: DEC_State + type(ESMF_State) :: Feas_State +! +! !DESCRIPTION: +! +! This routine sets the feasibility flag +! +!EOP + type(ESMF_Field) :: feasField + integer :: t + integer :: status + integer, pointer :: modflag(:) + + call ESMF_StateGet(Feas_State, "Feasibility Flag", feasField, rc=status) + call LIS_verify(status) + call ESMF_FieldGet(feasField,localDE=0,farrayPtr=modflag,rc=status) + call LIS_verify(status) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + if(mod_flag_NoahMP401(t).eq.1) then + modflag(t)=1 + endif + enddo + +end subroutine NoahMP401_setModFlag diff --git a/lis/surfacemodels/land/noahmp.new/pe/obspred/UAsnow/NoahMP401_getpeobspred_UAsnowobs.F90 b/lis/surfacemodels/land/noahmp.new/pe/obspred/UAsnow/NoahMP401_getpeobspred_UAsnowobs.F90 new file mode 100644 index 000000000..d0669daad --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/pe/obspred/UAsnow/NoahMP401_getpeobspred_UAsnowobs.F90 @@ -0,0 +1,69 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: NoahMP401_getpeobspred_UAsnowobs +! \label{NoahMP401_getpeobspred_UAsnowobs} +! +! !REVISION HISTORY: +! 02 May 2020: Sujay Kumar; Initial Specification +! +! !INTERFACE: +subroutine NoahMP401_getpeobspred_UAsnowobs(Obj_Func) +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc + use LIS_soilsMod, only : LIS_soils + use NoahMP401_lsmMod, only : NoahMP401_struc + use LIS_logMod, only : LIS_verify, LIS_logunit + + implicit none +! !ARGUMENTS: + type(ESMF_State) :: Obj_Func +! +! !DESCRIPTION: +! +! This routine retrieves the observation prediction, which is the +! model's estimate of snow depth. +! +!EOP + integer :: n + type(ESMF_Field) :: snodField + real, pointer :: snod(:) + type(ESMF_Field) :: sweField + real, pointer :: swe(:) + integer :: t + integer :: i + integer :: status + + + n = 1 + + call ESMF_StateGet(Obj_Func,"UA_SNOD",snodField,rc=status) + call LIS_verify(status) + + call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) + call LIS_verify(status) + + call ESMF_StateGet(Obj_Func,"UA_SWE",sweField,rc=status) + call LIS_verify(status) + + call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) + call LIS_verify(status) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + snod(t) = NoahMP401_struc(n)%noahmp401(t)%snowh*1000.0 !mm + swe(t) = NoahMP401_struc(n)%noahmp401(t)%sneqv + enddo + + +end subroutine NoahMP401_getpeobspred_UAsnowobs + + + diff --git a/lis/surfacemodels/land/noahmp.new/pe/obspred/UAsnow/NoahMP401_setupobspred_UAsnowobs.F90 b/lis/surfacemodels/land/noahmp.new/pe/obspred/UAsnow/NoahMP401_setupobspred_UAsnowobs.F90 new file mode 100644 index 000000000..5fda39680 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/pe/obspred/UAsnow/NoahMP401_setupobspred_UAsnowobs.F90 @@ -0,0 +1,62 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: NoahMP401_setupobspred_UAsnowobs +! \label{NoahMP401_setupobspred_UAsnowobs} +! +! !REVISION HISTORY: +! 2 May 2020: Sujay Kumar; Initial Specification +! +! !INTERFACE: +subroutine NoahMP401_setupobspred_UAsnowobs(OBSPred) +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc, LIS_vecPatch + use LIS_logMod, only : LIS_verify + + implicit none +! !ARGUMENTS: + type(ESMF_State) :: OBSPred +! +! !DESCRIPTION: +! +! This routine creates an entry in the Obs pred object from +! NoahMP4.0.1 used for parameter estimation +! +!EOP + integer :: n + type(ESMF_ArraySpec) :: realarrspec + type(ESMF_Field) :: snodField,sweField + integer :: status + + n = 1 + call ESMF_ArraySpecSet(realarrspec, rank=1,typekind=ESMF_TYPEKIND_R4,& + rc=status) + call LIS_verify(status) + + snodField = ESMF_FieldCreate(arrayspec=realarrspec, & + grid=LIS_vecPatch(n,LIS_rc%lsm_index), & + name="UA_SNOD", rc=status) + call LIS_verify(status) + + + sweField = ESMF_FieldCreate(arrayspec=realarrspec, & + grid=LIS_vecPatch(n,LIS_rc%lsm_index), & + name="UA_SWE", rc=status) + call LIS_verify(status) + + call ESMF_StateAdd(OBSPred,(/snodField/),rc=status) + call LIS_verify(status) + + call ESMF_StateAdd(OBSPred,(/sweField/),rc=status) + call LIS_verify(status) + +end subroutine NoahMP401_setupobspred_UAsnowobs + diff --git a/lis/surfacemodels/land/noahmp.new/phys/noahmp b/lis/surfacemodels/land/noahmp.new/phys/noahmp new file mode 160000 index 000000000..d17655628 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/phys/noahmp @@ -0,0 +1 @@ +Subproject commit d17655628106e8da8fec5d46ab24f5b951e24155 diff --git a/lis/surfacemodels/land/noahmp.new/routing/noahmp401_getrunoffs.F90 b/lis/surfacemodels/land/noahmp.new/routing/noahmp401_getrunoffs.F90 new file mode 100644 index 000000000..6678496d0 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/routing/noahmp401_getrunoffs.F90 @@ -0,0 +1,149 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_getrunoffs +! \label{noahmp401_getrunoffs} +! +! !REVISION HISTORY: +! 6 May 2011: Sujay Kumar; Initial Specification +! 26 Feb 2019: David Mocko, added Noah-MP-4.0.1 routing into LIS-7 +! +! !INTERFACE: +subroutine noahmp401_getrunoffs(n) +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc, LIS_masterproc + use LIS_routingMod, only : LIS_runoff_state + use LIS_logMod, only : LIS_verify + use LIS_constantsMod + use LIS_historyMod + use noahmp401_lsmMod, only : noahmp401_struc + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n +! +! !DESCRIPTION: +! +! +! +!EOP + type(ESMF_Field) :: sfrunoff_field + type(ESMF_Field) :: baseflow_field + real, pointer :: sfrunoff(:) + real, pointer :: baseflow(:) + real, allocatable :: gvar1(:) + real, allocatable :: gvar2(:) + real, allocatable :: runoff1(:) + real, allocatable :: runoff2(:) + real, allocatable :: runoff1_t(:) + real, allocatable :: runoff2_t(:) + integer :: t + integer :: c,r + integer :: status + + !ag (25Apr2017) + type(ESMF_Field) :: evapotranspiration_Field + real,pointer :: evapotranspiration(:) + real, allocatable :: gvar3(:) + real, allocatable :: evapotranspiration1(:) + real, allocatable :: evapotranspiration1_t(:) + integer :: evapflag + + allocate(runoff1(LIS_rc%npatch(n,LIS_rc%lsm_index))) + allocate(runoff2(LIS_rc%npatch(n,LIS_rc%lsm_index))) + allocate(runoff1_t(LIS_rc%ntiles(n))) + allocate(runoff2_t(LIS_rc%ntiles(n))) + + call ESMF_AttributeGet(LIS_runoff_state(n),"Routing model evaporation option",& + evapflag, rc=status) +!if option is not defined, then assume that no evap calculations will be done + if(status.ne.0)then + evapflag = 0 + endif + + if(LIS_masterproc) then + call ESMF_StateGet(LIS_runoff_state(n),"Surface Runoff",& + sfrunoff_field,rc=status) + call LIS_verify(status,'ESMF_StateGet failed for Surface Runoff') + + call ESMF_StateGet(LIS_runoff_state(n),"Subsurface Runoff",& + baseflow_field,rc=status) + call LIS_verify(status,'ESMF_StateGet failed for Subsurface Runoff') + + call ESMF_FieldGet(sfrunoff_field,localDE=0,farrayPtr=sfrunoff,rc=status) + call LIS_verify(status,'ESMF_FieldGet failed for Surface Runoff') + + call ESMF_FieldGet(baseflow_field,localDE=0,farrayPtr=baseflow,rc=status) + call LIS_verify(status,'ESMF_FieldGet failed for Subsurface Runoff') + + endif + + do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) + runoff1(t) = NOAHMP401_struc(n)%noahmp401(t)%runsf/LIS_CONST_RHOFW + runoff2(t) = NOAHMP401_struc(n)%noahmp401(t)%runsb/LIS_CONST_RHOFW + enddo + + call LIS_patch2tile(n,1,runoff1_t, runoff1) + call LIS_patch2tile(n,1,runoff2_t, runoff2) + +!gather the model tiles before assigning to the global data structure. + call LIS_gather_tiled_vector_withhalo_output(n, gvar1, runoff1_t) + call LIS_gather_tiled_vector_withhalo_output(n, gvar2, runoff2_t) + + if(LIS_masterproc) then + + sfrunoff = gvar1 + baseflow = gvar2 + + deallocate(gvar1) + deallocate(gvar2) + + endif + + deallocate(runoff1) + deallocate(runoff2) + deallocate(runoff1_t) + deallocate(runoff2_t) + + !ag (05Jun2017) + !Including meteorological forcings + evapotranspiration for computing evaporation from open waters in HyMAP2) + if(evapflag.ne.0)then + allocate(evapotranspiration1(LIS_rc%npatch(n,LIS_rc%lsm_index))) + allocate(evapotranspiration1_t(LIS_rc%ntiles(n))) + + if(LIS_masterproc) then + + call ESMF_StateGet(LIS_runoff_state(n),"Total Evapotranspiration",evapotranspiration_Field, rc=status) + call LIS_verify(status, "noahmp401_getrunoffs: ESMF_StateGet failed for Total Evapotranspiration") + + call ESMF_FieldGet(evapotranspiration_Field,localDE=0,farrayPtr=evapotranspiration,rc=status) + call LIS_verify(status, "noahmp401_getrunoffs: ESMF_FieldGet failed for Total Evapotranspiration") + + endif + + do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) + evapotranspiration1(t) = NOAHMP401_struc(n)%noahmp401(t)%ecan + NOAHMP401_struc(n)%noahmp401(t)%etran + NOAHMP401_struc(n)%noahmp401(t)%edir + enddo + + call LIS_patch2tile(n,1,evapotranspiration1_t, evapotranspiration1) + + call LIS_gather_tiled_vector_withhalo_output(n, gvar3, evapotranspiration1_t) + + if(LIS_masterproc) then + evapotranspiration = gvar3 + deallocate(gvar3) + endif + + deallocate(evapotranspiration1) + deallocate(evapotranspiration1_t) + endif + +end subroutine noahmp401_getrunoffs diff --git a/lis/surfacemodels/land/noahmp.new/routing/noahmp401_getrunoffs_hymap2.F90 b/lis/surfacemodels/land/noahmp.new/routing/noahmp401_getrunoffs_hymap2.F90 new file mode 100644 index 000000000..50ba761c4 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/routing/noahmp401_getrunoffs_hymap2.F90 @@ -0,0 +1,132 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_getrunoffs_hymap2 +! \label{noahmp401_getrunoffs_hymap2} +! +! !REVISION HISTORY: +! 6 May 2011: Sujay Kumar; Initial Specification +! +! !INTERFACE: +subroutine noahmp401_getrunoffs_hymap2(n) +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc, LIS_masterproc + use LIS_routingMod, only : LIS_runoff_state + use LIS_logMod + use LIS_historyMod + use noahmp401_lsmMod, only : noahmp401_struc + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n +! +! !DESCRIPTION: +! +! +! +!EOP + type(ESMF_Field) :: sfrunoff_field + type(ESMF_Field) :: baseflow_field + real, pointer :: sfrunoff(:) + real, pointer :: baseflow(:) + integer :: t + integer :: c,r + integer :: status + real, allocatable :: runoff1(:) + real, allocatable :: runoff2(:) + real, allocatable :: runoff1_t(:) + real, allocatable :: runoff2_t(:) + + !ag (25Apr2017) + type(ESMF_Field) :: evapotranspiration_Field + real,pointer :: evapotranspiration(:) + real, allocatable :: evapotranspiration1(:) + real, allocatable :: evapotranspiration1_t(:) + integer :: evapflag + + allocate(runoff1(LIS_rc%npatch(n,LIS_rc%lsm_index))) + allocate(runoff2(LIS_rc%npatch(n,LIS_rc%lsm_index))) + allocate(runoff1_t(LIS_rc%ntiles(n))) + allocate(runoff2_t(LIS_rc%ntiles(n))) + + runoff1_t = -9999.0 + runoff2_t = -9999.0 + + call ESMF_AttributeGet(LIS_runoff_state(n),"Routing model evaporation option",& + evapflag, rc=status) +!if option is not defined, then assume that no evap calculations will be done + if(status.ne.0)then + evapflag = 0 + endif + + call ESMF_StateGet(LIS_runoff_state(n),"Surface Runoff",& + sfrunoff_field,rc=status) + call LIS_verify(status,'ESMF_StateGet failed for Surface Runoff') + + call ESMF_StateGet(LIS_runoff_state(n),"Subsurface Runoff",& + baseflow_field,rc=status) + call LIS_verify(status,'ESMF_StateGet failed for Subsurface Runoff') + + call ESMF_FieldGet(sfrunoff_field,localDE=0,farrayPtr=sfrunoff,rc=status) + call LIS_verify(status,'ESMF_FieldGet failed for Surface Runoff') + + call ESMF_FieldGet(baseflow_field,localDE=0,farrayPtr=baseflow,rc=status) + call LIS_verify(status,'ESMF_FieldGet failed for Subsurface Runoff') + + do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) !units? + runoff1(t) = NOAHMP401_struc(n)%noahmp401(t)%runsf + runoff2(t) = NOAHMP401_struc(n)%noahmp401(t)%runsb + enddo + + runoff1_t = LIS_rc%udef + runoff2_t = LIS_rc%udef + + call LIS_patch2tile(n,1,runoff1_t, runoff1) + call LIS_patch2tile(n,1,runoff2_t, runoff2) + + sfrunoff = runoff1_t + baseflow = runoff2_t + + deallocate(runoff1) + deallocate(runoff2) + deallocate(runoff1_t) + deallocate(runoff2_t) + + !ag (05Jun2017) + !Including meteorological forcings + evapotranspiration for computing evaporation from open waters in HyMAP2) + if(evapflag.ne.0)then + allocate(evapotranspiration1(LIS_rc%npatch(n,LIS_rc%lsm_index))) + allocate(evapotranspiration1_t(LIS_rc%ntiles(n))) + + call ESMF_StateGet(LIS_runoff_state(n),"Total Evapotranspiration",& + evapotranspiration_Field, rc=status) + call LIS_verify(status, "noahmp401_getrunoffs_hymap2: ESMF_StateGet failed for Total Evapotranspiration") + + call ESMF_FieldGet(evapotranspiration_Field,localDE=0,& + farrayPtr=evapotranspiration,rc=status) + call LIS_verify(status, "noahmp401_getrunoffs_hymap2: ESMF_FieldGet failed for Total Evapotranspiration") + + do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) + evapotranspiration1(t) = & + NOAHMP401_struc(n)%noahmp401(t)%ecan + & + NOAHMP401_struc(n)%noahmp401(t)%etran + & + NOAHMP401_struc(n)%noahmp401(t)%edir + enddo + + call LIS_patch2tile(n,1,evapotranspiration1_t, evapotranspiration1) + + evapotranspiration = evapotranspiration1_t + + deallocate(evapotranspiration1) + deallocate(evapotranspiration1_t) + endif + +end subroutine noahmp401_getrunoffs_hymap2 diff --git a/lis/surfacemodels/land/noahmp.new/routing/noahmp401_getrunoffs_mm.F90 b/lis/surfacemodels/land/noahmp.new/routing/noahmp401_getrunoffs_mm.F90 new file mode 100644 index 000000000..56e68d3d4 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/routing/noahmp401_getrunoffs_mm.F90 @@ -0,0 +1,151 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_getrunoffs_mm +! \label{noahmp401_getrunoffs_mm} +! +! !REVISION HISTORY: +! 6 May 2011: Sujay Kumar; Initial Specification +! 26 Feb 2019: David Mocko, added Noah-MP-4.0.1 routing into LIS-7 +! +! !INTERFACE: +subroutine noahmp401_getrunoffs_mm(n) +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc, LIS_masterproc + use LIS_routingMod, only : LIS_runoff_state + use LIS_logMod, only : LIS_verify + use LIS_historyMod + use noahmp401_lsmMod, only : noahmp401_struc + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n +! +! !DESCRIPTION: +! +! +! +!EOP + type(ESMF_Field) :: sfrunoff_field + type(ESMF_Field) :: baseflow_field + real, pointer :: sfrunoff(:) + real, pointer :: baseflow(:) + real, allocatable :: gvar1(:) + real, allocatable :: gvar2(:) + real, allocatable :: runoff1(:) + real, allocatable :: runoff2(:) + real, allocatable :: runoff1_t(:) + real, allocatable :: runoff2_t(:) + integer :: t + integer :: c,r + integer :: status + + !ag (25Apr2017) + type(ESMF_Field) :: evapotranspiration_Field + real,pointer :: evapotranspiration(:) + real, allocatable :: gvar3(:) + real, allocatable :: evapotranspiration1(:) + real, allocatable :: evapotranspiration1_t(:) + integer :: evapflag + + allocate(runoff1(LIS_rc%npatch(n,LIS_rc%lsm_index))) + allocate(runoff2(LIS_rc%npatch(n,LIS_rc%lsm_index))) + allocate(runoff1_t(LIS_rc%ntiles(n))) + allocate(runoff2_t(LIS_rc%ntiles(n))) + + runoff1_t = -9999.0 + runoff2_t = -9999.0 + + call ESMF_AttributeGet(LIS_runoff_state(n),"Routing model evaporation option",& + evapflag, rc=status) +!if option is not defined, then assume that no evap calculations will be done + if(status.ne.0)then + evapflag = 0 + endif + + if(LIS_masterproc) then + call ESMF_StateGet(LIS_runoff_state(n),"Surface Runoff",& + sfrunoff_field,rc=status) + call LIS_verify(status,'ESMF_StateGet failed for Surface Runoff') + + call ESMF_StateGet(LIS_runoff_state(n),"Subsurface Runoff",& + baseflow_field,rc=status) + call LIS_verify(status,'ESMF_StateGet failed for Subsurface Runoff') + + call ESMF_FieldGet(sfrunoff_field,localDE=0,farrayPtr=sfrunoff,rc=status) + call LIS_verify(status,'ESMF_FieldGet failed for Surface Runoff') + + call ESMF_FieldGet(baseflow_field,localDE=0,farrayPtr=baseflow,rc=status) + call LIS_verify(status,'ESMF_FieldGet failed for Subsurface Runoff') + + endif + + do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) + runoff1(t) = NOAHMP401_struc(n)%noahmp401(t)%runsf + runoff2(t) = NOAHMP401_struc(n)%noahmp401(t)%runsb + enddo + + call LIS_patch2tile(n,1,runoff1_t, runoff1) + call LIS_patch2tile(n,1,runoff2_t, runoff2) + +!gather the model tiles before assigning to the global data structure. + call LIS_gather_tiled_vector_withhalo_output(n, gvar1, runoff1_t) + call LIS_gather_tiled_vector_withhalo_output(n, gvar2, runoff2_t) + + if(LIS_masterproc) then + + sfrunoff = gvar1 + baseflow = gvar2 + + deallocate(gvar1) + deallocate(gvar2) + + endif + + deallocate(runoff1) + deallocate(runoff2) + deallocate(runoff1_t) + deallocate(runoff2_t) + + !ag (05Jun2017) + !Including meteorological forcings + evapotranspiration for computing evaporation from open waters in HyMAP2) + if(evapflag.ne.0)then + allocate(evapotranspiration1(LIS_rc%npatch(n,LIS_rc%lsm_index))) + allocate(evapotranspiration1_t(LIS_rc%ntiles(n))) + + if(LIS_masterproc) then + + call ESMF_StateGet(LIS_runoff_state(n),"Total Evapotranspiration",evapotranspiration_Field, rc=status) + call LIS_verify(status, "noahmp401_getrunoffs_mm: ESMF_StateGet failed for Total Evapotranspiration") + + call ESMF_FieldGet(evapotranspiration_Field,localDE=0,farrayPtr=evapotranspiration,rc=status) + call LIS_verify(status, "noahmp401_getrunoffs_mm: ESMF_FieldGet failed for Total Evapotranspiration") + + endif + + do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) + evapotranspiration1(t) = NOAHMP401_struc(n)%noahmp401(t)%ecan + NOAHMP401_struc(n)%noahmp401(t)%etran + NOAHMP401_struc(n)%noahmp401(t)%edir + enddo + + call LIS_patch2tile(n,1,evapotranspiration1_t, evapotranspiration1) + + call LIS_gather_tiled_vector_withhalo_output(n, gvar3, evapotranspiration1_t) + + if(LIS_masterproc) then + evapotranspiration = gvar3 + deallocate(gvar3) + endif + + deallocate(evapotranspiration1) + deallocate(evapotranspiration1_t) + endif + +end subroutine noahmp401_getrunoffs_mm diff --git a/lis/surfacemodels/land/noahmp.new/routing/noahmp401_getrunoffs_rapid.F90 b/lis/surfacemodels/land/noahmp.new/routing/noahmp401_getrunoffs_rapid.F90 new file mode 100644 index 000000000..01d8769aa --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/routing/noahmp401_getrunoffs_rapid.F90 @@ -0,0 +1,89 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.3 +! +! Copyright (c) 2020 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_getrunoffs_rapid +! \label{noahmp401_getrunoffs_rapid} +! +! !REVISION HISTORY: +! 17 Mar 2021: Yeosang Yoon; Initial Specification +! +! !INTERFACE: +subroutine noahmp401_getrunoffs_rapid(n) +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc, LIS_masterproc + use LIS_routingMod, only : LIS_runoff_state + use LIS_logMod + use LIS_historyMod + use noahmp401_lsmMod, only : noahmp401_struc + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n +! +! !DESCRIPTION: +! +! +! +!EOP + type(ESMF_Field) :: sfrunoff_field + type(ESMF_Field) :: baseflow_field + real, pointer :: sfrunoff(:) + real, pointer :: baseflow(:) + integer :: t + integer :: c,r + integer :: status + real, allocatable :: runoff1(:) + real, allocatable :: runoff2(:) + real, allocatable :: runoff1_t(:) + real, allocatable :: runoff2_t(:) + + allocate(runoff1(LIS_rc%npatch(n,LIS_rc%lsm_index))) + allocate(runoff2(LIS_rc%npatch(n,LIS_rc%lsm_index))) + allocate(runoff1_t(LIS_rc%ntiles(n))) + allocate(runoff2_t(LIS_rc%ntiles(n))) + + runoff1_t = -9999.0 + runoff2_t = -9999.0 + + call ESMF_StateGet(LIS_runoff_state(n),"Surface Runoff",& + sfrunoff_field,rc=status) + call LIS_verify(status,'ESMF_StateGet failed for Surface Runoff') + + call ESMF_StateGet(LIS_runoff_state(n),"Subsurface Runoff",& + baseflow_field,rc=status) + call LIS_verify(status,'ESMF_StateGet failed for Subsurface Runoff') + + call ESMF_FieldGet(sfrunoff_field,localDE=0,farrayPtr=sfrunoff,rc=status) + call LIS_verify(status,'ESMF_FieldGet failed for Surface Runoff') + + call ESMF_FieldGet(baseflow_field,localDE=0,farrayPtr=baseflow,rc=status) + call LIS_verify(status,'ESMF_FieldGet failed for Subsurface Runoff') + + do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) !units? + runoff1(t) = NOAHMP401_struc(n)%noahmp401(t)%runsf + runoff2(t) = NOAHMP401_struc(n)%noahmp401(t)%runsb + enddo + + runoff1_t = LIS_rc%udef + runoff2_t = LIS_rc%udef + + call LIS_patch2tile(n,1,runoff1_t, runoff1) + call LIS_patch2tile(n,1,runoff2_t, runoff2) + + sfrunoff = runoff1_t + baseflow = runoff2_t + + deallocate(runoff1) + deallocate(runoff2) + deallocate(runoff1_t) + deallocate(runoff2_t) + +end subroutine noahmp401_getrunoffs_rapid diff --git a/lis/surfacemodels/land/noahmp.new/routing/noahmp401_getsws_hymap2.F90 b/lis/surfacemodels/land/noahmp.new/routing/noahmp401_getsws_hymap2.F90 new file mode 100644 index 000000000..1c04b9186 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/routing/noahmp401_getsws_hymap2.F90 @@ -0,0 +1,78 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: noahmp401_getsws_hymap2 +! \label{noahmp401_getsws_hymap2} +! +! !REVISION HISTORY: +! 12 Sep 2019: Augusto Getirana; implementation of two-way coupling +! +! !INTERFACE: +subroutine noahmp401_getsws_hymap2(n) +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc, LIS_masterproc + use LIS_routingMod, only : LIS_runoff_state + use LIS_logMod + use LIS_historyMod + use noahmp401_lsmMod, only : noahmp401_struc + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n +! +! !DESCRIPTION: +! This routine defines the surface water storage variables in NoahMP +! to be updated based on feedback from HYMAP2 +! +!EOP + type(ESMF_Field) :: rivsto_field + type(ESMF_Field) :: fldsto_field + type(ESMF_Field) :: fldfrc_field + real, pointer :: rivstotmp(:) + real, pointer :: fldstotmp(:) + real, pointer :: fldfrctmp(:) + integer :: t + integer :: c,r + integer :: status + integer :: enable2waycpl + + call ESMF_AttributeGet(LIS_runoff_state(n),"2 way coupling",& + enable2waycpl, rc=status) + call LIS_verify(status) + + if(enable2waycpl==1) then + ! River Storage + call ESMF_StateGet(LIS_runoff_state(n),"River Storage",rivsto_field,rc=status) + call LIS_verify(status,'ESMF_StateGet failed for River Storage') + + call ESMF_FieldGet(rivsto_field,localDE=0,farrayPtr=rivstotmp,rc=status) + call LIS_verify(status,'ESMF_FieldGet failed for River Storage') + where(rivstotmp/=LIS_rc%udef) & + NOAHMP401_struc(n)%noahmp401(:)%rivsto=rivstotmp/NOAHMP401_struc(n)%ts + + ! Flood Storage + call ESMF_StateGet(LIS_runoff_state(n),"Flood Storage",fldsto_field,rc=status) + call LIS_verify(status,'ESMF_StateGet failed for Flood Storage') + + call ESMF_FieldGet(fldsto_field,localDE=0,farrayPtr=fldstotmp,rc=status) + call LIS_verify(status,'ESMF_FieldGet failed for Flood Storage') + where(fldstotmp/=LIS_rc%udef)& + NOAHMP401_struc(n)%noahmp401(:)%fldsto=fldstotmp/NOAHMP401_struc(n)%ts + + ! Flooded Fraction Flag + call ESMF_StateGet(LIS_runoff_state(n),"Flooded Fraction",fldfrc_field,rc=status) + call LIS_verify(status,'ESMF_StateGet failed for Flooded Fraction') + + call ESMF_FieldGet(fldfrc_field,localDE=0,farrayPtr=fldfrctmp,rc=status) + call LIS_verify(status,'ESMF_FieldGet failed for Flooded Fraction') + NOAHMP401_struc(n)%noahmp401(:)%fldfrc=fldfrctmp + endif +end subroutine noahmp401_getsws_hymap2 diff --git a/lis/surfacemodels/land/noahmp.new/wrf_debug.F90 b/lis/surfacemodels/land/noahmp.new/wrf_debug.F90 new file mode 100644 index 000000000..bdc11fdd6 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/wrf_debug.F90 @@ -0,0 +1,17 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- + +subroutine wrf_debug(unit_number, message) + use LIS_logMod, only : LIS_logunit + implicit none + integer :: unit_number + character(len=*) :: message + write(LIS_logunit, *) "Noah-MP new refactored version (wrf_debug): ", message +end subroutine wrf_debug From f89d95556f85ec3bd99a9cf67db0de9c84c6e9d0 Mon Sep 17 00:00:00 2001 From: cenlinhe Date: Thu, 13 Jul 2023 19:26:14 -0600 Subject: [PATCH 02/27] update lis parameter setup --- .../land/noahmp.new/.NoahMPnew_setup.F90.swp | Bin 16384 -> 0 bytes .../land/noahmp.new/NoahMPnew_setup.F90 | 250 ++++++++++++------ lis/surfacemodels/land/noahmp.new/phys/noahmp | 2 +- 3 files changed, 164 insertions(+), 88 deletions(-) delete mode 100644 lis/surfacemodels/land/noahmp.new/.NoahMPnew_setup.F90.swp diff --git a/lis/surfacemodels/land/noahmp.new/.NoahMPnew_setup.F90.swp b/lis/surfacemodels/land/noahmp.new/.NoahMPnew_setup.F90.swp deleted file mode 100644 index 2e7f6d76db2b764a9e7bdb79b740883ac8408348..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16384 zcmeHOON=8|6)hly1oDq2*#LT;(209++ig#GW-!UZ-L`wI@h`S}zCCfOUC(x<>tm|Q z-P8FfNC_xNNJtzdP_JwD62KOWsrNb>lxB8q& z2R)rW-{qFY(+4qumg*U*##1}Cvy~djPE~WwT)SLqwyU<ChH7ak3%uqaY4M$u?1pb`mwUrOviPaRw=rWzo_XLs>VfN(qnWgrA9oy% zv0HChe~S|RkK}*AZy$}XFhTdpvyYhvW*(S%VCI3D2WB3ad0^&&nFnSbn0a94ftd&1 zl^#$vMfn6Qf0hoy`1}9p{Qvxoit=Tk2b={?1GfUN+@L5w2DX3)ffi5$DnJ^z9XJFi zz;o9t$^$?Qc=8it;q@2yhNa z09OOAT?>1F&jY7`JApT^QIwwpUji-wp9J3ekfOW_`~vt2@BnZP@XM>wANUdQ9PlmR zG2njS9^e+>XCG9Q?*ZQho&@d#4guEzuV1AoF9A;hP2fi0Ra_?g1Q-G(;E%XV_$}}< z@I&B>KoPhWAiqB|x`cR}3}TU|qZ$UI*CrgUYVCpQsAk+sFwfD=c(s;0QK^epB0Oi< ziCgn?<$SAcb+%Qfz0G^v+a2)v1REH5t)g!m8h7TEi0u8o3gJR$XHIDB>IR4OiOz@5 zm#W3u1x9aXEL7^rD&JvbrEc|@=*B(nuv3M#LhEe3z`BlYvcm~>=a>mQj_&a|DKqTe z(9*rck@*Rhn2?%fqY(xD@tO!{!7myOw=~TjYoXRDev&Viz;$tNer_cAUg2o}H5Br) zDI7TG(eNdoHzr)OnRjnGA>-4Tvj(cy>4zQ1c-eG!!Pk77@9Qr(=J1%9xAB+W6~1&j zb3>OK9a9}3ZVWHbB-ve-ZSlM2nb+r5ATrjf6T|lY2+3+lo3RRdFmE-*|us7xr{fIk$2eUP&d2<-HHqpUJtz)TR7l}MO2Lv%!RLY z)d=OeEW&nxu!WE<5Q{lxcU0tIWTuS#Xjn9{f*2c?Lo*?q3Nbe7%}l(zD{5l6!{+q$Lki-L$qU|u^ce6m?YNjEySVLJ(m z1cH+gP52UDg5|DZ52zF*SjVvk6g%pz&_D2|kr)j?-849ZxTq7diL4yzRK-x5V2-^b zWKHGp5^O8MWWG&h5Tlj-&4HnJbdOPPn2U4b16>HSTsCeL#u%C^eGha^|?K zvR-bL%7s&fGTW0BG6}2PTg?|4RWTtE6~{a;i^9@kdP9`fjdmz!L)O^~@ePM}9}XC0 z2@csL*Q4`nV}nf^ML8eVKrxp@{hMkEm`6s4KE7f!N2-3PXJeE1bZd`KT9|5%J@j;> z6K3qTy~Q=AIy@_F^R%v`c0BSOV+)LG8q*wAx6~fZRgh@bpI^8j*}M7}d)KgSjp>e~ z_hfn4+ru31Vd}`XgL}B+J=}q#TU$u(1J&rxm|>pnp$Z(>LrjnI(rD!LlX?82H*~17 zF+<&j&ZThZlK<$z{6{DGGY9i$Ci&9`^QR;HTy<@$-P1I5SztX(I9g&|(ahHJ`H;1* zI@_o+BhjOu$Uh!3VSZc4lAhpNpy@7uj&pgNwl7C$)i@uBssh)U1MaB8edka5=|Vmm zRTkJNeN2@mNT|^w>uVK1Wh#k&KA*!sGt?amCqz&$Zjn5y45j;8qbRP*6Qo- zDB~Hv(ptkU4;6S|qt-C2S$I{H4F`e}%tlvA*J^gjL zPTRgb7UY&)#zJM}Z4(oBOdfVmLKucY=1O^^EtRka3%uUlm2y#2ona_|9BmFtwNt9o zLeK)iK>*rVg&>~%w%#l>vx?#lH~nH0hDpAe8=qH*uT*Un8pYgdLDZkc<l?y{3ZQ+1Mzx>H-k7?Hx1ll0~@E0g^t3u$di z@y%TqGl`wzj!W8(B`L)Nqe-5~?{W1#Zqd|(0m4}%9bw@HD~%7bW!uIUmQoFSOIrO! zUW`xx6W)J<+Y95_M-kyhDQqqg2ERSPon{euR*drkdTusYx2 zPe*o`rhuuton-$og1_(Xt5D5jGu|q#7TCf9%h%`!E96V9eR{x%9F9K?z1R0#)<6Y7 zdDD{AteJ?f>%kd_ryr`S@GO>t9CvI>#ZuUDMU}vn2S88on?`- zSR}@pt!b(Qjl#yFAVfX5bB+*`ETw3OoQD0p7q_{UzW@paFao_yf-AuLIu%J_{TJ?gkD4 zFXO!aIFJSYjC1<;fi`d(@Cwf7PXN1s2iyzX1pE$X^4EZ`0S^Ib;40uZIFCOIJOexi zB!D+?9{&sQH1IgE3FH6mvTHj$vT}A-$gljjHYrKOU+r@zpzL=h5 zFfG?ojZLX~k8bl~NIj1K3q#V$5v8K|I;N`FIClnO@NtqIp%1KPEuYQ*1#&!MT(h!T z$(@O(=UFOhGnyNPBAVwRC%%|mN@u`;&%2My!&RvmZ`Mj>x+W2w;nXGnppG)3Y7Y*v zrxSJr%4m0kg>r~$7i_k&leP+DF}z@OQL9!-CBq1gCJT4_!-~>jb-r;{_;G1bCIK7s z4;W6DTL&{>+>#-)j|BKjGAv65xFQ&%JGb6g$yM9Ma&B$Db)ryZEXGctSaxi2$>iE5 zXG3RGja)0ZV%a5^$lykVHOn)2gA1#E*eqQ`Q#8`6dAd+JL$j7VDW9M~ z3flBu&63X?^opo#HcL}`om+%;vfmzEf;P2R5!vCJ==TZ?l%%P>TBS-Mhb0uxWG_jY z+N^2%#q!XxquYFHAS0L-?a2upt&#*VKRSLuW|JAHSca@>i zxs_5aQ_fMQkXr&T`pwcQ@zqAHE;b@yVKHWKwM+N747YB~(6{O4PPA?6xCU}vcHX={ zliKQCP{1D1wbsa$s&%;=i0Ja0Cv@SOpL7Mcx;RmHRAY<2D=n;{qG&0NZ zTaXGterVbT!z@EqFl0%}y`cOL DArI{^ diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_setup.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_setup.F90 index 5e8f92f97..e040e421c 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_setup.F90 +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_setup.F90 @@ -55,7 +55,7 @@ subroutine NoahMPnew_setup() ! \begin{description} ! \item[LIS\_read\_param](\ref{LIS_read_param}) \\ ! retrieves LIS parameter data from NetCDF file -! \item[NOAHMP401\_read\_MULTILEVEL\_param](\ref{NOAHMP401_read_MULTILEVEL_param}) \\ +! \item[NOAHMPnew\_read\_MULTILEVEL\_param](\ref{NOAHMPnew_read_MULTILEVEL_param}) \\ ! retrieves MULTILEVEL spatial parameter from NetCDF file ! \end{description} !EOP @@ -304,11 +304,12 @@ subroutine NoahMPnew_setup() trim(NOAHMPnew_struc(n)%noahmp_tbl_name)) do t=1,LIS_rc%npatch(n,mtype) - soiltyp = NoahMPnew_struc(n)%noahmpnew(t)%soiltype - vegtyp = NoahMPnew_struc(n)%noahmpnew(t)%vegetype - + SOILTYP = NoahMPnew_struc(n)%noahmpnew(t)%soiltype + VEGTYP = NoahMPnew_struc(n)%noahmpnew(t)%vegetype SLOPETYP = 1 ! set underground runoff slope term SOILCOLOR = 4 ! soil color: assuming a middle color category ????????? + ! if (NOAHMPnew_struc(n)%crop_opt > 0 .and. VEGTYP == NoahmpIO%ISCROP_TABLE) & + ! CROPTYPE = NoahmpIO%DEFAULT_CROP_TABLE CROPTYPE = 0 CALL TRANSFER_MP_PARAMETERS(VEGTYP,SOILTYP,SLOPETYP,SOILCOLOR,CROPTYPE,& NoahMPnew_struc(n)%noahmpnew(t)%param) @@ -324,7 +325,7 @@ end subroutine NoahMPnew_setup !BOP ! -! !ROUTINE: NOAHMP401_read_MULTILEVEL_param +! !ROUTINE: NOAHMPnew_read_MULTILEVEL_param ! \label{read_MULTILEVEL_param} ! ! !REVISION HISTORY: @@ -435,7 +436,7 @@ subroutine NOAHMPnew_read_MULTILEVEL_param(n, ncvar_name, level, placeholder) call LIS_endrun endif - end subroutine NOAHMP401_read_MULTILEVEL_param + end subroutine NOAHMPnew_read_MULTILEVEL_param SUBROUTINE TRANSFER_MP_PARAMETERS(VEGTYPE,SOILTYPE,SLOPETYPE,SOILCOLOR,CROPTYPE,parameters) @@ -451,8 +452,6 @@ SUBROUTINE TRANSFER_MP_PARAMETERS(VEGTYPE,SOILTYPE,SLOPETYPE,SOILCOLOR,CROPTYPE, type (LisNoahmpParam_type), intent(inout) :: parameters - REAL :: REFDK - REAL :: REFKDT REAL :: FRZK REAL :: FRZFACT INTEGER :: ISOIL @@ -472,74 +471,76 @@ SUBROUTINE TRANSFER_MP_PARAMETERS(VEGTYPE,SOILTYPE,SLOPETYPE,SOILCOLOR,CROPTYPE, ! Transfer veg parameters !------------------------------------------------------------------------------------------! - parameters%CH2OP = NoahmpIO%CH2OP_TABLE(VEGTYPE) !maximum intercepted h2o per unit lai+sai (mm) - parameters%DLEAF = NoahmpIO%DLEAF_TABLE(VEGTYPE) !characteristic leaf dimension (m) - parameters%Z0MVT = NoahmpIO%Z0MVT_TABLE(VEGTYPE) !momentum roughness length (m) - parameters%HVT = NoahmpIO%HVT_TABLE(VEGTYPE) !top of canopy (m) - parameters%HVB = NoahmpIO%HVB_TABLE(VEGTYPE) !bottom of canopy (m) - parameters%DEN = NoahmpIO%DEN_TABLE(VEGTYPE) !tree density (no. of trunks per m2) - parameters%RC = NoahmpIO%RC_TABLE(VEGTYPE) !tree crown radius (m) - parameters%MFSNO = NoahmpIO%MFSNO_TABLE(VEGTYPE) !snowmelt m parameter () - parameters%SCFFAC = NoahmpIO%SCFFAC_TABLE(VEGTYPE) !snow cover factor (m) (replace original hard-coded 2.5*z0 in SCF formulation) - parameters%CBIOM = NoahmpIO%CBIOM_TABLE(VEGTYPE) !canopy biomass heat capacity parameter (m) - parameters%SAIM = NoahmpIO%SAIM_TABLE(VEGTYPE,:) !monthly stem area index, one-sided - parameters%LAIM = NoahmpIO%LAIM_TABLE(VEGTYPE,:) !monthly leaf area index, one-sided - parameters%SLA = NoahmpIO%SLA_TABLE(VEGTYPE) !single-side leaf area per Kg [m2/kg] - parameters%DILEFC = NoahmpIO%DILEFC_TABLE(VEGTYPE) !coeficient for leaf stress death [1/s] - parameters%DILEFW = NoahmpIO%DILEFW_TABLE(VEGTYPE) !coeficient for leaf stress death [1/s] - parameters%FRAGR = NoahmpIO%FRAGR_TABLE(VEGTYPE) !fraction of growth respiration !original was 0.3 - parameters%LTOVRC = NoahmpIO%LTOVRC_TABLE(VEGTYPE) !leaf turnover [1/s] - - parameters%C3PSN = NoahmpIO%C3PSN_TABLE(VEGTYPE) !photosynthetic pathway: 0. = c4, 1. = c3 - parameters%KC25 = NoahmpIO%KC25_TABLE(VEGTYPE) !co2 michaelis-menten constant at 25c (pa) - parameters%AKC = NoahmpIO%AKC_TABLE(VEGTYPE) !q10 for kc25 - parameters%KO25 = NoahmpIO%KO25_TABLE(VEGTYPE) !o2 michaelis-menten constant at 25c (pa) - parameters%AKO = NoahmpIO%AKO_TABLE(VEGTYPE) !q10 for ko25 - parameters%VCMX25 = NoahmpIO%VCMX25_TABLE(VEGTYPE) !maximum rate of carboxylation at 25c (umol co2/m**2/s) - parameters%AVCMX = NoahmpIO%AVCMX_TABLE(VEGTYPE) !q10 for vcmx25 - parameters%BP = NoahmpIO%BP_TABLE(VEGTYPE) !minimum leaf conductance (umol/m**2/s) - parameters%MP = NoahmpIO%MP_TABLE(VEGTYPE) !slope of conductance-to-photosynthesis relationship - parameters%QE25 = NoahmpIO%QE25_TABLE(VEGTYPE) !quantum efficiency at 25c (umol co2 / umol photon) - parameters%AQE = NoahmpIO%AQE_TABLE(VEGTYPE) !q10 for qe25 - parameters%RMF25 = NoahmpIO%RMF25_TABLE(VEGTYPE) !leaf maintenance respiration at 25c (umol co2/m**2/s) - parameters%RMS25 = NoahmpIO%RMS25_TABLE(VEGTYPE) !stem maintenance respiration at 25c (umol co2/kg bio/s) - parameters%RMR25 = NoahmpIO%RMR25_TABLE(VEGTYPE) !root maintenance respiration at 25c (umol co2/kg bio/s) - parameters%ARM = NoahmpIO%ARM_TABLE(VEGTYPE) !q10 for maintenance respiration - parameters%FOLNMX = NoahmpIO%FOLNMX_TABLE(VEGTYPE) !foliage nitrogen concentration when f(n)=1 (%) - parameters%TMIN = NoahmpIO%TMIN_TABLE(VEGTYPE) !minimum temperature for photosynthesis (k) - - parameters%XL = NoahmpIO%XL_TABLE(VEGTYPE) !leaf/stem orientation index - parameters%RHOL = NoahmpIO%RHOL_TABLE(VEGTYPE,:) !leaf reflectance: 1=vis, 2=nir - parameters%RHOS = NoahmpIO%RHOS_TABLE(VEGTYPE,:) !stem reflectance: 1=vis, 2=nir - parameters%TAUL = NoahmpIO%TAUL_TABLE(VEGTYPE,:) !leaf transmittance: 1=vis, 2=nir - parameters%TAUS = NoahmpIO%TAUS_TABLE(VEGTYPE,:) !stem transmittance: 1=vis, 2=nir - - parameters%MRP = NoahmpIO%MRP_TABLE(VEGTYPE) !microbial respiration parameter (umol co2 /kg c/ s) - parameters%CWPVT = NoahmpIO%CWPVT_TABLE(VEGTYPE) !empirical canopy wind parameter - - parameters%WRRAT = NoahmpIO%WRRAT_TABLE(VEGTYPE) !wood to non-wood ratio - parameters%WDPOOL = NoahmpIO%WDPOOL_TABLE(VEGTYPE) !wood pool (switch 1 or 0) depending on woody or not [-] - parameters%TDLEF = NoahmpIO%TDLEF_TABLE(VEGTYPE) !characteristic T for leaf freezing [K] - - parameters%NROOT = NoahmpIO%NROOT_TABLE(VEGTYPE) !number of soil layers with root present - parameters%RGL = NoahmpIO%RGL_TABLE(VEGTYPE) !Parameter used in radiation stress function - parameters%RSMIN = NoahmpIO%RS_TABLE(VEGTYPE) !Minimum stomatal resistance [s m-1] - parameters%HS = NoahmpIO%HS_TABLE(VEGTYPE) !Parameter used in vapor pressure deficit function - parameters%TOPT = NoahmpIO%TOPT_TABLE(VEGTYPE) !Optimum transpiration air temperature [K] - parameters%RSMAX = NoahmpIO%RSMAX_TABLE(VEGTYPE) !Maximal stomatal resistance [s m-1] + parameters%CH2OP = NoahmpIO%CH2OP_TABLE(VEGTYPE) !maximum intercepted h2o per unit lai+sai (mm) + parameters%DLEAF = NoahmpIO%DLEAF_TABLE(VEGTYPE) !characteristic leaf dimension (m) + parameters%Z0MVT = NoahmpIO%Z0MVT_TABLE(VEGTYPE) !momentum roughness length (m) + parameters%HVT = NoahmpIO%HVT_TABLE(VEGTYPE) !top of canopy (m) + parameters%HVB = NoahmpIO%HVB_TABLE(VEGTYPE) !bottom of canopy (m) + parameters%DEN = NoahmpIO%DEN_TABLE(VEGTYPE) !tree density (no. of trunks per m2) + parameters%RC = NoahmpIO%RC_TABLE(VEGTYPE) !tree crown radius (m) + parameters%MFSNO = NoahmpIO%MFSNO_TABLE(VEGTYPE) !snowmelt m parameter () + parameters%SCFFAC = NoahmpIO%SCFFAC_TABLE(VEGTYPE) !snow cover factor (m) (replace original hard-coded 2.5*z0 in SCF formulation) + parameters%CBIOM = NoahmpIO%CBIOM_TABLE(VEGTYPE) !canopy biomass heat capacity parameter (m) + parameters%SAIM = NoahmpIO%SAIM_TABLE(VEGTYPE,:) !monthly stem area index, one-sided + parameters%LAIM = NoahmpIO%LAIM_TABLE(VEGTYPE,:) !monthly leaf area index, one-sided + parameters%SLA = NoahmpIO%SLA_TABLE(VEGTYPE) !single-side leaf area per Kg [m2/kg] + parameters%DILEFC = NoahmpIO%DILEFC_TABLE(VEGTYPE) !coeficient for leaf stress death [1/s] + parameters%DILEFW = NoahmpIO%DILEFW_TABLE(VEGTYPE) !coeficient for leaf stress death [1/s] + parameters%FRAGR = NoahmpIO%FRAGR_TABLE(VEGTYPE) !fraction of growth respiration !original was 0.3 + parameters%LTOVRC = NoahmpIO%LTOVRC_TABLE(VEGTYPE) !leaf turnover [1/s] + parameters%C3PSN = NoahmpIO%C3PSN_TABLE(VEGTYPE) !photosynthetic pathway: 0. = c4, 1. = c3 + parameters%KC25 = NoahmpIO%KC25_TABLE(VEGTYPE) !co2 michaelis-menten constant at 25c (pa) + parameters%AKC = NoahmpIO%AKC_TABLE(VEGTYPE) !q10 for kc25 + parameters%KO25 = NoahmpIO%KO25_TABLE(VEGTYPE) !o2 michaelis-menten constant at 25c (pa) + parameters%AKO = NoahmpIO%AKO_TABLE(VEGTYPE) !q10 for ko25 + parameters%VCMX25 = NoahmpIO%VCMX25_TABLE(VEGTYPE) !maximum rate of carboxylation at 25c (umol co2/m**2/s) + parameters%AVCMX = NoahmpIO%AVCMX_TABLE(VEGTYPE) !q10 for vcmx25 + parameters%BP = NoahmpIO%BP_TABLE(VEGTYPE) !minimum leaf conductance (umol/m**2/s) + parameters%MP = NoahmpIO%MP_TABLE(VEGTYPE) !slope of conductance-to-photosynthesis relationship + parameters%QE25 = NoahmpIO%QE25_TABLE(VEGTYPE) !quantum efficiency at 25c (umol co2 / umol photon) + parameters%AQE = NoahmpIO%AQE_TABLE(VEGTYPE) !q10 for qe25 + parameters%RMF25 = NoahmpIO%RMF25_TABLE(VEGTYPE) !leaf maintenance respiration at 25c (umol co2/m**2/s) + parameters%RMS25 = NoahmpIO%RMS25_TABLE(VEGTYPE) !stem maintenance respiration at 25c (umol co2/kg bio/s) + parameters%RMR25 = NoahmpIO%RMR25_TABLE(VEGTYPE) !root maintenance respiration at 25c (umol co2/kg bio/s) + parameters%ARM = NoahmpIO%ARM_TABLE(VEGTYPE) !q10 for maintenance respiration + parameters%FOLNMX = NoahmpIO%FOLNMX_TABLE(VEGTYPE) !foliage nitrogen concentration when f(n)=1 (%) + parameters%TMIN = NoahmpIO%TMIN_TABLE(VEGTYPE) !minimum temperature for photosynthesis (k) + parameters%XL = NoahmpIO%XL_TABLE(VEGTYPE) !leaf/stem orientation index + parameters%RHOL = NoahmpIO%RHOL_TABLE(VEGTYPE,:) !leaf reflectance: 1=vis, 2=nir + parameters%RHOS = NoahmpIO%RHOS_TABLE(VEGTYPE,:) !stem reflectance: 1=vis, 2=nir + parameters%TAUL = NoahmpIO%TAUL_TABLE(VEGTYPE,:) !leaf transmittance: 1=vis, 2=nir + parameters%TAUS = NoahmpIO%TAUS_TABLE(VEGTYPE,:) !stem transmittance: 1=vis, 2=nir + parameters%MRP = NoahmpIO%MRP_TABLE(VEGTYPE) !microbial respiration parameter (umol co2 /kg c/ s) + parameters%CWPVT = NoahmpIO%CWPVT_TABLE(VEGTYPE) !empirical canopy wind parameter + parameters%WRRAT = NoahmpIO%WRRAT_TABLE(VEGTYPE) !wood to non-wood ratio + parameters%WDPOOL = NoahmpIO%WDPOOL_TABLE(VEGTYPE) !wood pool (switch 1 or 0) depending on woody or not [-] + parameters%TDLEF = NoahmpIO%TDLEF_TABLE(VEGTYPE) !characteristic T for leaf freezing [K] + parameters%NROOT = NoahmpIO%NROOT_TABLE(VEGTYPE) !number of soil layers with root present + parameters%RGL = NoahmpIO%RGL_TABLE(VEGTYPE) !Parameter used in radiation stress function + parameters%RSMIN = NoahmpIO%RS_TABLE(VEGTYPE) !Minimum stomatal resistance [s m-1] + parameters%HS = NoahmpIO%HS_TABLE(VEGTYPE) !Parameter used in vapor pressure deficit function + parameters%TOPT = NoahmpIO%TOPT_TABLE(VEGTYPE) !Optimum transpiration air temperature [K] + parameters%RSMAX = NoahmpIO%RSMAX_TABLE(VEGTYPE) !Maximal stomatal resistance [s m-1] + parameters%RTOVRC = NoahmpIO%RTOVRC_TABLE(VEGTYPE) !root turnover coefficient [1/s] + parameters%RSWOODC = NoahmpIO%RSWOODC_TABLE(VEGTYPE) !wood respiration coeficient [1/s] + parameters%BF = NoahmpIO%BF_TABLE(VEGTYPE) !parameter for present wood allocation [-] + parameters%WSTRC = NoahmpIO%WSTRC_TABLE(VEGTYPE) !water stress coeficient [-] + parameters%LAIMIN = NoahmpIO%LAIMIN_TABLE(VEGTYPE) !minimum leaf area index [m2/m2] + parameters%XSAMIN = NoahmpIO%XSAMIN_TABLE(VEGTYPE) !minimum stem area index [m2/m2] !------------------------------------------------------------------------------------------! ! Transfer rad parameters !------------------------------------------------------------------------------------------! - parameters%ALBSAT = NoahmpIO%ALBSAT_TABLE(SOILCOLOR,:) - parameters%ALBDRY = NoahmpIO%ALBDRY_TABLE(SOILCOLOR,:) - parameters%ALBICE = NoahmpIO%ALBICE_TABLE - parameters%ALBLAK = NoahmpIO%ALBLAK_TABLE - parameters%OMEGAS = NoahmpIO%OMEGAS_TABLE - parameters%BETADS = NoahmpIO%BETADS_TABLE - parameters%BETAIS = NoahmpIO%BETAIS_TABLE - parameters%EG = NoahmpIO%EG_TABLE + parameters%ALBSAT = NoahmpIO%ALBSAT_TABLE(SOILCOLOR,:) + parameters%ALBDRY = NoahmpIO%ALBDRY_TABLE(SOILCOLOR,:) + parameters%ALBICE = NoahmpIO%ALBICE_TABLE + parameters%ALBLAK = NoahmpIO%ALBLAK_TABLE + parameters%OMEGAS = NoahmpIO%OMEGAS_TABLE + parameters%BETADS = NoahmpIO%BETADS_TABLE + parameters%BETAIS = NoahmpIO%BETAIS_TABLE + parameters%EG = NoahmpIO%EG_TABLE + parameters%EICE = NoahmpIO%EICE_TABLE !------------------------------------------------------------------------------------------! ! Transfer crop parameters @@ -557,7 +558,17 @@ SUBROUTINE TRANSFER_MP_PARAMETERS(VEGTYPE,SOILTYPE,SLOPETYPE,SOILCOLOR,CROPTYPE, parameters%GDDS3 = NoahmpIO%GDDS3_TABLE(CROPTYPE) ! GDD from seeding to post vegetative parameters%GDDS4 = NoahmpIO%GDDS4_TABLE(CROPTYPE) ! GDD from seeding to intial reproductive parameters%GDDS5 = NoahmpIO%GDDS5_TABLE(CROPTYPE) ! GDD from seeding to pysical maturity - parameters%C3C4 = NoahmpIO%C3C4_TABLE(CROPTYPE) ! photosynthetic pathway: 1. = c3 2. = c4 + parameters%C3PSN = NoahmpIO%C3PSNI_TABLE(CROPTYPE) + parameters%KC25 = NoahmpIO%KC25I_TABLE(CROPTYPE) + parameters%AKC = NoahmpIO%AKCI_TABLE(CROPTYPE) + parameters%KO25 = NoahmpIO%KO25I_TABLE(CROPTYPE) + parameters%AKO = NoahmpIO%AKOI_TABLE(CROPTYPE) + parameters%AVCMX = NoahmpIO%AVCMXI_TABLE(CROPTYPE) + parameters%VCMX25 = NoahmpIO%VCMX25I_TABLE(CROPTYPE) + parameters%BP = NoahmpIO%BPI_TABLE(CROPTYPE) + parameters%MP = NoahmpIO%MPI_TABLE(CROPTYPE) + parameters%FOLNMX = NoahmpIO%FOLNMXI_TABLE(CROPTYPE) + parameters%QE25 = NoahmpIO%QE25I_TABLE(CROPTYPE) parameters%AREF = NoahmpIO%AREF_TABLE(CROPTYPE) ! reference maximum CO2 assimulation rate parameters%PSNRF = NoahmpIO%PSNRF_TABLE(CROPTYPE) ! CO2 assimulation reduction factor(0-1) (caused by non-modeling part,e.g.pest,weeds) parameters%I2PAR = NoahmpIO%I2PAR_TABLE(CROPTYPE) ! Fraction of incoming solar radiation to photosynthetically active radiation @@ -567,7 +578,6 @@ SUBROUTINE TRANSFER_MP_PARAMETERS(VEGTYPE,SOILTYPE,SLOPETYPE,SOILCOLOR,CROPTYPE, parameters%K = NoahmpIO%K_TABLE(CROPTYPE) ! light extinction coefficient parameters%EPSI = NoahmpIO%EPSI_TABLE(CROPTYPE) ! initial light use efficiency parameters%Q10MR = NoahmpIO%Q10MR_TABLE(CROPTYPE) ! q10 for maintainance respiration - parameters%FOLN_MX = NoahmpIO%FOLN_MX_TABLE(CROPTYPE) ! foliage nitrogen concentration when f(n)=1 (%) parameters%LEFREEZ = NoahmpIO%LEFREEZ_TABLE(CROPTYPE) ! characteristic T for leaf freezing [K] parameters%DILE_FC = NoahmpIO%DILE_FC_TABLE(CROPTYPE,:) ! coeficient for temperature leaf stress death [1/s] parameters%DILE_FW = NoahmpIO%DILE_FW_TABLE(CROPTYPE,:) ! coeficient for water leaf stress death [1/s] @@ -583,6 +593,9 @@ SUBROUTINE TRANSFER_MP_PARAMETERS(VEGTYPE,SOILTYPE,SLOPETYPE,SOILCOLOR,CROPTYPE, parameters%STPT = NoahmpIO%STPT_TABLE(CROPTYPE,:) ! fraction of carbohydrate flux to stem parameters%RTPT = NoahmpIO%RTPT_TABLE(CROPTYPE,:) ! fraction of carbohydrate flux to root parameters%GRAINPT = NoahmpIO%GRAINPT_TABLE(CROPTYPE,:) ! fraction of carbohydrate flux to grain + parameters%LFCT = NoahmpIO%LFCT_TABLE(CROPTYPE,:) ! fraction of carbohydrate translocation from leaf to grain + parameters%STCT = NoahmpIO%STCT_TABLE(CROPTYPE,:) ! fraction of carbohydrate translocation from stem to grain + parameters%RTCT = NoahmpIO%RTCT_TABLE(CROPTYPE,:) ! fraction of carbohydrate translocation from root to grain parameters%BIO2LAI = NoahmpIO%BIO2LAI_TABLE(CROPTYPE) ! leaf are per living leaf biomass [m^2/kg] END IF @@ -590,14 +603,74 @@ SUBROUTINE TRANSFER_MP_PARAMETERS(VEGTYPE,SOILTYPE,SLOPETYPE,SOILCOLOR,CROPTYPE, ! Transfer global parameters !------------------------------------------------------------------------------------------! - parameters%CO2 = NoahmpIO%CO2_TABLE - parameters%O2 = NoahmpIO%O2_TABLE - parameters%TIMEAN = NoahmpIO%TIMEAN_TABLE - parameters%FSATMX = NoahmpIO%FSATMX_TABLE - parameters%Z0SNO = NoahmpIO%Z0SNO_TABLE - parameters%SSI = NoahmpIO%SSI_TABLE - parameters%SWEMX = NoahmpIO%SWEMX_TABLE - parameters%RSURF_SNOW = NoahmpIO%RSURF_SNOW_TABLE + parameters%CO2 = NoahmpIO%CO2_TABLE + parameters%O2 = NoahmpIO%O2_TABLE + parameters%TIMEAN = NoahmpIO%TIMEAN_TABLE + parameters%FSATMX = NoahmpIO%FSATMX_TABLE + parameters%Z0SNO = NoahmpIO%Z0SNO_TABLE + parameters%SSI = NoahmpIO%SSI_TABLE + parameters%SNOW_RET_FAC = NoahmpIO%SNOW_RET_FAC_TABLE + parameters%SNOW_EMIS = NoahmpIO%SNOW_EMIS_TABLE + parameters%SWEMX = NoahmpIO%SWEMX_TABLE + parameters%RSURF_SNOW = NoahmpIO%RSURF_SNOW_TABLE + parameters%TAU0 = NoahmpIO%TAU0_TABLE + parameters%GRAIN_GROWTH = NoahmpIO%GRAIN_GROWTH_TABLE + parameters%EXTRA_GROWTH = NoahmpIO%EXTRA_GROWTH_TABLE + parameters%DIRT_SOOT = NoahmpIO%DIRT_SOOT_TABLE + parameters%BATS_COSZ = NoahmpIO%BATS_COSZ_TABLE + parameters%BATS_VIS_NEW = NoahmpIO%BATS_VIS_NEW_TABLE + parameters%BATS_NIR_NEW = NoahmpIO%BATS_NIR_NEW_TABLE + parameters%BATS_VIS_AGE = NoahmpIO%BATS_VIS_AGE_TABLE + parameters%BATS_NIR_AGE = NoahmpIO%BATS_NIR_AGE_TABLE + parameters%BATS_VIS_DIR = NoahmpIO%BATS_VIS_DIR_TABLE + parameters%BATS_NIR_DIR = NoahmpIO%BATS_NIR_DIR_TABLE + parameters%RSURF_EXP = NoahmpIO%RSURF_EXP_TABLE + parameters%C2_SNOWCOMPACT = NoahmpIO%C2_SNOWCOMPACT_TABLE + parameters%C3_SNOWCOMPACT = NoahmpIO%C3_SNOWCOMPACT_TABLE + parameters%C4_SNOWCOMPACT = NoahmpIO%C4_SNOWCOMPACT_TABLE + parameters%C5_SNOWCOMPACT = NoahmpIO%C5_SNOWCOMPACT_TABLE + parameters%DM_SNOWCOMPACT = NoahmpIO%DM_SNOWCOMPACT_TABLE + parameters%ETA0_SNOWCOMPACT = NoahmpIO%ETA0_SNOWCOMPACT_TABLE + parameters%NLIQMAXFRAC = NoahmpIO%SNLIQMAXFRAC_TABLE + parameters%SWEMAXGLA = NoahmpIO%SWEMAXGLA_TABLE + parameters%WSLMAX = NoahmpIO%WSLMAX_TABLE + parameters%ROUS = NoahmpIO%ROUS_TABLE + parameters%CMIC = NoahmpIO%CMIC_TABLE + parameters%SNOWDEN_MAX = NoahmpIO%SNOWDEN_MAX_TABLE + parameters%CLASS_ALB_REF = NoahmpIO%CLASS_ALB_REF_TABLE + parameters%CLASS_SNO_AGE = NoahmpIO%CLASS_SNO_AGE_TABLE + parameters%CLASS_ALB_NEW = NoahmpIO%CLASS_ALB_NEW_TABLE + parameters%PSIWLT = NoahmpIO%PSIWLT_TABLE + parameters%Z0SOIL = NoahmpIO%Z0SOIL_TABLE + parameters%Z0LAKE = NoahmpIO%Z0LAKE_TABLE + +! ---------------------------------------------------------------------- +! Transfer irrigation parameters +! ---------------------------------------------------------------------- + parameters%IRR_HAR = NoahmpIO%IRR_HAR_TABLE + parameters%IRR_FRAC = NoahmpIO%IRR_FRAC_TABLE + parameters%IRR_LAI = NoahmpIO%IRR_LAI_TABLE + parameters%IRR_MAD = NoahmpIO%IRR_MAD_TABLE + parameters%FILOSS = NoahmpIO%FILOSS_TABLE + parameters%SPRIR_RATE = NoahmpIO%SPRIR_RATE_TABLE + parameters%MICIR_RATE = NoahmpIO%MICIR_RATE_TABLE + parameters%FIRTFAC = NoahmpIO%FIRTFAC_TABLE + parameters%IR_RAIN = NoahmpIO%IR_RAIN_TABLE + +! ---------------------------------------------------------------------- +! Transfer tile drainage parameters +! ---------------------------------------------------------------------- + parameters%DRAIN_LAYER_OPT = NoahmpIO%DRAIN_LAYER_OPT_TABLE + parameters%TD_DEPTH = NoahmpIO%TD_DEPTH_TABLE(SOILTYPE(1)) + parameters%TDSMC_FAC = NoahmpIO%TDSMC_FAC_TABLE(SOILTYPE(1)) + parameters%TD_DC = NoahmpIO%TD_DC_TABLE(SOILTYPE(1)) + parameters%TD_DCOEF = NoahmpIO%TD_DCOEF_TABLE(SOILTYPE(1)) + parameters%TD_D = NoahmpIO%TD_D_TABLE(SOILTYPE(1)) + parameters%TD_ADEPTH = NoahmpIO%TD_ADEPTH_TABLE(SOILTYPE(1)) + parameters%TD_RADI = NoahmpIO%TD_RADI_TABLE(SOILTYPE(1)) + parameters%TD_SPAC = NoahmpIO%TD_SPAC_TABLE(SOILTYPE(1)) + parameters%TD_DDRAIN = NoahmpIO%TD_DDRAIN_TABLE(SOILTYPE(1)) + parameters%KLAT_FAC = NoahmpIO%KLAT_FAC_TABLE(SOILTYPE(1)) ! ---------------------------------------------------------------------- ! Transfer soil parameters @@ -615,9 +688,13 @@ SUBROUTINE TRANSFER_MP_PARAMETERS(VEGTYPE,SOILTYPE,SLOPETYPE,SOILCOLOR,CROPTYPE, parameters%SMCWLT(isoil) = NoahmpIO%SMCWLT_TABLE (SOILTYPE(isoil)) end do - parameters%F1 = NoahmpIO%F1_TABLE(SOILTYPE(1)) - parameters%REFDK = NoahmpIO%REFDK_TABLE - parameters%REFKDT = NoahmpIO%REFKDT_TABLE + parameters%BVIC = BVIC_TABLE(SOILTYPE(1)) + parameters%AXAJ = AXAJ_TABLE(SOILTYPE(1)) + parameters%BXAJ = BXAJ_TABLE(SOILTYPE(1)) + parameters%XXAJ = XXAJ_TABLE(SOILTYPE(1)) + parameters%BDVIC = BDVIC_TABLE(SOILTYPE(1)) + parameters%GDVIC = GDVIC_TABLE(SOILTYPE(1)) + parameters%BBVIC = BBVIC_TABLE(SOILTYPE(1)) ! ---------------------------------------------------------------------- ! Transfer GENPARM parameters @@ -625,7 +702,8 @@ SUBROUTINE TRANSFER_MP_PARAMETERS(VEGTYPE,SOILTYPE,SLOPETYPE,SOILCOLOR,CROPTYPE, parameters%CSOIL = NoahmpIO%CSOIL_TABLE parameters%ZBOT = NoahmpIO%ZBOT_TABLE parameters%CZIL = NoahmpIO%CZIL_TABLE - + parameters%REFDK = NoahmpIO%REFDK_TABLE + parameters%REFKDT = NoahmpIO%REFKDT_TABLE FRZK = NoahmpIO%FRZK_TABLE parameters%KDT = parameters%REFKDT * parameters%DKSAT(1) / parameters%REFDK parameters%SLOPE = NoahmpIO%SLOPE_TABLE(SLOPETYPE) @@ -639,7 +717,6 @@ SUBROUTINE TRANSFER_MP_PARAMETERS(VEGTYPE,SOILTYPE,SLOPETYPE,SOILCOLOR,CROPTYPE, ENDIF ! adjust FRZK parameter to actual soil type: FRZK * FRZFACT - IF(SOILTYPE(1) /= 14) then FRZFACT = (parameters%SMCMAX(1) / parameters%SMCREF(1)) * (0.412 / 0.468) parameters%FRZX = FRZK * FRZFACT @@ -648,7 +725,6 @@ SUBROUTINE TRANSFER_MP_PARAMETERS(VEGTYPE,SOILTYPE,SLOPETYPE,SOILCOLOR,CROPTYPE, parameters%mxsnalb = 0.84 parameters%mnsnalb = 0.55 parameters%sndecayexp = 0.01 - parameters%t_ulimit = 2.5 parameters%t_mlimit = 2.0 parameters%t_llimit = 0.5 diff --git a/lis/surfacemodels/land/noahmp.new/phys/noahmp b/lis/surfacemodels/land/noahmp.new/phys/noahmp index d17655628..a4ccc774b 160000 --- a/lis/surfacemodels/land/noahmp.new/phys/noahmp +++ b/lis/surfacemodels/land/noahmp.new/phys/noahmp @@ -1 +1 @@ -Subproject commit d17655628106e8da8fec5d46ab24f5b951e24155 +Subproject commit a4ccc774ba5ab6d5aca9e4fcef374c0c00eac5f3 From 6d9c3eacadf914b70cd0abe856e092ce72bc7b14 Mon Sep 17 00:00:00 2001 From: cenlinhe Date: Fri, 14 Jul 2023 04:49:19 -0600 Subject: [PATCH 03/27] update lis-noahmp driver 3 --- ..._coldstart.F90 => NoahMP401_coldstart.F90} | 22 +- .../land/noahmp.new/NoahMP401_main.F90 | 1447 ----------------- .../{NoahMP401_f2t.F90 => NoahMPnew_f2t.F90} | 71 +- .../land/noahmp.new/NoahMPnew_lsmMod.F90 | 1 + .../land/noahmp.new/NoahMPnew_main.F90 | 1085 ++++++++++++ ....F90 => NoahMPnew_read_OPT_parameters.F90} | 129 +- .../land/noahmp.new/NoahMPnew_readcrd.F90 | 21 +- .../land/noahmp.new/noahmp_driver_401.F90 | 1149 ------------- .../land/noahmp.new/noahmp_driver_new.F90 | 510 ++++++ lis/surfacemodels/land/noahmp.new/phys/noahmp | 2 +- .../land/noahmp.new/wrf_debug.F90 | 2 + 11 files changed, 1724 insertions(+), 2715 deletions(-) rename lis/surfacemodels/land/noahmp.new/{NoahMPnew_coldstart.F90 => NoahMP401_coldstart.F90} (97%) delete mode 100644 lis/surfacemodels/land/noahmp.new/NoahMP401_main.F90 rename lis/surfacemodels/land/noahmp.new/{NoahMP401_f2t.F90 => NoahMPnew_f2t.F90} (67%) create mode 100644 lis/surfacemodels/land/noahmp.new/NoahMPnew_main.F90 rename lis/surfacemodels/land/noahmp.new/{NoahMP401_read_OPT_parameters.F90 => NoahMPnew_read_OPT_parameters.F90} (75%) delete mode 100644 lis/surfacemodels/land/noahmp.new/noahmp_driver_401.F90 create mode 100644 lis/surfacemodels/land/noahmp.new/noahmp_driver_new.F90 diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_coldstart.F90 b/lis/surfacemodels/land/noahmp.new/NoahMP401_coldstart.F90 similarity index 97% rename from lis/surfacemodels/land/noahmp.new/NoahMPnew_coldstart.F90 rename to lis/surfacemodels/land/noahmp.new/NoahMP401_coldstart.F90 index b05931d68..1a3d81d20 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_coldstart.F90 +++ b/lis/surfacemodels/land/noahmp.new/NoahMP401_coldstart.F90 @@ -22,6 +22,7 @@ ! May 2023: Cenlin He; update to work with refactored NoahMP (v5.0 and newer) ! ! !INTERFACE: + subroutine NoahMPnew_coldstart(mtype) ! !USES: ! use LIS_coreMod, only: LIS_rc @@ -176,8 +177,6 @@ subroutine NoahMPnew_coldstart(mtype) integer :: isnowxy(1,1) integer :: tmp_isnowxy(1,1) - real, dimension(1,60,1) :: gecros_state ! Optional gecros crop - ! PLANTING(1,1) = 126 ! default planting date ! HARVEST(1,1) = 290 ! default harvest date ! SEASON_GDD(1,1) = 1605 ! default total seasonal growing degree days @@ -231,7 +230,7 @@ subroutine NoahMPnew_coldstart(mtype) !---------------------------------------------------------------------- if (trim(LIS_rc%startcode) .eq. "coldstart") then write(LIS_logunit,*) & - "[INFO] NoahMP401_coldstart -- cold-starting Noah-MP.4.0.1" + "[INFO] NoahMPnew_coldstart -- cold-starting Noah-MP.New" do t=1, LIS_rc%npatch(n,mtype) @@ -268,14 +267,6 @@ subroutine NoahMPnew_coldstart(mtype) cropcatxy(1,1) = LIS_rc%cropclass - if (NoahmpNew_struc(n)%crop_opt.eq.2) then - do l=1, 60 ! TODO: check loop - gecros_state(1,l,1) = NoahmpNew_struc(n)%init_gecros_state(l) - enddo - else - gecros_state(1,l,1) = 0.0 - endif - canwatxy(1,1) = NoahmpNew_struc(n)%init_canwat IVGTYP(1,1) = NoahmpNew_struc(n)%noahmpnew(t)%vegetype ISLTYP(1,1) = NoahmpNew_struc(n)%noahmpnew(t)%soiltype @@ -439,10 +430,6 @@ subroutine NoahMPnew_coldstart(mtype) NoahmpNew_struc(n)%noahmpnew(t)%gdd = gddxy(1,1) NoahmpNew_struc(n)%noahmpnew(t)%pgs = pgsxy(1,1) - do l=1, 60 ! TODO: check loop - NoahmpNew_struc(n)%noahmpnew(t)%gecros_state(l) = gecros_state(1,l,1) - enddo - NoahmpNew_struc(n)%noahmpnew(t)%snowice(1:NoahmpNew_struc(n)%nsnow) = snicexy(1,-NoahmpNew_struc(n)%nsnow+1:0,1) NoahmpNew_struc(n)%noahmpnew(t)%snowliq(1:NoahmpNew_struc(n)%nsnow) = snliqxy(1,-NoahmpNew_struc(n)%nsnow+1:0,1) NoahmpNew_struc(n)%noahmpnew(t)%zss(1:NoahmpNew_struc(n)%nsnow+NoahmpNew_struc(n)%nsoil) = zsnsoxy(1,-NoahmpNew_struc(n)%nsnow+1:NoahmpNew_struc(n)%nsoil,1) @@ -474,7 +461,8 @@ subroutine NoahMPnew_coldstart(mtype) call LIS_date2time(LIS_rc%time, LIS_rc%doy, LIS_rc%gmt, LIS_rc%yr, & LIS_rc%mo, LIS_rc%da, LIS_rc%hr, LIS_rc%mn, LIS_rc%ss) - write(LIS_logunit,*) "[INFO] NoahMP401_coldstart -- ", & + write(LIS_logunit,*) "[INFO] NoahMPnew_coldstart -- ", & "Using the specified start time ", LIS_rc%time enddo ! nnest -end subroutine NoahMP401_coldstart + +end subroutine NoahMPnew_coldstart diff --git a/lis/surfacemodels/land/noahmp.new/NoahMP401_main.F90 b/lis/surfacemodels/land/noahmp.new/NoahMP401_main.F90 deleted file mode 100644 index 228575965..000000000 --- a/lis/surfacemodels/land/noahmp.new/NoahMP401_main.F90 +++ /dev/null @@ -1,1447 +0,0 @@ -!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- -! NASA Goddard Space Flight Center -! Land Information System Framework (LISF) -! Version 7.4 -! -! Copyright (c) 2022 United States Government as represented by the -! Administrator of the National Aeronautics and Space Administration. -! All Rights Reserved. -!-------------------------END NOTICE -- DO NOT EDIT----------------------- - -#include "LIS_misc.h" -!BOP -! -! !ROUTINE: NoahMP401_main -! \label{NoahMP401_main} -! -! !REVISION HISTORY: -! This subroutine is generated with the Model Implementation Toolkit -! developed by Shugong Wang for the NASA Land Information System V7. -! The initial specification of the subroutine is by Sujay Kumar. -! -! 10/25/18: Shugong Wang, Zhuo Wang; initial implementation for NoahMP401 with LIS-7 -! 05/15/19: Yeosang Yoon; code added for snow DA to work -! 10/29/19: David Mocko; Added RELSMC to output, and an option -! for different units for Qs/Qsb/Albedo -! 03/09/22: David Mocko: Fixed "input LAI" for dynamic vegetation options 7/8/9 -! -! !INTERFACE: -subroutine NoahMP401_main(n) -! !USES: - use LIS_coreMod - use LIS_histDataMod - use LIS_timeMgrMod, only : LIS_isAlarmRinging - use LIS_constantsMod, only : LIS_CONST_RHOFW !New - use LIS_vegDataMod, only : LIS_lai, LIS_sai - use LIS_logMod, only : LIS_logunit, LIS_endrun - use LIS_FORC_AttributesMod - use NoahMP401_lsmMod - - implicit none -! !ARGUMENTS: - integer, intent(in) :: n - integer :: t - integer :: i - real :: dt - real :: lat, lon - real :: tempval - integer :: row, col, tid - integer :: year, month, day, hour, minute, second - logical :: alarmCheck - -! -! !DESCRIPTION: -! This is the entry point for calling the NoahMP401 physics. -! This routine calls the {\tt noahmp_driver_401} routine that performs -! the land surface computations, to solve water and energy equations. - -! The arguments are: -! \begin{description} -! \item[n] -! index of the nest -! \end{description} -!EOP - -! define variables for NoahMP401 - real :: tmp_latitude ! latitude in decimal degree [rad] - real :: tmp_longitude ! longitude in decimal year [rad] - integer :: tmp_year ! year of the current time step [-] - integer :: tmp_month ! month of the current time step [-] - integer :: tmp_day ! day of the current time step [-] - integer :: tmp_hour ! hour of the current time step [-] - integer :: tmp_minute ! minute of the current time step [-] - real :: tmp_dz8w ! reference height of temperature and humidity [m] - real :: tmp_dt ! timestep [s] - integer :: tmp_ttile ! tile No. [-] - integer :: tmp_itimestep ! timestep number [-] - - real, allocatable :: tmp_sldpth(:) ! thickness of soil layers [m] - integer :: tmp_nsoil ! number of soil layers [-] - integer :: tmp_nsnow ! maximum number of snow layers (e.g. 3) [-] - integer :: tmp_vegetype ! vegetation type [-] - integer :: tmp_soiltype ! soil type [-] - real, allocatable :: tmp_shdfac_monthly(:) ! monthly values for green vegetation fraction [] - real :: tmp_tbot ! deep soil temperature [K] - integer :: tmp_urban_vegetype ! urban land cover type index [-] - integer :: tmp_cropcat ! crop category [-] - real :: tmp_planting ! planting date [-] - real :: tmp_harvest ! harvest date [-] - real :: tmp_season_gdd ! growing season GDD [-] - character :: tmp_landuse_tbl_name ! Noah model landuse parameter table [-] - character :: tmp_soil_tbl_name ! Noah model soil parameter table [-] - character :: tmp_gen_tbl_name ! Noah model general parameter table [-] - character :: tmp_noahmp_tbl_name ! NoahMP parameter table [-] - integer :: tmp_dveg_opt ! dynamic vegetation, (1->off; 2->on); with opt_crs=1 [-] - integer :: tmp_crs_opt ! canopt stomatal resistance (1->Ball-Berry; 2->Jarvis) [-] - integer :: tmp_btr_opt ! soil moisture factor for stomatal resistance (1->Noah;2->CLM;3->SSiB) [-] - integer :: tmp_run_opt ! runoff and groundwater (1->SIMGM; 2->SIMTOP; 3->Schaake96; 4->BATS) [-] - integer :: tmp_sfc_opt ! surface layer drag coeff (CH & CM) (1->M-O; 2->Chen97) [-] - integer :: tmp_frz_opt ! supercooled liquid water (1->NY06; 2->Koren99) [-] - integer :: tmp_inf_opt ! frozen soil permeability (1->NY06; 2->Koren99) [-] - integer :: tmp_rad_opt ! radiation transfer (1->gap=F(3D,cosz); 2->gap=0; 3->gap=1-Fveg) [-] - integer :: tmp_alb_opt ! snow surface albedo (1->BATS; 2->CLASS) [-] - integer :: tmp_snf_opt ! rainfall & snowfall (1->Jordan91; 2->BATS; 3->Noah) [-] - integer :: tmp_tbot_opt ! lower boundary of soil temperature [-] - integer :: tmp_stc_opt ! snow/soil temperature time scheme [-] - integer :: tmp_gla_opt ! glacier option (1->phase change; 2->simple) [-] - integer :: tmp_sndpth_gla_opt ! snow depth max for glacier model [mm] - integer :: tmp_rsf_opt ! surface resistance (1->Sakaguchi/Zeng;2->Seller;3->mod Sellers;4->1+snow) [-] - integer :: tmp_soil_opt ! soil configuration option [-] - integer :: tmp_pedo_opt ! soil pedotransfer function option [-] - integer :: tmp_crop_opt ! crop model option (0->none; 1->Liu et al.; 2->Gecros) [-] - integer :: tmp_iz0tlnd ! option of Chen adjustment of Czil (not used) [-] - integer :: tmp_urban_opt ! urban physics option [-] - real, allocatable :: tmp_soilcomp(:) ! soil sand and clay percentage [-] - real :: tmp_soilcL1 ! soil texture in layer 1 [-] - real :: tmp_soilcL2 ! soil texture in layer 2 [-] - real :: tmp_soilcL3 ! soil texture in layer 3 [-] - real :: tmp_soilcL4 ! soil texture in layer 4 [-] - real :: tmp_tair ! air temperature [K] - real :: tmp_psurf ! air pressure [Pa] - real :: tmp_wind_e ! U wind component [m/s] - real :: tmp_wind_n ! V wind component [m/s] - real :: tmp_qair ! specific humidity [kg/kg] - real :: tmp_swdown ! downward solar radiation [W m-2] - real :: tmp_lwdown ! downward longwave radiation [W m-2] - real :: tmp_prcp ! total precipitation (rainfall+snowfall) [mm] - real :: tmp_tsk ! surface radiative temperature [K] - real :: tmp_hfx ! sensible heat flux [W m-2] -! real :: tmp_fsh ! sensible heat flux [W/m2] - - real :: tmp_qfx ! latent heat flux [kg s-1 m-2] - real :: tmp_lh ! latent heat flux [W m-2] - real :: tmp_grdflx ! ground/snow heat flux [W m-2] - real :: tmp_sfcrunoff ! accumulated surface runoff [m] - real :: tmp_udrrunoff ! accumulated sub-surface runoff [m] - real :: tmp_albedo ! total grid albedo [-] - - real :: tmp_snowc ! snow cover fraction [-] - real, allocatable :: tmp_smc(:) ! volumetric soil moisture [m3/m3] - real, allocatable :: tmp_sh2o(:) ! volumetric liquid soil moisture [m3/m3] - real, allocatable :: tmp_tslb(:) ! soil temperature [K] - real :: tmp_sneqv ! snow water equivalent [mm] - real :: tmp_snowh ! physical snow depth [m] - real :: tmp_canwat ! total canopy water + ice [mm] - real :: tmp_acsnom ! accumulated snow melt leaving pack [-] - real :: tmp_acsnow ! accumulated snow on grid [mm] - real :: tmp_emiss ! surface bulk emissivity [-] - real :: tmp_rs ! total stomatal resistance [s/m] - integer :: tmp_isnow ! actual no. of snow layers [-] - real :: tmp_tv ! vegetation leaf temperature [K] - real :: tmp_tg ! bulk ground surface temperature [K] - real :: tmp_canice ! canopy-intercepted ice [mm] - real :: tmp_canliq ! canopy-intercepted liquid water [mm] - real :: tmp_eah ! canopy air vapor pressure [Pa] - real :: tmp_tah ! canopy air temperature [K] - real :: tmp_cm ! bulk momentum drag coefficient [-] - real :: tmp_ch ! bulk sensible heat exchange coefficient [-] - real :: tmp_fwet ! wetted or snowed fraction of canopy [-] - real :: tmp_sneqvo ! snow mass at last time step [mm h2o] - real :: tmp_albold ! snow albedo at last time step [-] - real :: tmp_qsnow ! snowfall on the ground [mm/s] - real :: tmp_wslake ! lake water storage [mm] - real :: tmp_zwt ! water table depth [m] - real :: tmp_wa ! water in the "aquifer" [mm] - real :: tmp_wt ! water in aquifer and saturated soil [mm] - real, allocatable :: tmp_tsno(:) ! snow layer temperature [K] - real, allocatable :: tmp_zss(:) ! snow/soil layer depth from snow surface [m] - real, allocatable :: tmp_snowice(:) ! snow layer ice [mm] - real, allocatable :: tmp_snowliq(:) ! snow layer liquid water [mm] - real :: tmp_lfmass ! leaf mass [g/m2] - real :: tmp_rtmass ! mass of fine roots [g/m2] - real :: tmp_stmass ! stem mass [g/m2] - real :: tmp_wood ! mass of wood (including woody roots) [g/m2] - real :: tmp_stblcp ! stable carbon in deep soil [g/m2] - real :: tmp_fastcp ! short-lived carbon in shallow soil [g/m2] - real :: tmp_lai ! leaf area index [-] - real :: tmp_sai ! stem area index [-] - real :: tmp_tauss ! snow age factor [-] - real, allocatable :: tmp_smoiseq(:) ! equilibrium volumetric soil moisture content [m3/m3] - real :: tmp_smcwtd ! soil moisture content in the layer to the water table when deep [-] - real :: tmp_deeprech ! recharge to the water table when deep [-] - real :: tmp_rech ! recharge to the water table (diagnostic) [-] - real :: tmp_grain ! mass of grain XING [g/m2] - real :: tmp_gdd ! growing degree days XING (based on 10C) [-] - integer :: tmp_pgs ! growing degree days XING [-] - real, allocatable :: tmp_gecros_state(:) ! optional gecros crop [-] - real :: tmp_t2mv ! 2m temperature of vegetation part [K] - real :: tmp_t2mb ! 2m temperature of bare ground part [K] - real :: tmp_q2mv ! 2m mixing ratio of vegetation part [-] - real :: tmp_q2mb ! 2m mixing ratio of bare ground part [-] - real :: tmp_trad ! surface radiative temperature [K] - real :: tmp_nee ! net ecosys exchange of CO2 [g/m2/s CO2] - real :: tmp_gpp ! gross primary assimilation of carbon [g/m2/s C] - real :: tmp_npp ! net primary productivity of carbon [g/m2/s C] - real :: tmp_fveg ! Noah-MP green vegetation fraction [-] - real :: tmp_runsf ! surface runoff [mm/s] - real :: tmp_runsb ! subsurface runoff [mm/s] - real :: tmp_ecan ! evaporation of intercepted water [mm/s] - real :: tmp_edir ! soil surface evaporation rate [mm/s] - real :: tmp_etran ! transpiration rate [mm/s] - real :: tmp_rainf ! rainfall rate [kg s-1] - real :: tmp_snowf ! snowfall rate [kg s-1] - real :: tmp_fsa ! total absorbed solar radiation [W/m2] - real :: tmp_fira ! total net longwave radiation [+ to atm] [W/m2] - real :: tmp_apar ! photosyn active energy by canopy [W/m2] - real :: tmp_psn ! total photosynthesis [+] [umol co2/m2/s] - real :: tmp_sav ! solar radiation absorbed by vegetation [W/m2] - real :: tmp_sag ! solar radiation absorbed by ground [W/m2] - real :: tmp_rssun ! sunlit leaf stomatal resistance [s/m] - real :: tmp_rssha ! shaded leaf stomatal resistance [s/m] - real :: tmp_bgap ! between gap fraction [-] - real :: tmp_wgap ! within gap fraction [-] - real :: tmp_tgb ! bare ground temperature [K] - real :: tmp_tgv ! under canopy ground temperature [K] - real :: tmp_chv ! sensible heat exchange coefficient vegetated [-] - real :: tmp_chb ! sensible heat exchange coefficient bare-ground [-] - real :: tmp_shg ! veg ground sensible heat [+ to atm] [W/m2] - real :: tmp_shc ! canopy sensible heat [+ to atm] [W/m2] - real :: tmp_shb ! bare sensible heat [+ to atm] [W/m2] - real :: tmp_evg ! veg ground evaporation [+ to atm] [W/m2] - real :: tmp_evb ! bare soil evaporation [+ to atm] [W/m2] - real :: tmp_ghv ! veg ground heat flux [+ to soil] [W/m2] - real :: tmp_ghb ! bare ground heat flux [+ to soil] [W/m2] - real :: tmp_irg ! veg ground net LW radiation [+ to atm] [W/m2] - real :: tmp_irc ! canopy net LW radiation [+ to atm] [W/m2] - real :: tmp_irb ! bare net LW radiation [+ to atm] [W/m2] - real :: tmp_tr ! transpiration [ to atm] [W/m2] - real :: tmp_evc ! canopy evaporation heat [to atm] [W/m2] - real :: tmp_fgev_pet, tmp_fcev_pet,tmp_fctr_pet - real :: tmp_chleaf ! leaf exchange coefficient [-] - real :: tmp_chuc ! under canopy exchange coefficient [-] - real :: tmp_chv2 ! veg 2m exchange coefficient [-] - real :: tmp_chb2 ! bare 2m exchange coefficient [-] - real :: tmp_qsnbot ! melting water out of snow bottom [kg m-2 s-1] - real :: tmp_subsnow ! snow sublimation rate [kg m-2 s-1] - real :: tmp_pah ! precipitation advected heat - total (W/m2) - real, allocatable :: tmp_relsmc(:) ! relative soil moisture [-] - - ! Code added by Zhuo Wang 02/28/2019 - real :: AvgSurfT_out ! average surface temperature [K] - real :: TWS_out ! terrestrial water storage [mm] - ! Code added by David Mocko 04/25/2019 - real :: startsm, startswe, startint, startgw, endsm - - real :: tmp_sfcheadrt ! extra input for WRF-HYDRO [m] - real :: tmp_infxs1rt ! extra output for WRF-HYDRO [m] - real :: tmp_soldrain1rt ! extra output for WRF-HYDRO [m] - - !ag (05Jan2021) - real :: tmp_rivsto - real :: tmp_fldsto - real :: tmp_fldfrc - - ! EMK for 557WW - real :: tmp_q2sat, tmp_es - character*3 :: fnest - REAL, PARAMETER:: LVH2O = 2.501000E+6 ! Latent heat for evapo for water - - allocate( tmp_sldpth( NOAHMP401_struc(n)%nsoil ) ) - allocate( tmp_shdfac_monthly( 12 ) ) - allocate( tmp_soilcomp( 8 ) ) - allocate( tmp_smc( NOAHMP401_struc(n)%nsoil ) ) - allocate( tmp_sh2o( NOAHMP401_struc(n)%nsoil ) ) - allocate( tmp_tslb( NOAHMP401_struc(n)%nsoil ) ) - allocate( tmp_relsmc( NOAHMP401_struc(n)%nsoil ) ) - allocate( tmp_tsno( NOAHMP401_struc(n)%nsnow ) ) - allocate( tmp_zss( NOAHMP401_struc(n)%nsnow+NOAHMP401_struc(n)%nsoil) ) - allocate( tmp_snowice( NOAHMP401_struc(n)%nsnow ) ) - allocate( tmp_snowliq( NOAHMP401_struc(n)%nsnow ) ) - allocate( tmp_smoiseq( NOAHMP401_struc(n)%nsoil ) ) - allocate( tmp_gecros_state( 60 ) ) - - ! check NoahMP401 alarm. If alarm is ring, run model. - - alarmCheck = LIS_isAlarmRinging(LIS_rc, "NoahMP401 model alarm") - - if (alarmCheck) Then - do t = 1, LIS_rc%npatch(n, LIS_rc%lsm_index) - dt = LIS_rc%ts - row = LIS_surface(n, LIS_rc%lsm_index)%tile(t)%row - col = LIS_surface(n, LIS_rc%lsm_index)%tile(t)%col - lat = LIS_domain(n)%grid(LIS_domain(n)%gindex(col, row))%lat - lon = LIS_domain(n)%grid(LIS_domain(n)%gindex(col, row))%lon - - ! retrieve forcing data from NOAHMP401_struc(n)%noahmp401(t) and assign to local variables - ! tair: air temperature - tmp_tair = NOAHMP401_struc(n)%noahmp401(t)%tair / NOAHMP401_struc(n)%forc_count - ! Yeosang Yoon, for snow DA - NOAHMP401_struc(n)%noahmp401(t)%sfctmp = tmp_tair - - ! psurf: air pressure - tmp_psurf = NOAHMP401_struc(n)%noahmp401(t)%psurf / NOAHMP401_struc(n)%forc_count - - ! wind_e: U wind component - tmp_wind_e = NOAHMP401_struc(n)%noahmp401(t)%wind_e / NOAHMP401_struc(n)%forc_count - - ! wind_n: V wind component - tmp_wind_n = NOAHMP401_struc(n)%noahmp401(t)%wind_n / NOAHMP401_struc(n)%forc_count - - ! qair: specific humidity - tmp_qair = NOAHMP401_struc(n)%noahmp401(t)%qair / NOAHMP401_struc(n)%forc_count - - ! swdown: downward solar radiation - tmp_swdown = NOAHMP401_struc(n)%noahmp401(t)%swdown / NOAHMP401_struc(n)%forc_count - - ! lwdown: downward longwave radiation - tmp_lwdown = NOAHMP401_struc(n)%noahmp401(t)%lwdown / NOAHMP401_struc(n)%forc_count - - ! prcp: total precipitation (rainfall+snowfall) - ! Both Noah-MP-3.6 and Noah-MP-4.0.1 require total precipitation as forcing input. - ! In Noah-MP-3.6, the forcing is required to be precipitation rate [kg m-2 sec-1]. - ! In Noah-MP-4.0.1, the forcing is required to be precipitation amount [kg m-2]. - - ! T. Lahmers: Correct total precip for cases when model time step > forcing timestep. - ! Edit suggested by D. Mocko and K. Arsenault - if (NOAHMP401_struc(n)%ts > LIS_rc%ts) then - tmp_dt = NOAHMP401_struc(n)%ts - tmp_prcp = tmp_dt * (NOAHMP401_struc(n)%noahmp401(t)%prcp / NOAHMP401_struc(n)%forc_count) - else - tmp_prcp = dt * (NOAHMP401_struc(n)%noahmp401(t)%prcp / NOAHMP401_struc(n)%forc_count) - endif - - !ag(05Jan2021) - ! rivsto/fldsto: River storage and flood storage - ! NOAHMP401_struc(n)%noahmp401(t)%rivsto and NOAHMP401_struc(n)%noahmp401(t)%fldsto - ! are updated in noahmp401_getsws_hymap2.F90 - tmp_rivsto = NOAHMP401_struc(n)%noahmp401(t)%rivsto - tmp_fldsto = NOAHMP401_struc(n)%noahmp401(t)%fldsto - tmp_fldfrc = NOAHMP401_struc(n)%noahmp401(t)%fldfrc - - ! check validity of tair - if(tmp_tair .eq. LIS_rc%udef) then - write(LIS_logunit, *) "[ERR] undefined value found for forcing variable tair in NoahMP401" - write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon - call LIS_endrun() - endif - ! check validity of psurf - if(tmp_psurf .eq. LIS_rc%udef) then - write(LIS_logunit, *) "[ERR] undefined value found for forcing variable psurf in NoahMP401" - write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon - call LIS_endrun() - endif - ! check validity of wind_e - if(tmp_wind_e .eq. LIS_rc%udef) then - write(LIS_logunit, *) "[ERR] undefined value found for forcing variable wind_e in NoahMP401" - write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon - call LIS_endrun() - endif - ! check validity of wind_n - if(tmp_wind_n .eq. LIS_rc%udef) then - write(LIS_logunit, *) "[ERR] undefined value found for forcing variable wind_n in NoahMP401" - write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon - call LIS_endrun() - endif - ! check validity of qair - if(tmp_qair .eq. LIS_rc%udef) then - write(LIS_logunit, *) "[ERR] undefined value found for forcing variable qair in NoahMP401" - write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon - call LIS_endrun() - endif - ! check validity of swdown - if(tmp_swdown .eq. LIS_rc%udef) then - write(LIS_logunit, *) "[ERR] undefined value found for forcing variable swdown in NoahMP401" - write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon - call LIS_endrun() - endif - ! check validity of lwdown - if(tmp_lwdown .eq. LIS_rc%udef) then - write(LIS_logunit, *) "[ERR] undefined value found for forcing variable lwdown in NoahMP401" - write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon - call LIS_endrun() - endif - ! check validity of prcp - if(tmp_prcp .eq. LIS_rc%udef) then - write(LIS_logunit, *) "[ERR] undefined value found for forcing variable prcp in NoahMP401" - write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon - call LIS_endrun() - endif - ! - - !ag (05Jan2021) - ! check validity of rivsto - if(tmp_rivsto .eq. LIS_rc%udef) then - write(LIS_logunit, *) "[ERR] undefined value found for forcing variable rivsto in NoahMP36" - write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon - call LIS_endrun() - endif - ! check validity of fldsto - if(tmp_fldsto .eq. LIS_rc%udef) then - write(LIS_logunit, *) "[ERR] undefined value found for forcing variable fldsto in NoahMP36" - write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon - call LIS_endrun() - endif - ! check validity of fldfrc - if(tmp_fldfrc .eq. LIS_rc%udef) then - write(LIS_logunit, *) "[ERR] undefined value found for forcing variable fldfrc in NoahMP36" - write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon - call LIS_endrun() - endif - ! - - tmp_latitude = lat - tmp_longitude = lon - tmp_year = LIS_rc%yr - tmp_month = LIS_rc%mo - tmp_day = LIS_rc%da - tmp_hour = LIS_rc%hr - tmp_minute = LIS_rc%mn - - ! Added by Zhuo Wang on 11/13/2018 - tmp_ttile = t - tmp_itimestep = LIS_rc%tscount(n) - - ! get parameters - tmp_dt = NOAHMP401_struc(n)%ts - tmp_sldpth(:) = NOAHMP401_struc(n)%sldpth(:) - tmp_nsoil = NOAHMP401_struc(n)%nsoil - tmp_nsnow = NOAHMP401_struc(n)%nsnow - tmp_vegetype = NOAHMP401_struc(n)%noahmp401(t)%vegetype - tmp_soiltype = NOAHMP401_struc(n)%noahmp401(t)%soiltype - ! Multiply shdfac by 100.0 because noahmpdrv.f90 - ! expects it in units of percentage, not fraction. - tmp_shdfac_monthly(:) = NOAHMP401_struc(n)%noahmp401(t)%shdfac_monthly(:) * 100.0 - tmp_tbot = NOAHMP401_struc(n)%noahmp401(t)%tbot - tmp_urban_vegetype = LIS_rc%urbanclass - tmp_cropcat = LIS_rc%cropclass - tmp_dveg_opt = NOAHMP401_struc(n)%dveg_opt - tmp_crs_opt = NOAHMP401_struc(n)%crs_opt - tmp_btr_opt = NOAHMP401_struc(n)%btr_opt - tmp_run_opt = NOAHMP401_struc(n)%run_opt - tmp_sfc_opt = NOAHMP401_struc(n)%sfc_opt - tmp_frz_opt = NOAHMP401_struc(n)%frz_opt - tmp_inf_opt = NOAHMP401_struc(n)%inf_opt - tmp_rad_opt = NOAHMP401_struc(n)%rad_opt - tmp_alb_opt = NOAHMP401_struc(n)%alb_opt - tmp_snf_opt = NOAHMP401_struc(n)%snf_opt - tmp_tbot_opt = NOAHMP401_struc(n)%tbot_opt - tmp_stc_opt = NOAHMP401_struc(n)%stc_opt - tmp_gla_opt = NOAHMP401_struc(n)%gla_opt - tmp_sndpth_gla_opt = NOAHMP401_struc(n)%sndpth_gla_opt - tmp_rsf_opt = NOAHMP401_struc(n)%rsf_opt - tmp_soil_opt = NOAHMP401_struc(n)%soil_opt - tmp_pedo_opt = NOAHMP401_struc(n)%pedo_opt - tmp_crop_opt = NOAHMP401_struc(n)%crop_opt - tmp_iz0tlnd = 0 - tmp_urban_opt = NOAHMP401_struc(n)%urban_opt -! Multiply reference height by 2.0 because module_sf_noahmpdrv -! expects this variable to be in terms of a thickness of the -! atmospheric layers, and it later divides this value by 2.0. -! Thus, the LIS user should specify the exact height of the -! reference in lis.config, and module_sf_noahmpdrv will then -! correctly use this actual value. This code is confirmed in -! the HRLDAS driver, which also multiplies this value by 2.0. -! 11/30/2018 - dmm - tmp_dz8w = NOAHMP401_struc(n)%dz8w * 2.0 - - if (tmp_crop_opt.ne.0) then - tmp_planting = NOAHMP401_struc(n)%noahmp401(t)%planting - tmp_harvest = NOAHMP401_struc(n)%noahmp401(t)%harvest - tmp_season_gdd = NOAHMP401_struc(n)%noahmp401(t)%season_gdd - if (tmp_crop_opt.eq.2) then - tmp_gecros_state(:) = NOAHMP401_struc(n)%noahmp401(t)%gecros_state(:) - else - tmp_gecros_state(:) = 0.0 - endif - else - tmp_planting = 0.0 - tmp_harvest = 0.0 - tmp_season_gdd = 0.0 - endif - -! Zhuo Wang tested on 11/15/2018, not read from LDT-generated netcdf input file - if (tmp_soil_opt.eq.2) then - tmp_soilcL1 = NOAHMP401_struc(n)%noahmp401(t)%soilcL1 - tmp_soilcL2 = NOAHMP401_struc(n)%noahmp401(t)%soilcL2 - tmp_soilcL3 = NOAHMP401_struc(n)%noahmp401(t)%soilcL3 - tmp_soilcL4 = NOAHMP401_struc(n)%noahmp401(t)%soilcL4 - else - tmp_soilcL1 = 0.0 - tmp_soilcL2 = 0.0 - tmp_soilcL3 = 0.0 - tmp_soilcL4 = 0.0 - endif - if (tmp_soil_opt.eq.3) then - tmp_soilcomp(:) = NOAHMP401_struc(n)%noahmp401(t)%soilcomp(:) - else - tmp_soilcomp = 0.0 - endif - - ! get state variables - tmp_sfcrunoff = NOAHMP401_struc(n)%noahmp401(t)%sfcrunoff - tmp_udrrunoff = NOAHMP401_struc(n)%noahmp401(t)%udrrunoff - tmp_smc(:) = NOAHMP401_struc(n)%noahmp401(t)%smc(:) - tmp_sh2o(:) = NOAHMP401_struc(n)%noahmp401(t)%sh2o(:) - tmp_tslb(:) = NOAHMP401_struc(n)%noahmp401(t)%tslb(:) - tmp_sneqv = NOAHMP401_struc(n)%noahmp401(t)%sneqv - tmp_snowh = NOAHMP401_struc(n)%noahmp401(t)%snowh - tmp_canwat = NOAHMP401_struc(n)%noahmp401(t)%canwat - tmp_acsnom = NOAHMP401_struc(n)%noahmp401(t)%acsnom - tmp_acsnow = NOAHMP401_struc(n)%noahmp401(t)%acsnow - tmp_isnow = NOAHMP401_struc(n)%noahmp401(t)%isnow - tmp_tv = NOAHMP401_struc(n)%noahmp401(t)%tv - tmp_tg = NOAHMP401_struc(n)%noahmp401(t)%tg - tmp_canice = NOAHMP401_struc(n)%noahmp401(t)%canice - tmp_canliq = NOAHMP401_struc(n)%noahmp401(t)%canliq - tmp_eah = NOAHMP401_struc(n)%noahmp401(t)%eah - tmp_tah = NOAHMP401_struc(n)%noahmp401(t)%tah - tmp_cm = NOAHMP401_struc(n)%noahmp401(t)%cm - tmp_ch = NOAHMP401_struc(n)%noahmp401(t)%ch - tmp_fwet = NOAHMP401_struc(n)%noahmp401(t)%fwet - tmp_sneqvo = NOAHMP401_struc(n)%noahmp401(t)%sneqvo - tmp_albold = NOAHMP401_struc(n)%noahmp401(t)%albold - tmp_qsnow = NOAHMP401_struc(n)%noahmp401(t)%qsnow - tmp_wslake = NOAHMP401_struc(n)%noahmp401(t)%wslake - tmp_zwt = NOAHMP401_struc(n)%noahmp401(t)%zwt - tmp_wa = NOAHMP401_struc(n)%noahmp401(t)%wa - tmp_wt = NOAHMP401_struc(n)%noahmp401(t)%wt - tmp_tsno(:) = NOAHMP401_struc(n)%noahmp401(t)%tsno(:) - tmp_zss(:) = NOAHMP401_struc(n)%noahmp401(t)%zss(:) - tmp_snowice(:) = NOAHMP401_struc(n)%noahmp401(t)%snowice(:) - tmp_snowliq(:) = NOAHMP401_struc(n)%noahmp401(t)%snowliq(:) - tmp_lfmass = NOAHMP401_struc(n)%noahmp401(t)%lfmass - tmp_rtmass = NOAHMP401_struc(n)%noahmp401(t)%rtmass - tmp_stmass = NOAHMP401_struc(n)%noahmp401(t)%stmass - tmp_wood = NOAHMP401_struc(n)%noahmp401(t)%wood - tmp_stblcp = NOAHMP401_struc(n)%noahmp401(t)%stblcp - tmp_fastcp = NOAHMP401_struc(n)%noahmp401(t)%fastcp -! DMM - If dynamic vegetation option DVEG = 7, 8, or 9 for "input LAI", -! then send LAI/SAI from input to the Noah-MP-4.0.1 physics. If any -! tile has an undefined LAI/SAI value, instead use the value from the -! MPTABLE file for that vegetation class and for the month. - if ((tmp_dveg_opt.ge.7).and.(tmp_dveg_opt.le.9)) then - tid = LIS_surface(n,LIS_rc%lsm_index)%tile(t)%tile_id -! If "LAI data source:" is set to "none" for these three Noah-MP-4.0.1 -! input LAI vegetation options, stop the run. - if (LIS_rc%useLAImap(n).ne."none") then - tmp_lai = LIS_lai(n)%tlai(tid) - else - write(LIS_logunit,*) & - '[ERR] Attempting to use input LAI, however' - write(LIS_logunit,*) & - '[ERR] "LAI data source:" is set to "none".' - call LIS_endrun() - endif -! If "SAI data source:" is set to "none" for these three Noah-MP-4.0.1 -! input LAI vegetation options, fill in the SAI values from MPTABLE. - if (LIS_rc%useSAImap(n).ne."none") then - tmp_sai = LIS_sai(n)%tsai(tid) - endif -! If any LAI or SAI values are undefined at a tile, -! fill in the LAI or SAI values from MPTABLE. - if (tmp_lai.eq.LIS_rc%udef) then - tmp_lai = NOAHMP401_struc(n)%noahmp401(t)%lai - endif - if (tmp_sai.eq.LIS_rc%udef) then - tmp_sai = NOAHMP401_struc(n)%noahmp401(t)%sai - endif - else - tmp_lai = NOAHMP401_struc(n)%noahmp401(t)%lai - tmp_sai = NOAHMP401_struc(n)%noahmp401(t)%sai - endif - tmp_tauss = NOAHMP401_struc(n)%noahmp401(t)%tauss - tmp_smoiseq(:) = NOAHMP401_struc(n)%noahmp401(t)%smoiseq(:) - tmp_smcwtd = NOAHMP401_struc(n)%noahmp401(t)%smcwtd - tmp_deeprech = NOAHMP401_struc(n)%noahmp401(t)%deeprech - tmp_rech = NOAHMP401_struc(n)%noahmp401(t)%rech - tmp_grain = NOAHMP401_struc(n)%noahmp401(t)%grain - tmp_gdd = NOAHMP401_struc(n)%noahmp401(t)%gdd - tmp_pgs = NOAHMP401_struc(n)%noahmp401(t)%pgs - tmp_sfcheadrt = NoahMP401_struc(n)%noahmp401(t)%sfcheadrt - -! Calculate water storages at start of timestep - startsm = 0.0 - do i = 1,tmp_nsoil - startsm = startsm + & - (tmp_smc(i) * tmp_sldpth(i) * LIS_CONST_RHOFW) - enddo - startswe = tmp_sneqv - startint = tmp_canliq + tmp_canice - startgw = tmp_wa - - ! call model physics - call noahmp_driver_401(n , & ! in - nest id [-] - tmp_ttile , & ! in - tile id [-] - tmp_itimestep , & ! in - timestep number [-] - tmp_latitude , & ! in - latitude in decimal degree [rad] - tmp_longitude , & ! in - longitude in decimal year [rad] - tmp_year , & ! in - year of the currrent time step [-] - tmp_month , & ! in - month of the current time step [-] - tmp_day , & ! in - day of the current time step [-] - tmp_hour , & ! in - hour of the current time step [-] - tmp_minute , & ! in - minute of the current time step [-] - tmp_dz8w , & ! in - thickness of atmospheric layers [m] - tmp_dt , & ! in - timestep [s] - tmp_sldpth , & ! in - thickness of soil layers [m] - tmp_nsoil , & ! in - number of soil layers [-] - tmp_nsnow , & ! in - maximum number of snow layers (e.g. 3) [-] - tmp_vegetype , & ! in - vegetation type [-] - tmp_soiltype , & ! in - soil type [-] - tmp_shdfac_monthly , & ! in - monthly values for green vegetation fraction [] - tmp_tbot , & ! in - deep soil temperature [K] - tmp_urban_vegetype , & ! in - urban land cover type index [-] - tmp_cropcat , & ! in - crop category [-] - tmp_planting , & ! in - planting date [-] - tmp_harvest , & ! in - harvest date [-] - tmp_season_gdd , & ! in - growing season GDD [-] - tmp_dveg_opt , & ! in - dynamic vegetation, 1->off; 2->on); with opt_crs=1 [-] - tmp_crs_opt , & ! in - canopt stomatal resistance (1->Ball-Berry; 2->Jarvis) [-] - tmp_btr_opt , & ! in - soil moisture factor for stomatal resistance(1->Noah;2->CLM;3->SSiB) [-] - tmp_run_opt , & ! in - runoff and groundwater (1->SIMGM; 2->SIMTOP; 3->Schaake96; 4->BATS) [-] - tmp_sfc_opt , & ! in - surface layer drag coeff (CH & CM) (1->M-O; 2->Chen97) [-] - tmp_frz_opt , & ! in - supercooled liquid water (1->NY06; 2->Koren99) [-] - tmp_inf_opt , & ! in - frozen soil permeability (1->NY06; 2->Koren99) [-] - tmp_rad_opt , & ! in - radiation transfer (1->gap=F(3D,cosz); 2->gap=0; 3->gap=1-Fveg) [-] - tmp_alb_opt , & ! in - snow surface albedo (1->BATS; 2->CLASS) [-] - tmp_snf_opt , & ! in - rainfall & snowfall (1->Jordan91; 2->BATS; 3->Noah) [-] - tmp_tbot_opt , & ! in - lower boundary of soil temperature [-] - tmp_stc_opt , & ! in - snow/soil temperature time scheme [-] - tmp_gla_opt , & ! in - glacier option (1->phase change; 2->simple) [-] - tmp_sndpth_gla_opt , & ! in - Snow depth max for glacier model [mm] - tmp_rsf_opt , & ! in - surface resistance(1->Sakaguchi/Zeng;2->Seller;3->mod Sellers;4->1+snow) [-] - tmp_soil_opt , & ! in - soil configuration option [-] - tmp_pedo_opt , & ! in - soil pedotransfer function option [-] - tmp_crop_opt , & ! in - crop model option (0->none; 1->Liu et al.; 2->Gecros) [-] - tmp_iz0tlnd , & ! in - option of Chen adjustment of Czil (not used) [-] - tmp_urban_opt , & ! in - urban physics option [-] - tmp_soilcomp , & ! in - soil sand and clay percentage [-] - tmp_soilcL1 , & ! in - soil texture in layer 1 [-] - tmp_soilcL2 , & ! in - soil texture in layer 2 [-] - tmp_soilcL3 , & ! in - soil texture in layer 3 [-] - tmp_soilcL4 , & ! in - soil texture in layer 4 [-] - tmp_tair , & ! in - air temperature [K] - tmp_psurf , & ! in - air pressure [Pa] - tmp_wind_e , & ! in - U wind component [m/s] - tmp_wind_n , & ! in - V wind component [m/s] - tmp_qair , & ! in - specific humidity [kg/kg] - tmp_swdown , & ! in - downward solar radiation [W m-2] - tmp_lwdown , & ! in - downward longwave radiation [W m-2] - tmp_prcp , & ! in - total precipitation (rainfall+snowfall) [mm] - tmp_tsk , & ! out - surface radiative temperature [K] - tmp_hfx , & ! out - sensible heat flux [W m-2] -! tmp_fsh , & ! out - sensible heat flux [W/m2] - - tmp_qfx , & ! out - latent heat flux [kg s-1 m-2] - tmp_lh , & ! out - latent heat flux [W m-2] - tmp_grdflx , & ! out - ground/snow heat flux [W m-2] - tmp_sfcrunoff , & ! inout - accumulated surface runoff [m] - tmp_udrrunoff , & ! inout - accumulated sub-surface runoff [m] - tmp_albedo , & ! out - total grid albedo [-] - tmp_qsnbot , & ! out - melting water out of snow bottom [kg m-2 s-1] - tmp_subsnow , & ! out - snow sublimation rate [kg m-2 s-1] - tmp_snowc , & ! out - snow cover fraction [-] - tmp_smc , & ! inout - volumetric soil moisture [m3/m3] - tmp_pah , & ! out - precipitation advected heat - total (W/m2) - tmp_sh2o , & ! inout - volumetric liquid soil moisture [m3/m3] - tmp_tslb , & ! inout - soil temperature [K] - tmp_sneqv , & ! inout - snow water equivalent [mm] - tmp_snowh , & ! inout - physical snow depth [m] - tmp_canwat , & ! inout - total canopy water + ice [mm] - tmp_acsnom , & ! inout - accumulated snow melt leaving pack [-] - tmp_acsnow , & ! inout - accumulated snow on grid [mm] - tmp_emiss , & ! out - surface bulk emissivity [-] - tmp_rs , & ! out - total stomatal resistance [s/m] - tmp_isnow , & ! inout - actual no. of snow layers [-] - tmp_tv , & ! inout - vegetation leaf temperature [K] - tmp_tg , & ! inout - bulk ground surface temperature [K] - tmp_canice , & ! inout - canopy-intercepted ice [mm] - tmp_canliq , & ! inout - canopy-intercepted liquid water [mm] - tmp_eah , & ! inout - canopy air vapor pressure [Pa] - tmp_tah , & ! inout - canopy air temperature [K] - tmp_cm , & ! inout - bulk momentum drag coefficient [-] - tmp_ch , & ! inout - bulk sensible heat exchange coefficient [-] - tmp_fwet , & ! inout - wetted or snowed fraction of canopy [-] - tmp_sneqvo , & ! inout - snow mass at last time step [mm h2o] - tmp_albold , & ! inout - snow albedo at last time step [-] - tmp_qsnow , & ! inout - snowfall on the ground [mm/s] - tmp_wslake , & ! inout - lake water storage [mm] - tmp_zwt , & ! inout - water table depth [m] - tmp_wa , & ! inout - water in the "aquifer" [mm] - tmp_wt , & ! inout - water in aquifer and saturated soil [mm] - tmp_tsno , & ! inout - snow layer temperature [K] - tmp_zss , & ! inout - snow/soil layer depth from snow surface [m] - tmp_snowice , & ! inout - snow layer ice [mm] - tmp_snowliq , & ! inout - snow layer liquid water [mm] - tmp_lfmass , & ! inout - leaf mass [g/m2] - tmp_rtmass , & ! inout - mass of fine roots [g/m2] - tmp_stmass , & ! inout - stem mass [g/m2] - tmp_wood , & ! inout - mass of wood (including woody roots) [g/m2] - tmp_stblcp , & ! inout - stable carbon in deep soil [g/m2] - tmp_fastcp , & ! inout - short-lived carbon in shallow soil [g/m2] - tmp_lai , & ! inout - leaf area index [-] - tmp_sai , & ! inout - stem area index [-] - tmp_tauss , & ! inout - snow age factor [-] - tmp_smoiseq , & ! inout - equilibrium volumetric soil moisture content [m3/m3] - tmp_smcwtd , & ! inout - soil moisture content in the layer to the water table when deep [-] - tmp_deeprech , & ! inout - recharge to the water table when deep [-] - tmp_rech , & ! inout - recharge to the water table (diagnostic) [-] - tmp_grain , & ! inout - mass of grain XING [g/m2] - tmp_gdd , & ! inout - growing degree days XING (based on 10C) [-] - tmp_pgs , & ! inout - growing degree days XING [-] - tmp_gecros_state , & ! inout - optional gecros crop [-] - tmp_t2mv , & ! out - 2m temperature of vegetation part [K] - tmp_t2mb , & ! out - 2m temperature of bare ground part [K] - tmp_q2mv , & ! out - 2m mixing ratio of vegetation part [-] - tmp_q2mb , & ! out - 2m mixing ratio of bare ground part [-] - tmp_trad , & ! out - surface radiative temperature [K] - tmp_nee , & ! out - net ecosys exchange of CO2 [g/m2/s CO2] - tmp_gpp , & ! out - gross primary assimilation of carbon [g/m2/s C] - tmp_npp , & ! out - net primary productivity of carbon [g/m2/s C] - tmp_fveg , & ! out - Noah-MP green vegetation fraction [-] - tmp_runsf , & ! out - surface runoff [mm/s] - tmp_runsb , & ! out - subsurface runoff [mm/s] - tmp_ecan , & ! out - evaporation of intercepted water [mm/s] - tmp_edir , & ! out - soil surface evaporation rate [mm/s] - tmp_etran , & ! out - transpiration rate [mm/s] - tmp_rainf , & ! out - raifall rate [km s-1] - tmp_snowf , & ! out - snowfall rate [kg s-1] - tmp_fsa , & ! out - total absorbed solar radiation [W/m2] - tmp_fira , & ! out - total net longwave radiation [+ to atm] [W/m2] - tmp_apar , & ! out - photosyn active energy by canopy [W/m2] - tmp_psn , & ! out - total photosynthesis [+] [umol co2/m2/s] - tmp_sav , & ! out - solar radiation absorbed by vegetation [W/m2] - tmp_sag , & ! out - solar radiatiob absorbed by ground [W/m2] - tmp_rssun , & ! out - sunlit leaf stomatal resistance [s/m] - tmp_rssha , & ! out - shaded leaf stomatal resistance [s/m] - tmp_bgap , & ! out - between gap fraction [-] - tmp_wgap , & ! out - within gap fraction [-] - tmp_tgb , & ! out - bare ground temperature [K] - tmp_tgv , & ! out - under canopy ground temperature [K] - tmp_chv , & ! out - sensible heat exchange coefficient vegetated [-] - tmp_chb , & ! out - sensible heat exchange coefficient bare-ground [-] - tmp_shg , & ! out - veg ground sensible heat [+ to atm] [W/m2] - tmp_shc , & ! out - canopy sensible heat [+ to atm] [W/m2] - tmp_shb , & ! out - bare sensible heat [+ to atm] [W/m2] - tmp_evg , & ! out - veg ground evaporation [+ to atm] [W/m2] - tmp_evb , & ! out - bare soil evaporation [+ to atm] [W/m2] - tmp_ghv , & ! out - veg ground heat flux [+ to soil] [W/m2] - tmp_ghb , & ! out - bare ground heat flux [+ to soil] [W/m2] - tmp_irg , & ! out - veg ground net LW radiation [+ to atm] [W/m2] - tmp_irc , & ! out - canopy net LW radiation [+ to atm] [W/m2] - tmp_irb , & ! out - bare net LW radiation [+ to atm] [W/m2] - tmp_tr , & ! out - transpiration [ to atm] [W/m2] - tmp_evc , & ! out - canopy evaporation heat [to atm] [W/m2] - tmp_fgev_pet, tmp_fcev_pet, tmp_fctr_pet, & !PET code from Sujay - tmp_chleaf , & ! out - leaf exchange coefficient [-] - tmp_chuc , & ! out - under canopy exchange coefficient [-] - tmp_chv2 , & ! out - veg 2m exchange coefficient [-] - tmp_chb2 , & ! out - bare 2m exchange coefficient [-] - tmp_relsmc , & - !ag (12Sep2019) - tmp_rivsto , & ! in - river storage [m/s] - tmp_fldsto , & ! in - flood storage [m/s] - tmp_fldfrc , & ! in - flooded fraction [-] - NOAHMP401_struc(n)%noahmp401(t)%param, & ! out - relative soil moisture [-] - tmp_sfcheadrt , & - tmp_infxs1rt , & - tmp_soldrain1rt ) ! out - extra output for WRF-HYDRO [m] - - ! save state variables from local variables to global variables - NOAHMP401_struc(n)%noahmp401(t)%sfcrunoff = tmp_sfcrunoff - NOAHMP401_struc(n)%noahmp401(t)%udrrunoff = tmp_udrrunoff - NOAHMP401_struc(n)%noahmp401(t)%smc(:) = tmp_smc(:) - NOAHMP401_struc(n)%noahmp401(t)%sh2o(:) = tmp_sh2o(:) - NOAHMP401_struc(n)%noahmp401(t)%tslb(:) = tmp_tslb(:) - NOAHMP401_struc(n)%noahmp401(t)%sneqv = tmp_sneqv - NOAHMP401_struc(n)%noahmp401(t)%snowh = tmp_snowh - NOAHMP401_struc(n)%noahmp401(t)%canwat = tmp_canwat - NOAHMP401_struc(n)%noahmp401(t)%acsnom = tmp_acsnom - NOAHMP401_struc(n)%noahmp401(t)%acsnow = tmp_acsnow - NOAHMP401_struc(n)%noahmp401(t)%isnow = tmp_isnow - NOAHMP401_struc(n)%noahmp401(t)%tv = tmp_tv - NOAHMP401_struc(n)%noahmp401(t)%tg = tmp_tg - NOAHMP401_struc(n)%noahmp401(t)%canice = tmp_canice - NOAHMP401_struc(n)%noahmp401(t)%canliq = tmp_canliq - NOAHMP401_struc(n)%noahmp401(t)%eah = tmp_eah - NOAHMP401_struc(n)%noahmp401(t)%tah = tmp_tah - NOAHMP401_struc(n)%noahmp401(t)%cm = tmp_cm - NOAHMP401_struc(n)%noahmp401(t)%ch = tmp_ch - NOAHMP401_struc(n)%noahmp401(t)%fwet = tmp_fwet - NOAHMP401_struc(n)%noahmp401(t)%sneqvo = tmp_sneqvo - NOAHMP401_struc(n)%noahmp401(t)%albold = tmp_albold - NOAHMP401_struc(n)%noahmp401(t)%qsnow = tmp_qsnow - NOAHMP401_struc(n)%noahmp401(t)%wslake = tmp_wslake - NOAHMP401_struc(n)%noahmp401(t)%zwt = tmp_zwt - NOAHMP401_struc(n)%noahmp401(t)%wa = tmp_wa - NOAHMP401_struc(n)%noahmp401(t)%wt = tmp_wt - NOAHMP401_struc(n)%noahmp401(t)%tsno(:) = tmp_tsno(:) - NOAHMP401_struc(n)%noahmp401(t)%zss(:) = tmp_zss(:) - NOAHMP401_struc(n)%noahmp401(t)%snowice(:) = tmp_snowice(:) - NOAHMP401_struc(n)%noahmp401(t)%snowliq(:) = tmp_snowliq(:) - NOAHMP401_struc(n)%noahmp401(t)%lfmass = tmp_lfmass - NOAHMP401_struc(n)%noahmp401(t)%rtmass = tmp_rtmass - NOAHMP401_struc(n)%noahmp401(t)%stmass = tmp_stmass - NOAHMP401_struc(n)%noahmp401(t)%wood = tmp_wood - NOAHMP401_struc(n)%noahmp401(t)%stblcp = tmp_stblcp - NOAHMP401_struc(n)%noahmp401(t)%fastcp = tmp_fastcp - NOAHMP401_struc(n)%noahmp401(t)%lai = tmp_lai - NOAHMP401_struc(n)%noahmp401(t)%sai = tmp_sai - NOAHMP401_struc(n)%noahmp401(t)%tauss = tmp_tauss - NOAHMP401_struc(n)%noahmp401(t)%smoiseq(:) = tmp_smoiseq(:) - NOAHMP401_struc(n)%noahmp401(t)%smcwtd = tmp_smcwtd - NOAHMP401_struc(n)%noahmp401(t)%deeprech = tmp_deeprech - NOAHMP401_struc(n)%noahmp401(t)%rech = tmp_rech - NOAHMP401_struc(n)%noahmp401(t)%grain = tmp_grain - NOAHMP401_struc(n)%noahmp401(t)%gdd = tmp_gdd - NOAHMP401_struc(n)%noahmp401(t)%pgs = tmp_pgs - NOAHMP401_struc(n)%noahmp401(t)%gecros_state(:) = tmp_gecros_state(:) - - ! save output variables from local variables to global variables - NOAHMP401_struc(n)%noahmp401(t)%tsk = tmp_tsk - NOAHMP401_struc(n)%noahmp401(t)%hfx = tmp_hfx -! NOAHMP401_struc(n)%noahmp401(t)%fsh = tmp_fsh - - NOAHMP401_struc(n)%noahmp401(t)%qfx = tmp_qfx - NOAHMP401_struc(n)%noahmp401(t)%lh = tmp_lh - NOAHMP401_struc(n)%noahmp401(t)%grdflx = tmp_grdflx - NOAHMP401_struc(n)%noahmp401(t)%albedo = tmp_albedo - NOAHMP401_struc(n)%noahmp401(t)%snowc = tmp_snowc - NOAHMP401_struc(n)%noahmp401(t)%emiss = tmp_emiss - NOAHMP401_struc(n)%noahmp401(t)%rs = tmp_rs - NOAHMP401_struc(n)%noahmp401(t)%t2mv = tmp_t2mv - NOAHMP401_struc(n)%noahmp401(t)%t2mb = tmp_t2mb - NOAHMP401_struc(n)%noahmp401(t)%q2mv = tmp_q2mv - NOAHMP401_struc(n)%noahmp401(t)%q2mb = tmp_q2mb - NOAHMP401_struc(n)%noahmp401(t)%trad = tmp_trad - NOAHMP401_struc(n)%noahmp401(t)%nee = tmp_nee - NOAHMP401_struc(n)%noahmp401(t)%gpp = tmp_gpp - NOAHMP401_struc(n)%noahmp401(t)%npp = tmp_npp - NOAHMP401_struc(n)%noahmp401(t)%fveg = tmp_fveg - NOAHMP401_struc(n)%noahmp401(t)%runsf = tmp_runsf - NOAHMP401_struc(n)%noahmp401(t)%runsb = tmp_runsb - NOAHMP401_struc(n)%noahmp401(t)%ecan = tmp_ecan -! Direct soil evaporation does not include sublimation of the snowpack -! on the soil (by the strict ALMA definition of ESoil). - David Mocko - NOAHMP401_struc(n)%noahmp401(t)%edir = tmp_edir - tmp_subsnow - NOAHMP401_struc(n)%noahmp401(t)%etran = tmp_etran - NOAHMP401_struc(n)%noahmp401(t)%rainf = tmp_rainf - NOAHMP401_struc(n)%noahmp401(t)%snowf = tmp_snowf - NOAHMP401_struc(n)%noahmp401(t)%fsa = tmp_fsa - NOAHMP401_struc(n)%noahmp401(t)%fira = tmp_fira - NOAHMP401_struc(n)%noahmp401(t)%apar = tmp_apar - NOAHMP401_struc(n)%noahmp401(t)%psn = tmp_psn - NOAHMP401_struc(n)%noahmp401(t)%sav = tmp_sav - NOAHMP401_struc(n)%noahmp401(t)%sag = tmp_sag - NOAHMP401_struc(n)%noahmp401(t)%rssun = tmp_rssun - NOAHMP401_struc(n)%noahmp401(t)%rssha = tmp_rssha - NOAHMP401_struc(n)%noahmp401(t)%bgap = tmp_bgap - NOAHMP401_struc(n)%noahmp401(t)%wgap = tmp_wgap - NOAHMP401_struc(n)%noahmp401(t)%tgb = tmp_tgb - NOAHMP401_struc(n)%noahmp401(t)%tgv = tmp_tgv - NOAHMP401_struc(n)%noahmp401(t)%chv = tmp_chv - NOAHMP401_struc(n)%noahmp401(t)%chb = tmp_chb - NOAHMP401_struc(n)%noahmp401(t)%shg = tmp_shg - NOAHMP401_struc(n)%noahmp401(t)%shc = tmp_shc - NOAHMP401_struc(n)%noahmp401(t)%shb = tmp_shb - NOAHMP401_struc(n)%noahmp401(t)%evg = tmp_evg - NOAHMP401_struc(n)%noahmp401(t)%evb = tmp_evb - NOAHMP401_struc(n)%noahmp401(t)%ghv = tmp_ghv - NOAHMP401_struc(n)%noahmp401(t)%ghb = tmp_ghb - NOAHMP401_struc(n)%noahmp401(t)%irg = tmp_irg - NOAHMP401_struc(n)%noahmp401(t)%irc = tmp_irc - NOAHMP401_struc(n)%noahmp401(t)%irb = tmp_irb - NOAHMP401_struc(n)%noahmp401(t)%tr = tmp_tr - NOAHMP401_struc(n)%noahmp401(t)%evc = tmp_evc - NOAHMP401_struc(n)%noahmp401(t)%chleaf = tmp_chleaf - NOAHMP401_struc(n)%noahmp401(t)%chuc = tmp_chuc - NOAHMP401_struc(n)%noahmp401(t)%chv2 = tmp_chv2 - NOAHMP401_struc(n)%noahmp401(t)%chb2 = tmp_chb2 - NOAHMP401_struc(n)%noahmp401(t)%infxs1rt = tmp_infxs1rt - NOAHMP401_struc(n)%noahmp401(t)%soldrain1rt = tmp_soldrain1rt - - ! EMK Update RHMin for 557WW - if (tmp_tair .lt. & - noahmp401_struc(n)%noahmp401(t)%tair_agl_min) then - noahmp401_struc(n)%noahmp401(t)%tair_agl_min = tmp_tair - ! Use formulation based on Noah.3.6 code, which treats - ! q2sat as saturated specific humidity - tmp_es = 611.0*exp(2.501E6/461.0*(1./273.15 - 1./tmp_tair)) - tmp_q2sat = 0.622*tmp_es/(tmp_psurf-(1.-0.622)*tmp_es) - noahmp401_struc(n)%noahmp401(t)%rhmin = tmp_qair / tmp_q2sat - endif - - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RHMIN, & - value=noahmp401_struc(n)%noahmp401(t)%rhmin, & - vlevel=1, unit="-", direction="-",& - surface_type=LIS_rc%lsm_index) - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RHMIN, & - value=(100.*noahmp401_struc(n)%noahmp401(t)%rhmin), & - vlevel=1, unit="%", direction="-",& - surface_type=LIS_rc%lsm_index) - - ![ 1] output variable: tsk (unit=K ). *** surface radiative temperature - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RADT, value = NOAHMP401_struc(n)%noahmp401(t)%tsk, & - vlevel=1, unit="K", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 2] output variable: fsh (unit=W/m2). *** sensible heat flux to atmosphere - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QH, value = NOAHMP401_struc(n)%noahmp401(t)%hfx, & - vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) - - !call LIS_diagnoseSurfaceOutputVar(n, t,LIS_MOC_QH,value = NOAHMP401_struc(n)%noahmp401(t)%fsh, & - ! vlevel=1,unit="W m-2",direction="UP",surface_type=LIS_rc%lsm_index) - - - ![ 3] output variable: lh (unit=W/m2). *** latent heat flux - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QLE, value = NOAHMP401_struc(n)%noahmp401(t)%lh, & - vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) - - ![ 4] output variable: grdflx (unit=W/m2). *** ground/snow heat flux to soil - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QG, value = NOAHMP401_struc(n)%noahmp401(t)%grdflx, & - vlevel=1, unit="W m-2", direction="DN", surface_type = LIS_rc%lsm_index) - - ![ 5] output variable: albedo (unit=- ). *** total grid albedo - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_ALBEDO, value = NOAHMP401_struc(n)%noahmp401(t)%albedo, & - vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) - - if (tmp_albedo.ne.LIS_rc%udef) tmp_albedo = tmp_albedo * 100.0 - - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_ALBEDO, value = tmp_albedo, & - vlevel=1, unit="%", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 6] output variable: snowc (unit=-). *** snow cover fraction - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWCOVER, value = NOAHMP401_struc(n)%noahmp401(t)%snowc, & - vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) - - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWCOVER, value = (NOAHMP401_struc(n)%noahmp401(t)%snowc*100.0), & - vlevel=1, unit="%", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 7] output variable: smc (unit=m3/m3). *** volumetric soil moisture - do i=1, NOAHMP401_struc(n)%nsoil - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SOILMOIST, value = NOAHMP401_struc(n)%noahmp401(t)%smc(i), & - vlevel=i, unit="m^3 m-3", direction="-", surface_type = LIS_rc%lsm_index) - end do - - ![ 8] output variable: sh2o (unit=m3/m3). *** equilibrium volumetric liquid soil moisture content - do i=1, NOAHMP401_struc(n)%nsoil - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SMLIQFRAC, value = NOAHMP401_struc(n)%noahmp401(t)%sh2o(i), & - vlevel=i, unit="m^3 m-3", direction="-", surface_type = LIS_rc%lsm_index) - end do - - ![ 9] output variable: tslb (unit=K). *** soil temperature - do i=1, NOAHMP401_struc(n)%nsoil - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SOILTEMP, value = NOAHMP401_struc(n)%noahmp401(t)%tslb(i), & - vlevel=i, unit="K", direction="-", surface_type = LIS_rc%lsm_index) - end do - - ![ 10] output variable: sneqv (unit=mm ). *** snow water equivalent - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SWE, value = NOAHMP401_struc(n)%noahmp401(t)%sneqv, & - vlevel=1, unit="kg m-2", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 11] output variable: snowh (unit=m ). *** physical snow depth - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWDEPTH, value = NOAHMP401_struc(n)%noahmp401(t)%snowh, & - vlevel=1, unit="m ", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 12] output variable: canwat (unit=kg/m2). *** total canopy water storage - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CANOPINT, value = NOAHMP401_struc(n)%noahmp401(t)%canwat, & - vlevel=1, unit="kg m-2", direction="- ", surface_type = LIS_rc%lsm_index) - - ![ 13] output variable: emiss (unit=- ). *** surface bulk emissivity - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_EMISSFORC, value = NOAHMP401_struc(n)%noahmp401(t)%emiss, & - vlevel=1, unit="- ", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 14] output variable: rs (unit=s/m). *** total stomatal resistance - ! call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RS, value = NOAHMP401_struc(n)%noahmp401(t)%rs, & - ! vlevel=1, unit="s/m", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 15] output variable: isnow (unit=-). *** actual number of snow layers - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SOWN_NLAYER, value = -1.0*NOAHMP401_struc(n)%noahmp401(t)%isnow, & - vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 16] output variable: tv (unit=K ). *** vegetation leaf temperature - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_VEGT, value = NOAHMP401_struc(n)%noahmp401(t)%tv, & - vlevel=1, unit="K", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 17] output variable: tg (unit=K). *** averaged ground surface temperature - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_GROUNDAVGT, value = NOAHMP401_struc(n)%noahmp401(t)%tg, & - vlevel=1, unit="K", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 18] output variable: canice (unit=mm). *** canopy intercepted ice - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SWEVEG, value = NOAHMP401_struc(n)%noahmp401(t)%canice, & - vlevel=1, unit="kg m-2", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 19] output variable: canliq (unit=mm). *** canopy intercepted liquid water - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CANOPY_INTL, value = NOAHMP401_struc(n)%noahmp401(t)%canliq, & - vlevel=1, unit="mm", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 20] output variable: eah (unit=Pa ). *** canopy air vapor pressure - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CANOPY_VP, value = NOAHMP401_struc(n)%noahmp401(t)%eah, & - vlevel=1, unit="Pa", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 21] output variable: tah (unit=K ). *** canopy air temperature - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CANOPY_TEMP, value = NOAHMP401_struc(n)%noahmp401(t)%tah, & - vlevel=1, unit="K", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 22] output variable: cm (unit=s/m ). *** bulk momentum drag coefficient - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CM, value = NOAHMP401_struc(n)%noahmp401(t)%cm, & - vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 23] output variable: ch (unit=s/m ). *** bulk sensible heat exchange coefficient - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CH, value = NOAHMP401_struc(n)%noahmp401(t)%ch, & - vlevel=1, unit="m", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 24] output variable: fwet (unit=- ). *** wetted or snowed fraction of canopy - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CANOPY_WF, value = NOAHMP401_struc(n)%noahmp401(t)%fwet, & - vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 25] output variable: wslake (unit=mm). *** lake water storage - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_LAKEWATER, value = NOAHMP401_struc(n)%noahmp401(t)%wslake, & - vlevel=1, unit="mm", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 26] output variable: zwt (unit=m). *** water table depth - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_WATERTABLED, value = NOAHMP401_struc(n)%noahmp401(t)%zwt, & - vlevel=1, unit="m", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 27] output variable: wa (unit=mm). *** water storage in the "aquifer" - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_GWS, value = NOAHMP401_struc(n)%noahmp401(t)%wa, & - vlevel=1, unit="mm", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 28] output variable: wt (unit=mm). *** water in aquifer and saturated soil - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_WT_AQUI_SATSOIL, value = NOAHMP401_struc(n)%noahmp401(t)%wt, & - vlevel=1, unit="mm", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 29] output variable: tsno (unit=K). *** snow layer temperature - do i=1, NOAHMP401_struc(n)%nsnow - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWTPROF, value = NOAHMP401_struc(n)%noahmp401(t)%tsno(i), & - vlevel=i, unit="K", direction="-", surface_type = LIS_rc%lsm_index) - end do - - ![ 30] output variable: snowice (unit=mm ). *** snow layer ice - do i=1, NOAHMP401_struc(n)%nsnow - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWICE, value = NOAHMP401_struc(n)%noahmp401(t)%snowice(i), & - vlevel=i, unit="mm", direction="-", surface_type = LIS_rc%lsm_index) - end do - - ![ 31] output variable: snowliq (unit=mm ). *** snow layer liquid water - do i=1, NOAHMP401_struc(n)%nsnow - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWLIQ, value = NOAHMP401_struc(n)%noahmp401(t)%snowliq(i), & - vlevel=i, unit="mm", direction="-", surface_type = LIS_rc%lsm_index) - end do - - ! Yeosang Yoon, for snow DA - ! output variable: z_snow (unit=m). *** snow layer-bottom depth from snow surface - do i=1, NOAHMP401_struc(n)%nsnow - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOW_LBDFSS, value = NOAHMP401_struc(n)%noahmp401(t)%zss(i), & - vlevel=i, unit="m", direction="-", surface_type = LIS_rc%lsm_index) - end do - - ![ 32] output variable: lfmass (unit=g/m2). *** leaf mass - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_LEAFMASS, value = NOAHMP401_struc(n)%noahmp401(t)%lfmass, & - vlevel=1, unit="g m-2", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 33] output variable: rtmass (unit=g/m2 ). *** mass of fine roots - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_ROOTMASS, value = NOAHMP401_struc(n)%noahmp401(t)%rtmass, & - vlevel=1, unit="g m-2 ", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 34] output variable: stmass (unit=g/m2 ). *** stem mass - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_STEMMASS, value = NOAHMP401_struc(n)%noahmp401(t)%stmass, & - vlevel=1, unit="g m-2", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 35] output variable: wood (unit=g/m2). *** mass of wood including woody roots - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_WOODMASS, value = NOAHMP401_struc(n)%noahmp401(t)%wood, & - vlevel=1, unit="g m-2", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 36] output variable: stblcp (unit=g/m2). *** stable carbon in deep soil - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CARBON_DEEPSOIL, value = NOAHMP401_struc(n)%noahmp401(t)%stblcp, & - vlevel=1, unit="g m-2", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 37] output variable: fastcp (unit=g/m2 ). *** short-lived carbon in shallow soil - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CARBON_SHALLOWSOIL, value = NOAHMP401_struc(n)%noahmp401(t)%fastcp, & - vlevel=1, unit="g m-2", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 38] output variable: lai (unit=-). *** leave area index - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_LAI, value = NOAHMP401_struc(n)%noahmp401(t)%lai, & - vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 39] output variable: sai (unit=- ). *** stem area index - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SAI, value = NOAHMP401_struc(n)%noahmp401(t)%sai, & - vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 40] output variable: tauss (unit=- ). *** snow aging factor - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWAGE, value = NOAHMP401_struc(n)%noahmp401(t)%tauss, & - vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 41] output variable: smcwtd (unit=m3/m3). *** soil moisture content in the layer to the water table when deep - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_BETWEENWATER, value = NOAHMP401_struc(n)%noahmp401(t)%smcwtd, & - vlevel=1, unit="m^3 m-3", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 42] output variable: deeprech (unit=m). *** recharge to the water table when groundwater is deep - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QRECTOGW, value = NOAHMP401_struc(n)%noahmp401(t)%deeprech, & - vlevel=1, unit="m", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 43] output variable: rech (unit=m). *** recharge from the water table when groundwater is shallow - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QRECFROMGW, value = NOAHMP401_struc(n)%noahmp401(t)%rech, & - vlevel=1, unit="m", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 44] output variable: t2mv (unit=K). *** 2-m air temperature over vegetated part - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_VEGE2MT, value = NOAHMP401_struc(n)%noahmp401(t)%t2mv, & - vlevel=1, unit="K", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 45] output variable: t2mb (unit=K ). *** 2-m height air temperature - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_BARE2MT, value = NOAHMP401_struc(n)%noahmp401(t)%t2mb, & - vlevel=1, unit="K", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 46] output variable: q2mv (unit=kg/kg). *** 2-m mixing ratio of vegetation part - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_VEGE2MQ2, value = NOAHMP401_struc(n)%noahmp401(t)%q2mv, & - vlevel=1, unit="kg kg-1", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 47] output variable: q2mb (unit=kg/kg). *** 2-m mixing ratio of bare ground part - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_BARE2MQ2, value = NOAHMP401_struc(n)%noahmp401(t)%q2mb, & - vlevel=1, unit="kg kg-1", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 48] output variable: trad (unit=K). *** surface radiative temperature - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RADT, value = NOAHMP401_struc(n)%noahmp401(t)%trad, & - vlevel=1, unit="K", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 49] output variable: nee (unit=g/m2/s ). *** net ecosystem exchange of CO2 - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_NEE, value = NOAHMP401_struc(n)%noahmp401(t)%nee, & - vlevel=1, unit="g m-2 s-1", direction="OUT", surface_type = LIS_rc%lsm_index) - - ![ 50] output variable: gpp (unit=g/m2/s ). *** gross primary assimilation of carbon - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_GPP, value = NOAHMP401_struc(n)%noahmp401(t)%gpp, & - vlevel=1, unit="g m-2 s-1", direction="IN", surface_type = LIS_rc%lsm_index) - - ![ 51] output variable: npp (unit=g/m2/s). *** net primary productivity of carbon - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_NPP, value = NOAHMP401_struc(n)%noahmp401(t)%npp, & - vlevel=1, unit="g m-2 s-1", direction="OUT", surface_type = LIS_rc%lsm_index) - - ![ 52] output variable: fveg (unit=-). *** Noah-MP green vegetation fraction - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_GREENNESS, value = NOAHMP401_struc(n)%noahmp401(t)%fveg, & - vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 53] output variable: runsf (unit=mm/s). *** surface runoff - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QS, value = NOAHMP401_struc(n)%noahmp401(t)%runsf, & - vlevel=1, unit="kg m-2 s-1", direction="OUT", surface_type = LIS_rc%lsm_index) - - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QS, value = NOAHMP401_struc(n)%noahmp401(t)%runsf*dt, & - vlevel=1, unit="kg m-2", direction="OUT", surface_type = LIS_rc%lsm_index) - - ![ 54] output variable: runsb (unit=mm/s ). *** baseflow (saturation excess) - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QSB, value = NOAHMP401_struc(n)%noahmp401(t)%runsb, & - vlevel=1, unit="kg m-2 s-1", direction="OUT", surface_type = LIS_rc%lsm_index) - - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QSB, value = NOAHMP401_struc(n)%noahmp401(t)%runsb*dt, & - vlevel=1, unit="kg m-2", direction="OUT", surface_type = LIS_rc%lsm_index) - - ! Combined output variable: qtot (unit=mm | mm/s). *** total runoff - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QTOT, & - value = NOAHMP401_struc(n)%noahmp401(t)%runsf + NOAHMP401_struc(n)%noahmp401(t)%runsb, & - vlevel=1, unit="kg m-2 s-1", direction="OUT", surface_type = LIS_rc%lsm_index) - - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QTOT, & - value = NOAHMP401_struc(n)%noahmp401(t)%runsf*dt + NOAHMP401_struc(n)%noahmp401(t)%runsb*dt, & - vlevel=1, unit="kg m-2", direction="OUT", surface_type = LIS_rc%lsm_index) - - ![ 55] output variable: ecan (unit=mm/s ). *** evaporation of intercepted water - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_ECANOP, value = NOAHMP401_struc(n)%noahmp401(t)%ecan, & - vlevel=1, unit="kg m-2 s-1", direction="UP", surface_type = LIS_rc%lsm_index) - - ![ 56] output variable: edir (unit=mm/s ). *** soil surface evaporation rate - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_ESOIL, value = NOAHMP401_struc(n)%noahmp401(t)%edir, & - vlevel=1, unit="kg m-2 s-1", direction="UP", surface_type = LIS_rc%lsm_index) - - ![ 57] output variable: etran (unit=mm/s ). *** transpiration rate - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_TVEG, value = NOAHMP401_struc(n)%noahmp401(t)%etran, & - vlevel=1, unit="kg m-2 s-1", direction="UP", surface_type = LIS_rc%lsm_index) - - ![ 58] output variable: fsa (unit=W/m2). *** total absorbed solar radiation - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SWNET, value = NOAHMP401_struc(n)%noahmp401(t)%fsa, & - vlevel=1, unit="W m-2", direction="DN", surface_type = LIS_rc%lsm_index) - - ![ 59] output variable: fira (unit=W/m2 ). *** total net longwave radiation [+ to atm] - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_LWUP, value = NOAHMP401_struc(n)%noahmp401(t)%fira, & - vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) - - ![ 60] output variable: apar (unit=W/m2). *** photosynthesis active energy by canopy - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_APAR, value = NOAHMP401_struc(n)%noahmp401(t)%apar, & - vlevel=1, unit="W m-2", direction="IN", surface_type = LIS_rc%lsm_index) - - ![ 61] output variable: psn (unit=umol/m2/s ). *** total photosynthesis of CO2 [+] - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_PSCO2, value = NOAHMP401_struc(n)%noahmp401(t)%psn, & - vlevel=1, unit="umol m-2 s-1", direction="IN", surface_type = LIS_rc%lsm_index) - - !![ 62] output variable: sav (unit=W/m2 ). *** solar radiation absorbed by vegetation - !call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SAV, value = NOAHMP401_struc(n)%noahmp401(t)%sav, & - ! vlevel=1, unit="W/m2 ", direction="IN", surface_type = LIS_rc%lsm_index) - - ![ 63] output variable: sag (unit=W/m2 ). *** solar radiation absorbed by ground - !call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SAQ, value = NOAHMP401_struc(n)%noahmp401(t)%sag, & - ! vlevel=1, unit="W/m2 ", direction="IN", surface_type = LIS_rc%lsm_index) - - ![ 64] output variable: rssun (unit=s/m). *** sunlit leaf stomatal resistance - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RSSUN, value = NOAHMP401_struc(n)%noahmp401(t)%rssun, & - vlevel=1, unit="s m-1", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 65] output variable: rssha (unit=s/m). *** shaded leaf stomatal resistance - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RSSHA, value = NOAHMP401_struc(n)%noahmp401(t)%rssha, & - vlevel=1, unit="s m-1", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 66] output variable: bgap (unit=-). *** between gap fraction - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_BGAP, value = NOAHMP401_struc(n)%noahmp401(t)%bgap, & - vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 67] output variable: wgap (unit=- ). *** within gap fraction - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_WGAP, value = NOAHMP401_struc(n)%noahmp401(t)%wgap, & - vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 68] output variable: tgb (unit=K). *** bare ground temperature - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_BARESOILT, value = NOAHMP401_struc(n)%noahmp401(t)%tgb, & - vlevel=1, unit="K", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 69] output variable: tgv (unit=K). *** vegetated ground surface temperature - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_GROUNDVEGT, value = NOAHMP401_struc(n)%noahmp401(t)%tgv, & - vlevel=1, unit="K", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 70] output variable: chv (unit=s/m). *** sensible heat exchange coefficient over vegetated fraction - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CHV, value = NOAHMP401_struc(n)%noahmp401(t)%chv, & - vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 71] output variable: chb (unit=s/m). *** sensible heat exchange coefficient over bare-ground fraction - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CHB, value = NOAHMP401_struc(n)%noahmp401(t)%chb, & - vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 72] output variable: shg (unit=W/m2 ). *** get ground sensible heat [+ to atm] - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SHG, value = NOAHMP401_struc(n)%noahmp401(t)%shg, & - vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) - - ![ 73] output variable: shc (unit=W/m2 ). *** canopy sensible heat [+ to atm] - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SHC, value = NOAHMP401_struc(n)%noahmp401(t)%shc, & - vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) - - ![ 74] output variable: shb (unit=W/m2 ). *** bare ground sensible heat [+ to atm] - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SHB, value = NOAHMP401_struc(n)%noahmp401(t)%shb, & - vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) - - ![ 75] output variable: evg (unit=W/m2 ). *** veg ground evaporation [+ to atm] - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_EVG, value = NOAHMP401_struc(n)%noahmp401(t)%evg, & - vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) - - ![ 76] output variable: evb (unit=W/m2 ). *** bare soil evaporation [+ to atm] - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_EVB, value = NOAHMP401_struc(n)%noahmp401(t)%evb, & - vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) - - ![ 77] output variable: ghv (unit=W/m2 ). *** vegetated ground heat flux [+ to soil] - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_GHV, value = NOAHMP401_struc(n)%noahmp401(t)%ghv, & - vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) - - ![ 78] output variable: ghb (unit=W/m2 ). *** bare ground heat flux [+ to soil] - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_GHB, value = NOAHMP401_struc(n)%noahmp401(t)%ghb, & - vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) - - ![ 79] output variable: irg (unit=W/m2 ). *** veg ground net long wave radiation [+ to atm] - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_IRV, value = NOAHMP401_struc(n)%noahmp401(t)%irg, & - vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) - - ![ 80] output variable: irc (unit=W/m2 ). *** canopy net long wave radiation [+ to atm] - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_IRC, value = NOAHMP401_struc(n)%noahmp401(t)%irc, & - vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) - - ![ 81] output variable: irb (unit=W/m2 ). *** bare net long wave radiation [+ to atm] - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_IRB, value = NOAHMP401_struc(n)%noahmp401(t)%irb, & - vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) - - ![ 82] output variable: tr (unit=W/m2 ). *** transpiration heat [to atm] - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_HTR, value = NOAHMP401_struc(n)%noahmp401(t)%tr, & - vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) - - ![ 83] output variable: evc (unit=W/m2 ). *** canopy evaporation heat [to atm] - !call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_EVC, value = NOAHMP401_struc(n)%noahmp401(t)%evc, & - ! vlevel=1, unit="W/m2 ", direction="UP", surface_type = LIS_rc%lsm_index) - - ![ 84] output variable: chleaf (unit=m/s). *** leaf exchange coefficient - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CHLEAF, value = NOAHMP401_struc(n)%noahmp401(t)%chleaf, & - vlevel=1, unit="m s-1", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 85] output variable: chuc (unit=m/s). *** under canopy exchange coefficient - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CHUC, value = NOAHMP401_struc(n)%noahmp401(t)%chuc, & - vlevel=1, unit="m s-1", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 86] output variable: chv2 (unit=m/s). *** veg 2m exchange coefficient - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CHV2, value = NOAHMP401_struc(n)%noahmp401(t)%chv2, & - vlevel=1, unit="m s-1", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 87] output variable: chb2 (unit=m/s). *** bare 2m exchange coefficient - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CHB2, value = NOAHMP401_struc(n)%noahmp401(t)%chb2, & - vlevel=1, unit="m s-1", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 88] output variable: evap (unit=kg/m2/s). *** total evapotranspiration - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_EVAP, value = NOAHMP401_struc(n)%noahmp401(t)%qfx, & - vlevel=1, unit="kg m-2 s-1", direction="UP", surface_type = LIS_rc%lsm_index) - !PET - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_POTEVAP, & - value=(tmp_fgev_pet+tmp_fcev_pet+tmp_fctr_pet), vlevel=1,unit="W m-2",& - direction="UP",surface_type=LIS_rc%lsm_index) - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_POTEVAP, & - value=(tmp_fgev_pet+tmp_fcev_pet+tmp_fctr_pet)/LVH2O, vlevel=1,unit="kg m-2 s-1",& - direction="UP",surface_type=LIS_rc%lsm_index) - - ![ 89] output variable: rainf (unit=kg/m2). *** precipitation rate - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RAINF, value = NOAHMP401_struc(n)%noahmp401(t)%rainf, & - vlevel=1, unit="kg m-2 s-1", direction="DN", surface_type = LIS_rc%lsm_index) - - ![ 90] output variable: snowf (unit=kg/m2). *** snowfall rate - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWF, value = NOAHMP401_struc(n)%noahmp401(t)%snowf, & - vlevel=1, unit="kg m-2 s-1", direction="DN", surface_type = LIS_rc%lsm_index) - - ![ 91] LWnet - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_LWNET,vlevel=1, & - value=(-1.0 * NOAHMP401_struc(n)%noahmp401(t)%fira), & - unit="W m-2", direction="DN", surface_type=LIS_rc%lsm_index) - - ! Code added by Zhuo Wang on 02/28/2019 - ![ 92] output variable: qsnbot (unit=kg m-2 s-1). *** melting water out of snow bottom - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QSM, value = tmp_qsnbot, & - vlevel=1, unit="kg m-2 s-1", direction="S2L", surface_type = LIS_rc%lsm_index) - - ![ 93] output variable: subsnow (unit=kg m-2 s-1). *** snow sublimation - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SUBSNOW, value = tmp_subsnow, & - vlevel=1, unit="kg m-2 s-1", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 94] output variable: AvgSurfT (unit=K). *** average surface temperature - AvgSurfT_out = NOAHMP401_struc(n)%noahmp401(t)%fveg * NOAHMP401_struc(n)%noahmp401(t)%tv + & - (1.0-NOAHMP401_struc(n)%noahmp401(t)%fveg) * NOAHMP401_struc(n)%noahmp401(t)%tgb - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_AVGSURFT, value = AvgSurfT_out, & - vlevel=1, unit="K", direction="-",surface_type = LIS_rc%lsm_index) - - ![ 95] TWS should be SWE + CanopInt + Soil moisture + WA - David Mocko - TWS_out = NOAHMP401_struc(n)%noahmp401(t)%sneqv - if ((NOAHMP401_struc(n)%noahmp401(t)%canliq.ge.0.0).and. & - (NOAHMP401_struc(n)%noahmp401(t)%canice.ge.0.0)) then - TWS_out = TWS_out + & - (NOAHMP401_struc(n)%noahmp401(t)%canliq + & - NOAHMP401_struc(n)%noahmp401(t)%canice) - endif - do i = 1,NOAHMP401_struc(n)%nsoil - TWS_out = TWS_out + & - (NOAHMP401_struc(n)%noahmp401(t)%smc(i) * & - tmp_sldpth(i)*LIS_CONST_RHOFW) - enddo - if (NOAHMP401_struc(n)%noahmp401(t)%wa.ge.0.0) then - TWS_out = TWS_out + NOAHMP401_struc(n)%noahmp401(t)%wa - endif - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_TWS, value = TWS_out, & - vlevel=1, unit="mm", direction="-", surface_type = LIS_rc%lsm_index) - - ![ 96] Qa - Advective energy - Heat transferred to a snow cover by rain - ! - (unit=W m-2) - added by David Mocko - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QA, value = tmp_pah, & - vlevel=1, unit="W m-2",direction="DN",surface_type=LIS_rc%lsm_index) - -! Added water balance change terms - David Mocko - endsm = 0.0 - do i = 1,tmp_nsoil - endsm = endsm + & - (tmp_smc(i) * tmp_sldpth(i) * LIS_CONST_RHOFW) - enddo - call LIS_diagnoseSurfaceOutputVar(n,t,LIS_MOC_DELSOILMOIST,& - value=(endsm - startsm),vlevel=1,unit="kg m-2", & - direction="INC",surface_type=LIS_rc%lsm_index) - call LIS_diagnoseSurfaceOutputVar(n,t,LIS_MOC_DELSWE, & - value=(NOAHMP401_struc(n)%noahmp401(t)%sneqv - & - startswe), & - vlevel=1,unit="kg m-2",direction="INC", & - surface_type=LIS_rc%lsm_index) - call LIS_diagnoseSurfaceOutputVar(n,t,LIS_MOC_DELINTERCEPT,& - value=((NOAHMP401_struc(n)%noahmp401(t)%canliq + & - NOAHMP401_struc(n)%noahmp401(t)%canice) - & - startint), & - vlevel=1,unit="kg m-2",direction="INC", & - surface_type=LIS_rc%lsm_index) -! For now, the ALMA standard does not provide a variable for the -! change in groundwater storage. Instead, temporarily writing it -! to the DELSURFSTOR (which is the change in surface water storage). -! This is only a temporary fix, until LIS_MOC_DELGROUNDWATER or -! a similarly-named variable is added into LIS_histDataMod.F90. - call LIS_diagnoseSurfaceOutputVar(n,t,LIS_MOC_DELSURFSTOR, & - value=(NOAHMP401_struc(n)%noahmp401(t)%wa - & - startgw), & - vlevel=1,unit="kg m-2",direction="INC", & - surface_type=LIS_rc%lsm_index) - -! David Mocko (10/29/2019) - Copy RELSMC calculation from Noah-3.X - do i = 1,tmp_nsoil - if (tmp_relsmc(i).gt.1.0) then - tmp_relsmc(i) = 1.0 - endif - if (tmp_relsmc(i).lt.0.01) then - tmp_relsmc(i) = 0.01 - endif - -! J.Case (9/11/2014) -- Set relative soil moisture to missing (LIS_rc%udef) -! if the vegetation type is urban class. - if (tmp_vegetype.eq.tmp_urban_vegetype) then - tmp_relsmc(i) = LIS_rc%udef - endif - call LIS_diagnoseSurfaceOutputVar(n,t,LIS_MOC_RELSMC,vlevel=i, & - value=tmp_relsmc(i),unit='-',direction="-",surface_type=LIS_rc%lsm_index) - if (tmp_relsmc(i).eq.LIS_rc%udef) then - tempval = tmp_relsmc(i) - else - tempval = tmp_relsmc(i)*100.0 - endif - call LIS_diagnoseSurfaceOutputVar(n,t,LIS_MOC_RELSMC,vlevel=i, & - value=tempval,unit='%',direction="-",surface_type=LIS_rc%lsm_index) - enddo - - ! reset forcing variables to zeros - NOAHMP401_struc(n)%noahmp401(t)%tair = 0.0 - NOAHMP401_struc(n)%noahmp401(t)%psurf = 0.0 - NOAHMP401_struc(n)%noahmp401(t)%wind_e = 0.0 - NOAHMP401_struc(n)%noahmp401(t)%wind_n = 0.0 - NOAHMP401_struc(n)%noahmp401(t)%qair = 0.0 - NOAHMP401_struc(n)%noahmp401(t)%swdown = 0.0 - NOAHMP401_struc(n)%noahmp401(t)%lwdown = 0.0 - NOAHMP401_struc(n)%noahmp401(t)%prcp = 0.0 - - enddo ! end of tile (t) loop - ! reset forcing counter to be zero - NOAHMP401_struc(n)%forc_count = 0 - - endif ! end of alarmCheck loop - - deallocate( tmp_sldpth ) - deallocate( tmp_shdfac_monthly ) - deallocate( tmp_soilcomp ) - deallocate( tmp_smc ) - deallocate( tmp_sh2o ) - deallocate( tmp_tslb ) - deallocate( tmp_tsno ) - deallocate( tmp_zss ) - deallocate( tmp_snowice ) - deallocate( tmp_snowliq ) - deallocate( tmp_smoiseq ) - deallocate( tmp_gecros_state ) - - ! EMK...See if noahmp401_struc(n)%noahmp401(t)%tair_agl_min needs to be - ! reset for calculating RHMin. - write(fnest,'(i3.3)') n - alarmCheck = LIS_isAlarmRinging(LIS_rc, & - "NoahMP401 RHMin alarm "//trim(fnest)) - if (alarmCheck) then - write(LIS_logunit,*) & - '[INFO] Resetting tair_agl_min for RHMin calculation' - do t = 1,LIS_rc%npatch(n,LIS_rc%lsm_index) - noahmp401_struc(n)%noahmp401(t)%tair_agl_min = 999. - end do - end if - -end subroutine NoahMP401_main diff --git a/lis/surfacemodels/land/noahmp.new/NoahMP401_f2t.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_f2t.F90 similarity index 67% rename from lis/surfacemodels/land/noahmp.new/NoahMP401_f2t.F90 rename to lis/surfacemodels/land/noahmp.new/NoahMPnew_f2t.F90 index 07721e343..8a75b4adc 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMP401_f2t.F90 +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_f2t.F90 @@ -9,8 +9,8 @@ !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: NoahMP401_f2t -! \label{NoahMP401_f2t} +! !ROUTINE: NoahMPnew_f2t +! \label{NoahMPnew_f2t} ! ! !REVISION HISTORY: ! This subroutine is generated with the Model Implementation Toolkit developed @@ -18,16 +18,17 @@ ! specification of the subroutine is defined by Sujay Kumar. ! ! 10/25/18: Shugong Wang, Zhuo Wang; Initial implementation for LIS 7 and NoahMP401 -! +! May 2023: Cenlin He; updated for Noah-MP v5 (refactored) and later + ! !INTERFACE: -subroutine NoahMP401_f2t(n) +subroutine NoahMPnew_f2t(n) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc , LIS_surface use LIS_metforcingMod, only : LIS_FORC_State use LIS_logMod, only : LIS_verify use LIS_FORC_AttributesMod - use NoahMP401_lsmMod + use NoahMPnew_lsmMod implicit none ! !ARGUMENTS: @@ -89,109 +90,109 @@ subroutine NoahMP401_f2t(n) !!! GET FORCING FIELDS FROM LIS ! get near surface air temperature call ESMF_StateGet(LIS_FORC_State(n), trim(LIS_FORC_Tair%varname(1)), tmpField, rc=status) - call LIS_verify(status, "NoahMP401_f2t: error getting Tair") + call LIS_verify(status, "NoahMPnew_f2t: error getting Tair") call ESMF_FieldGet(tmpField, localDE = 0, farrayPtr = tmp, rc = status) - call LIS_verify(status, "NoahMP401_f2t: error retrieving Tair") + call LIS_verify(status, "NoahMPnew_f2t: error retrieving Tair") ! get near surface specific humidity call ESMF_StateGet(LIS_FORC_State(n), trim(LIS_FORC_Qair%varname(1)), q2Field, rc=status) - call LIS_verify(status, "NoahMP401_f2t: error getting Qair") + call LIS_verify(status, "NoahMPnew_f2t: error getting Qair") call ESMF_FieldGet(q2Field, localDE = 0, farrayPtr = q2, rc = status) - call LIS_verify(status, "NoahMP401_f2t: error retrieving Qair") + call LIS_verify(status, "NoahMPnew_f2t: error retrieving Qair") ! get incident shortwave radiation call ESMF_StateGet(LIS_FORC_State(n), trim(LIS_FORC_SWdown%varname(1)), swdField, rc=status) - call LIS_verify(status, "NoahMP401_f2t: error getting Swdown") + call LIS_verify(status, "NoahMPnew_f2t: error getting Swdown") call ESMF_FieldGet(swdField, localDE = 0, farrayPtr = swd, rc = status) - call LIS_verify(status, "NoahMP401_f2t: error retrieving Swdown") + call LIS_verify(status, "NoahMPnew_f2t: error retrieving Swdown") ! get incident longwave radiation call ESMF_StateGet(LIS_FORC_State(n), trim(LIS_FORC_LWdown%varname(1)), lwdField, rc=status) - call LIS_verify(status, "NoahMP401_f2t: error getting Lwdown") + call LIS_verify(status, "NoahMPnew_f2t: error getting Lwdown") call ESMF_FieldGet(lwdField, localDE = 0, farrayPtr = lwd, rc = status) - call LIS_verify(status, "NoahMP401_f2t: error retrieving Lwdown") + call LIS_verify(status, "NoahMPnew_f2t: error retrieving Lwdown") ! get eastward wind call ESMF_StateGet(LIS_FORC_State(n), trim(LIS_FORC_Wind_E%varname(1)), uField, rc=status) - call LIS_verify(status, "NoahMP401_f2t: error getting Wind_E") + call LIS_verify(status, "NoahMPnew_f2t: error getting Wind_E") call ESMF_FieldGet(uField, localDE = 0, farrayPtr = uwind, rc = status) - call LIS_verify(status, "NoahMP401_f2t: error retrieving Wind_E") + call LIS_verify(status, "NoahMPnew_f2t: error retrieving Wind_E") ! get northward wind call ESMF_StateGet(LIS_FORC_State(n), trim(LIS_FORC_Wind_N%varname(1)), vField, rc=status) - call LIS_verify(status, "NoahMP401_f2t: error getting Wind_N") + call LIS_verify(status, "NoahMPnew_f2t: error getting Wind_N") call ESMF_FieldGet(vField, localDE = 0, farrayPtr = vwind, rc = status) - call LIS_verify(status, "NoahMP401_f2t: error retrieving Wind_N") + call LIS_verify(status, "NoahMPnew_f2t: error retrieving Wind_N") ! get surface pressure call ESMF_StateGet(LIS_FORC_State(n), trim(LIS_FORC_Psurf%varname(1)), psurfField, rc=status) - call LIS_verify(status, "NoahMP401_f2t: error getting Psurf") + call LIS_verify(status, "NoahMPnew_f2t: error getting Psurf") call ESMF_FieldGet(psurfField, localDE = 0, farrayPtr = psurf, rc = status) - call LIS_verify(status, "NoahMP401_f2t: error retrieving Psurf") + call LIS_verify(status, "NoahMPnew_f2t: error retrieving Psurf") ! get rainfall rate call ESMF_StateGet(LIS_FORC_State(n), trim(LIS_FORC_Rainf%varname(1)), pcpField, rc=status) - call LIS_verify(status, "NoahMP401_f2t: error getting Rainf") + call LIS_verify(status, "NoahMPnew_f2t: error getting Rainf") call ESMF_FieldGet(pcpField, localDE = 0, farrayPtr = pcp, rc = status) - call LIS_verify(status, "NoahMP401_f2t: error retrieving Rainf") + call LIS_verify(status, "NoahMPnew_f2t: error retrieving Rainf") ! get snowfall rate if(LIS_Forc_Snowf%selectOpt .eq. 1) then call ESMF_StateGet(LIS_FORC_State(n), trim(LIS_FORC_Snowf%varname(1)), snowField, rc=status) - call LIS_verify(status, "NoahMP401_f2t: error getting Snowf") + call LIS_verify(status, "NoahMPnew_f2t: error getting Snowf") call ESMF_FieldGet(snowField, localDE = 0, farrayPtr = snowf, rc = status) - call LIS_verify(status, "NoahMP401_f2t: error retrieving Snowf") + call LIS_verify(status, "NoahMPnew_f2t: error retrieving Snowf") endif !!! set the forcing counter - NOAHMP401_struc(n)%forc_count = NOAHMP401_struc(n)%forc_count + 1 + NOAHMPnew_struc(n)%forc_count = NOAHMPnew_struc(n)%forc_count + 1 !!! pass forcing data to tiles do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) tid = LIS_surface(n, LIS_rc%lsm_index)%tile(t)%tile_id ! TAIR - NOAHMP401_struc(n)%noahmp401(t)%tair = NOAHMP401_struc(n)%noahmp401(t)%tair + tmp(tid) + NoahMPnew_struc(n)%noahmpnew(t)%tair = NoahMPnew_struc(n)%noahmpnew(t)%tair + tmp(tid) ! QAIR - NOAHMP401_struc(n)%noahmp401(t)%qair = NOAHMP401_struc(n)%noahmp401(t)%qair + q2(tid) + NoahMPnew_struc(n)%noahmpnew(t)%qair = NoahMPnew_struc(n)%noahmpnew(t)%qair + q2(tid) ! SWDOWN - NOAHMP401_struc(n)%noahmp401(t)%swdown = NOAHMP401_struc(n)%noahmp401(t)%swdown + swd(tid) + NoahMPnew_struc(n)%noahmpnew(t)%swdown = NoahMPnew_struc(n)%noahmpnew(t)%swdown + swd(tid) ! LWDOWN - NOAHMP401_struc(n)%noahmp401(t)%lwdown = NOAHMP401_struc(n)%noahmp401(t)%lwdown + lwd(tid) + NoahMPnew_struc(n)%noahmpnew(t)%lwdown = NoahMPnew_struc(n)%noahmpnew(t)%lwdown + lwd(tid) ! WIND_E - NOAHMP401_struc(n)%noahmp401(t)%wind_e = NOAHMP401_struc(n)%noahmp401(t)%wind_e + uwind(tid) + NoahMPnew_struc(n)%noahmpnew(t)%wind_e = NoahMPnew_struc(n)%noahmpnew(t)%wind_e + uwind(tid) ! WIND_N - NOAHMP401_struc(n)%noahmp401(t)%wind_n = NOAHMP401_struc(n)%noahmp401(t)%wind_n + vwind(tid) + NoahMPnew_struc(n)%noahmpnew(t)%wind_n = NoahMPnew_struc(n)%noahmpnew(t)%wind_n + vwind(tid) ! PSURF - NOAHMP401_struc(n)%noahmp401(t)%psurf = NOAHMP401_struc(n)%noahmp401(t)%psurf + psurf(tid) + NoahMPnew_struc(n)%noahmpnew(t)%psurf = NoahMPnew_struc(n)%noahmpnew(t)%psurf + psurf(tid) ! RAINF - NOAHMP401_struc(n)%noahmp401(t)%prcp = NOAHMP401_struc(n)%noahmp401(t)%prcp + pcp(tid) + NoahMPnew_struc(n)%noahmpnew(t)%prcp = NoahMPnew_struc(n)%noahmpnew(t)%prcp + pcp(tid) ! SNOWF - ! If there is snowf add it to precipitation. Noah-MP-4.0.1 does not use + ! If there is snowf add it to precipitation. Noah-MP does not use ! separate rainf and snowf. It determines what to do with precipitation. if (LIS_Forc_Snowf%selectOpt.eq.1) then if (snowf(tid) .ne. LIS_rc%udef) then - NOAHMP401_struc(n)%noahmp401(t)%prcp = NOAHMP401_struc(n)%noahmp401(t)%prcp + snowf(tid) + NoahMPnew_struc(n)%noahmpnew(t)%prcp = NoahMPnew_struc(n)%noahmpnew(t)%prcp + snowf(tid) endif endif enddo -end subroutine NoahMP401_f2t +end subroutine NoahMPnew_f2t diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_lsmMod.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_lsmMod.F90 index 207393505..0d3127058 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_lsmMod.F90 +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_lsmMod.F90 @@ -238,6 +238,7 @@ module NoahMPnew_lsmMod integer :: irr_opt integer :: irrm_opt integer :: tdrn_opt + integer :: infdv_opt integer :: urban_opt type(NoahMPnewdec), pointer :: noahmpnew(:) end type NoahMPnew_type_dec diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_main.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_main.F90 new file mode 100644 index 000000000..08d87b36c --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_main.F90 @@ -0,0 +1,1085 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- + +#include "LIS_misc.h" +!BOP +! +! !ROUTINE: NoahMPnew_main +! \label{NoahMPnew_main} +! +! !REVISION HISTORY: +! This subroutine is generated with the Model Implementation Toolkit +! developed by Shugong Wang for the NASA Land Information System V7. +! The initial specification of the subroutine is by Sujay Kumar. +! +! 10/25/18: Shugong Wang, Zhuo Wang; initial implementation for NoahMPnew with LIS-7 +! 05/15/19: Yeosang Yoon; code added for snow DA to work +! 10/29/19: David Mocko; Added RELSMC to output, and an option +! for different units for Qs/Qsb/Albedo +! 03/09/22: David Mocko: Fixed "input LAI" for dynamic vegetation options 7/8/9 +! 05/23/23: Cenlin He: modified for refactored NoahMP v5 and later + +! !INTERFACE: +subroutine NoahMPnew_main(n) +! !USES: + use LIS_coreMod + use LIS_histDataMod + use LIS_timeMgrMod, only : LIS_isAlarmRinging + use LIS_constantsMod, only : LIS_CONST_RHOFW !New + use LIS_vegDataMod, only : LIS_lai, LIS_sai + use LIS_logMod, only : LIS_logunit, LIS_endrun + use LIS_FORC_AttributesMod + use NoahMPnew_lsmMod + use NoahmpIOVarType + use NoahmpIOVarInitMod, only : NoahmpIOVarInitDefault + + implicit none +! !ARGUMENTS: + integer, intent(in) :: n + integer :: t + integer :: i + real :: dt + real :: lat, lon + real :: tempval + integer :: row, col, tid + integer :: year, month, day, hour, minute, second + logical :: alarmCheck + +! +! !DESCRIPTION: +! This is the entry point for calling the NoahMPnew physics. +! This routine calls the {\tt noahmp_driver_new} routine that performs +! the land surface computations, to solve water and energy equations. + +! The arguments are: +! \begin{description} +! \item[n] +! index of the nest +! \end{description} +!EOP + +! define variables for NoahMPnew + + ! Code added by Zhuo Wang 02/28/2019 + real :: AvgSurfT_out ! average surface temperature [K] + real :: TWS_out ! terrestrial water storage [mm] + ! Code added by David Mocko 04/25/2019 + real :: startsm, startswe, startint, startgw, endsm + + ! EMK for 557WW + real :: tmp_q2sat, tmp_es + character*3 :: fnest + REAL, PARAMETER:: LVH2O = 2.501000E+6 ! Latent heat for evapo for water + + ! -------------------------------- + + ! check NoahMPnew alarm. If alarm is ring, run model. + + alarmCheck = LIS_isAlarmRinging(LIS_rc, "NoahMPnew model alarm") + + ! initialize NoahmpIO 1-D variables + NoahmpIO%xstart = 1 + NoahmpIO%xend = 1 + NoahmpIO%ystart = 1 + NoahmpIO%yend = 1 + NoahmpIO%ids = NoahmpIO%xstart + NoahmpIO%ide = NoahmpIO%xend + NoahmpIO%jds = NoahmpIO%ystart + NoahmpIO%jde = NoahmpIO%yend + NoahmpIO%kds = 1 + NoahmpIO%kde = 2 + NoahmpIO%its = NoahmpIO%xstart + NoahmpIO%ite = NoahmpIO%xend + NoahmpIO%jts = NoahmpIO%ystart + NoahmpIO%jte = NoahmpIO%yend + NoahmpIO%kts = 1 + NoahmpIO%kte = 2 + NoahmpIO%ims = NoahmpIO%xstart + NoahmpIO%ime = NoahmpIO%xend + NoahmpIO%jms = NoahmpIO%ystart + NoahmpIO%jme = NoahmpIO%yend + NoahmpIO%kms = 1 + NoahmpIO%kme = 2 + + NoahmpIO%NSOIL = NoahMPnew_struc(n)%nsoil + NoahmpIO%NSNOW = NoahMPnew_struc(n)%nsnow + + call NoahmpIOVarInitDefault() ! initialize NoahmpIO to undefined/default value + + if (alarmCheck) Then + do t = 1, LIS_rc%npatch(n, LIS_rc%lsm_index) + dt = LIS_rc%ts + row = LIS_surface(n, LIS_rc%lsm_index)%tile(t)%row + col = LIS_surface(n, LIS_rc%lsm_index)%tile(t)%col + lat = LIS_domain(n)%grid(LIS_domain(n)%gindex(col, row))%lat + lon = LIS_domain(n)%grid(LIS_domain(n)%gindex(col, row))%lon + + ! retrieve forcing data from NoahMPnew_struc(n)%noahmpnew(t) and assign to 1-D NoahmpIO variables + ! T_PHY: air temperature + NoahmpIO%T_PHY(1,1,1) = NoahMPnew_struc(n)%noahmpnew(t)%tair / NoahMPnew_struc(n)%forc_count + ! Yeosang Yoon, for snow DA + NoahMPnew_struc(n)%noahmpnew(t)%sfctmp = NoahmpIO%T_PHY(1,1,1) + + ! P8W: air pressure + NoahmpIO%P8W(1,1,1) = NoahMPnew_struc(n)%noahmpnew(t)%psurf / NoahMPnew_struc(n)%forc_count + + ! U_PHY: U wind component + NoahmpIO%U_PHY(1,1,1) = NoahMPnew_struc(n)%noahmpnew(t)%wind_e / NoahMPnew_struc(n)%forc_count + + ! V_PHY: V wind component + NoahmpIO%V_PHY(1,1,1) = NoahMPnew_struc(n)%noahmpnew(t)%wind_n / NoahMPnew_struc(n)%forc_count + + ! QV_CURR: specific humidity + NoahmpIO%QV_CURR(1,1,1) = NoahMPnew_struc(n)%noahmpnew(t)%qair / NoahMPnew_struc(n)%forc_count + + ! SWDOWN: downward solar radiation + NoahmpIO%SWDOWN(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%swdown / NoahMPnew_struc(n)%forc_count + + ! GLW: downward longwave radiation + NoahmpIO%GLW(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%lwdown / NoahMPnew_struc(n)%forc_count + + ! prcp: total precipitation (rainfall+snowfall) + ! Noah-MP require total precipitation as forcing input. [mm per model timestep] + ! T. Lahmers: Correct total precip for cases when model time step > forcing timestep. + ! Edit suggested by D. Mocko and K. Arsenault + !if (NoahMPnew_struc(n)%ts > LIS_rc%ts) then + NoahmpIO%RAINBL(1,1) = NoahMPnew_struc(n)%ts * & + (NoahMPnew_struc(n)%noahmpnew(t)%prcp / NoahMPnew_struc(n)%forc_count) + !else + ! NoahmpIO%RAINBL(1,1) = dt * (NoahMPnew_struc(n)%noahmpnew(t)%prcp / NoahMPnew_struc(n)%forc_count) + !endif + + !ag(05Jan2021) + ! rivsto/fldsto: River storage and flood storage + ! NoahMPnew_struc(n)%noahmpnew(t)%rivsto and NoahMPnew_struc(n)%noahmpnew(t)%fldsto + ! are updated in noahmpnew_getsws_hymap2.F90 + NoahmpIO%rivsto(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%rivsto + NoahmpIO%fldsto(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%fldsto + NoahmpIO%fldfrc(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%fldfrc + + ! check validity of tair + if(NoahmpIO%T_PHY(1,1,1) .eq. LIS_rc%udef) then + write(LIS_logunit, *) "[ERR] undefined value found for forcing variable tair in NoahMPnew" + write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon + call LIS_endrun() + endif + ! check validity of psurf + if(NoahmpIO%P8W(1,1,1) .eq. LIS_rc%udef) then + write(LIS_logunit, *) "[ERR] undefined value found for forcing variable psurf in NoahMPnew" + write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon + call LIS_endrun() + endif + ! check validity of wind_e + if(NoahmpIO%U_PHY(1,1,1) .eq. LIS_rc%udef) then + write(LIS_logunit, *) "[ERR] undefined value found for forcing variable wind_e in NoahMPnew" + write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon + call LIS_endrun() + endif + ! check validity of wind_n + if(NoahmpIO%V_PHY(1,1,1) .eq. LIS_rc%udef) then + write(LIS_logunit, *) "[ERR] undefined value found for forcing variable wind_n in NoahMPnew" + write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon + call LIS_endrun() + endif + ! check validity of qair + if(NoahmpIO%QV_CURR(1,1,1) .eq. LIS_rc%udef) then + write(LIS_logunit, *) "[ERR] undefined value found for forcing variable qair in NoahMPnew" + write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon + call LIS_endrun() + endif + ! check validity of swdown + if(NoahmpIO%SWDOWN(1,1) .eq. LIS_rc%udef) then + write(LIS_logunit, *) "[ERR] undefined value found for forcing variable swdown in NoahMPnew" + write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon + call LIS_endrun() + endif + ! check validity of lwdown + if(NoahmpIO%GLW(1,1) .eq. LIS_rc%udef) then + write(LIS_logunit, *) "[ERR] undefined value found for forcing variable lwdown in NoahMPnew" + write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon + call LIS_endrun() + endif + ! check validity of prcp + if(NoahmpIO%RAINBL(1,1) .eq. LIS_rc%udef) then + write(LIS_logunit, *) "[ERR] undefined value found for forcing variable prcp in NoahMPnew" + write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon + call LIS_endrun() + endif + ! + + !ag (05Jan2021) + ! check validity of rivsto + if(NoahmpIO%rivsto(1,1) .eq. LIS_rc%udef) then + write(LIS_logunit, *) "[ERR] undefined value found for forcing variable rivsto in NoahMP36" + write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon + call LIS_endrun() + endif + ! check validity of fldsto + if(NoahmpIO%fldsto(1,1) .eq. LIS_rc%udef) then + write(LIS_logunit, *) "[ERR] undefined value found for forcing variable fldsto in NoahMP36" + write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon + call LIS_endrun() + endif + ! check validity of fldfrc + if(NoahmpIO%fldfrc(1,1) .eq. LIS_rc%udef) then + write(LIS_logunit, *) "[ERR] undefined value found for forcing variable fldfrc in NoahMP36" + write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon + call LIS_endrun() + endif + ! + + NoahmpIO%latitude = lat + NoahmpIO%longitude = lon + NoahmpIO%year = LIS_rc%yr + NoahmpIO%month = LIS_rc%mo + NoahmpIO%day = LIS_rc%da + NoahmpIO%hour = LIS_rc%hr + NoahmpIO%minute = LIS_rc%mn + + ! Added by Zhuo Wang on 11/13/2018 + NoahmpIO%ttile = t + NoahmpIO%itimestep = LIS_rc%tscount(n) + + ! get parameters + NoahmpIO%dtbl = NoahMPnew_struc(n)%ts + NoahmpIO%soiltstep = NoahMPnew_struc(n)%ts_soil + NoahmpIO%dzs(:) = NoahMPnew_struc(n)%sldpth(:) + NoahmpIO%nsoil = NoahMPnew_struc(n)%nsoil + NoahmpIO%nsnow = NoahMPnew_struc(n)%nsnow + NoahmpIO%ivgtyp(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%vegetype + NoahmpIO%isltyp(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%soiltype + ! Multiply shdfac by 100.0 because noahmpdrv.f90 + ! expects it in units of percentage, not fraction. + NoahmpIO%shdfac_monthly(1,:,1) = NoahMPnew_struc(n)%noahmpnew(t)%shdfac_monthly(:) * 100.0 + NoahmpIO%tmn(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%tbot + NoahmpIO%urban_vegtype(1,1) = LIS_rc%urbanclass + NoahmpIO%cropcat(1,1) = LIS_rc%cropclass + NoahmpIO%IOPT_DVEG = NoahMPnew_struc(n)%dveg_opt + NoahmpIO%IOPT_CRS = NoahMPnew_struc(n)%crs_opt + NoahmpIO%IOPT_BTR = NoahMPnew_struc(n)%btr_opt + NoahmpIO%IOPT_RUNSRF = NoahMPnew_struc(n)%runsfc_opt + NoahmpIO%IOPT_RUNSUB = NoahMPnew_struc(n)%runsub_opt + NoahmpIO%IOPT_SFC = NoahMPnew_struc(n)%sfc_opt + NoahmpIO%IOPT_FRZ = NoahMPnew_struc(n)%frz_opt + NoahmpIO%IOPT_INF = NoahMPnew_struc(n)%inf_opt + NoahmpIO%IOPT_RAD = NoahMPnew_struc(n)%rad_opt + NoahmpIO%IOPT_ALB = NoahMPnew_struc(n)%alb_opt + NoahmpIO%IOPT_SNF = NoahMPnew_struc(n)%snf_opt + NoahmpIO%IOPT_TKSNO = NoahMPnew_struc(n)%tksno_opt + NoahmpIO%IOPT_TBOT = NoahMPnew_struc(n)%tbot_opt + NoahmpIO%IOPT_STC = NoahMPnew_struc(n)%stc_opt + NoahmpIO%IOPT_GLA = NoahMPnew_struc(n)%gla_opt + NoahmpIO%IOPT_sndpth_gla = NoahMPnew_struc(n)%sndpth_gla_opt + NoahmpIO%IOPT_RSF = NoahMPnew_struc(n)%rsf_opt + NoahmpIO%IOPT_SOIL = NoahMPnew_struc(n)%soil_opt + NoahmpIO%IOPT_PEDO = NoahMPnew_struc(n)%pedo_opt + NoahmpIO%IOPT_CROP = NoahMPnew_struc(n)%crop_opt + NoahmpIO%IOPT_IRR = NoahMPnew_struc(n)%irr_opt + NoahmpIO%IOPT_IRRM = NoahMPnew_struc(n)%irrm_opt + NoahmpIO%IOPT_INFDV = NoahMPnew_struc(n)%infdv_opt + NoahmpIO%IOPT_TDRN = NoahMPnew_struc(n)%tdrn_opt + NoahmpIO%iz0tlnd = 0 + NoahmpIO%sf_urban_physics = NoahMPnew_struc(n)%urban_opt +! Multiply reference height by 2.0 because module_sf_noahmpdrv +! expects this variable to be in terms of a thickness of the +! atmospheric layers, and it later divides this value by 2.0. +! Thus, the LIS user should specify the exact height of the +! reference in lis.config, and module_sf_noahmpdrv will then +! correctly use this actual value. This code is confirmed in +! the HRLDAS driver, which also multiplies this value by 2.0. +! 11/30/2018 - dmm + NoahmpIO%dz8w(1,1,1) = NoahMPnew_struc(n)%dz8w * 2.0 + + if (NoahmpIO%IOPT_CROP > 0) then + NoahmpIO%planting(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%planting + NoahmpIO%harvest(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%harvest + NoahmpIO%season_gdd(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%season_gdd + else + NoahmpIO%planting(1,1) = 0.0 + NoahmpIO%harvest(1,1) = 0.0 + NoahmpIO%season_gdd(1,1) = 0.0 + endif + +! Zhuo Wang tested on 11/15/2018, not read from LDT-generated netcdf input file + if (NoahmpIO%IOPT_SOIL .eq. 2) then + NoahmpIO%soilcL1(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%soilcL1 + NoahmpIO%soilcL2(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%soilcL2 + NoahmpIO%soilcL3(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%soilcL3 + NoahmpIO%soilcL4(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%soilcL4 + endif + if (NoahmpIO%IOPT_SOIL .eq. 3) then + NoahmpIO%soilcomp(1,:,1) = NoahMPnew_struc(n)%noahmpnew(t)%soilcomp(:) + endif + + ! get state variables + NoahmpIO%sfcrunoff(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%sfcrunoff + NoahmpIO%udrunoff(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%udrrunoff + NoahmpIO%smois(1,:,1) = NoahMPnew_struc(n)%noahmpnew(t)%smc(:) + NoahmpIO%sh2o(1,:,1) = NoahMPnew_struc(n)%noahmpnew(t)%sh2o(:) + NoahmpIO%tslb(1,:,1) = NoahMPnew_struc(n)%noahmpnew(t)%tslb(:) + NoahmpIO%snow(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%sneqv + NoahmpIO%snowh(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%snowh + NoahmpIO%canwat(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%canwat + NoahmpIO%acsnom(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%acsnom + NoahmpIO%acsnow(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%acsnow + NoahmpIO%isnowxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%isnow + NoahmpIO%tvxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%tv + NoahmpIO%tgxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%tg + NoahmpIO%canicexy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%canice + NoahmpIO%canliqxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%canliq + NoahmpIO%eahxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%eah + NoahmpIO%tahxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%tah + NoahmpIO%cmxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%cm + NoahmpIO%chxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%ch + NoahmpIO%fwetxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%fwet + NoahmpIO%sneqvoxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%sneqvo + NoahmpIO%alboldxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%albold + NoahmpIO%qsnowxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%qsnow + NoahmpIO%wslakexy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%wslake + NoahmpIO%zwtxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%zwt + NoahmpIO%waxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%wa + NoahmpIO%wtxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%wt + NoahmpIO%tsnoxy(1,:,1) = NoahMPnew_struc(n)%noahmpnew(t)%tsno(:) + NoahmpIO%zsnsoxy(1,:,1) = NoahMPnew_struc(n)%noahmpnew(t)%zss(:) + NoahmpIO%snicexy(1,:,1) = NoahMPnew_struc(n)%noahmpnew(t)%snowice(:) + NoahmpIO%snliqxy(1,:,1) = NoahMPnew_struc(n)%noahmpnew(t)%snowliq(:) + NoahmpIO%lfmassxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%lfmass + NoahmpIO%rtmassxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%rtmass + NoahmpIO%stmassxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%stmass + NoahmpIO%woodxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%wood + NoahmpIO%stblcpxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%stblcp + NoahmpIO%fastcpxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%fastcp +! DMM - If dynamic vegetation option DVEG = 7, 8, or 9 for "input LAI", +! then send LAI/SAI from input to the Noah-MP physics. If any +! tile has an undefined LAI/SAI value, instead use the value from the +! MPTABLE file for that vegetation class and for the month. + if ((NoahmpIO%IOPT_DVEG .ge. 7).and.(NoahmpIO%IOPT_DVEG .le. 9)) then + tid = LIS_surface(n,LIS_rc%lsm_index)%tile(t)%tile_id +! If "LAI data source:" is set to "none" for these three Noah-MP +! input LAI vegetation options, stop the run. + if (LIS_rc%useLAImap(n).ne."none") then + NoahmpIO%lai(1,1) = LIS_lai(n)%tlai(tid) + else + write(LIS_logunit,*) & + '[ERR] Attempting to use input LAI, however' + write(LIS_logunit,*) & + '[ERR] "LAI data source:" is set to "none".' + call LIS_endrun() + endif +! If "SAI data source:" is set to "none" for these three Noah-MP-4.0.1 +! input LAI vegetation options, fill in the SAI values from MPTABLE. + if (LIS_rc%useSAImap(n).ne."none") then + NoahmpIO%xsaixy(1,1) = LIS_sai(n)%tsai(tid) + endif +! If any LAI or SAI values are undefined at a tile, +! fill in the LAI or SAI values from MPTABLE. + if (NoahmpIO%lai(1,1) .eq. LIS_rc%udef) then + NoahmpIO%lai(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%lai + endif + if (NoahmpIO%xsaixy(1,1) .eq. LIS_rc%udef) then + NoahmpIO%xsaixy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%sai + endif + else + NoahmpIO%lai(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%lai + NoahmpIO%xsaixy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%sai + endif + NoahmpIO%taussxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%tauss + NoahmpIO%smoiseq(1,:,1) = NoahMPnew_struc(n)%noahmpnew(t)%smoiseq(:) + NoahmpIO%smcwtdxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%smcwtd + NoahmpIO%deeprechxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%deeprech + NoahmpIO%rechxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%rech + NoahmpIO%grainxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%grain + NoahmpIO%gddxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%gdd + NoahmpIO%pgsxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%pgs + NoahmpIO%sfcheadrt(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%sfcheadrt + +! Calculate water storages at start of timestep + startsm = 0.0 + do i = 1,NoahmpIO%nsoil + startsm = startsm + & + (NoahmpIO%smois(1,i,1) * NoahmpIO%dzs(i) * LIS_CONST_RHOFW) + enddo + startswe = NoahmpIO%snow(1,1) + startint = NoahmpIO%canliqxy(1,1) + NoahmpIO%canicexy(1,1) + startgw = NoahmpIO%waxy(1,1) + + ! call model physics + call noahmp_driver_new(n, NoahmpIO, NoahMPnew_struc(n)%noahmpnew(t)%param) + + ! save state variables from NoahmpIO 1-D variables to global variables + NoahMPnew_struc(n)%noahmpnew(t)%sfcrunoff = NoahmpIO%sfcrunoff(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%udrrunoff = NoahmpIO%udrunoff(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%smc(:) = NoahmpIO%smois(1,:,1) + NoahMPnew_struc(n)%noahmpnew(t)%sh2o(:) = NoahmpIO%sh2o(1,:,1) + NoahMPnew_struc(n)%noahmpnew(t)%tslb(:) = NoahmpIO%tslb(1,:,1) + NoahMPnew_struc(n)%noahmpnew(t)%sneqv = NoahmpIO%snow(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%snowh = NoahmpIO%snowh(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%canwat = NoahmpIO%canwat(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%acsnom = NoahmpIO%acsnom(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%acsnow = NoahmpIO%acsnow(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%isnow = NoahmpIO%isnowxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%tv = NoahmpIO%tvxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%tg = NoahmpIO%tgxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%canice = NoahmpIO%canicexy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%canliq = NoahmpIO%canliqxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%eah = NoahmpIO%eahxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%tah = NoahmpIO%tahxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%cm = NoahmpIO%cmxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%ch = NoahmpIO%chxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%fwet = NoahmpIO%fwetxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%sneqvo = NoahmpIO%sneqvoxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%albold = NoahmpIO%alboldxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%qsnow = NoahmpIO%qsnowxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%wslake = NoahmpIO%wslakexy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%zwt = NoahmpIO%zwtxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%wa = NoahmpIO%waxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%wt = NoahmpIO%wtxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%tsno(:) = NoahmpIO%tsnoxy(1,:,1) + NoahMPnew_struc(n)%noahmpnew(t)%zss(:) = NoahmpIO%zsnsoxy(1,:,1) + NoahMPnew_struc(n)%noahmpnew(t)%snowice(:) = NoahmpIO%snicexy(1,:,1) + NoahMPnew_struc(n)%noahmpnew(t)%snowliq(:) = NoahmpIO%snliqxy(1,:,1) + NoahMPnew_struc(n)%noahmpnew(t)%lfmass = NoahmpIO%lfmassxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%rtmass = NoahmpIO%rtmassxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%stmass = NoahmpIO%stmassxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%wood = NoahmpIO%woodxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%stblcp = NoahmpIO%stblcpxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%fastcp = NoahmpIO%fastcpxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%lai = NoahmpIO%lai(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%sai = NoahmpIO%xsaixy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%tauss = NoahmpIO%taussxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%smoiseq(:) = NoahmpIO%smoiseq(1,:,1) + NoahMPnew_struc(n)%noahmpnew(t)%smcwtd = NoahmpIO%smcwtdxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%deeprech = NoahmpIO%deeprechxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%rech = NoahmpIO%rechxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%grain = NoahmpIO%grainxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%gdd = NoahmpIO%gddxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%pgs = NoahmpIO%pgsxy(1,1) + + ! save output variables from NoahmpIO variables to global variables + NoahMPnew_struc(n)%noahmpnew(t)%tsk = NoahmpIO%tsk(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%hfx = NoahmpIO%hfx(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%qfx = NoahmpIO%qfx(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%lh = NoahmpIO%lh(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%grdflx = NoahmpIO%grdflx(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%albedo = NoahmpIO%albedo(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%snowc = NoahmpIO%snowc(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%emiss = NoahmpIO%emiss(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%rs = NoahmpIO%rs(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%t2mv = NoahmpIO%t2mvxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%t2mb = NoahmpIO%t2mbxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%q2mv = NoahmpIO%q2mvxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%q2mb = NoahmpIO%q2mbxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%trad = NoahmpIO%tradxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%nee = NoahmpIO%neexy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%gpp = NoahmpIO%gppxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%npp = NoahmpIO%nppxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%fveg = NoahmpIO%fvegxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%runsf = NoahmpIO%runsfxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%runsb = NoahmpIO%runsbxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%ecan = NoahmpIO%ecanxy(1,1) +! Direct soil evaporation does not include sublimation of the snowpack +! on the soil (by the strict ALMA definition of ESoil). - David Mocko + NoahMPnew_struc(n)%noahmpnew(t)%edir = NoahmpIO%edirxy(1,1) - NoahmpIO%qsnsubxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%etran = NoahmpIO%etranxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%rainf = NoahmpIO%rainlsm(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%snowf = NoahmpIO%snowlsm(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%fsa = NoahmpIO%fsaxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%fira = NoahmpIO%firaxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%apar = NoahmpIO%aparxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%psn = NoahmpIO%psnxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%sav = NoahmpIO%savxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%sag = NoahmpIO%sagxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%rssun = NoahmpIO%rssunxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%rssha = NoahmpIO%rsshaxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%bgap = NoahmpIO%bgapxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%wgap = NoahmpIO%wgapxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%tgb = NoahmpIO%tgbxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%tgv = NoahmpIO%tgvxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%chv = NoahmpIO%chvxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%chb = NoahmpIO%chbxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%shg = NoahmpIO%shgxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%shc = NoahmpIO%shcxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%shb = NoahmpIO%shbxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%evg = NoahmpIO%evgxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%evb = NoahmpIO%evbxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%ghv = NoahmpIO%ghvxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%ghb = NoahmpIO%ghbxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%irg = NoahmpIO%irgxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%irc = NoahmpIO%ircxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%irb = NoahmpIO%irbxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%tr = NoahmpIO%trxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%evc = NoahmpIO%evcxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%chleaf = NoahmpIO%chleafxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%chuc = NoahmpIO%chucxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%chv2 = NoahmpIO%chv2xy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%chb2 = NoahmpIO%chb2xy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%infxs1rt = NoahmpIO%infxs1rt(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%soldrain1rt = NoahmpIO%soldrain1rt(1,1) + + ! EMK Update RHMin for 557WW + if (NoahmpIO%T_PHY(1,1,1) .lt. & + noahmpnew_struc(n)%noahmpnew(t)%tair_agl_min) then + noahmpnew_struc(n)%noahmpnew(t)%tair_agl_min = NoahmpIO%T_PHY(1,1,1) + ! Use formulation based on Noah.3.6 code, which treats + ! q2sat as saturated specific humidity + tmp_es = 611.0*exp(2.501E6/461.0*(1./273.15 - 1./NoahmpIO%T_PHY(1,1,1))) + tmp_q2sat = 0.622*tmp_es/(NoahmpIO%P8W(1,1,1)-(1.-0.622)*tmp_es) + noahmpnew_struc(n)%noahmpnew(t)%rhmin = NoahmpIO%QV_CURR(1,1,1) / tmp_q2sat + endif + + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RHMIN, & + value=noahmpnew_struc(n)%noahmpnew(t)%rhmin, & + vlevel=1, unit="-", direction="-",& + surface_type=LIS_rc%lsm_index) + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RHMIN, & + value=(100.*noahmpnew_struc(n)%noahmpnew(t)%rhmin), & + vlevel=1, unit="%", direction="-",& + surface_type=LIS_rc%lsm_index) + + ![ 1] output variable: tsk (unit=K ). *** surface radiative temperature + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RADT, value = NoahMPnew_struc(n)%noahmpnew(t)%tsk, & + vlevel=1, unit="K", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 2] output variable: fsh (unit=W/m2). *** sensible heat flux to atmosphere + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QH, value = NoahMPnew_struc(n)%noahmpnew(t)%hfx, & + vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) + + ![ 3] output variable: lh (unit=W/m2). *** latent heat flux + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QLE, value = NoahMPnew_struc(n)%noahmpnew(t)%lh, & + vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) + + ![ 4] output variable: grdflx (unit=W/m2). *** ground/snow heat flux to soil + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QG, value = NoahMPnew_struc(n)%noahmpnew(t)%grdflx, & + vlevel=1, unit="W m-2", direction="DN", surface_type = LIS_rc%lsm_index) + + ![ 5] output variable: albedo (unit=- ). *** total grid albedo + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_ALBEDO, value = NoahMPnew_struc(n)%noahmpnew(t)%albedo, & + vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) + + if (NoahmpIO%albedo(1,1) .ne. LIS_rc%udef) NoahmpIO%albedo(1,1) = NoahmpIO%albedo(1,1) * 100.0 + + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_ALBEDO, value = NoahmpIO%albedo(1,1), & + vlevel=1, unit="%", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 6] output variable: snowc (unit=-). *** snow cover fraction + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWCOVER, value = NoahMPnew_struc(n)%noahmpnew(t)%snowc, & + vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) + + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWCOVER, value = (NoahMPnew_struc(n)%noahmpnew(t)%snowc*100.0), & + vlevel=1, unit="%", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 7] output variable: smc (unit=m3/m3). *** volumetric soil moisture + do i=1, NoahMPnew_struc(n)%nsoil + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SOILMOIST, value = NoahMPnew_struc(n)%noahmpnew(t)%smc(i), & + vlevel=i, unit="m^3 m-3", direction="-", surface_type = LIS_rc%lsm_index) + end do + + ![ 8] output variable: sh2o (unit=m3/m3). *** equilibrium volumetric liquid soil moisture content + do i=1, NoahMPnew_struc(n)%nsoil + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SMLIQFRAC, value = NoahMPnew_struc(n)%noahmpnew(t)%sh2o(i), & + vlevel=i, unit="m^3 m-3", direction="-", surface_type = LIS_rc%lsm_index) + end do + + ![ 9] output variable: tslb (unit=K). *** soil temperature + do i=1, NoahMPnew_struc(n)%nsoil + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SOILTEMP, value = NoahMPnew_struc(n)%noahmpnew(t)%tslb(i), & + vlevel=i, unit="K", direction="-", surface_type = LIS_rc%lsm_index) + end do + + ![ 10] output variable: sneqv (unit=mm ). *** snow water equivalent + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SWE, value = NoahMPnew_struc(n)%noahmpnew(t)%sneqv, & + vlevel=1, unit="kg m-2", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 11] output variable: snowh (unit=m ). *** physical snow depth + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWDEPTH, value = NoahMPnew_struc(n)%noahmpnew(t)%snowh, & + vlevel=1, unit="m ", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 12] output variable: canwat (unit=kg/m2). *** total canopy water storage + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CANOPINT, value = NoahMPnew_struc(n)%noahmpnew(t)%canwat, & + vlevel=1, unit="kg m-2", direction="- ", surface_type = LIS_rc%lsm_index) + + ![ 13] output variable: emiss (unit=- ). *** surface bulk emissivity + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_EMISSFORC, value = NoahMPnew_struc(n)%noahmpnew(t)%emiss, & + vlevel=1, unit="- ", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 14] output variable: rs (unit=s/m). *** total stomatal resistance + ! call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RS, value = NoahMPnew_struc(n)%noahmpnew(t)%rs, & + ! vlevel=1, unit="s/m", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 15] output variable: isnow (unit=-). *** actual number of snow layers + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SOWN_NLAYER, value = -1.0*NoahMPnew_struc(n)%noahmpnew(t)%isnow, & + vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 16] output variable: tv (unit=K ). *** vegetation leaf temperature + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_VEGT, value = NoahMPnew_struc(n)%noahmpnew(t)%tv, & + vlevel=1, unit="K", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 17] output variable: tg (unit=K). *** averaged ground surface temperature + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_GROUNDAVGT, value = NoahMPnew_struc(n)%noahmpnew(t)%tg, & + vlevel=1, unit="K", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 18] output variable: canice (unit=mm). *** canopy intercepted ice + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SWEVEG, value = NoahMPnew_struc(n)%noahmpnew(t)%canice, & + vlevel=1, unit="kg m-2", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 19] output variable: canliq (unit=mm). *** canopy intercepted liquid water + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CANOPY_INTL, value = NoahMPnew_struc(n)%noahmpnew(t)%canliq, & + vlevel=1, unit="mm", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 20] output variable: eah (unit=Pa ). *** canopy air vapor pressure + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CANOPY_VP, value = NoahMPnew_struc(n)%noahmpnew(t)%eah, & + vlevel=1, unit="Pa", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 21] output variable: tah (unit=K ). *** canopy air temperature + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CANOPY_TEMP, value = NoahMPnew_struc(n)%noahmpnew(t)%tah, & + vlevel=1, unit="K", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 22] output variable: cm (unit=s/m ). *** bulk momentum drag coefficient + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CM, value = NoahMPnew_struc(n)%noahmpnew(t)%cm, & + vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 23] output variable: ch (unit=s/m ). *** bulk sensible heat exchange coefficient + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CH, value = NoahMPnew_struc(n)%noahmpnew(t)%ch, & + vlevel=1, unit="m", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 24] output variable: fwet (unit=- ). *** wetted or snowed fraction of canopy + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CANOPY_WF, value = NoahMPnew_struc(n)%noahmpnew(t)%fwet, & + vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 25] output variable: wslake (unit=mm). *** lake water storage + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_LAKEWATER, value = NoahMPnew_struc(n)%noahmpnew(t)%wslake, & + vlevel=1, unit="mm", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 26] output variable: zwt (unit=m). *** water table depth + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_WATERTABLED, value = NoahMPnew_struc(n)%noahmpnew(t)%zwt, & + vlevel=1, unit="m", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 27] output variable: wa (unit=mm). *** water storage in the "aquifer" + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_GWS, value = NoahMPnew_struc(n)%noahmpnew(t)%wa, & + vlevel=1, unit="mm", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 28] output variable: wt (unit=mm). *** water in aquifer and saturated soil + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_WT_AQUI_SATSOIL, value = NoahMPnew_struc(n)%noahmpnew(t)%wt, & + vlevel=1, unit="mm", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 29] output variable: tsno (unit=K). *** snow layer temperature + do i=1, NoahMPnew_struc(n)%nsnow + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWTPROF, value = NoahMPnew_struc(n)%noahmpnew(t)%tsno(i), & + vlevel=i, unit="K", direction="-", surface_type = LIS_rc%lsm_index) + end do + + ![ 30] output variable: snowice (unit=mm ). *** snow layer ice + do i=1, NoahMPnew_struc(n)%nsnow + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWICE, value = NoahMPnew_struc(n)%noahmpnew(t)%snowice(i), & + vlevel=i, unit="mm", direction="-", surface_type = LIS_rc%lsm_index) + end do + + ![ 31] output variable: snowliq (unit=mm ). *** snow layer liquid water + do i=1, NoahMPnew_struc(n)%nsnow + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWLIQ, value = NoahMPnew_struc(n)%noahmpnew(t)%snowliq(i), & + vlevel=i, unit="mm", direction="-", surface_type = LIS_rc%lsm_index) + end do + + ! Yeosang Yoon, for snow DA + ! output variable: z_snow (unit=m). *** snow layer-bottom depth from snow surface + do i=1, NoahMPnew_struc(n)%nsnow + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOW_LBDFSS, value = NoahMPnew_struc(n)%noahmpnew(t)%zss(i), & + vlevel=i, unit="m", direction="-", surface_type = LIS_rc%lsm_index) + end do + + ![ 32] output variable: lfmass (unit=g/m2). *** leaf mass + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_LEAFMASS, value = NoahMPnew_struc(n)%noahmpnew(t)%lfmass, & + vlevel=1, unit="g m-2", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 33] output variable: rtmass (unit=g/m2 ). *** mass of fine roots + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_ROOTMASS, value = NoahMPnew_struc(n)%noahmpnew(t)%rtmass, & + vlevel=1, unit="g m-2 ", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 34] output variable: stmass (unit=g/m2 ). *** stem mass + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_STEMMASS, value = NoahMPnew_struc(n)%noahmpnew(t)%stmass, & + vlevel=1, unit="g m-2", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 35] output variable: wood (unit=g/m2). *** mass of wood including woody roots + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_WOODMASS, value = NoahMPnew_struc(n)%noahmpnew(t)%wood, & + vlevel=1, unit="g m-2", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 36] output variable: stblcp (unit=g/m2). *** stable carbon in deep soil + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CARBON_DEEPSOIL, value = NoahMPnew_struc(n)%noahmpnew(t)%stblcp, & + vlevel=1, unit="g m-2", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 37] output variable: fastcp (unit=g/m2 ). *** short-lived carbon in shallow soil + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CARBON_SHALLOWSOIL, value = NoahMPnew_struc(n)%noahmpnew(t)%fastcp, & + vlevel=1, unit="g m-2", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 38] output variable: lai (unit=-). *** leave area index + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_LAI, value = NoahMPnew_struc(n)%noahmpnew(t)%lai, & + vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 39] output variable: sai (unit=- ). *** stem area index + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SAI, value = NoahMPnew_struc(n)%noahmpnew(t)%sai, & + vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 40] output variable: tauss (unit=- ). *** snow aging factor + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWAGE, value = NoahMPnew_struc(n)%noahmpnew(t)%tauss, & + vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 41] output variable: smcwtd (unit=m3/m3). *** soil moisture content in the layer to the water table when deep + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_BETWEENWATER, value = NoahMPnew_struc(n)%noahmpnew(t)%smcwtd, & + vlevel=1, unit="m^3 m-3", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 42] output variable: deeprech (unit=m). *** recharge to the water table when groundwater is deep + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QRECTOGW, value = NoahMPnew_struc(n)%noahmpnew(t)%deeprech, & + vlevel=1, unit="m", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 43] output variable: rech (unit=m). *** recharge from the water table when groundwater is shallow + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QRECFROMGW, value = NoahMPnew_struc(n)%noahmpnew(t)%rech, & + vlevel=1, unit="m", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 44] output variable: t2mv (unit=K). *** 2-m air temperature over vegetated part + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_VEGE2MT, value = NoahMPnew_struc(n)%noahmpnew(t)%t2mv, & + vlevel=1, unit="K", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 45] output variable: t2mb (unit=K ). *** 2-m height air temperature + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_BARE2MT, value = NoahMPnew_struc(n)%noahmpnew(t)%t2mb, & + vlevel=1, unit="K", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 46] output variable: q2mv (unit=kg/kg). *** 2-m mixing ratio of vegetation part + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_VEGE2MQ2, value = NoahMPnew_struc(n)%noahmpnew(t)%q2mv, & + vlevel=1, unit="kg kg-1", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 47] output variable: q2mb (unit=kg/kg). *** 2-m mixing ratio of bare ground part + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_BARE2MQ2, value = NoahMPnew_struc(n)%noahmpnew(t)%q2mb, & + vlevel=1, unit="kg kg-1", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 48] output variable: trad (unit=K). *** surface radiative temperature + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RADT, value = NoahMPnew_struc(n)%noahmpnew(t)%trad, & + vlevel=1, unit="K", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 49] output variable: nee (unit=g/m2/s ). *** net ecosystem exchange of CO2 + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_NEE, value = NoahMPnew_struc(n)%noahmpnew(t)%nee, & + vlevel=1, unit="g m-2 s-1", direction="OUT", surface_type = LIS_rc%lsm_index) + + ![ 50] output variable: gpp (unit=g/m2/s ). *** gross primary assimilation of carbon + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_GPP, value = NoahMPnew_struc(n)%noahmpnew(t)%gpp, & + vlevel=1, unit="g m-2 s-1", direction="IN", surface_type = LIS_rc%lsm_index) + + ![ 51] output variable: npp (unit=g/m2/s). *** net primary productivity of carbon + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_NPP, value = NoahMPnew_struc(n)%noahmpnew(t)%npp, & + vlevel=1, unit="g m-2 s-1", direction="OUT", surface_type = LIS_rc%lsm_index) + + ![ 52] output variable: fveg (unit=-). *** Noah-MP green vegetation fraction + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_GREENNESS, value = NoahMPnew_struc(n)%noahmpnew(t)%fveg, & + vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 53] output variable: runsf (unit=mm/s). *** surface runoff + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QS, value = NoahMPnew_struc(n)%noahmpnew(t)%runsf/NoahMPnew_struc(n)%ts,& + vlevel=1, unit="kg m-2 s-1", direction="OUT", surface_type = LIS_rc%lsm_index) + + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QS, value = NoahMPnew_struc(n)%noahmpnew(t)%runsf, & + vlevel=1, unit="kg m-2", direction="OUT", surface_type = LIS_rc%lsm_index) + + ![ 54] output variable: runsb (unit=mm/s ). *** baseflow (saturation excess) + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QSB, value = NoahMPnew_struc(n)%noahmpnew(t)%runsb/NoahMPnew_struc(n)%ts,& + vlevel=1, unit="kg m-2 s-1", direction="OUT", surface_type = LIS_rc%lsm_index) + + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QSB, value = NoahMPnew_struc(n)%noahmpnew(t)%runsb, & + vlevel=1, unit="kg m-2", direction="OUT", surface_type = LIS_rc%lsm_index) + + ! Combined output variable: qtot (unit=mm | mm/s). *** total runoff + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QTOT, & + value = NoahMPnew_struc(n)%noahmpnew(t)%runsf/NoahMPnew_struc(n)%ts + & + NoahMPnew_struc(n)%noahmpnew(t)%runsb/NoahMPnew_struc(n)%ts, & + vlevel=1, unit="kg m-2 s-1", direction="OUT", surface_type = LIS_rc%lsm_index) + + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QTOT, & + value = NoahMPnew_struc(n)%noahmpnew(t)%runsf + NoahMPnew_struc(n)%noahmpnew(t)%runsb, & + vlevel=1, unit="kg m-2", direction="OUT", surface_type = LIS_rc%lsm_index) + + ![ 55] output variable: ecan (unit=mm/s ). *** evaporation of intercepted water + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_ECANOP, value = NoahMPnew_struc(n)%noahmpnew(t)%ecan, & + vlevel=1, unit="kg m-2 s-1", direction="UP", surface_type = LIS_rc%lsm_index) + + ![ 56] output variable: edir (unit=mm/s ). *** soil surface evaporation rate + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_ESOIL, value = NoahMPnew_struc(n)%noahmpnew(t)%edir, & + vlevel=1, unit="kg m-2 s-1", direction="UP", surface_type = LIS_rc%lsm_index) + + ![ 57] output variable: etran (unit=mm/s ). *** transpiration rate + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_TVEG, value = NoahMPnew_struc(n)%noahmpnew(t)%etran, & + vlevel=1, unit="kg m-2 s-1", direction="UP", surface_type = LIS_rc%lsm_index) + + ![ 58] output variable: fsa (unit=W/m2). *** total absorbed solar radiation + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SWNET, value = NoahMPnew_struc(n)%noahmpnew(t)%fsa, & + vlevel=1, unit="W m-2", direction="DN", surface_type = LIS_rc%lsm_index) + + ![ 59] output variable: fira (unit=W/m2 ). *** total net longwave radiation [+ to atm] + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_LWUP, value = NoahMPnew_struc(n)%noahmpnew(t)%fira, & + vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) + + ![ 60] output variable: apar (unit=W/m2). *** photosynthesis active energy by canopy + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_APAR, value = NoahMPnew_struc(n)%noahmpnew(t)%apar, & + vlevel=1, unit="W m-2", direction="IN", surface_type = LIS_rc%lsm_index) + + ![ 61] output variable: psn (unit=umol/m2/s ). *** total photosynthesis of CO2 [+] + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_PSCO2, value = NoahMPnew_struc(n)%noahmpnew(t)%psn, & + vlevel=1, unit="umol m-2 s-1", direction="IN", surface_type = LIS_rc%lsm_index) + + ![ 62] output variable: sav (unit=W/m2 ). *** solar radiation absorbed by vegetation + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SAV, value = NoahMPnew_struc(n)%noahmpnew(t)%sav, & + vlevel=1, unit="W/m2 ", direction="IN", surface_type = LIS_rc%lsm_index) + + ![ 63] output variable: sag (unit=W/m2 ). *** solar radiation absorbed by ground + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SAQ, value = NoahMPnew_struc(n)%noahmpnew(t)%sag, & + vlevel=1, unit="W/m2 ", direction="IN", surface_type = LIS_rc%lsm_index) + + ![ 64] output variable: rssun (unit=s/m). *** sunlit leaf stomatal resistance + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RSSUN, value = NoahMPnew_struc(n)%noahmpnew(t)%rssun, & + vlevel=1, unit="s m-1", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 65] output variable: rssha (unit=s/m). *** shaded leaf stomatal resistance + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RSSHA, value = NoahMPnew_struc(n)%noahmpnew(t)%rssha, & + vlevel=1, unit="s m-1", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 66] output variable: bgap (unit=-). *** between gap fraction + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_BGAP, value = NoahMPnew_struc(n)%noahmpnew(t)%bgap, & + vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 67] output variable: wgap (unit=- ). *** within gap fraction + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_WGAP, value = NoahMPnew_struc(n)%noahmpnew(t)%wgap, & + vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 68] output variable: tgb (unit=K). *** bare ground temperature + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_BARESOILT, value = NoahMPnew_struc(n)%noahmpnew(t)%tgb, & + vlevel=1, unit="K", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 69] output variable: tgv (unit=K). *** vegetated ground surface temperature + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_GROUNDVEGT, value = NoahMPnew_struc(n)%noahmpnew(t)%tgv, & + vlevel=1, unit="K", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 70] output variable: chv (unit=s/m). *** sensible heat exchange coefficient over vegetated fraction + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CHV, value = NoahMPnew_struc(n)%noahmpnew(t)%chv, & + vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 71] output variable: chb (unit=s/m). *** sensible heat exchange coefficient over bare-ground fraction + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CHB, value = NoahMPnew_struc(n)%noahmpnew(t)%chb, & + vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 72] output variable: shg (unit=W/m2 ). *** get ground sensible heat [+ to atm] + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SHG, value = NoahMPnew_struc(n)%noahmpnew(t)%shg, & + vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) + + ![ 73] output variable: shc (unit=W/m2 ). *** canopy sensible heat [+ to atm] + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SHC, value = NoahMPnew_struc(n)%noahmpnew(t)%shc, & + vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) + + ![ 74] output variable: shb (unit=W/m2 ). *** bare ground sensible heat [+ to atm] + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SHB, value = NoahMPnew_struc(n)%noahmpnew(t)%shb, & + vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) + + ![ 75] output variable: evg (unit=W/m2 ). *** veg ground evaporation [+ to atm] + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_EVG, value = NoahMPnew_struc(n)%noahmpnew(t)%evg, & + vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) + + ![ 76] output variable: evb (unit=W/m2 ). *** bare soil evaporation [+ to atm] + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_EVB, value = NoahMPnew_struc(n)%noahmpnew(t)%evb, & + vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) + + ![ 77] output variable: ghv (unit=W/m2 ). *** vegetated ground heat flux [+ to soil] + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_GHV, value = NoahMPnew_struc(n)%noahmpnew(t)%ghv, & + vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) + + ![ 78] output variable: ghb (unit=W/m2 ). *** bare ground heat flux [+ to soil] + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_GHB, value = NoahMPnew_struc(n)%noahmpnew(t)%ghb, & + vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) + + ![ 79] output variable: irg (unit=W/m2 ). *** veg ground net long wave radiation [+ to atm] + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_IRV, value = NoahMPnew_struc(n)%noahmpnew(t)%irg, & + vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) + + ![ 80] output variable: irc (unit=W/m2 ). *** canopy net long wave radiation [+ to atm] + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_IRC, value = NoahMPnew_struc(n)%noahmpnew(t)%irc, & + vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) + + ![ 81] output variable: irb (unit=W/m2 ). *** bare net long wave radiation [+ to atm] + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_IRB, value = NoahMPnew_struc(n)%noahmpnew(t)%irb, & + vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) + + ![ 82] output variable: tr (unit=W/m2 ). *** transpiration heat [to atm] + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_HTR, value = NoahMPnew_struc(n)%noahmpnew(t)%tr, & + vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) + + ![ 83] output variable: evc (unit=W/m2 ). *** canopy evaporation heat [to atm] + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_EVC, value = NoahMPnew_struc(n)%noahmpnew(t)%evc, & + vlevel=1, unit="W/m2 ", direction="UP", surface_type = LIS_rc%lsm_index) + + ![ 84] output variable: chleaf (unit=m/s). *** leaf exchange coefficient + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CHLEAF, value = NoahMPnew_struc(n)%noahmpnew(t)%chleaf, & + vlevel=1, unit="m s-1", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 85] output variable: chuc (unit=m/s). *** under canopy exchange coefficient + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CHUC, value = NoahMPnew_struc(n)%noahmpnew(t)%chuc, & + vlevel=1, unit="m s-1", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 86] output variable: chv2 (unit=m/s). *** veg 2m exchange coefficient + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CHV2, value = NoahMPnew_struc(n)%noahmpnew(t)%chv2, & + vlevel=1, unit="m s-1", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 87] output variable: chb2 (unit=m/s). *** bare 2m exchange coefficient + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CHB2, value = NoahMPnew_struc(n)%noahmpnew(t)%chb2, & + vlevel=1, unit="m s-1", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 88] output variable: evap (unit=kg/m2/s). *** total evapotranspiration + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_EVAP, value = NoahMPnew_struc(n)%noahmpnew(t)%qfx, & + vlevel=1, unit="kg m-2 s-1", direction="UP", surface_type = LIS_rc%lsm_index) + !PET + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_POTEVAP, & + value=(NoahmpIO%fgev_pet(1,1)+NoahmpIO%fcev_pet(1,1)+NoahmpIO%fctr_pet(1,1)), vlevel=1,unit="W m-2",& + direction="UP",surface_type=LIS_rc%lsm_index) + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_POTEVAP, & + value=(NoahmpIO%fgev_pet(1,1)+NoahmpIO%fcev_pet(1,1)+NoahmpIO%fctr_pet(1,1))/LVH2O, & + vlevel=1,unit="kg m-2 s-1", direction="UP",surface_type=LIS_rc%lsm_index) + + ![ 89] output variable: rainf (unit=kg/m2). *** precipitation rate + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RAINF, value = NoahMPnew_struc(n)%noahmpnew(t)%rainf, & + vlevel=1, unit="kg m-2 s-1", direction="DN", surface_type = LIS_rc%lsm_index) + + ![ 90] output variable: snowf (unit=kg/m2). *** snowfall rate + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWF, value = NoahMPnew_struc(n)%noahmpnew(t)%snowf, & + vlevel=1, unit="kg m-2 s-1", direction="DN", surface_type = LIS_rc%lsm_index) + + ![ 91] LWnet + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_LWNET,vlevel=1, & + value=(-1.0 * NoahMPnew_struc(n)%noahmpnew(t)%fira), & + unit="W m-2", direction="DN", surface_type=LIS_rc%lsm_index) + + ! Code added by Zhuo Wang on 02/28/2019 + ![ 92] output variable: qsnbot (unit=kg m-2 s-1). *** melting water out of snow bottom + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QSM, value = NoahmpIO%qsnbotxy(1,1), & + vlevel=1, unit="kg m-2 s-1", direction="S2L", surface_type = LIS_rc%lsm_index) + + ![ 93] output variable: subsnow (unit=kg m-2 s-1). *** snow sublimation + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SUBSNOW, value = NoahmpIO%qsnsubxy(1,1), & + vlevel=1, unit="kg m-2 s-1", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 94] output variable: AvgSurfT (unit=K). *** average surface temperature + AvgSurfT_out = NoahMPnew_struc(n)%noahmpnew(t)%fveg * NoahMPnew_struc(n)%noahmpnew(t)%tv + & + (1.0-NoahMPnew_struc(n)%noahmpnew(t)%fveg) * NoahMPnew_struc(n)%noahmpnew(t)%tgb + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_AVGSURFT, value = AvgSurfT_out, & + vlevel=1, unit="K", direction="-",surface_type = LIS_rc%lsm_index) + + ![ 95] TWS should be SWE + CanopInt + Soil moisture + WA - David Mocko + TWS_out = NoahMPnew_struc(n)%noahmpnew(t)%sneqv + if ((NoahMPnew_struc(n)%noahmpnew(t)%canliq.ge.0.0).and. & + (NoahMPnew_struc(n)%noahmpnew(t)%canice.ge.0.0)) then + TWS_out = TWS_out + & + (NoahMPnew_struc(n)%noahmpnew(t)%canliq + & + NoahMPnew_struc(n)%noahmpnew(t)%canice) + endif + do i = 1,NoahMPnew_struc(n)%nsoil + TWS_out = TWS_out + & + (NoahMPnew_struc(n)%noahmpnew(t)%smc(i) * & + NoahmpIO%dzs(i)*LIS_CONST_RHOFW) + enddo + if (NoahMPnew_struc(n)%noahmpnew(t)%wa.ge.0.0) then + TWS_out = TWS_out + NoahMPnew_struc(n)%noahmpnew(t)%wa + endif + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_TWS, value = TWS_out, & + vlevel=1, unit="mm", direction="-", surface_type = LIS_rc%lsm_index) + + ![ 96] Qa - Advective energy - Heat transferred to a snow cover by rain + ! - (unit=W m-2) - added by David Mocko + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QA, value = NoahmpIO%pahxy(1,1), & + vlevel=1, unit="W m-2",direction="DN",surface_type=LIS_rc%lsm_index) + +! Added water balance change terms - David Mocko + endsm = 0.0 + do i = 1,NoahmpIO%nsoil + endsm = endsm + & + (NoahmpIO%smois(1,i,1) * NoahmpIO%dzs(i) * LIS_CONST_RHOFW) + enddo + call LIS_diagnoseSurfaceOutputVar(n,t,LIS_MOC_DELSOILMOIST,& + value=(endsm - startsm),vlevel=1,unit="kg m-2", & + direction="INC",surface_type=LIS_rc%lsm_index) + call LIS_diagnoseSurfaceOutputVar(n,t,LIS_MOC_DELSWE, & + value=(NoahMPnew_struc(n)%noahmpnew(t)%sneqv - & + startswe), & + vlevel=1,unit="kg m-2",direction="INC", & + surface_type=LIS_rc%lsm_index) + call LIS_diagnoseSurfaceOutputVar(n,t,LIS_MOC_DELINTERCEPT,& + value=((NoahMPnew_struc(n)%noahmpnew(t)%canliq + & + NoahMPnew_struc(n)%noahmpnew(t)%canice) - & + startint), & + vlevel=1,unit="kg m-2",direction="INC", & + surface_type=LIS_rc%lsm_index) +! For now, the ALMA standard does not provide a variable for the +! change in groundwater storage. Instead, temporarily writing it +! to the DELSURFSTOR (which is the change in surface water storage). +! This is only a temporary fix, until LIS_MOC_DELGROUNDWATER or +! a similarly-named variable is added into LIS_histDataMod.F90. + call LIS_diagnoseSurfaceOutputVar(n,t,LIS_MOC_DELSURFSTOR, & + value=(NoahMPnew_struc(n)%noahmpnew(t)%wa - & + startgw), & + vlevel=1,unit="kg m-2",direction="INC", & + surface_type=LIS_rc%lsm_index) + +! David Mocko (10/29/2019) - Copy RELSMC calculation from Noah-3.X + do i = 1,NoahmpIO%nsoil + if (NoahmpIO%relsmc(1,i,1).gt.1.0) then + NoahmpIO%relsmc(1,i,1) = 1.0 + endif + if (NoahmpIO%relsmc(1,i,1).lt.0.01) then + NoahmpIO%relsmc(1,i,1) = 0.01 + endif + +! J.Case (9/11/2014) -- Set relative soil moisture to missing (LIS_rc%udef) +! if the vegetation type is urban class. + if (NoahmpIO%ivgtyp .eq. NoahmpIO%urban_vegtype) then + NoahmpIO%relsmc(1,i,1) = LIS_rc%udef + endif + call LIS_diagnoseSurfaceOutputVar(n,t,LIS_MOC_RELSMC,vlevel=i, & + value=NoahmpIO%relsmc(1,i,1),unit='-',direction="-",surface_type=LIS_rc%lsm_index) + if (NoahmpIO%relsmc(1,i,1) .eq. LIS_rc%udef) then + tempval = NoahmpIO%relsmc(1,i,1) + else + tempval = NoahmpIO%relsmc(1,i,1)*100.0 + endif + call LIS_diagnoseSurfaceOutputVar(n,t,LIS_MOC_RELSMC,vlevel=i, & + value=tempval,unit='%',direction="-",surface_type=LIS_rc%lsm_index) + enddo + + ! reset forcing variables to zeros + NoahMPnew_struc(n)%noahmpnew(t)%tair = 0.0 + NoahMPnew_struc(n)%noahmpnew(t)%psurf = 0.0 + NoahMPnew_struc(n)%noahmpnew(t)%wind_e = 0.0 + NoahMPnew_struc(n)%noahmpnew(t)%wind_n = 0.0 + NoahMPnew_struc(n)%noahmpnew(t)%qair = 0.0 + NoahMPnew_struc(n)%noahmpnew(t)%swdown = 0.0 + NoahMPnew_struc(n)%noahmpnew(t)%lwdown = 0.0 + NoahMPnew_struc(n)%noahmpnew(t)%prcp = 0.0 + + enddo ! end of tile (t) loop + ! reset forcing counter to be zero + NoahMPnew_struc(n)%forc_count = 0 + + endif ! end of alarmCheck loop + + ! EMK...See if noahmpnew_struc(n)%noahmpnew(t)%tair_agl_min needs to be + ! reset for calculating RHMin. + write(fnest,'(i3.3)') n + alarmCheck = LIS_isAlarmRinging(LIS_rc, & + "NoahMPnew RHMin alarm "//trim(fnest)) + if (alarmCheck) then + write(LIS_logunit,*) & + '[INFO] Resetting tair_agl_min for RHMin calculation' + do t = 1,LIS_rc%npatch(n,LIS_rc%lsm_index) + noahmpnew_struc(n)%noahmpnew(t)%tair_agl_min = 999. + end do + end if + +end subroutine NoahMPnew_main diff --git a/lis/surfacemodels/land/noahmp.new/NoahMP401_read_OPT_parameters.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_read_OPT_parameters.F90 similarity index 75% rename from lis/surfacemodels/land/noahmp.new/NoahMP401_read_OPT_parameters.F90 rename to lis/surfacemodels/land/noahmp.new/NoahMPnew_read_OPT_parameters.F90 index ca8ca3da0..bf6e68e74 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMP401_read_OPT_parameters.F90 +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_read_OPT_parameters.F90 @@ -10,8 +10,8 @@ #include "LIS_misc.h" !BOP ! -! !ROUTINE: NoahMP401_read_OPT_parameters -! \label{NoahMP401_read_OPT_parameters} +! !ROUTINE: NoahMPnew_read_OPT_parameters +! \label{NoahMPnew_read_OPT_parameters} ! ! !REVISION HISTORY: ! @@ -20,13 +20,14 @@ ! to overwrite the default lookup table values that the model uses. ! ! 5 May 2020: Sujay Kumar; Initial specification -! +! May 2023: Cenlin He, modified for refactored NoahMP v5 and later + ! !INTERFACE: ! -subroutine NoahMP401_read_OPT_parameters() +subroutine NoahMPnew_read_OPT_parameters() ! !USES: use LIS_coreMod - use NoahMP401_lsmMod + use NoahMPnew_lsmMod implicit none @@ -41,281 +42,281 @@ subroutine NoahMP401_read_OPT_parameters() do n=1,LIS_rc%nnest allocate(placeholder(LIS_rc%lnc(n), LIS_rc%lnr(n))) - call NOAHMP401_read_OPT_param(n, "ALBDRY1", placeholder, var_found) + call NoahMPnew_read_OPT_param(n, "ALBDRY1", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NOAHMP401_struc(n)%noahmp401(t)%param%albdry(1) =& + NoahMPnew_struc(n)%noahmpnew(t)%param%albdry(1) =& placeholder(col, row) endif enddo endif - call NOAHMP401_read_OPT_param(n, "ALBDRY2", placeholder, var_found) + call NoahMPnew_read_OPT_param(n, "ALBDRY2", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NOAHMP401_struc(n)%noahmp401(t)%param%albdry(2) =& + NoahMPnew_struc(n)%noahmpnew(t)%param%albdry(2) =& placeholder(col, row) endif enddo endif - call NOAHMP401_read_OPT_param(n, "ALBICE1", placeholder, var_found) + call NoahMPnew_read_OPT_param(n, "ALBICE1", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NOAHMP401_struc(n)%noahmp401(t)%param%albice(1) =& + NoahMPnew_struc(n)%noahmpnew(t)%param%albice(1) =& placeholder(col, row) endif enddo endif - call NOAHMP401_read_OPT_param(n, "ALBICE2", placeholder, var_found) + call NoahMPnew_read_OPT_param(n, "ALBICE2", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NOAHMP401_struc(n)%noahmp401(t)%param%albice(2) =& + NoahMPnew_struc(n)%noahmpnew(t)%param%albice(2) =& placeholder(col, row) endif enddo endif - call NOAHMP401_read_OPT_param(n, "ALBSAT1", placeholder, var_found) + call NoahMPnew_read_OPT_param(n, "ALBSAT1", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NOAHMP401_struc(n)%noahmp401(t)%param%albsat(1) =& + NoahMPnew_struc(n)%noahmpnew(t)%param%albsat(1) =& placeholder(col, row) endif enddo endif - call NOAHMP401_read_OPT_param(n, "ALBSAT2", placeholder, var_found) + call NoahMPnew_read_OPT_param(n, "ALBSAT2", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NOAHMP401_struc(n)%noahmp401(t)%param%albsat(2) =& + NoahMPnew_struc(n)%noahmpnew(t)%param%albsat(2) =& placeholder(col, row) endif enddo endif - call NOAHMP401_read_OPT_param(n, "BETADS", placeholder, var_found) + call NoahMPnew_read_OPT_param(n, "BETADS", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NOAHMP401_struc(n)%noahmp401(t)%param%betads =& + NoahMPnew_struc(n)%noahmpnew(t)%param%betads =& placeholder(col, row) endif enddo endif - call NOAHMP401_read_OPT_param(n, "BETAIS", placeholder, var_found) + call NoahMPnew_read_OPT_param(n, "BETAIS", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NOAHMP401_struc(n)%noahmp401(t)%param%betais =& + NoahMPnew_struc(n)%noahmpnew(t)%param%betais =& placeholder(col, row) endif enddo endif - call NOAHMP401_read_OPT_param(n, "EG1", placeholder, var_found) + call NoahMPnew_read_OPT_param(n, "EG1", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NOAHMP401_struc(n)%noahmp401(t)%param%eg(1) =& + NoahMPnew_struc(n)%noahmpnew(t)%param%eg(1) =& placeholder(col, row) endif enddo endif - call NOAHMP401_read_OPT_param(n, "EG2", placeholder, var_found) + call NoahMPnew_read_OPT_param(n, "EG2", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NOAHMP401_struc(n)%noahmp401(t)%param%eg(2) =& + NoahMPnew_struc(n)%noahmpnew(t)%param%eg(2) =& placeholder(col, row) endif enddo endif - call NOAHMP401_read_OPT_param(n, "MFSNO", placeholder, var_found) + call NoahMPnew_read_OPT_param(n, "MFSNO", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NOAHMP401_struc(n)%noahmp401(t)%param%mfsno =& + NoahMPnew_struc(n)%noahmpnew(t)%param%mfsno =& placeholder(col, row) endif enddo endif - call NOAHMP401_read_OPT_param(n, "OMEGAS1", placeholder, var_found) + call NoahMPnew_read_OPT_param(n, "OMEGAS1", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NOAHMP401_struc(n)%noahmp401(t)%param%omegas(1) =& + NoahMPnew_struc(n)%noahmpnew(t)%param%omegas(1) =& placeholder(col, row) endif enddo endif - call NOAHMP401_read_OPT_param(n, "OMGEAS2", placeholder, var_found) + call NoahMPnew_read_OPT_param(n, "OMGEAS2", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NOAHMP401_struc(n)%noahmp401(t)%param%omegas(2) =& + NoahMPnew_struc(n)%noahmpnew(t)%param%omegas(2) =& placeholder(col, row) endif enddo endif - call NOAHMP401_read_OPT_param(n, "RSURF_SNOW", placeholder, var_found) + call NoahMPnew_read_OPT_param(n, "RSURF_SNOW", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NOAHMP401_struc(n)%noahmp401(t)%param%rsurf_snow =& + NoahMPnew_struc(n)%noahmpnew(t)%param%rsurf_snow =& placeholder(col, row) endif enddo endif - call NOAHMP401_read_OPT_param(n, "SSI", placeholder, var_found) + call NoahMPnew_read_OPT_param(n, "SSI", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NOAHMP401_struc(n)%noahmp401(t)%param%ssi =& + NoahMPnew_struc(n)%noahmpnew(t)%param%ssi =& placeholder(col, row) endif enddo endif - call NOAHMP401_read_OPT_param(n, "Z0SNO", placeholder, var_found) + call NoahMPnew_read_OPT_param(n, "Z0SNO", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NOAHMP401_struc(n)%noahmp401(t)%param%z0sno =& + NoahMPnew_struc(n)%noahmpnew(t)%param%z0sno =& placeholder(col, row) endif enddo endif - call NOAHMP401_read_OPT_param(n, "MXSNALB", placeholder, var_found) + call NoahMPnew_read_OPT_param(n, "MXSNALB", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NOAHMP401_struc(n)%noahmp401(t)%param%mxsnalb =& + NoahMPnew_struc(n)%noahmpnew(t)%param%mxsnalb =& placeholder(col, row) endif enddo endif - call NOAHMP401_read_OPT_param(n, "MNSNALB", placeholder, var_found) + call NoahMPnew_read_OPT_param(n, "MNSNALB", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NOAHMP401_struc(n)%noahmp401(t)%param%mnsnalb =& + NoahMPnew_struc(n)%noahmpnew(t)%param%mnsnalb =& placeholder(col, row) endif enddo endif - call NOAHMP401_read_OPT_param(n, "SNDECAYEXP", placeholder, var_found) + call NoahMPnew_read_OPT_param(n, "SNDECAYEXP", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NOAHMP401_struc(n)%noahmp401(t)%param%sndecayexp =& + NoahMPnew_struc(n)%noahmpnew(t)%param%sndecayexp =& placeholder(col, row) endif enddo endif - call NOAHMP401_read_OPT_param(n, "T_ULIMIT", placeholder, var_found) + call NoahMPnew_read_OPT_param(n, "T_ULIMIT", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NOAHMP401_struc(n)%noahmp401(t)%param%t_ulimit =& + NoahMPnew_struc(n)%noahmpnew(t)%param%t_ulimit =& placeholder(col, row) endif enddo endif - call NOAHMP401_read_OPT_param(n, "T_MLIMIT", placeholder, var_found) + call NoahMPnew_read_OPT_param(n, "T_MLIMIT", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NOAHMP401_struc(n)%noahmp401(t)%param%t_mlimit =& + NoahMPnew_struc(n)%noahmpnew(t)%param%t_mlimit =& placeholder(col, row) endif enddo endif - call NOAHMP401_read_OPT_param(n, "T_LLIMIT", placeholder, var_found) + call NoahMPnew_read_OPT_param(n, "T_LLIMIT", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NOAHMP401_struc(n)%noahmp401(t)%param%t_llimit =& + NoahMPnew_struc(n)%noahmpnew(t)%param%t_llimit =& placeholder(col, row) endif enddo endif - call NOAHMP401_read_OPT_param(n, "SNOWF_SCALEF", placeholder, var_found) + call NoahMPnew_read_OPT_param(n, "SNOWF_SCALEF", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NOAHMP401_struc(n)%noahmp401(t)%param%snowf_scalef =& + NoahMPnew_struc(n)%noahmpnew(t)%param%snowf_scalef =& placeholder(col, row) endif enddo @@ -324,19 +325,19 @@ subroutine NoahMP401_read_OPT_parameters() deallocate(placeholder) end do -end subroutine NoahMP401_read_OPT_parameters +end subroutine NoahMPnew_read_OPT_parameters !BOP ! -! !ROUTINE: NOAHMP401_read_OPT_param -! \label{NOAHMP401_read_OPT_param} +! !ROUTINE: NoahMPnew_read_OPT_param +! \label{NoahMPnew_read_OPT_param} ! ! !REVISION HISTORY: ! 03 Sept 2004: Sujay Kumar; Initial Specification for read_laiclimo ! 30 Oct 2013: Shugong Wang; Generalization for reading OPT spatial parameter ! ! !INTERFACE: -subroutine NOAHMP401_read_OPT_param(n, ncvar_name, placeholder,var_found) +subroutine NoahMPnew_read_OPT_param(n, ncvar_name, placeholder,var_found) ! !USES: use netcdf use LIS_coreMod, only : LIS_rc, LIS_domain, LIS_localPet, & @@ -381,27 +382,27 @@ subroutine NOAHMP401_read_OPT_param(n, ncvar_name, placeholder,var_found) ! open NetCDF parameter file ios = nf90_open(path=trim(LIS_rc%paramfile(n)), & mode=NF90_NOWRITE, ncid=nid) - call LIS_verify(ios, 'Error in nf90_open in NOAHMP401_read_OPT_param') + call LIS_verify(ios, 'Error in nf90_open in NoahMPnew_read_OPT_param') ! inquire the ID of east-west dimension ios = nf90_inq_dimid(nid, 'east_west', nc_ID) call LIS_verify(ios, & - 'Error in nf90_inq_dimid in NOAHMP401_read_OPT_param') + 'Error in nf90_inq_dimid in NoahMPnew_read_OPT_param') ! inquire the ID of north-south dimension ios = nf90_inq_dimid(nid, 'north_south', nr_ID) call LIS_verify(ios, & - 'Error in nf90_inq_dimid in NOAHMP401_read_OPT_param') + 'Error in nf90_inq_dimid in NoahMPnew_read_OPT_param') ! inquire the length of east-west dimension ios = nf90_inquire_dimension(nid, nc_ID, len=nc) call LIS_verify(ios, & - 'Error in nf90_inquire_dimension in NOAHMP401_read_OPT_param') + 'Error in nf90_inquire_dimension in NoahMPnew_read_OPT_param') ! inquire the length of north-south dimension ios = nf90_inquire_dimension(nid, nr_ID, len=nr) call LIS_verify(ios, & - 'Error in nf90_inquire_dimension in NOAHMP401_read_OPT_param') + 'Error in nf90_inquire_dimension in NoahMPnew_read_OPT_param') ! inquire the ID of parameter. ios = nf90_inq_varid(nid, Trim(ncvar_name), param_ID) @@ -420,7 +421,7 @@ subroutine NOAHMP401_read_OPT_param(n, ncvar_name, placeholder,var_found) ! read parameter ios = nf90_get_var(nid, param_ID, level_data) - call LIS_verify(ios, 'Error in nf90_get_var in NOAHMP401_read_OPT_param') + call LIS_verify(ios, 'Error in nf90_get_var in NoahMPnew_read_OPT_param') ! grab parameter at specific level placeholder(:, :) = & @@ -437,8 +438,8 @@ subroutine NOAHMP401_read_OPT_param(n, ncvar_name, placeholder,var_found) ! close netcdf file ios = nf90_close(nid) - call LIS_verify(ios, 'Error in nf90_close in NOAHMP401_read_OPT_param') + call LIS_verify(ios, 'Error in nf90_close in NoahMPnew_read_OPT_param') endif -end subroutine NOAHMP401_read_OPT_param - + +end subroutine NoahMPnew_read_OPT_param diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_readcrd.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_readcrd.F90 index 15cb522b0..eb2d14a31 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_readcrd.F90 +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_readcrd.F90 @@ -21,6 +21,7 @@ ! May 2023: Cenlin He; update to work with refactored NoahMP (v5.0 and newer) ! ! !INTERFACE: + subroutine NoahMPnew_readcrd() ! !USES: use ESMF @@ -227,6 +228,17 @@ subroutine NoahMPnew_readcrd() NoahmpNew_struc(n)%runsub_opt enddo + ! infiltration options for dynamic VIC (1->Philip; 2-> Green-Ampt;3->Smith-Parlange) + call ESMF_ConfigFindLabel(LIS_config, & + "Noah-MP.New dynamic VIC infiltration option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%infdv_opt, rc=rc) + call LIS_verify(rc, & + "Noah-MP.New dynamic VIC infiltration option: not defined") + write(LIS_logunit,33) "dynamic VIC infiltration:", & + NoahmpNew_struc(n)%infdv_opt + enddo + ! surface layer drag coeff (CH & CM) (1->M-O; 2->Chen97) call ESMF_ConfigFindLabel(LIS_config, & "Noah-MP.New surface layer drag coefficient option:", rc = rc) @@ -333,9 +345,9 @@ subroutine NoahMPnew_readcrd() "Noah-MP.New snow depth glacier model option:", rc = rc) if(rc /= 0) then write(LIS_logunit,33) "[WARN] Max snow depth not defined." - write(LIS_logunit,33) "[WARN] Setting to default value of 2000." + write(LIS_logunit,33) "[WARN] Setting to default value of 5000." do n=1, LIS_rc%nnest - NoahmpNew_struc(n)%sndpth_gla_opt = 2000 + NoahmpNew_struc(n)%sndpth_gla_opt = 5000 write(LIS_logunit,33) "snow depth for glacier model: ",NoahmpNew_struc(n)%sndpth_gla_opt enddo else @@ -457,6 +469,11 @@ subroutine NoahMPnew_readcrd() NoahmpNew_struc(n)%LDT_ncvar_soilcL2 = 'SOILCL2' !'NOAHMPnew_SOILCL2' NoahmpNew_struc(n)%LDT_ncvar_soilcL3 = 'SOILCL3' !'NOAHMPnew_SOILCL3' NoahmpNew_struc(n)%LDT_ncvar_soilcL4 = 'SOILCL4' !'NOAHMPnew_SOILCL4' + NoahmpNew_struc(n)%LDT_ncvar_irfract = 'IRFRACT' + NoahmpNew_struc(n)%LDT_ncvar_sifract = 'SIFRACT' + NoahmpNew_struc(n)%LDT_ncvar_mifract = 'MIFRACT' + NoahmpNew_struc(n)%LDT_ncvar_fifract = 'FIFRACT' + NoahmpNew_struc(n)%LDT_ncvar_tdfract = 'TD_FRACTION' enddo !------------------------------------------------------------------------------------------ diff --git a/lis/surfacemodels/land/noahmp.new/noahmp_driver_401.F90 b/lis/surfacemodels/land/noahmp.new/noahmp_driver_401.F90 deleted file mode 100644 index 88c747a5f..000000000 --- a/lis/surfacemodels/land/noahmp.new/noahmp_driver_401.F90 +++ /dev/null @@ -1,1149 +0,0 @@ -!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- -! NASA Goddard Space Flight Center -! Land Information System Framework (LISF) -! Version 7.4 -! -! Copyright (c) 2022 United States Government as represented by the -! Administrator of the National Aeronautics and Space Administration. -! All Rights Reserved. -!-------------------------END NOTICE -- DO NOT EDIT----------------------- -! Oct 15 2018 Shugong Wang started for implementing Noah-MP 4.0.1 based on the version of 3.6 -! Oct 15 2018 Zhuo Wang modifed for implementing Noah-MP 4.0.1 - -#undef LIS_NoahMP_TEST -! !INTERFACE -subroutine noahmp_driver_401(n, ttile, itimestep, & - latitude, longitude, & - year , month , day , hour , minute , & - dz8w , & ! new in : model configuration - dt , sldpth , nsoil , nsnow , & ! in : model configuration - vegetype, soiltype, shdfac_monthly , tbot , & ! in : Vegetation/Soil characteristics - urban_vegetype, & ! in - cropcat, planting, harvest ,season_gdd, & ! in : Vegetation/Soil characteristics - dveg_opt, crs_opt, btr_opt, run_opt, sfc_opt, frz_opt, & ! in : User options - inf_opt, rad_opt, alb_opt , snf_opt, tbot_opt, stc_opt, & ! in : User options - gla_opt, sndpth_gla_opt, rsf_opt, soil_opt, pedo_opt, & ! in : new options - crop_opt, iz0tlnd, urban_opt, & ! in : new options - soilcomp, soilcL1, soilcL2, soilcL3, soilcL4, & ! in : new options - tair , psurf , wind_e , wind_n , qair , & ! in : forcing - swdown , lwdown , prcp , & ! in : forcing - tsk , hfx , qfx , lh , grdflx , & ! in/out LSM eqv - sfcrunoff, udrunoff, albedo , qsnbot , subsnow , & ! in/out LSM eqv - snowc , smc , pah , & ! in/out LSM eqv - sh2o , tslb , sneqv , snowh , canwat , acsnom , & ! in/out LSM eqv - acsnow , emiss , rs , & ! in/out LSM eqv - isnow , tv , tg , canice , canliq , eah , & ! in/out Noah MP only - tah , cm , ch , fwet , sneqvo , albold , & ! in/out Noah MP only - qsnow , wslake , zwt , wa , wt , tsno , & ! in/out Noah MP only - zss , snowice , snowliq , lfmass , rtmass , stmass , & ! in/out Noah MP only - wood , stblcp , fastcp , lai , sai , tauss , & ! in/out Noah MP only - smoiseq , smcwtd ,deeprech , rech , & ! in/out Noah MP only - grain , gdd , pgs , & ! in/out Noah MP only for crop model - gecros_state, & ! in/out gecros model - t2mv , t2mb , q2mv , q2mb , & ! out Noah MP only - trad , nee , gpp , npp , fveg , runsf , & ! out Noah MP only - runsb , ecan , edir , etran , & ! out Noah MP only - rainf , snowf , fsa , fira , & ! out Noah MP only - apar , psn , sav , sag , rssun , rssha , & ! out Noah MP only - bgap , wgap , tgb , tgv , chv , chb , & ! out Noah MP only - shg , shc , shb , evg , evb , ghv , & ! out Noah MP only - ghb , irg , irc , irb , tr , evc , & ! out Noah MP only - fgev_pet, fcev_pet, fctr_pet, & ! PET - chleaf , chuc , chv2 , chb2 , relsmc, & - !ag (12Sep2019) - rivsto, fldsto, fldfrc,& - parameters , & ! out Noah MP only - sfcheadrt , INFXSRT, soldrain) ! For WRF-Hydro - - use module_sf_noahmpdrv_401, only: noahmplsm_401 - use module_sf_noahmplsm_401 - use LIS_coreMod, only : LIS_rc - use LIS_logMod, only : LIS_logunit, LIS_endrun - use LIS_timeMgrMod, only : LIS_date2time, LIS_tick - - implicit none - integer, intent(in) :: n ! nest id - integer, intent(in) :: ttile ! tile id - integer, intent(in) :: itimestep ! timestep number - real, intent(in) :: latitude ! latitude in decimal degree [-] - real, intent(in) :: longitude ! longitude in decimal degree [-] - integer, intent(in) :: year ! year of the current time step [-] - integer, intent(in) :: month ! month of the current time step [-] - integer, intent(in) :: day ! day of the current time step [-] - integer, intent(in) :: hour ! hour of the current time step [-] - integer, intent(in) :: minute ! minute of the current time step [-] - real, intent(in) :: dt ! timestep [s] - - ! Revised by Zhuo Wang and Shugong Wang - real, intent(in) :: dz8w ! thickness of atmo layers [m] - - integer, intent(in) :: nsoil ! number of soil layers [-] - real, intent(in) :: sldpth(nsoil) ! thickness of soil layers [m] - integer, intent(in) :: nsnow ! maximum number of snow layers (e.g. 3) [-] - integer, intent(in) :: vegetype ! vegetation type [-] - integer, intent(in) :: soiltype ! soil type [-] - integer, intent(in) :: urban_vegetype ! urban land cover type index [-] - real, intent(in) :: shdfac_monthly(12) ! monthly values for green vegetation fraction [-] - real, intent(in) :: tbot ! deep soil temperature [K] - - ! Crop Model - integer, intent(in) :: cropcat ! crop catagory - real, intent(in) :: planting ! planting date - real, intent(in) :: harvest ! harvest date - real, intent(in) :: season_gdd ! growing season GDD - real, intent(inout) :: gdd ! growing degree days XING (based on 10C) - real, intent(inout) :: grain ! mass of grain XING [g/m2] - integer, intent(inout) :: pgs - - ! gecros model - real, intent(inout) :: gecros_state(60) ! gecros crop - - integer, intent(in) :: dveg_opt ! dynamic vegetation (1 -> off ; 2 -> on) with opt_crs = 1 - ! vegetation model ( 1->prescribed [table LAI, shdfac=FVEG]; 2->dynamic; 3->table LAI, calculate FVEG 4->table LAI, shdfac=maximum) - integer, intent(in) :: crs_opt ! canopy stomatal resistance (1-> Ball-Berry; 2->Jarvis) - integer, intent(in) :: btr_opt ! soil moisture factor for stomatal resistance (1-> Noah; 2-> CLM; 3-> SSiB) - integer, intent(in) :: run_opt ! runoff and groundwater (1->SIMGM; 2->SIMTOP; 3->Schaake96; 4->BATS) - integer, intent(in) :: sfc_opt ! surface layer drag coeff (CH & CM) (1->M-O; 2->Chen97) - integer, intent(in) :: frz_opt ! supercooled liquid water (1-> NY06; 2->Koren99) - integer, intent(in) :: inf_opt ! frozen soil permeability (1-> NY06; 2->Koren99) - integer, intent(in) :: rad_opt ! radiation transfer (1->gap=F(3D,cosz); 2->gap=0; 3->gap=1--Fveg) - integer, intent(in) :: alb_opt ! snow surface albedo (1->BATS; 2->CLASS) - integer, intent(in) :: snf_opt ! precipitation partitioning between snow and rain - ! (1-Jordan91; 2->BATS: Snow when SFCTMP < TFRZ+2.2; - ! 3->Noah: Snow when SFCTMP < TFRZ; - ! 4->Use WRF precipitation partitioning ) - integer, intent(in) :: tbot_opt ! lower boundary of soil temperature (1->zero-flux; 2->Noah) - integer, intent(in) :: stc_opt ! snow/soil temperature time scheme (1->semi-implicit; 2->fully implicit) - - ! Added by Zhuo Wang and Shugong Wang - integer, intent(in) :: gla_opt ! glacier option (1->phase change; 2->simple) - integer, intent(in) :: sndpth_gla_opt ! snow depth max for glacier model [mm] - integer, intent(in) :: rsf_opt ! surface resistance (1->Sakaguchi/Zeng; 2->Seller; 3->mod Sellers; 4->1+snow) - integer, intent(in) :: soil_opt ! soil configuration option - integer, intent(in) :: pedo_opt ! soil pedotransfer function option - integer, intent(in) :: crop_opt ! crop model option (0->none; 1->Liu et al.; 2->Gecros) - integer, intent(in) :: iz0tlnd ! option of Chen adjustment of Czil (not used) - integer, intent(in) :: urban_opt ! urban physics option - real, intent(in) :: soilcomp(8) ! soil sand and clay percentage - real, intent(in) :: soilcL1 ! soil texture in layer 1 - real, intent(in) :: soilcL2 ! soil texture in layer 2 - real, intent(in) :: soilcL3 ! soil texture in layer 3 - real, intent(in) :: soilcL4 ! soil texture in layer 4 - - real, intent(in) :: tair ! air temperature [K] - real, intent(in) :: psurf ! air pressure [Pa] - real, intent(in) :: wind_e ! U wind component [m s-1] - real, intent(in) :: wind_n ! V wind component [m s-1] - - real, intent(in) :: qair ! specific humidity [kg/kg]; mv/(mv+md) - - real, intent(in) :: swdown ! downward solar radiation [w/m2] - real, intent(in) :: lwdown ! downward longwave radiation [w/m2] - real, intent(in) :: prcp ! total precipitatin (rainfall+snowfall) [mm] - - ! Modified by Zhuo Wang and Shugong Wang - ! in/out (with generic LSM equivalent) - real, intent(out) :: tsk ! surface radiative temperature [K] - real, intent(out) :: hfx ! sensible heat flux [W m-2] - real, intent(out) :: qfx ! latent heat flux [kg s-1 m-2] - real, intent(out) :: lh ! latent heat flux [W m-2] - real, intent(out) :: grdflx ! ground/snow heat flux [W m-2] - real, intent(inout) :: sfcrunoff ! accumulated surface runoff [m] - real, intent(inout) :: udrunoff ! accumulated sub-surface runoff [m] - real, intent(out) :: albedo ! total grid albedo [] - real, intent(out) :: qsnbot ! snowmelt out the bottom layer [kg s-1 m-2] - real, intent(out) :: subsnow ! snow sublimation [kg s-1 m-2] - real, intent(out) :: pah ! precipitation advected heat - total (W/m2) - real, intent(out) :: snowc ! snow cover fraction [] - real, intent(inout) :: smc(nsoil) ! volumetric soil moisture, ice + liquid [m3/m3] - real, intent(inout) :: sh2o(nsoil) ! volumetric liquid soil moisture [m3/m3] - real, intent(inout) :: tslb(nsoil) ! soil temperature [K] - real, intent(inout) :: sneqv ! snow water equivalent [mm] - real, intent(inout) :: snowh ! physical snow depth [m] - real, intent(inout) :: canwat ! total canopy water + ice [mm] - real, intent(inout) :: acsnom ! accumulated snow melt leaving pack - real, intent(inout) :: acsnow ! accumulated snow on grid - real, intent(out) :: emiss ! surface bulk emissivity - real, intent(out) :: rs ! Total stomatal resistance (s/m) - ! In module_sf_noahmpdrv_401.F, it is defined as inout variable (with generic LSM equivalent), but it is also in the - ! output list as NoahMP out only. Which one is correct??????/ - - ! in/out Noah MP only - integer, intent(inout) :: isnow ! actual no. of snow layers - real, intent(inout) :: tv ! vegetation leaf temperature - real, intent(inout) :: tg ! bulk ground surface temperature - real, intent(inout) :: canice ! canopy-intercepted ice (mm) - real, intent(inout) :: canliq ! canopy-intercepted liquid water (mm) - real, intent(inout) :: eah ! canopy air vapor pressure (pa) - real, intent(inout) :: tah ! canopy air temperature (k) - real, intent(inout) :: cm ! bulk momentum drag coefficient - real, intent(inout) :: ch ! bulk sensible heat exchange coefficient - real, intent(inout) :: fwet ! wetted or snowed fraction of the canopy (-) - real, intent(inout) :: sneqvo ! snow mass at last time step(mm h2o) - real, intent(inout) :: albold ! snow albedo at last time step (-) - real, intent(inout) :: qsnow ! snowfall on the ground [mm/s] - real, intent(inout) :: wslake ! lake water storage [mm] - real, intent(inout) :: zwt ! water table depth [m] - real, intent(inout) :: wa ! water in the "aquifer" [mm] - real, intent(inout) :: wt ! groundwater storage [mm] - real, intent(inout) :: tsno(nsnow) ! snow temperature [K] - real, intent(inout) :: zss(nsnow+nsoil) ! snow/soil layer-bottom depth from snow surface [m] - real, intent(inout) :: snowice(nsnow) ! snow layer ice [mm] - real, intent(inout) :: snowliq(nsnow) ! snow layer liquid water [mm] - real, intent(inout) :: lfmass ! leaf mass [g/m2] - real, intent(inout) :: rtmass ! mass of fine roots [g/m2] - real, intent(inout) :: stmass ! stem mass [g/m2] - real, intent(inout) :: wood ! mass of wood (incl. woody roots) [g/m2] - real, intent(inout) :: stblcp ! stable carbon in deep soil [g/m2] - real, intent(inout) :: fastcp ! short-lived carbon, shallow soil [g/m2] - real, intent(inout) :: lai ! leaf area index - real, intent(inout) :: sai ! stem area index - real, intent(inout) :: tauss ! snow age factor - real, intent(inout) :: smoiseq(nsoil) ! eq volumetric soil moisture [m3/m3] - real, intent(inout) :: smcwtd ! soil moisture content in the layer to the water table when deep - real, intent(inout) :: deeprech ! recharge to the water table when deep - real, intent(inout) :: rech ! recharge to the water table (diagnostic) - - ! OUT (with no Noah LSM equivalent) - real, intent(out) :: t2mv ! 2m temperature of vegetation part - real, intent(out) :: t2mb ! 2m temperature of bare ground part - real, intent(out) :: q2mv ! 2m mixing ratio of vegetation part - real, intent(out) :: q2mb ! 2m mixing ratio of bare ground part - real, intent(out) :: trad ! surface radiative temperature (k) - real, intent(out) :: nee ! net ecosys exchange (g/m2/s CO2) - real, intent(out) :: gpp ! gross primary assimilation [g/m2/s C] - real, intent(out) :: npp ! net primary productivity [g/m2/s C] - real, intent(out) :: fveg ! Noah-MP vegetation fraction [-] - real, intent(out) :: runsf ! surface runoff [mm/s] - real, intent(out) :: runsb ! subsurface runoff [mm/s] - real, intent(out) :: ecan ! evaporation of intercepted water (mm/s) - real, intent(out) :: edir ! soil surface evaporation rate (mm/s] - real, intent(out) :: etran ! transpiration rate (mm/s) - real, intent(out) :: rainf ! rainfall rate (kg/m2s) - real, intent(out) :: snowf ! snowfall rate (kg/m2s) - real, intent(out) :: fsa ! total absorbed solar radiation (w/m2) - real, intent(out) :: fira ! total net longwave rad (w/m2) [+ to atm] - real, intent(out) :: apar ! photosyn active energy by canopy (w/m2) - real, intent(out) :: psn ! total photosynthesis (umol co2/m2/s) [+] - real, intent(out) :: sav ! solar rad absorbed by veg. (w/m2) - real, intent(out) :: sag ! solar rad absorbed by ground (w/m2) - real, intent(out) :: rssun ! sunlit leaf stomatal resistance (s/m) - real, intent(out) :: rssha ! shaded leaf stomatal resistance (s/m) - real, intent(out) :: bgap ! between gap fraction - real, intent(out) :: wgap ! within gap fraction - real, intent(out) :: tgb ! bare ground temperature [K] - real, intent(out) :: tgv ! under canopy ground temperature[K] - real, intent(out) :: chv ! sensible heat exchange coefficient vegetated - real, intent(out) :: chb ! sensible heat exchange coefficient bare-ground - real, intent(out) :: shg ! veg ground sen. heat [w/m2] [+ to atm] - real, intent(out) :: shc ! canopy sen. heat [w/m2] [+ to atm] - real, intent(out) :: shb ! bare sensible heat [w/m2] [+ to atm] - real, intent(out) :: evg ! veg ground evap. heat [w/m2] [+ to atm] - real, intent(out) :: evb ! bare soil evaporation [w/m2] [+ to atm] - real, intent(out) :: ghv ! veg ground heat flux [w/m2] [+ to soil] - real, intent(out) :: ghb ! bare ground heat flux [w/m2] [+ to soil] - real, intent(out) :: irg ! veg ground net LW rad. [w/m2] [+ to atm] - real, intent(out) :: irc ! canopy net LW rad. [w/m2] [+ to atm] - real, intent(out) :: irb ! bare net longwave rad. [w/m2] [+ to atm] - real, intent(out) :: tr ! transpiration [w/m2] [+ to atm] - real, intent(out) :: evc ! canopy evaporation heat [w/m2] [+ to atm] - real, intent(out) :: fgev_pet - real, intent(out) :: fcev_pet - real, intent(out) :: fctr_pet - real, intent(out) :: chleaf ! leaf exchange coefficient - real, intent(out) :: chuc ! under canopy exchange coefficient - real, intent(out) :: chv2 ! veg 2m exchange coefficient - real, intent(out) :: chb2 ! bare 2m exchange coefficient - real, intent(out) :: relsmc(nsoil) ! relative soil moisture [-] - !ag (05Jan2021) - real, intent(in) :: rivsto ! river storage [m s-1] - real, intent(in) :: fldsto ! flood storage [m s-1] - real, intent(in) :: fldfrc ! flooded fraction [-] - - - type(noahmp_parameters) :: parameters - -! real, intent(inout) :: sfcheadrt,INFXSRT,soldrain ! for WRF-Hydro -!-------------------------------------------------------------------------------- - ! external function - real, external :: month_d_401 - - ! local variables - real :: qsfc ! bulk surface specific humidity - real :: smstav ! soil moisture avail. [not used], maintained for Noah consistency - real :: smstot ! total soil water [mm][not used], maintained for Noah consistency - - ! Added by Zhuo Wang and Shugong Wang - integer :: ids,ide, jds,jde, kds,kde ! d -> domain - integer :: ims,ime, jms,jme, kms,kme ! m -> memory - integer :: its,ite, jts,jte, kts,kte ! t -> tile - real :: sr ! input frozen precipitation ratio [-] - real :: fpice ! output frozen precipitation ratio [-] -! real, dimension(1:60) :: gecros1d ! gecros crop -! real, :: gecros_dd ,gecros_tbem,gecros_emb ,gecros_ema, & -! gecros_ds1,gecros_ds2 ,gecros_ds1x,gecros_ds2x - - real :: dx - character(len=12) :: nowdate - integer :: k - integer :: ice - integer :: ist - - ! Revised by Zhuo Wang and Shugong Wang - real :: xland ! = 2 ocean; = 1 land/seaice - real :: xice ! fraction of grid that is seaice - real :: xice_thres ! fraction of grid determining seaice -! integer :: isc - integer :: croptype - real :: vegfra ! vegetation fraction [] - real :: vegmax ! annual max vegetation fraction [] - - integer :: yearlen - real :: julian - real :: cosz - real :: lat, lon - real :: q2(2) ! water vapor mixing ratio [kg/kg_dry] - real :: sfctmp(2) - real :: uu(2) - real :: vv(2) - real :: soldn - real :: lwdn - real :: sfcprs(2) ! multiple layer is required - real, dimension(1,1) :: sfcheadrt,INFXSRT,soldrain ! For WRF-Hydro - real :: dz8w3d(2) - real, allocatable, dimension(:) :: zsoil - real, allocatable, dimension(:) :: zsnso - real, allocatable, dimension(:) :: snice - real, allocatable, dimension(:) :: snliq - - ! Added by Zhuo Wang and Shugong Wang on 10/30/2018 - real, allocatable, dimension(:) :: tsnow - - integer :: snl_idx - - ! Added by David Mocko on 11/19/2018 - logical :: Bondvillecheck - integer :: i,local_hour - integer :: locyr,locmo,locda,lochr,locmn,locss,locdoy - real*8 :: loctime - real :: locgmt,change - - !!!! local variables for dimension match - !!!! Added by Zhuo Wang and Shugong Wang on 10/30/2018 - real, dimension(1,1) :: coszin - real, dimension(1,1) :: latin - real, dimension(1,1) :: lonin - integer, dimension(1,1) :: vegetypein - integer, dimension(1,1) :: soiltypein - real, dimension(1,1) :: vegfrain - real, dimension(1,1) :: vegmaxin - real, dimension(1,1) :: tbotin - real, dimension(1,1) :: xlandin - real, dimension(1,1) :: xicein - integer, dimension(1,1) :: cropcatin - real, dimension(1,1) :: plantingin - real, dimension(1,1) :: harvestin - real, dimension(1,1) :: season_gddin - real, dimension(1,8,1) :: soilcompin - real, dimension(1,1) :: soilcL1in - real, dimension(1,1) :: soilcL2in - real, dimension(1,1) :: soilcL3in - real, dimension(1,1) :: soilcL4in - real, dimension(1,1) :: soldnin - real, dimension(1,1) :: lwdnin - real, dimension(1,1) :: prcpin - real, dimension(1,1) :: srin - real, dimension(1,1) :: tskinout - real, dimension(1,1) :: hfxinout - real, dimension(1,1) :: qfxinout - real, dimension(1,1) :: lhinout - real, dimension(1,1) :: grdflxinout - real, dimension(1,1) :: smstavinout - real, dimension(1,1) :: smstotinout - real, dimension(1,1) :: sfcrunoffinout - real, dimension(1,1) :: udrunoffinout -! real, dimension(1,1) :: albedoinout - real, dimension(1,1) :: albedoout - real, dimension(1,1) :: snowcinout - real, dimension(1,nsoil,1) :: smcinout - real, dimension(1,nsoil,1) :: sh2oinout - real, dimension(1,nsoil,1) :: tslbinout - real, dimension(1,1) :: sneqvinout - real, dimension(1,1) :: snowhinout - real, dimension(1,1) :: canwatinout - real, dimension(1,1) :: acsnominout - real, dimension(1,1) :: acsnowinout - real, dimension(1,1) :: emissinout - real, dimension(1,1) :: qsfcinout - real, dimension(1,1) :: z0inout - real, dimension(1,1) :: zntinout - integer, dimension(1,1) :: isnowinout - real, dimension(1,1) :: tvinout - real, dimension(1,1) :: tginout - real, dimension(1,1) :: caniceinout - real, dimension(1,1) :: canliqinout - real, dimension(1,1) :: eahinout - real, dimension(1,1) :: tahinout - real, dimension(1,1) :: cminout - real, dimension(1,1) :: chinout - real, dimension(1,1) :: fwetinout - real, dimension(1,1) :: sneqvoinout - real, dimension(1,1) :: alboldinout - real, dimension(1,1) :: qsnowinout - real, dimension(1,1) :: wslakeinout - real, dimension(1,1) :: zwtinout - real, dimension(1,1) :: wainout - real, dimension(1,1) :: wtinout - real, dimension(1,-nsnow+1:0,1) :: tsnowinout - real, dimension(1,-nsnow+1:nsoil,1) :: zsnsoinout - real, dimension(1,-nsnow+1:0,1) :: sniceinout - real, dimension(1,-nsnow+1:0,1) :: snliqinout - real, dimension(1,1) :: lfmassinout - real, dimension(1,1) :: rtmassinout - real, dimension(1,1) :: stmassinout - real, dimension(1,1) :: woodinout - real, dimension(1,1) :: stblcpinout - real, dimension(1,1) :: fastcpinout - real, dimension(1,1) :: laiinout - real, dimension(1,1) :: saiinout - real, dimension(1,1) :: taussinout - real, dimension(1,nsoil,1) :: smoiseqinout - real, dimension(1,1) :: smcwtdinout - real, dimension(1,1) :: deeprechinout - real, dimension(1,1) :: rechinout - real, dimension(1,1) :: graininout - real, dimension(1,1) :: gddinout - integer, dimension(1,1) :: pgsinout - real, dimension(1,60,1) :: gecros_stateinout - real, dimension(1,1) :: t2mvout - real, dimension(1,1) :: t2mbout - real, dimension(1,1) :: q2mvout - real, dimension(1,1) :: q2mbout - real, dimension(1,1) :: tradout - real, dimension(1,1) :: neeout - real, dimension(1,1) :: gppout - real, dimension(1,1) :: nppout - real, dimension(1,1) :: fvegout - real, dimension(1,1) :: runsfout - real, dimension(1,1) :: runsbout - real, dimension(1,1) :: ecanout - real, dimension(1,1) :: edirout - real, dimension(1,1) :: etranout - real, dimension(1,1) :: fsaout - real, dimension(1,1) :: firaout - real, dimension(1,1) :: aparout - real, dimension(1,1) :: psnout - real, dimension(1,1) :: savout - real, dimension(1,1) :: sagout - real, dimension(1,1) :: rssunout - real, dimension(1,1) :: rsshaout - real, dimension(1,1) :: bgapout - real, dimension(1,1) :: wgapout - real, dimension(1,1) :: tgvout - real, dimension(1,1) :: tgbout - real, dimension(1,1) :: chvout - real, dimension(1,1) :: chbout - real, dimension(1,1) :: shgout - real, dimension(1,1) :: shcout - real, dimension(1,1) :: shbout - real, dimension(1,1) :: evgout - real, dimension(1,1) :: evbout - real, dimension(1,1) :: ghvout - real, dimension(1,1) :: ghbout - real, dimension(1,1) :: irgout - real, dimension(1,1) :: ircout - real, dimension(1,1) :: irbout - real, dimension(1,1) :: trout - real, dimension(1,1) :: evcout - real, dimension(1,1) :: fgev_petout - real, dimension(1,1) :: fcev_petout - real, dimension(1,1) :: fctr_petout - real, dimension(1,1) :: chleafout - real, dimension(1,1) :: chucout - real, dimension(1,1) :: chv2out - real, dimension(1,1) :: chb2out - real, dimension(1,nsoil,1) :: relsmcout - real, dimension(1,1) :: rsout - !ag(05Jan2021) - real, dimension(1,1) :: rivstoin - real, dimension(1,1) :: fldstoin - real, dimension(1,1) :: fldfrcin - - - ids = 1 - ide = 1 - jds = 1 - jde = 1 - kds = 1 - kde = 1 - ims = 1 - ime = 1 - jms = 1 - jme = 1 - kms = 1 - kme = 2 - its = 1 - ite = 1 - jts = 1 - jte = 1 - kts = 1 - kte = 1 - - xland = 1 - xice = 0 - ! Fraction of grid determining seaice (from WRF and HRLDAS) - xice_thres = 0.5 - -#ifndef WRF_HYDRO - sfcheadrt = 0.0 -#endif -! SR = frozen precip fraction. For offline, it is set to zero. -! If running coupled to WRF, then SR is set by the WRF model. - if (snf_opt.ne.4) then - sr = 0.0 - else - write(LIS_logunit,*) "[ERR] SR should be set by the WRF model." - write(LIS_logunit,*) "[ERR] Code needs fixing. Stopping LIS." - call LIS_endrun - endif - - ! dx is horizontal grid spacing. dx is not used past this point, - ! but is used earlier when run_opt=5 (new groundwater scheme). - dx = 0.0 - - !!!!! print all the options not supported in offline mode - if (sfc_opt == 3) then - stop "(opt_sfc == 3) and (opt_sfc == 4) are not for offline use" - endif - - ! set ZSOIL - allocate(zsoil(nsoil)) - do k = 1,nsoil - zsoil(k) = sldpth(k) - enddo - - allocate(zsnso(-nsnow+1:nsoil)) - allocate(snice(-nsnow+1:0)) - allocate(snliq(-nsnow+1:0)) - allocate(tsnow(-nsnow+1:0)) ! Added by Zhuo Wang and Shugong Wang on 10/30/2018 - - smstav = 0.0 ! Not used - smstot = 0.0 ! Not used - - ! state variables - zsnso(-nsnow+1:nsoil) = zss(1:nsnow+nsoil) - snice(-nsnow+1:0) = snowice(1:nsnow) - snliq(-nsnow+1:0) = snowliq(1:nsnow) - tsnow(-nsnow+1:0) = tsno(1:nsnow) ! Added by Zhuo Wang and Shugong Wang on 10/30/2018 - - ! cosz, yearlen, and julian are calculated in subroutine calc_declin_401. - ! Be careful here!!!, LIS uses GMT; the date for calc_declin_401 should - ! be local time. Longitude is need to convert GMT into local time!!!. - ! This should only be done when using Bondville single_point forcing, - ! as the forcing file uses local time instead of GMT. - Bondvillecheck = .false. - do i=1,LIS_rc%nmetforc - if (trim(LIS_rc%metforc(i)).eq."Bondville") Bondvillecheck = .true. - enddo - -! For a true benchmark against the HRLDAS Noah-MP-4.0.1 testcase -! from NCAR, set "change = -21600.0". This line allows the code -! to _incorrectly_ run in the same way as the HRLDAS testcase, -! which runs on local time instead of on UTC time. The changes -! is 6 hours * 3600.0 seconds per hour, to go from GMT to the -! Bondville location in Illinois, which uses Central time. - change = 0.0 - if (Bondvillecheck) change = -21600.0 - locyr = LIS_rc%yr - locmo = LIS_rc%mo - locda = LIS_rc%da - lochr = LIS_rc%hr - locmn = LIS_rc%mn - locss = LIS_rc%ss - - call LIS_date2time(loctime,locdoy,locgmt,locyr,locmo,locda,lochr,locmn,locss) - call LIS_tick(loctime,locdoy,locgmt,locyr,locmo,locda,lochr,locmn,locss,change) - - write(nowdate,'(I4.4,4I2.2)') locyr, locmo, locda, lochr, locmn - call calc_declin_401(nowdate(1:4)//"-"//nowdate(5:6)//"-"//nowdate(7:8)//"_"//nowdate(9:10)//":"//nowdate(11:12)//":00", & - latitude, longitude, cosz, yearlen, julian) - - if ((dveg_opt.eq.1).or.(dveg_opt.eq.6).or.(dveg_opt.eq.7)) then - ! with dveg_opt==1/6/7, shdfac is fed directly to fveg - vegfra = month_d_401(shdfac_monthly, nowdate) - else - ! with dveg_opt==2/3/8, fveg is computed from lai and sai, and shdfac is unused - ! with dveg_opt==4/5/9, fveg is set to the maximum shdfac, and shdfac is unused - vegfra = -1.E36 ! To match with HRLDAS initialization - endif - vegmax = maxval(shdfac_monthly) - - ! assign forcing variables - dz8w3d(:) = dz8w - sfctmp(:) = tair - sfcprs(:) = psurf - q2(:) = qair/(1.0-qair) ! Convert specific humidity to water vapor mixing ratio - soldn = swdown - lwdn = lwdown - qsfc = qair - uu(:) = wind_e - vv(:) = wind_n - - !!!! set up local variables for dimension match - !!!! Added by Zhuo Wang and Shugong Wang on 10/30/2018 - coszin(1,1) = cosz - latin(1,1) = latitude - lonin(1,1) = longitude - vegetypein(1,1) = vegetype - soiltypein(1,1) = soiltype - vegfrain(1,1) = vegfra - vegmaxin(1,1) = vegmax - tbotin(1,1) = tbot - xlandin(1,1) = xland - xicein(1,1) = xice - cropcatin(1,1) = cropcat - plantingin(1,1) = planting - harvestin(1,1) = harvest - season_gddin(1,1) = season_gdd - soilcompin(1,:,1) = soilcomp(:) - soilcL1in(1,1) = soilcL1 - soilcL2in(1,1) = soilcL2 - soilcL3in(1,1) = soilcL3 - soilcL4in(1,1) = soilcL4 - soldnin(1,1) = soldn - lwdnin(1,1) = lwdn - prcpin(1,1) = prcp - srin(1,1) = sr - tskinout(1,1) = tsk - hfxinout(1,1) = hfx - qfxinout(1,1) = qfx - lhinout(1,1) = lh - grdflxinout(1,1) = grdflx - smstavinout(1,1) = smstav - smstotinout(1,1) = smstot - sfcrunoffinout(1,1) = sfcrunoff - udrunoffinout(1,1) = udrunoff -! albedoinout(1,1) = albedo - snowcinout(1,1) = snowc - smcinout(1,:,1) = smc(:) - sh2oinout(1,:,1) = sh2o(:) - tslbinout(1,:,1) = tslb(:) - sneqvinout(1,1) = sneqv - snowhinout(1,1) = snowh - canwatinout(1,1) = canwat - acsnominout(1,1) = acsnom - acsnowinout(1,1) = acsnow - emissinout(1,1) = emiss - qsfcinout(1,1) = qsfc -! If coupled to WRF, set these variables to realistic values, -! and then pass back to WRF after the call to noahmplsm_401. - z0inout(1,1) = 0.0 - zntinout(1,1) = 0.0 -! z0 and znt should be passed to WRF, if coupled. - dmm - isnowinout(1,1) = isnow - tvinout(1,1) = tv - tginout(1,1) = tg - caniceinout(1,1) = canice - canliqinout(1,1) = canliq - eahinout(1,1) = eah - tahinout(1,1) = tah - cminout(1,1) = cm - chinout(1,1) = ch - fwetinout(1,1) = fwet - sneqvoinout(1,1) = sneqvo - alboldinout(1,1) = albold - qsnowinout(1,1) = qsnow - wslakeinout(1,1) = wslake - zwtinout(1,1) = zwt - wainout(1,1) = wa - wtinout(1,1) = wt - tsnowinout(1,:,1) = tsnow(:) - zsnsoinout(1,:,1) = zsnso(:) - sniceinout(1,:,1) = snice(:) - snliqinout(1,:,1) = snliq(:) - lfmassinout(1,1) = lfmass - rtmassinout(1,1) = rtmass - stmassinout(1,1) = stmass - woodinout(1,1) = wood - stblcpinout(1,1) = stblcp - fastcpinout(1,1) = fastcp - laiinout(1,1) = lai - saiinout(1,1) = sai - taussinout(1,1) = tauss - smoiseqinout(1,:,1) = smoiseq(:) - smcwtdinout(1,1) = smcwtd - deeprechinout(1,1) = deeprech - rechinout(1,1) = rech - graininout(1,1) = grain - gddinout(1,1) = gdd - pgsinout(1,1) = pgs - gecros_stateinout(1,:,1) = gecros_state(:) - t2mvout(1,1) = t2mv - t2mbout(1,1) = t2mb - q2mvout(1,1) = q2mv - q2mbout(1,1) = q2mb - tradout(1,1) = trad - neeout(1,1) = nee - gppout(1,1) = gpp - nppout(1,1) = npp - fvegout(1,1) = fveg - runsfout(1,1) = runsf - runsbout(1,1) = runsb - ecanout(1,1) = ecan - edirout(1,1) = edir - etranout(1,1) = etran - fsaout(1,1) = fsa - firaout(1,1) = fira - aparout(1,1) = apar - psnout(1,1) = psn - savout(1,1) = sav - sagout(1,1) = sag - rssunout(1,1) = rssun - rsshaout(1,1) = rssha - bgapout(1,1) = bgap - wgapout(1,1) = wgap - tgvout(1,1) = tgv - tgbout(1,1) = tgb - chvout(1,1) = chv - chbout(1,1) = chb - shgout(1,1) = shg - shcout(1,1) = shc - shbout(1,1) = shb - evgout(1,1) = evg - evbout(1,1) = evb - ghvout(1,1) = ghv - ghbout(1,1) = ghb - irgout(1,1) = irg - ircout(1,1) = irc - irbout(1,1) = irb - trout(1,1) = tr - evcout(1,1) = evc - fgev_petout(1,1) = fgev_pet - fcev_petout(1,1) = fcev_pet - fctr_petout(1,1) = fctr_pet - chleafout(1,1) = chleaf - chucout(1,1) = chuc - chv2out(1,1) = chv2 - chb2out(1,1) = chb2 - relsmcout(1,:,1) = relsmc(:) - rsout(1,1) = rs - -! Code from module_NoahMP_hrldas_driver.F. Initial guess only. - if ((trim(LIS_rc%startcode).eq."coldstart").and.(itimestep.eq.1)) then - eahinout(1,1) = sfcprs(1) * (q2(1)/(0.622+q2(1))) - tahinout(1,1) = sfctmp(1) - cminout(1,1) = 0.1 - chinout(1,1) = 0.1 - endif - - !ag(05Jan2021) - rivstoin(1,1)=rivsto - fldstoin(1,1)=fldsto - fldfrcin(1,1)=fldfrc - - - call noahmplsm_401 (LIS_rc%udef, & ! in : LIS undefined value (David Mocko) - itimestep,yearlen , julian , coszin , latin , lonin , & ! in : time/space-related - dz8w3d(1), dt , zsoil , nsoil , dx , & ! in : model configuration - vegetypein, soiltypein, vegfrain, vegmaxin, tbotin , & ! in : Vegetation/Soil characteristics - xlandin , xicein , xice_thres, & ! in : Vegetation/Soil characteristics - cropcatin , plantingin, harvestin ,season_gddin, & - dveg_opt, crs_opt , btr_opt ,run_opt , sfc_opt , frz_opt, & ! in : user options - inf_opt , rad_opt , alb_opt ,snf_opt , tbot_opt, stc_opt, & ! in : user options - gla_opt , sndpth_gla_opt, rsf_opt , soil_opt,pedo_opt , crop_opt, & ! in : user options - iz0tlnd , urban_opt, & ! in : user options - soilcompin, soilcL1in, soilcL2in, soilcL3in, soilcL4in, & ! in : user options - sfctmp(1) , q2(1) , uu(1) , vv(1) , soldnin , lwdnin , & ! in : forcing - sfcprs(1) , prcpin , srin , & ! in : forcing - - tskinout, hfxinout, qfxinout, lhinout , grdflxinout , smstavinout , & ! in/out LSM eqv - - smstotinout ,sfcrunoffinout, udrunoffinout, albedoout , qsnbot , subsnow, & ! in/out LSM eqv - snowcinout , smcinout , pah, & ! in/out LSM eqv - sh2oinout , tslbinout , sneqvinout , snowhinout , canwatinout , acsnominout , & ! in/out LSM eqv - acsnowinout , emissinout , qsfcinout , z0inout , zntinout , & ! in/out LSM eqv - - isnowinout , tvinout , tginout , caniceinout , canliqinout , eahinout , & ! in/out Noah MP only - tahinout , cminout , chinout , fwetinout , sneqvoinout , alboldinout , & ! in/out Noah MP only - qsnowinout , wslakeinout , zwtinout , wainout , wtinout , tsnowinout , & ! in/out Noah MP only - zsnsoinout , sniceinout , snliqinout , lfmassinout , rtmassinout , stmassinout , & ! in/out Noah MP only - woodinout , stblcpinout , fastcpinout , laiinout , saiinout , taussinout , & ! in/out Noah MP only - smoiseqinout , smcwtdinout ,deeprechinout , rechinout , graininout , gddinout , & ! in/out Noah MP only - pgsinout , & ! in/out Noah MP only - gecros_stateinout, & ! in/out gecros model - - t2mvout , t2mbout , q2mvout , q2mbout , relsmcout, & ! out Noah MP only - tradout , neeout , gppout , nppout , fvegout , runsfout, & ! out Noah MP only - runsbout, ecanout , edirout , etranout, fsaout , firaout , & ! out Noah MP only - aparout , psnout , savout , sagout , rssunout, rsshaout, & ! out Noah MP only - bgapout , wgapout , tgvout , tgbout , chvout , chbout , & ! out Noah MP only - shgout , shcout , shbout , evgout , evbout , ghvout , & ! out Noah MP only - ghbout , irgout , ircout , irbout , trout , evcout , & ! out Noah MP only - fgev_petout, fcev_petout, fctr_petout, & ! PET - chleafout , chucout , chv2out , chb2out , rsout , fpice , & ! out Noah MP only - parameters, & - rivstoin,fldstoin,fldfrcin, & -#ifdef WRF_HYDRO - sfcheadrt, INFXSRT, soldrain, & -#endif - ids,ide, jds,jde, kds,kde, & - ims,ime, jms,jme, kms,kme, & - its,ite, jts,jte, kts,kte) - - ! Added by Zhuo Wang and Shugong on 10/30/2018 - tsk = tskinout(1,1) - hfx = hfxinout(1,1) - qfx = qfxinout(1,1) - lh = lhinout(1,1) - grdflx = grdflxinout(1,1) - smstav = smstavinout(1,1) - smstot = smstotinout(1,1) - sfcrunoff = sfcrunoffinout(1,1) - udrunoff = udrunoffinout(1,1) -! albedo = albedoinout(1,1) - albedo = albedoout(1,1) - snowc = snowcinout(1,1) - smc(:) = smcinout(1,:,1) - sh2o(:) = sh2oinout(1,:,1) - tslb(:) = tslbinout(1,:,1) - sneqv = sneqvinout(1,1) - snowh = snowhinout(1,1) - canwat = canwatinout(1,1) - acsnom = acsnominout(1,1) - acsnow = acsnowinout(1,1) - emiss = emissinout(1,1) - qsfc = qsfcinout(1,1) - isnow = isnowinout(1,1) - tv = tvinout(1,1) - tg = tginout(1,1) - canice = caniceinout(1,1) - canliq = canliqinout(1,1) - eah = eahinout(1,1) - tah = tahinout(1,1) - cm = cminout(1,1) - ch = chinout(1,1) - fwet = fwetinout(1,1) - sneqvo = sneqvoinout(1,1) - albold = alboldinout(1,1) - qsnow = qsnowinout(1,1) - wslake = wslakeinout(1,1) - zwt = zwtinout(1,1) - wa = wainout(1,1) - wt = wtinout(1,1) - - ! Modified by Zhuo Wang on 12/31/2018 - tsnow(-nsnow+1:0) = tsnowinout(1,-nsnow+1:0,1) - zsnso(-nsnow+1:nsoil) = zsnsoinout(1,-nsnow+1:nsoil,1) - snice(-nsnow+1:0) = sniceinout(1,-nsnow+1:0,1) - snliq(-nsnow+1:0) = snliqinout(1,-nsnow+1:0,1) - tsno(1:nsnow) = tsnow(-nsnow+1:0) - zss(1:nsnow+nsoil) = zsnso(-nsnow+1:nsoil) - snowice(1:nsnow) = snice(-nsnow+1:0) - snowliq(1:nsnow) = snliq(-nsnow+1:0) - - lfmass = lfmassinout(1,1) - rtmass = rtmassinout(1,1) - stmass = stmassinout(1,1) - wood = woodinout(1,1) - stblcp = stblcpinout(1,1) - fastcp = fastcpinout(1,1) - lai = laiinout(1,1) - sai = saiinout(1,1) - tauss = taussinout(1,1) - smoiseq(:) = smoiseqinout(1,:,1) - smcwtd = smcwtdinout(1,1) - deeprech = deeprechinout(1,1) - rech = rechinout(1,1) - grain = graininout(1,1) - gdd = gddinout(1,1) - pgs = pgsinout(1,1) - gecros_state(:) = gecros_stateinout(1,:,1) - t2mv = t2mvout(1,1) - t2mb = t2mbout(1,1) - q2mv = q2mvout(1,1) - q2mb = q2mbout(1,1) - trad = tradout(1,1) - nee = neeout(1,1) - gpp = gppout(1,1) - npp = nppout(1,1) - fveg = fvegout(1,1) - runsf = runsfout(1,1) - runsb = runsbout(1,1) - ecan = ecanout(1,1) - edir = edirout(1,1) - etran = etranout(1,1) - fsa = fsaout(1,1) - fira = firaout(1,1) - apar = aparout(1,1) - psn = psnout(1,1) - sav = savout(1,1) - sag = sagout(1,1) - rssun = rssunout(1,1) - rssha = rsshaout(1,1) - bgap = bgapout(1,1) - wgap = wgapout(1,1) - tgv = tgvout(1,1) - tgb = tgbout(1,1) - chv = chvout(1,1) - chb = chbout(1,1) - shg = shgout(1,1) - shc = shcout(1,1) - shb = shbout(1,1) - evg = evgout(1,1) - evb = evbout(1,1) - ghv = ghvout(1,1) - ghb = ghbout(1,1) - irg = irgout(1,1) - irc = ircout(1,1) - irb = irbout(1,1) - tr = trout(1,1) - evc = evcout(1,1) - chleaf = chleafout(1,1) - chuc = chucout(1,1) - chv2 = chv2out(1,1) - chb2 = chb2out(1,1) - relsmc(:) = relsmcout(1,:,1) - rs = rsout(1,1) - - rainf = prcp * (1.0 - fpice)/dt ! added by Shugong for LIS output - snowf = prcp * fpice/dt ! added by Shugong for LIS output - fgev_pet = fgev_petout(1,1) ! 08/30/2021 Shugong - fcev_pet = fcev_petout(1,1) - fctr_pet = fctr_petout(1,1) - -#ifndef WRF_HYDRO - INFXSRT = 0.0 - soldrain = 0.0 -#endif - - deallocate(zsoil) - deallocate(zsnso) - - deallocate(snice) - deallocate(snliq) - deallocate(tsnow) ! Added by Zhuo Wang and Shugong Wang on 10/30/2018 - -end subroutine noahmp_driver_401 - -real function month_d_401(a12, nowdate) result (nowval) - ! - ! Given a set of 12 values, taken to be valid on the fifteenth of each month (Jan through Dec) - ! and a date in the form .... - ! - ! Return a value valid for the day given in , as an interpolation from the 12 - ! monthly values. - ! - use kwm_date_utilities_401 - implicit none - real, dimension(12), intent(in) :: a12 ! 12 monthly values, taken to be valid on the 15th of - ! ! the month - character(len=12), intent(in) :: nowdate ! Date, in the form - integer :: nowy, nowm, nowd - integer :: prevm, postm - real :: factor - integer, dimension(12) :: ndays = (/ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 /) - ! - ! Handle leap year by setting the number of days in February for the year in question. - ! - read(nowdate(1:8),'(I4,I2,I2)') nowy, nowm, nowd - ndays(2) = nfeb(nowy) - - ! - ! Do interpolation between the fifteenth of two successive months. - ! - if (nowd == 15) then - nowval = a12(nowm) - return - else if (nowd < 15) then - postm = nowm - prevm = nowm - 1 - if (prevm == 0) prevm = 12 - factor = real(ndays(prevm)-15+nowd)/real(ndays(prevm)) - else if (nowd > 15) then - prevm = nowm - postm = nowm + 1 - if (postm == 13) postm = 1 - factor = real(nowd-15)/real(ndays(prevm)) - endif - - nowval = a12(prevm)*(1.0-factor) + a12(postm)*factor - -end function month_d_401 - -SUBROUTINE calc_declin_401 ( nowdate, latitude, longitude, cosz, yearlen, julian) - use kwm_date_utilities_401 -!--------------------------------------------------------------------- - IMPLICIT NONE -!--------------------------------------------------------------------- - -! !ARGUMENTS: - character(len=19), intent(in) :: nowdate ! YYYY-MM-DD_HH:mm:ss - real, intent(in) :: latitude - real, intent(in) :: longitude - real, intent(out) :: cosz - integer, intent(out) :: yearlen - real, intent(out) :: JULIAN - - REAL :: hrang - real :: DECLIN - real :: GMT - real :: tloctim - REAL :: OBECL - REAL :: SINOB - REAL :: SXLONG - REAL :: ARG - integer :: iyear - integer :: iday - integer :: ihour - integer :: iminute - integer :: isecond - - REAL, PARAMETER :: DEGRAD = 3.14159265/180. - REAL, PARAMETER :: DPD = 360./365. - - ! - ! Determine the number of days in the year - ! - - read(nowdate(1:4), '(I4)') iyear - yearlen = 365 - if (mod(iyear,4) == 0) then - yearlen = 366 - if (mod(iyear,100) == 0) then - yearlen = 365 - if (mod(iyear,400) == 0) then - yearlen = 366 - if (mod(iyear,3600) == 0) then - yearlen = 365 - endif - endif - endif - endif - - ! - ! Determine the Julian time (floating-point day of year). - ! - - call geth_idts(nowdate(1:10), nowdate(1:4)//"-01-01", iday) - read(nowdate(12:13), *) ihour - read(nowdate(15:16), *) iminute - read(nowdate(18:19), *) isecond - GMT = REAL(IHOUR) + IMINUTE/60.0 + ISECOND/3600.0 - JULIAN = REAL(IDAY) + GMT/24. - -! for short wave radiation - - DECLIN=0. - -!-----OBECL : OBLIQUITY = 23.5 DEGREE. - - OBECL=23.5*DEGRAD - SINOB=SIN(OBECL) - -!-----CALCULATE LONGITUDE OF THE SUN FROM VERNAL EQUINOX: - - IF(JULIAN.GE.80.)SXLONG=DPD*(JULIAN-80.)*DEGRAD - IF(JULIAN.LT.80.)SXLONG=DPD*(JULIAN+285.)*DEGRAD - ARG=SINOB*SIN(SXLONG) - DECLIN=ASIN(ARG) - - TLOCTIM = REAL(IHOUR) + REAL(IMINUTE)/60.0 + REAL(ISECOND)/3600.0 + LONGITUDE/15.0 ! Local time in hours - tloctim = AMOD(tloctim+24.0, 24.0) - HRANG=15.*(TLOCTIM-12.)*DEGRAD - COSZ=SIN(LATITUDE*DEGRAD)*SIN(DECLIN)+COS(LATITUDE*DEGRAD)*COS(DECLIN)*COS(HRANG) - COSZ=MIN(COSZ,1.0); !Added by kwH 3/1/16 to address floating point roundoff errors - COSZ=MAX(COSZ,-1.0); ! - -!KWM write(wrf_err_message,10)DECDEG/DEGRAD -!KWM10 FORMAT(1X,'*** SOLAR DECLINATION ANGLE = ',F6.2,' DEGREES.',' ***') -!KWM CALL wrf_debug (50, wrf_err_message) - -END SUBROUTINE calc_declin_401 - -! Subroutine SNOW_INIT grabbed from NOAH-MP-WRF -SUBROUTINE SNOW_INIT_401 ( jts, jtf, its, itf, ims, ime, jms, jme, NSNOW, NSOIL, ZSOIL, & - SWE, tgxy, SNODEP, ZSNSOXY, TSNOXY, SNICEXY, SNLIQXY, ISNOWXY) - -! ------------------------------------------------------------------------------------------ - IMPLICIT NONE -! ------------------------------------------------------------------------------------------ - INTEGER, INTENT(IN) :: jts,jtf,its,itf,ims,ime, jms,jme,NSNOW,NSOIL - REAL, INTENT(IN), DIMENSION(ims:ime, jms:jme) :: SWE - REAL, INTENT(IN), DIMENSION(ims:ime, jms:jme) :: SNODEP - REAL, INTENT(IN), DIMENSION(ims:ime, jms:jme) :: tgxy - REAL, INTENT(IN), DIMENSION(1:NSOIL) :: ZSOIL - - INTEGER, INTENT(OUT), DIMENSION(ims:ime, jms:jme) :: ISNOWXY - REAL, INTENT(OUT), DIMENSION(ims:ime, -NSNOW+1:NSOIL,jms:jme) :: ZSNSOXY - REAL, INTENT(OUT), DIMENSION(ims:ime, -NSNOW+1: 0,jms:jme) :: TSNOXY - REAL, INTENT(OUT), DIMENSION(ims:ime, -NSNOW+1: 0,jms:jme) :: SNICEXY - REAL, INTENT(OUT), DIMENSION(ims:ime, -NSNOW+1: 0,jms:jme) :: SNLIQXY - -!local - INTEGER :: I,J,IZ - REAL, DIMENSION(ims:ime, -NSNOW+1: 0,jms:jme) :: DZSNOXY - REAL, DIMENSION(ims:ime, -NSNOW+1:NSOIL,jms:jme) :: DZSNSOXY -! ------------------------------------------------------------------------------------------ - - - DO J = jts,jtf - DO I = its,itf - IF (SNODEP(I,J) < 0.025) THEN - ISNOWXY(I,J) = 0 - DZSNOXY(I,-NSNOW+1:0,J) = 0. - ELSE - IF ((SNODEP(I,J) >= 0.025) .AND. (SNODEP(I,J) <= 0.05)) THEN - ISNOWXY(I,J) = -1 - DZSNOXY(I,0,J) = SNODEP(I,J) - ELSE IF ((SNODEP(I,J) > 0.05) .AND. (SNODEP(I,J) <= 0.10)) THEN - ISNOWXY(I,J) = -2 - DZSNOXY(I,-1,J) = SNODEP(I,J)/2. - DZSNOXY(I, 0,J) = SNODEP(I,J)/2. - ELSE IF ((SNODEP(I,J) > 0.10) .AND. (SNODEP(I,J) <= 0.25)) THEN - ISNOWXY(I,J) = -2 - DZSNOXY(I,-1,J) = 0.05 - DZSNOXY(I, 0,J) = SNODEP(I,J) - DZSNOXY(I,-1,J) - ELSE IF ((SNODEP(I,J) > 0.25) .AND. (SNODEP(I,J) <= 0.35)) THEN - ISNOWXY(I,J) = -3 - DZSNOXY(I,-2,J) = 0.05 - DZSNOXY(I,-1,J) = 0.5*(SNODEP(I,J)-DZSNOXY(I,-2,J)) - DZSNOXY(I, 0,J) = 0.5*(SNODEP(I,J)-DZSNOXY(I,-2,J)) - ELSE IF (SNODEP(I,J) > 0.35) THEN - ISNOWXY(I,J) = -3 - DZSNOXY(I,-2,J) = 0.05 - DZSNOXY(I,-1,J) = 0.10 - DZSNOXY(I, 0,J) = SNODEP(I,J) - DZSNOXY(I,-1,J) - DZSNOXY(I,-2,J) - END IF - END IF - ENDDO - ENDDO - - DO J = jts,jtf - DO I = its,itf - TSNOXY( I,-NSNOW+1:0,J) = 0. - SNICEXY(I,-NSNOW+1:0,J) = 0. - SNLIQXY(I,-NSNOW+1:0,J) = 0. - DO IZ = ISNOWXY(I,J)+1, 0 - TSNOXY(I,IZ,J) = tgxy(I,J) ! [k] - SNLIQXY(I,IZ,J) = 0.00 - SNICEXY(I,IZ,J) = 1.00 * DZSNOXY(I,IZ,J) * (SWE(I,J)/SNODEP(I,J)) ! [kg/m3] - END DO - - DO IZ = ISNOWXY(I,J)+1, 0 - DZSNSOXY(I,IZ,J) = -DZSNOXY(I,IZ,J) - END DO - - DZSNSOXY(I,1,J) = ZSOIL(1) - DO IZ = 2,NSOIL - DZSNSOXY(I,IZ,J) = (ZSOIL(IZ) - ZSOIL(IZ-1)) - END DO - - ZSNSOXY(I,ISNOWXY(I,J)+1,J) = DZSNSOXY(I,ISNOWXY(I,J)+1,J) - DO IZ = ISNOWXY(I,J)+2 ,NSOIL - ZSNSOXY(I,IZ,J) = ZSNSOXY(I,IZ-1,J) + DZSNSOXY(I,IZ,J) - ENDDO - - END DO - END DO - -END SUBROUTINE SNOW_INIT_401 diff --git a/lis/surfacemodels/land/noahmp.new/noahmp_driver_new.F90 b/lis/surfacemodels/land/noahmp.new/noahmp_driver_new.F90 new file mode 100644 index 000000000..11269174a --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/noahmp_driver_new.F90 @@ -0,0 +1,510 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +! Oct 15 2018 Shugong Wang started for implementing Noah-MP 4.0.1 based on the version of 3.6 +! Oct 15 2018 Zhuo Wang modifed for implementing Noah-MP 4.0.1 +! May 2023: Cenlin He modified for refactored Noah-MP v5 and later + +#undef LIS_NoahMP_TEST +! !INTERFACE +subroutine noahmp_driver_new(n, NoahmpIO, LISparam) + + use LIS_coreMod, only : LIS_rc + use LIS_logMod, only : LIS_logunit, LIS_endrun + use LIS_timeMgrMod, only : LIS_date2time, LIS_tick + use NoahmpIOVarType + use LisNoahmpParamType + use NoahmpDriverMainMod + + implicit none + integer, intent(in) :: n ! nest id + type(NoahmpIO_type), intent(inout) :: NoahmpIO ! noahmp IO data type + type(LisNoahmpParam_type), intent(in) :: LISparam ! lis/noahmp parameter + +!-------------------------------------------------------------------------------- + ! external function + real, external :: month_d_new + + ! local variables + character(len=12) :: nowdate + integer :: k + + ! Added by David Mocko on 11/19/2018 + logical :: Bondvillecheck + integer :: i,local_hour + integer :: locyr,locmo,locda,lochr,locmn,locss,locdoy + real*8 :: loctime + real :: locgmt,change + + ! --------------------------------------- + NoahmpIO%xland(1,1) = 1 + NoahmpIO%xice(1,1) = 0 + ! Fraction of grid determining seaice (from WRF and HRLDAS) + NoahmpIO%xice_threshold = 0.5 + +#ifndef WRF_HYDRO + NoahmpIO%sfcheadrt(1,1) = 0.0 +#endif +! SR = frozen precip fraction. For offline, it is set to zero. +! If running coupled to WRF, then SR is set by the WRF model. + if (NoahmpIO%IOPT_SNF .ne. 4) then + NoahmpIO%SR(1,1) = 0.0 + else + write(LIS_logunit,*) "[ERR] SR should be set by the WRF model." + write(LIS_logunit,*) "[ERR] Code needs fixing. Stopping LIS." + call LIS_endrun + endif + + ! dx is horizontal grid spacing. dx is not used past this point, + ! but is used earlier when run_opt=5 (new groundwater scheme). + NoahmpIO%dx = 0.0 + + !!!!! print all the options not supported in offline mode + if (NoahmpIO%IOPT_SFC > 2) then + stop "(opt_sfc == 3) and (opt_sfc == 4) are not for offline use" + endif + + + ! cosz, yearlen, and julian are calculated in subroutine calc_declin. + ! Be careful here!!!, LIS uses GMT; the date for calc_declin_401 should + ! be local time. Longitude is need to convert GMT into local time!!!. + ! This should only be done when using Bondville single_point forcing, + ! as the forcing file uses local time instead of GMT. + Bondvillecheck = .false. + do i=1,LIS_rc%nmetforc + if (trim(LIS_rc%metforc(i)).eq."Bondville") Bondvillecheck = .true. + enddo + +! For a true benchmark against the HRLDAS Noah-MP testcase +! from NCAR, set "change = -21600.0". This line allows the code +! to _incorrectly_ run in the same way as the HRLDAS testcase, +! which runs on local time instead of on UTC time. The changes +! is 6 hours * 3600.0 seconds per hour, to go from GMT to the +! Bondville location in Illinois, which uses Central time. + change = 0.0 + if (Bondvillecheck) change = -21600.0 + locyr = LIS_rc%yr + locmo = LIS_rc%mo + locda = LIS_rc%da + lochr = LIS_rc%hr + locmn = LIS_rc%mn + locss = LIS_rc%ss + + call LIS_date2time(loctime,locdoy,locgmt,locyr,locmo,locda,lochr,locmn,locss) + call LIS_tick(loctime,locdoy,locgmt,locyr,locmo,locda,lochr,locmn,locss,change) + + write(nowdate,'(I4.4,4I2.2)') locyr, locmo, locda, lochr, locmn + call calc_declin(nowdate(1:4)//"-"//nowdate(5:6)//"-"//nowdate(7:8)//"_"//nowdate(9:10)//":"//nowdate(11:12)//":00", & + NoahmpIO%xlat(1,1), NoahmpIO%xlon(1,1), NoahmpIO%coszen(1,1), NoahmpIO%yearlen, NoahmpIO%julian) + + NoahmpIO%YR = locyr + if ((NoahmpIO%IOPT_DVEG .eq. 1).or.(NoahmpIO%IOPT_DVEG .eq. 6).or.(NoahmpIO%IOPT_DVEG .eq. 7)) then + ! with dveg_opt==1/6/7, shdfac is fed directly to fveg + NoahmpIO%vegfra(1,1) = month_d_new(shdfac_monthly(1,:,1), nowdate) + else + ! with dveg_opt==2/3/8, fveg is computed from lai and sai, and shdfac is unused + ! with dveg_opt==4/5/9, fveg is set to the maximum shdfac, and shdfac is unused + NoahmpIO%vegfra(1,1) = -1.E36 ! To match with HRLDAS initialization + endif + NoahmpIO%gvfmax(1,1) = maxval(shdfac_monthly(1,:,1)) + + ! assign forcing variables + NoahmpIO%dz8w(1,2,1) = NoahmpIO%dz8w(1,1,1) + NoahmpIO%T_PHY(1,2,1) = NoahmpIO%T_PHY(1,1,1) + NoahmpIO%P8W(1,2,1) = NoahmpIO%P8W(1,1,1) + NoahmpIO%QV_CURR(1,1,1) = NoahmpIO%QV_CURR(1,1,1)/& + (1.0 - NoahmpIO%QV_CURR(1,1,1)) ! Convert specific humidity to water vapor mixing ratio + NoahmpIO%QV_CURR(1,2,1) = NoahmpIO%QV_CURR(1,1,1) + NoahmpIO%U_PHY(1,2,1) = NoahmpIO%U_PHY(1,1,1) + NoahmpIO%V_PHY(1,2,1) = NoahmpIO%V_PHY(1,1,1) + NoahmpIO%QSFC(1,1) = NoahmpIO%QV_CURR(1,1,1) + NoahmpIO%SNOWBL = 0.0 + NoahmpIO%SR = 0.0 ! Will only use component if opt_snf=4 + NoahmpIO%RAINCV = 0.0 + NoahmpIO%RAINNCV = NoahmpIO%RAINBL + NoahmpIO%RAINSHV = 0.0 + NoahmpIO%SNOWNCV = NoahmpIO%SNOWBL + NoahmpIO%GRAUPELNCV = 0.0 + NoahmpIO%HAILNCV = 0.0 + + ! If coupled to WRF, set these variables to realistic values, + ! and then pass back to WRF after the call to noahmplsm_401. + NoahmpIO%z0(1,1) = 0.0 + NoahmpIO%znt(1,1) = 0.0 + ! z0 and znt should be passed to WRF, if coupled. - dmm + + ! Code from module_NoahMP_hrldas_driver.F. Initial guess only. + if ((trim(LIS_rc%startcode).eq."coldstart").and.(NoahmpIO%itimestep.eq.1)) then + NoahmpIO%eahxy(1,1) = NoahmpIO%P8W(1,1,1) * (NoahmpIO%QV_CURR(1,1,1)/(0.622+NoahmpIO%QV_CURR(1,1,1))) + NoahmpIO%tahxy(1,1) = NoahmpIO%T_PHY(1,1,1) + NoahmpIO%cmxy(1,1) = 0.1 + NoahmpIO%chxy(1,1) = 0.1 + endif + + ! main NoahMP driver physics + call NoahmpDriverMain(NoahmpIO,LISparam) + + + ! Added by Zhuo Wang and Shugong on 10/30/2018 + tsk = tskinout(1,1) + hfx = hfxinout(1,1) + qfx = qfxinout(1,1) + lh = lhinout(1,1) + grdflx = grdflxinout(1,1) + smstav = smstavinout(1,1) + smstot = smstotinout(1,1) + sfcrunoff = sfcrunoffinout(1,1) + udrunoff = udrunoffinout(1,1) +! albedo = albedoinout(1,1) + albedo = albedoout(1,1) + snowc = snowcinout(1,1) + smc(:) = smcinout(1,:,1) + sh2o(:) = sh2oinout(1,:,1) + tslb(:) = tslbinout(1,:,1) + sneqv = sneqvinout(1,1) + snowh = snowhinout(1,1) + canwat = canwatinout(1,1) + acsnom = acsnominout(1,1) + acsnow = acsnowinout(1,1) + emiss = emissinout(1,1) + qsfc = qsfcinout(1,1) + isnow = isnowinout(1,1) + tv = tvinout(1,1) + tg = tginout(1,1) + canice = caniceinout(1,1) + canliq = canliqinout(1,1) + eah = eahinout(1,1) + tah = tahinout(1,1) + cm = cminout(1,1) + ch = chinout(1,1) + fwet = fwetinout(1,1) + sneqvo = sneqvoinout(1,1) + albold = alboldinout(1,1) + qsnow = qsnowinout(1,1) + wslake = wslakeinout(1,1) + zwt = zwtinout(1,1) + wa = wainout(1,1) + wt = wtinout(1,1) + + ! Modified by Zhuo Wang on 12/31/2018 + tsnow(-nsnow+1:0) = tsnowinout(1,-nsnow+1:0,1) + zsnso(-nsnow+1:nsoil) = zsnsoinout(1,-nsnow+1:nsoil,1) + snice(-nsnow+1:0) = sniceinout(1,-nsnow+1:0,1) + snliq(-nsnow+1:0) = snliqinout(1,-nsnow+1:0,1) + tsno(1:nsnow) = tsnow(-nsnow+1:0) + zss(1:nsnow+nsoil) = zsnso(-nsnow+1:nsoil) + snowice(1:nsnow) = snice(-nsnow+1:0) + snowliq(1:nsnow) = snliq(-nsnow+1:0) + + lfmass = lfmassinout(1,1) + rtmass = rtmassinout(1,1) + stmass = stmassinout(1,1) + wood = woodinout(1,1) + stblcp = stblcpinout(1,1) + fastcp = fastcpinout(1,1) + lai = laiinout(1,1) + sai = saiinout(1,1) + tauss = taussinout(1,1) + smoiseq(:) = smoiseqinout(1,:,1) + smcwtd = smcwtdinout(1,1) + deeprech = deeprechinout(1,1) + rech = rechinout(1,1) + grain = graininout(1,1) + gdd = gddinout(1,1) + pgs = pgsinout(1,1) + gecros_state(:) = gecros_stateinout(1,:,1) + t2mv = t2mvout(1,1) + t2mb = t2mbout(1,1) + q2mv = q2mvout(1,1) + q2mb = q2mbout(1,1) + trad = tradout(1,1) + nee = neeout(1,1) + gpp = gppout(1,1) + npp = nppout(1,1) + fveg = fvegout(1,1) + runsf = runsfout(1,1) + runsb = runsbout(1,1) + ecan = ecanout(1,1) + edir = edirout(1,1) + etran = etranout(1,1) + fsa = fsaout(1,1) + fira = firaout(1,1) + apar = aparout(1,1) + psn = psnout(1,1) + sav = savout(1,1) + sag = sagout(1,1) + rssun = rssunout(1,1) + rssha = rsshaout(1,1) + bgap = bgapout(1,1) + wgap = wgapout(1,1) + tgv = tgvout(1,1) + tgb = tgbout(1,1) + chv = chvout(1,1) + chb = chbout(1,1) + shg = shgout(1,1) + shc = shcout(1,1) + shb = shbout(1,1) + evg = evgout(1,1) + evb = evbout(1,1) + ghv = ghvout(1,1) + ghb = ghbout(1,1) + irg = irgout(1,1) + irc = ircout(1,1) + irb = irbout(1,1) + tr = trout(1,1) + evc = evcout(1,1) + chleaf = chleafout(1,1) + chuc = chucout(1,1) + chv2 = chv2out(1,1) + chb2 = chb2out(1,1) + relsmc(:) = relsmcout(1,:,1) + rs = rsout(1,1) + + rainf = prcp * (1.0 - fpice)/dt ! added by Shugong for LIS output + snowf = prcp * fpice/dt ! added by Shugong for LIS output + fgev_pet = fgev_petout(1,1) ! 08/30/2021 Shugong + fcev_pet = fcev_petout(1,1) + fctr_pet = fctr_petout(1,1) + +#ifndef WRF_HYDRO + INFXSRT = 0.0 + soldrain = 0.0 +#endif + + deallocate(zsoil) + deallocate(zsnso) + + deallocate(snice) + deallocate(snliq) + deallocate(tsnow) ! Added by Zhuo Wang and Shugong Wang on 10/30/2018 + +end subroutine noahmp_driver_401 + +real function month_d_401(a12, nowdate) result (nowval) + ! + ! Given a set of 12 values, taken to be valid on the fifteenth of each month (Jan through Dec) + ! and a date in the form .... + ! + ! Return a value valid for the day given in , as an interpolation from the 12 + ! monthly values. + ! + use kwm_date_utilities_401 + implicit none + real, dimension(12), intent(in) :: a12 ! 12 monthly values, taken to be valid on the 15th of + ! ! the month + character(len=12), intent(in) :: nowdate ! Date, in the form + integer :: nowy, nowm, nowd + integer :: prevm, postm + real :: factor + integer, dimension(12) :: ndays = (/ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 /) + ! + ! Handle leap year by setting the number of days in February for the year in question. + ! + read(nowdate(1:8),'(I4,I2,I2)') nowy, nowm, nowd + ndays(2) = nfeb(nowy) + + ! + ! Do interpolation between the fifteenth of two successive months. + ! + if (nowd == 15) then + nowval = a12(nowm) + return + else if (nowd < 15) then + postm = nowm + prevm = nowm - 1 + if (prevm == 0) prevm = 12 + factor = real(ndays(prevm)-15+nowd)/real(ndays(prevm)) + else if (nowd > 15) then + prevm = nowm + postm = nowm + 1 + if (postm == 13) postm = 1 + factor = real(nowd-15)/real(ndays(prevm)) + endif + + nowval = a12(prevm)*(1.0-factor) + a12(postm)*factor + +end function month_d_401 + +SUBROUTINE calc_declin_401 ( nowdate, latitude, longitude, cosz, yearlen, julian) + use kwm_date_utilities_401 +!--------------------------------------------------------------------- + IMPLICIT NONE +!--------------------------------------------------------------------- + +! !ARGUMENTS: + character(len=19), intent(in) :: nowdate ! YYYY-MM-DD_HH:mm:ss + real, intent(in) :: latitude + real, intent(in) :: longitude + real, intent(out) :: cosz + integer, intent(out) :: yearlen + real, intent(out) :: JULIAN + + REAL :: hrang + real :: DECLIN + real :: GMT + real :: tloctim + REAL :: OBECL + REAL :: SINOB + REAL :: SXLONG + REAL :: ARG + integer :: iyear + integer :: iday + integer :: ihour + integer :: iminute + integer :: isecond + + REAL, PARAMETER :: DEGRAD = 3.14159265/180. + REAL, PARAMETER :: DPD = 360./365. + + ! + ! Determine the number of days in the year + ! + + read(nowdate(1:4), '(I4)') iyear + yearlen = 365 + if (mod(iyear,4) == 0) then + yearlen = 366 + if (mod(iyear,100) == 0) then + yearlen = 365 + if (mod(iyear,400) == 0) then + yearlen = 366 + if (mod(iyear,3600) == 0) then + yearlen = 365 + endif + endif + endif + endif + + ! + ! Determine the Julian time (floating-point day of year). + ! + + call geth_idts(nowdate(1:10), nowdate(1:4)//"-01-01", iday) + read(nowdate(12:13), *) ihour + read(nowdate(15:16), *) iminute + read(nowdate(18:19), *) isecond + GMT = REAL(IHOUR) + IMINUTE/60.0 + ISECOND/3600.0 + JULIAN = REAL(IDAY) + GMT/24. + +! for short wave radiation + + DECLIN=0. + +!-----OBECL : OBLIQUITY = 23.5 DEGREE. + + OBECL=23.5*DEGRAD + SINOB=SIN(OBECL) + +!-----CALCULATE LONGITUDE OF THE SUN FROM VERNAL EQUINOX: + + IF(JULIAN.GE.80.)SXLONG=DPD*(JULIAN-80.)*DEGRAD + IF(JULIAN.LT.80.)SXLONG=DPD*(JULIAN+285.)*DEGRAD + ARG=SINOB*SIN(SXLONG) + DECLIN=ASIN(ARG) + + TLOCTIM = REAL(IHOUR) + REAL(IMINUTE)/60.0 + REAL(ISECOND)/3600.0 + LONGITUDE/15.0 ! Local time in hours + tloctim = AMOD(tloctim+24.0, 24.0) + HRANG=15.*(TLOCTIM-12.)*DEGRAD + COSZ=SIN(LATITUDE*DEGRAD)*SIN(DECLIN)+COS(LATITUDE*DEGRAD)*COS(DECLIN)*COS(HRANG) + COSZ=MIN(COSZ,1.0); !Added by kwH 3/1/16 to address floating point roundoff errors + COSZ=MAX(COSZ,-1.0); ! + +!KWM write(wrf_err_message,10)DECDEG/DEGRAD +!KWM10 FORMAT(1X,'*** SOLAR DECLINATION ANGLE = ',F6.2,' DEGREES.',' ***') +!KWM CALL wrf_debug (50, wrf_err_message) + +END SUBROUTINE calc_declin_401 + +! Subroutine SNOW_INIT grabbed from NOAH-MP-WRF +SUBROUTINE SNOW_INIT_401 ( jts, jtf, its, itf, ims, ime, jms, jme, NSNOW, NSOIL, ZSOIL, & + SWE, tgxy, SNODEP, ZSNSOXY, TSNOXY, SNICEXY, SNLIQXY, ISNOWXY) + +! ------------------------------------------------------------------------------------------ + IMPLICIT NONE +! ------------------------------------------------------------------------------------------ + INTEGER, INTENT(IN) :: jts,jtf,its,itf,ims,ime, jms,jme,NSNOW,NSOIL + REAL, INTENT(IN), DIMENSION(ims:ime, jms:jme) :: SWE + REAL, INTENT(IN), DIMENSION(ims:ime, jms:jme) :: SNODEP + REAL, INTENT(IN), DIMENSION(ims:ime, jms:jme) :: tgxy + REAL, INTENT(IN), DIMENSION(1:NSOIL) :: ZSOIL + + INTEGER, INTENT(OUT), DIMENSION(ims:ime, jms:jme) :: ISNOWXY + REAL, INTENT(OUT), DIMENSION(ims:ime, -NSNOW+1:NSOIL,jms:jme) :: ZSNSOXY + REAL, INTENT(OUT), DIMENSION(ims:ime, -NSNOW+1: 0,jms:jme) :: TSNOXY + REAL, INTENT(OUT), DIMENSION(ims:ime, -NSNOW+1: 0,jms:jme) :: SNICEXY + REAL, INTENT(OUT), DIMENSION(ims:ime, -NSNOW+1: 0,jms:jme) :: SNLIQXY + +!local + INTEGER :: I,J,IZ + REAL, DIMENSION(ims:ime, -NSNOW+1: 0,jms:jme) :: DZSNOXY + REAL, DIMENSION(ims:ime, -NSNOW+1:NSOIL,jms:jme) :: DZSNSOXY +! ------------------------------------------------------------------------------------------ + + + DO J = jts,jtf + DO I = its,itf + IF (SNODEP(I,J) < 0.025) THEN + ISNOWXY(I,J) = 0 + DZSNOXY(I,-NSNOW+1:0,J) = 0. + ELSE + IF ((SNODEP(I,J) >= 0.025) .AND. (SNODEP(I,J) <= 0.05)) THEN + ISNOWXY(I,J) = -1 + DZSNOXY(I,0,J) = SNODEP(I,J) + ELSE IF ((SNODEP(I,J) > 0.05) .AND. (SNODEP(I,J) <= 0.10)) THEN + ISNOWXY(I,J) = -2 + DZSNOXY(I,-1,J) = SNODEP(I,J)/2. + DZSNOXY(I, 0,J) = SNODEP(I,J)/2. + ELSE IF ((SNODEP(I,J) > 0.10) .AND. (SNODEP(I,J) <= 0.25)) THEN + ISNOWXY(I,J) = -2 + DZSNOXY(I,-1,J) = 0.05 + DZSNOXY(I, 0,J) = SNODEP(I,J) - DZSNOXY(I,-1,J) + ELSE IF ((SNODEP(I,J) > 0.25) .AND. (SNODEP(I,J) <= 0.35)) THEN + ISNOWXY(I,J) = -3 + DZSNOXY(I,-2,J) = 0.05 + DZSNOXY(I,-1,J) = 0.5*(SNODEP(I,J)-DZSNOXY(I,-2,J)) + DZSNOXY(I, 0,J) = 0.5*(SNODEP(I,J)-DZSNOXY(I,-2,J)) + ELSE IF (SNODEP(I,J) > 0.35) THEN + ISNOWXY(I,J) = -3 + DZSNOXY(I,-2,J) = 0.05 + DZSNOXY(I,-1,J) = 0.10 + DZSNOXY(I, 0,J) = SNODEP(I,J) - DZSNOXY(I,-1,J) - DZSNOXY(I,-2,J) + END IF + END IF + ENDDO + ENDDO + + DO J = jts,jtf + DO I = its,itf + TSNOXY( I,-NSNOW+1:0,J) = 0. + SNICEXY(I,-NSNOW+1:0,J) = 0. + SNLIQXY(I,-NSNOW+1:0,J) = 0. + DO IZ = ISNOWXY(I,J)+1, 0 + TSNOXY(I,IZ,J) = tgxy(I,J) ! [k] + SNLIQXY(I,IZ,J) = 0.00 + SNICEXY(I,IZ,J) = 1.00 * DZSNOXY(I,IZ,J) * (SWE(I,J)/SNODEP(I,J)) ! [kg/m3] + END DO + + DO IZ = ISNOWXY(I,J)+1, 0 + DZSNSOXY(I,IZ,J) = -DZSNOXY(I,IZ,J) + END DO + + DZSNSOXY(I,1,J) = ZSOIL(1) + DO IZ = 2,NSOIL + DZSNSOXY(I,IZ,J) = (ZSOIL(IZ) - ZSOIL(IZ-1)) + END DO + + ZSNSOXY(I,ISNOWXY(I,J)+1,J) = DZSNSOXY(I,ISNOWXY(I,J)+1,J) + DO IZ = ISNOWXY(I,J)+2 ,NSOIL + ZSNSOXY(I,IZ,J) = ZSNSOXY(I,IZ-1,J) + DZSNSOXY(I,IZ,J) + ENDDO + + END DO + END DO + +END SUBROUTINE SNOW_INIT_401 diff --git a/lis/surfacemodels/land/noahmp.new/phys/noahmp b/lis/surfacemodels/land/noahmp.new/phys/noahmp index a4ccc774b..1d778fc36 160000 --- a/lis/surfacemodels/land/noahmp.new/phys/noahmp +++ b/lis/surfacemodels/land/noahmp.new/phys/noahmp @@ -1 +1 @@ -Subproject commit a4ccc774ba5ab6d5aca9e4fcef374c0c00eac5f3 +Subproject commit 1d778fc36bb64e133ab6fe37ed7e405367a5f00a diff --git a/lis/surfacemodels/land/noahmp.new/wrf_debug.F90 b/lis/surfacemodels/land/noahmp.new/wrf_debug.F90 index bdc11fdd6..a2325afd5 100644 --- a/lis/surfacemodels/land/noahmp.new/wrf_debug.F90 +++ b/lis/surfacemodels/land/noahmp.new/wrf_debug.F90 @@ -9,9 +9,11 @@ !-------------------------END NOTICE -- DO NOT EDIT----------------------- subroutine wrf_debug(unit_number, message) + use LIS_logMod, only : LIS_logunit implicit none integer :: unit_number character(len=*) :: message write(LIS_logunit, *) "Noah-MP new refactored version (wrf_debug): ", message + end subroutine wrf_debug From 5692045515d6606bd55a693bb94982ca5e3d3e9c Mon Sep 17 00:00:00 2001 From: cenlinhe Date: Fri, 14 Jul 2023 11:32:03 -0600 Subject: [PATCH 04/27] update integration 3 --- .../land/noahmp.new/NoahMP401_readrst.F90 | 453 --------------- ..._coldstart.F90 => NoahMPnew_coldstart.F90} | 2 +- ...01_dynsetup.F90 => NoahMPnew_dynsetup.F90} | 19 +- ...01_finalize.F90 => NoahMPnew_finalize.F90} | 0 .../land/noahmp.new/NoahMPnew_lsmMod.F90 | 52 +- .../land/noahmp.new/NoahMPnew_main.F90 | 110 +++- .../land/noahmp.new/NoahMPnew_module.F90 | 51 +- .../land/noahmp.new/NoahMPnew_readcrd.F90 | 34 +- .../land/noahmp.new/NoahMPnew_readrst.F90 | 550 ++++++++++++++++++ .../land/noahmp.new/NoahMPnew_setup.F90 | 47 ++ ...ies_401.F90 => kwm_date_utilities_new.F90} | 4 +- .../land/noahmp.new/noahmp_driver_new.F90 | 155 +---- lis/surfacemodels/land/noahmp.new/phys/noahmp | 2 +- 13 files changed, 840 insertions(+), 639 deletions(-) delete mode 100644 lis/surfacemodels/land/noahmp.new/NoahMP401_readrst.F90 rename lis/surfacemodels/land/noahmp.new/{NoahMP401_coldstart.F90 => NoahMPnew_coldstart.F90} (99%) rename lis/surfacemodels/land/noahmp.new/{NoahMP401_dynsetup.F90 => NoahMPnew_dynsetup.F90} (86%) rename lis/surfacemodels/land/noahmp.new/{NoahMP401_finalize.F90 => NoahMPnew_finalize.F90} (100%) create mode 100644 lis/surfacemodels/land/noahmp.new/NoahMPnew_readrst.F90 rename lis/surfacemodels/land/noahmp.new/{kwm_date_utilities_401.F90 => kwm_date_utilities_new.F90} (99%) diff --git a/lis/surfacemodels/land/noahmp.new/NoahMP401_readrst.F90 b/lis/surfacemodels/land/noahmp.new/NoahMP401_readrst.F90 deleted file mode 100644 index 606a12682..000000000 --- a/lis/surfacemodels/land/noahmp.new/NoahMP401_readrst.F90 +++ /dev/null @@ -1,453 +0,0 @@ -!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- -! NASA Goddard Space Flight Center -! Land Information System Framework (LISF) -! Version 7.4 -! -! Copyright (c) 2022 United States Government as represented by the -! Administrator of the National Aeronautics and Space Administration. -! All Rights Reserved. -!-------------------------END NOTICE -- DO NOT EDIT----------------------- - -#include "LIS_misc.h" -!BOP -! -! !ROUTINE: NoahMP401_readrst -! \label{NoahMP401_readrst} -! -! !REVISION HISTORY: -! This subroutine is generated with the Model Implementation Toolkit developed -! by Shugong Wang for the NASA Land Information System Version 7. The initial -! specification of the subroutine is defined by Sujay Kumar. -! 10/25/18: Shugong Wang, Zhuo Wang; initial implementation for LIS 7 and Noah-MP-4.0.1 -! 01/08/2021 Bailing Li; implemented code for reading GRACE DA restart file -! -! !INTERFACE: -subroutine NoahMP401_readrst() -! !USES: - use LIS_coreMod, only : LIS_rc, LIS_masterproc - use LIS_historyMod, only : LIS_readvar_restart - use LIS_logMod, only : LIS_logunit, LIS_endrun, & - LIS_getNextUnitNumber, & - LIS_releaseUnitNumber, & - LIS_verify - use LIS_constantsMod, only : LIS_CONST_PATH_LEN - use NoahMP401_lsmMod - use ESMF - use LIS_fileIOMod - use LIS_timeMgrMod - -#if (defined USE_NETCDF3 || defined USE_NETCDF4) - use netcdf -#endif - -! -! !DESCRIPTION: -! This program reads restart files for Noah-MP-4.0.1 LSM. -! This includes all relevant water/energy storages and tile information. -! The following is the list of variables specified in the Noah-MP-4.0.1 -! restart file: -! \begin{verbatim} -! nc, nr, ntiles - grid and tile space dimensions -! sfcrunoff - NoahMP401 accumulated surface runoff [m] -! udrrunoff - NoahMP401 accumulated sub-surface runoff [m] -! smc - NoahMP401 volumtric soil moisture [m3/m3] -! sh2o - NoahMP401 volumtric liquid soil moisture [m3/m3] -! tslb - NoahMP401 soil temperature [K] -! sneqv - NoahMP401 snow water equivalent [mm] -! snowh - NoahMP401 physical snow depth [m] -! canwat - NoahMP401 total canopy water + ice [mm] -! acsnom - NoahMP401 accumulated snow melt leaving pack [-] -! acsnow - NoahMP401 accumulated snow on grid [mm] -! isnow - NoahMP401 actual no. of snow layers [-] -! tv - NoahMP401 vegetation leaf temperature [K] -! tg - NoahMP401 bulk ground surface temperature [K] -! canice - NoahMP401 canopy-intercepted ice [mm] -! canliq - NoahMP401 canopy-intercepted liquid water [mm] -! eah - NoahMP401 canopy air vapor pressure [Pa] -! tah - NoahMP401 canopy air temperature [K] -! cm - NoahMP401 bulk momentum drag coefficient [-] -! ch - NoahMP401 bulk sensible heat exchange coefficient [-] -! fwet - NoahMP401 wetted or snowed fraction of canopy [-] -! sneqvo - NoahMP401 snow mass at last time step [mm h2o] -! albold - NoahMP401 snow albedo at last time step [-] -! qsnow - NoahMP401 snowfall on the ground [mm/s] -! wslake - NoahMP401 lake water storage [mm] -! zwt - NoahMP401 water table depth [m] -! wa - NoahMP401 water in the "aquifer" [mm] -! wt - NoahMP401 water in aquifer and saturated soil [mm] -! tsno - NoahMP401 snow layer temperature [K] -! zss - NoahMP401 snow/soil layer depth from snow surface [m] -! snowice - NoahMP401 snow layer ice [mm] -! snowliq - NoahMP401 snow layer liquid water [mm] -! lfmass - NoahMP401 leaf mass [g/m2] -! rtmass - NoahMP401 mass of fine roots [g/m2] -! stmass - NoahMP401 stem mass [g/m2] -! wood - NoahMP401 mass of wood (including woody roots) [g/m2] -! stblcp - NoahMP401 stable carbon in deep soil [g/m2] -! fastcp - NoahMP401 short-lived carbon in shallow soil [g/m2] -! lai - NoahMP401 leaf area index [-] -! sai - NoahMP401 stem area index [-] -! tauss - NoahMP401 snow age factor [-] -! smoiseq - NoahMP401 equilibrium volumetric soil moisture content [m3/m3] -! smcwtd - NoahMP401 soil moisture content in the layer to the water table when deep [-] -! deeprech - NoahMP401 recharge to the water table when deep [-] -! rech - NoahMP401 recharge to the water table (diagnostic) [-] -! grain - NoahMP401 mass of grain XING [g/m2] -! gdd - NoahMP401 growing degree days XING (based on 10C) [-] -! pgs - NoahMP401 growing degree days XING [-] -! gecros_state - NoahMP401 optional gecros crop [-] -! \end{verbatim} -! -! The routines invoked are: -! \begin{description} -! \item[LIS\_readvar\_restart](\ref{LIS_readvar_restart})\\ -! reads a variable from the restart file -! \item[NoahMP401\_coldstart](\ref{NoahMP401_coldstart})\\ -! initializes the NoahMP401 state variables -! \end{description} -!EOP - - implicit none - - integer :: t, l - integer :: nc, nr, npatch - integer :: n - integer :: ftn - integer :: status - real, allocatable :: tmptilen(:) - logical :: file_exists - character*20 :: wformat - character(len=LIS_CONST_PATH_LEN) :: filen - integer :: yr,mo,da,hr,mn,ss,doy - real*8 :: time - real :: gmt - real :: ts - - - do n=1, LIS_rc%nnest - wformat = trim(NOAHMP401_struc(n)%rformat) - ! coldstart - if(LIS_rc%startcode .eq. "coldstart") then - call NoahMP401_coldstart(LIS_rc%lsm_index) - ! restart - elseif(LIS_rc%startcode .eq. "restart") then - !---create restart filename based on timewindow for EnKS - if(LIS_rc%runmode.eq."ensemble smoother") then - if(LIS_rc%iterationId(n).gt.1) then - if(NOAHMP401_struc(n)%rstInterval.eq.2592000) then - !create the restart filename based on the timewindow start time - call ESMF_TimeGet(LIS_twStartTime,yy=yr,mm=mo,& - dd=da,calendar=LIS_calendar,rc=status) - hr = 0 - mn = 0 - ss = 0 - call LIS_tick(time,doy,gmt,yr,mo,da,hr,mn,ss,(-1)*LIS_rc%ts) - else - call ESMF_TimeGet(LIS_twStartTime,yy=yr,mm=mo,& - dd=da,calendar=LIS_calendar,rc=status) - hr = 0 - mn = 0 - ss = 0 - endif - - call LIS_create_restart_filename(n,filen,'SURFACEMODEL','NOAHMP401', & - yr,mo,da,hr,mn,ss, wformat=wformat) - NOAHMP401_struc(n)%rfile = filen - endif - endif - - - allocate(tmptilen(LIS_rc%npatch(n, LIS_rc%lsm_index))) - ! check the existance of restart file - inquire(file=NOAHMP401_struc(n)%rfile, exist=file_exists) - If (.not. file_exists) then - write(LIS_logunit,*) "[ERR] NoahMP401 restart file: ", & - trim(NOAHMP401_struc(n)%rfile) - write(LIS_logunit,*) "[ERR] does not exist." - write(LIS_logunit,*) "[ERR] Program stopping ..." - call LIS_endrun - endif - write(LIS_logunit,*) & - "[INFO] Noah-MP.4.0.1 restart file used: ",trim(NOAHMP401_struc(n)%rfile) - - ! open restart file - if(wformat .eq. "binary") then - ftn = LIS_getNextUnitNumber() - open(ftn, file=NOAHMP401_struc(n)%rfile, & - form="unformatted") - read(ftn) nc, nr, npatch !time, veg class, no. tiles - - ! check for grid space conflict - if((nc .ne. LIS_rc%gnc(n)) .or. (nr .ne. LIS_rc%gnr(n))) then - write(LIS_logunit,*) "[ERR]",trim(NOAHMP401_struc(n)%rfile) - write(LIS_logunit,*) "[ERR] grid space mismatch" - write(LIS_logunit,*) "[ERR] Program stopping..." - call LIS_endrun - endif - - if(npatch .ne. LIS_rc%glbnpatch_red(n, LIS_rc%lsm_index)) then - write(LIS_logunit,*) "[ERR]",trim(NOAHMP401_struc(n)%rfile) - write(LIS_logunit,*) "[ERR] tile space mismatch" - write(LIS_logunit,*) "[ERR] Program stopping..." - call LIS_endrun - endif - elseif(wformat .eq. "netcdf") then -#if (defined USE_NETCDF3 || defined USE_NETCDF4) - status = nf90_open(path=NOAHMP401_struc(n)%rfile, & - mode=NF90_NOWRITE, ncid=ftn) - call LIS_verify(status, "Error opening file "//NOAHMP401_struc(n)%rfile) -#endif - endif - - ! read: accumulated surface runoff - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%sfcrunoff, & - varname="SFCRUNOFF", wformat=wformat) - - ! read: accumulated sub-surface runoff - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%udrrunoff, & - varname="UDRRUNOFF", wformat=wformat) - - ! read: volumtric soil moisture - do l=1, NOAHMP401_struc(n)%nsoil ! TODO: check loop - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, varname="SMC", & - dim=l, vlevels = NOAHMP401_struc(n)%nsoil, wformat=wformat) - do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - NOAHMP401_struc(n)%noahmp401(t)%smc(l) = tmptilen(t) - enddo - enddo - - ! read: volumtric liquid soil moisture - do l=1, NOAHMP401_struc(n)%nsoil ! TODO: check loop - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, varname="SH2O", & - dim=l, vlevels = NOAHMP401_struc(n)%nsoil, wformat=wformat) - do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - NOAHMP401_struc(n)%noahmp401(t)%sh2o(l) = tmptilen(t) - enddo - enddo - - ! read: soil temperature - do l=1, NOAHMP401_struc(n)%nsoil ! TODO: check loop - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, varname="TSLB", & - dim=l, vlevels = NOAHMP401_struc(n)%nsoil, wformat=wformat) - do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - NOAHMP401_struc(n)%noahmp401(t)%tslb(l) = tmptilen(t) - enddo - enddo - - ! read: snow water equivalent - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%sneqv, & - varname="SNEQV", wformat=wformat) - - ! read: physical snow depth - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%snowh, & - varname="SNOWH", wformat=wformat) - - ! read: total canopy water + ice - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%canwat, & - varname="CANWAT", wformat=wformat) - - ! read: accumulated snow melt leaving pack - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%acsnom, & - varname="ACSNOM", wformat=wformat) - - ! read: accumulated snow on grid - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%acsnow, & - varname="ACSNOW", wformat=wformat) - - ! read: actual no. of snow layers - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%isnow, & - varname="ISNOW", wformat=wformat) - - ! read: vegetation leaf temperature - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%tv, & - varname="TV", wformat=wformat) - - ! read: bulk ground surface temperature - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%tg, & - varname="TG", wformat=wformat) - - ! read: canopy-intercepted ice - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%canice, & - varname="CANICE", wformat=wformat) - - ! read: canopy-intercepted liquid water - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%canliq, & - varname="CANLIQ", wformat=wformat) - - ! read: canopy air vapor pressure - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%eah, & - varname="EAH", wformat=wformat) - - ! read: canopy air temperature - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%tah, & - varname="TAH", wformat=wformat) - - ! read: bulk momentum drag coefficient - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%cm, & - varname="CM", wformat=wformat) - - ! read: bulk sensible heat exchange coefficient - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%ch, & - varname="CH", wformat=wformat) - - ! read: wetted or snowed fraction of canopy - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%fwet, & - varname="FWET", wformat=wformat) - - ! read: snow mass at last time step - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%sneqvo, & - varname="SNEQVO", wformat=wformat) - - ! read: snow albedo at last time step - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%albold, & - varname="ALBOLD", wformat=wformat) - - ! read: snowfall on the ground - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%qsnow, & - varname="QSNOW", wformat=wformat) - - ! read: lake water storage - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%wslake, & - varname="WSLAKE", wformat=wformat) - - ! read: water table depth - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%zwt, & - varname="ZWT", wformat=wformat) - - ! read: water in the "aquifer" - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%wa, & - varname="WA", wformat=wformat) - - ! read: water in aquifer and saturated soil - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%wt, & - varname="WT", wformat=wformat) - - ! read: snow layer temperature - do l=1, NOAHMP401_struc(n)%nsnow ! TODO: check loop - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, varname="TSNO", & - dim=l, vlevels = NOAHMP401_struc(n)%nsnow, wformat=wformat) - do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - NOAHMP401_struc(n)%noahmp401(t)%tsno(l) = tmptilen(t) - enddo - enddo - - ! read: snow/soil layer depth from snow surface - do l=1, NOAHMP401_struc(n)%nsnow + NOAHMP401_struc(n)%nsoil - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, varname="ZSS", & - dim=l, vlevels = NOAHMP401_struc(n)%nsnow + NOAHMP401_struc(n)%nsoil, wformat=wformat) - do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - NOAHMP401_struc(n)%noahmp401(t)%zss(l) = tmptilen(t) - enddo - enddo - - ! read: snow layer ice - do l=1, NOAHMP401_struc(n)%nsnow ! TODO: check loop - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, varname="SNOWICE", & - dim=l, vlevels = NOAHMP401_struc(n)%nsnow, wformat=wformat) - do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - NOAHMP401_struc(n)%noahmp401(t)%snowice(l) = tmptilen(t) - enddo - enddo - - ! read: snow layer liquid water - do l=1, NOAHMP401_struc(n)%nsnow ! TODO: check loop - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, varname="SNOWLIQ", & - dim=l, vlevels = NOAHMP401_struc(n)%nsnow, wformat=wformat) - do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - NOAHMP401_struc(n)%noahmp401(t)%snowliq(l) = tmptilen(t) - enddo - enddo - - ! read: leaf mass - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%lfmass, & - varname="LFMASS", wformat=wformat) - - ! read: mass of fine roots - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%rtmass, & - varname="RTMASS", wformat=wformat) - - ! read: stem mass - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%stmass, & - varname="STMASS", wformat=wformat) - - ! read: mass of wood (including woody roots) - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%wood, & - varname="WOOD", wformat=wformat) - - ! read: stable carbon in deep soil - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%stblcp, & - varname="STBLCP", wformat=wformat) - - ! read: short-lived carbon in shallow soil - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%fastcp, & - varname="FASTCP", wformat=wformat) - - ! read: leaf area index - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%lai, & - varname="LAI", wformat=wformat) - - ! read: stem area index - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%sai, & - varname="SAI", wformat=wformat) - - ! read: snow age factor - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%tauss, & - varname="TAUSS", wformat=wformat) - - ! read: equilibrium volumetric soil moisture content - do l=1, NOAHMP401_struc(n)%nsoil ! TODO: check loop - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, varname="SMOISEQ", & - dim=l, vlevels = NOAHMP401_struc(n)%nsoil, wformat=wformat) - do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - NOAHMP401_struc(n)%noahmp401(t)%smoiseq(l) = tmptilen(t) - enddo - enddo - - ! read: soil moisture content in the layer to the water table when deep - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%smcwtd, & - varname="SMCWTD", wformat=wformat) - - ! read: recharge to the water table when deep - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%deeprech, & - varname="DEEPRECH", wformat=wformat) - - ! read: recharge to the water table (diagnostic) - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%rech, & - varname="RECH", wformat=wformat) - - ! read: mass of grain XING - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%grain, & - varname="GRAIN", wformat=wformat) - - ! read: growing degree days XING (based on 10C) - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%gdd, & - varname="GDD", wformat=wformat) - - ! read: growing degree days XING - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%pgs, & - varname="PGS", wformat=wformat) - - ! read: optional gecros crop -! do l=1, 60 ! TODO: check loop -! call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, varname="GECROS_STATE", & -! dim=l, vlevels = 60, wformat=wformat) -! do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) -! NOAHMP401_struc(n)%noahmp401(t)%gecros_state(l) = tmptilen(t) -! enddo -! enddo - - ! close restart file - if(wformat .eq. "binary") then - call LIS_releaseUnitNumber(ftn) - elseif(wformat .eq. "netcdf") then -#if (defined USE_NETCDF3 || defined USE_NETCDF4) - status = nf90_close(ftn) - call LIS_verify(status, & - "Error in nf90_close in NoahMP401_readrst") -#endif - endif - deallocate(tmptilen) - endif - enddo -end subroutine NoahMP401_readrst - diff --git a/lis/surfacemodels/land/noahmp.new/NoahMP401_coldstart.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_coldstart.F90 similarity index 99% rename from lis/surfacemodels/land/noahmp.new/NoahMP401_coldstart.F90 rename to lis/surfacemodels/land/noahmp.new/NoahMPnew_coldstart.F90 index 1a3d81d20..e220da5c8 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMP401_coldstart.F90 +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_coldstart.F90 @@ -244,7 +244,7 @@ subroutine NoahMPnew_coldstart(mtype) tgxy(1,1) = NoahmpNew_struc(n)%init_tskin tmp_snodep(1,1) = NoahmpNew_struc(n)%init_snowh - call snow_init_401(1, 1, 1, 1, 1, 1, 1, 1, & !input + call snow_init_new(1, 1, 1, 1, 1, 1, 1, 1, & !input NoahmpNew_struc(n)%nsnow, & !input NoahmpNew_struc(n)%nsoil, & !input zsoil, & !input diff --git a/lis/surfacemodels/land/noahmp.new/NoahMP401_dynsetup.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_dynsetup.F90 similarity index 86% rename from lis/surfacemodels/land/noahmp.new/NoahMP401_dynsetup.F90 rename to lis/surfacemodels/land/noahmp.new/NoahMPnew_dynsetup.F90 index 4d6cc1917..ab83837d2 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMP401_dynsetup.F90 +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_dynsetup.F90 @@ -10,8 +10,8 @@ !BOP ! -! !ROUTINE: NoahMP401_dynsetup -! \label{NoahMP401_dynsetup} +! !ROUTINE: NoahMPnew_dynsetup +! \label{NoahMPnew_dynsetup} ! ! !REVISION HISTORY: ! This subroutine is generated with the Model Implementation Toolkit developed @@ -19,20 +19,21 @@ ! specification of the subroutine is defined by Sujay Kumar. ! 10/25/18: Shugong Wang, Zhuo Wang; initial implementation for LIS 7 and NoahMP401 ! 11 Nov 2020: Eric Kemp, added updates to LIS_snow_struc -! +! May 2023: Cenlin He, modified for refactored noahmp v5 and later + ! !INTERFACE: -subroutine NoahMP401_dynsetup(n) +subroutine NoahMPnew_dynsetup(n) ! !USES: use LIS_coreMod, only : LIS_rc, LIS_domain, LIS_surface use LIS_fileIOMod, only : LIS_read_param use LIS_logMod, only : LIS_logunit use LIS_snowMod, only : LIS_snow_struc use LIS_timeMgrMod, only : LIS_date2time, LIS_tick - use NoahMP401_lsmMod, only : NOAHMP401_struc + use NoahMPnew_lsmMod, only : NOAHMPnew_struc ! ! !DESCRIPTION: -! This routine sets up the time-dependent variables in NoahMP401 +! This routine sets up the time-dependent variables in NoahMP ! !EOP implicit none @@ -56,7 +57,7 @@ subroutine NoahMP401_dynsetup(n) do t = 1, LIS_rc%npatch(n, LIS_rc%lsm_index) tid = LIS_surface(n, LIS_rc%lsm_index)%tile(t)%tile_id LIS_snow_struc(n)%sneqv(tid) = LIS_snow_struc(n)%sneqv(tid) + & - noahmp401_struc(n)%noahmp401(t)%sneqv + NoahMPnew_struc(n)%noahmpnew(t)%sneqv end do ! Collect mean snow depth at grid points @@ -64,7 +65,7 @@ subroutine NoahMP401_dynsetup(n) gid = LIS_surface(n,LIS_rc%lsm_index)%tile(t)%index LIS_snow_struc(n)%snowdepth(gid) = & LIS_snow_struc(n)%snowdepth(gid) + & - noahmp401_struc(n)%noahmp401(t)%snowh + NoahMPnew_struc(n)%noahmpnew(t)%snowh ncount(gid) = ncount(gid) + 1 end do do t = 1, LIS_rc%ngrid(n) @@ -78,6 +79,6 @@ subroutine NoahMP401_dynsetup(n) end if !TODO: add code here if needed. -end subroutine NoahMP401_dynsetup +end subroutine NoahMPnew_dynsetup ! generate date/time string for reading time-dependent variables diff --git a/lis/surfacemodels/land/noahmp.new/NoahMP401_finalize.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_finalize.F90 similarity index 100% rename from lis/surfacemodels/land/noahmp.new/NoahMP401_finalize.F90 rename to lis/surfacemodels/land/noahmp.new/NoahMPnew_finalize.F90 diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_lsmMod.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_lsmMod.F90 index 0d3127058..e302c1129 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_lsmMod.F90 +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_lsmMod.F90 @@ -181,6 +181,10 @@ module NoahMPnew_lsmMod character*128 :: LDT_ncvar_mifract character*128 :: LDT_ncvar_fifract character*128 :: LDT_ncvar_tdfract + character*128 :: LDT_ncvar_fdepth + character*128 :: LDT_ncvar_eqzwt + character*128 :: LDT_ncvar_rechclim + character*128 :: LDT_ncvar_riverbed !------------------------------------------------------------------------- ! ts, Count, rstInterval, outInterval @@ -310,16 +314,46 @@ subroutine NoahMPnew_ini() ! initialize forcing variables to zeros do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - NoahmpNew_struc(n)%noahmpnew(t)%lwdown = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%swdown = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%psurf = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%prcp = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%tair = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%qair = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%wind_e = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%wind_n = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%lwdown = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%swdown = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%psurf = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%prcp = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%tair = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%qair = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%wind_e = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%wind_n = 0.0 NoahmpNew_struc(n)%noahmpnew(t)%sfcheadrt = 0.0 - + NoahmpNew_struc(n)%noahmpnew(t)%irnumsi = 0 + NoahmpNew_struc(n)%noahmpnew(t)%irnummi = 0 + NoahmpNew_struc(n)%noahmpnew(t)%irnumfi = 0 + NoahmpNew_struc(n)%noahmpnew(t)%irwatsi = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%irwatmi = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%irwatfi = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%irsivol = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%irmivol = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%irfivol = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%ireloss = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%irrsplh = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%qtdrain = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%accssoil = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%accqinsur = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%accqseva = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%accetrani = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%accdwater = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%accprcp = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%accecan = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%accetran = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%accedir = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%sfcrunoff = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%udrrunoff = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%deeprech = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%rech = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%acsnom = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%acsnow = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%irfract = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%sifract = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%mifract = 0.0 + NoahmpNew_struc(n)%noahmpnew(t)%fifract = 0.0 !ag(05Jan2021) NoahmpNew_struc(n)%noahmpnew(t)%rivsto = 0.0 NoahmpNew_struc(n)%noahmpnew(t)%fldsto = 0.0 diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_main.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_main.F90 index 08d87b36c..4a0342dd2 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_main.F90 +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_main.F90 @@ -318,6 +318,52 @@ subroutine NoahMPnew_main(n) NoahmpIO%soilcomp(1,:,1) = NoahMPnew_struc(n)%noahmpnew(t)%soilcomp(:) endif + ! for irrigation + if (NoahmpIO%IOPT_IRR > 0) then + NoahmpIO%irnumsi(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%irnumsi + NoahmpIO%irnummi(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%irnummi + NoahmpIO%irnumfi(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%irnumfi + NoahmpIO%irfract(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%irfract + NoahmpIO%sifract(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%sifract + NoahmpIO%mifract(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%mifract + NoahmpIO%fifract(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%fifract + NoahmpIO%irwatsi(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%irwatsi + NoahmpIO%irwatmi(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%irwatmi + NoahmpIO%irwatfi(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%irwatfi + NoahmpIO%ireloss(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%ireloss + NoahmpIO%irrsplh(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%irrsplh + NoahmpIO%irsivol(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%irsivol + NoahmpIO%irmivol(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%irmivol + NoahmpIO%irfivol(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%irfivol + endif + + ! for tile drainage + if (NoahmpIO%IOPT_TDRN > 0) then + NoahmpIO%tdfract(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%tdfract + NoahmpIO%qtdrain(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%qtdrain + NoahmpIO%qtdrainflx(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%qtdrainflx + endif + + ! for MMF groundwater + if (NoahmpIO%IOPT_RUNSUB == 5) then + NoahmpIO%fdepthxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%fdepth + NoahmpIO%msftx(1,1) = 1.0 + NoahmpIO%msfty(1,1) = 1.0 + NoahmpIO%eqzwt(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%eqzwt + NoahmpIO%riverbedxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%riverbed + NoahmpIO%rivercondxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%rivercond + NoahmpIO%pexpxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%pexp + NoahmpIO%areaxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%area + NoahmpIO%qrfsxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%qrfs + NoahmpIO%qspringxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%qspring + NoahmpIO%qrfxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%qrf + NoahmpIO%qspringsxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%qsprings + NoahmpIO%qslatxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%qslat + NoahmpIO%rechclim(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%rechclim + NoahmpIO%rivermask(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%rivermask + NoahmpIO%nonriverxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%nonriver + endif + ! get state variables NoahmpIO%sfcrunoff(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%sfcrunoff NoahmpIO%udrunoff(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%udrrunoff @@ -356,6 +402,18 @@ subroutine NoahMPnew_main(n) NoahmpIO%woodxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%wood NoahmpIO%stblcpxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%stblcp NoahmpIO%fastcpxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%fastcp + + ! additional accumulated variables + NoahmpIO%ACC_SSOILXY(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%accssoil + NoahmpIO%ACC_QINSURXY(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%accqinsur + NoahmpIO%ACC_QSEVAXY(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%accqseva + NoahmpIO%ACC_ETRANIXY(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%accetrani + NoahmpIO%ACC_DWATERXY(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%accdwater + NoahmpIO%ACC_PRCPXY(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%accprcp + NoahmpIO%ACC_ECANXY(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%accecan + NoahmpIO%ACC_ETRANXY(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%accetran + NoahmpIO%ACC_EDIRXY (1,1) = NoahMPnew_struc(n)%noahmpnew(t)%accedir + ! DMM - If dynamic vegetation option DVEG = 7, 8, or 9 for "input LAI", ! then send LAI/SAI from input to the Noah-MP physics. If any ! tile has an undefined LAI/SAI value, instead use the value from the @@ -520,8 +578,56 @@ subroutine NoahMPnew_main(n) NoahMPnew_struc(n)%noahmpnew(t)%chuc = NoahmpIO%chucxy(1,1) NoahMPnew_struc(n)%noahmpnew(t)%chv2 = NoahmpIO%chv2xy(1,1) NoahMPnew_struc(n)%noahmpnew(t)%chb2 = NoahmpIO%chb2xy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%infxs1rt = NoahmpIO%infxs1rt(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%soldrain1rt = NoahmpIO%soldrain1rt(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%infxs1rt = NoahmpIO%infxsrt(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%soldrain1rt = NoahmpIO%soldrain(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%sfcheadrt = NoahmpIO%sfcheadrt(1,1) + + ! additional accumulated variables + NoahMPnew_struc(n)%noahmpnew(t)%accssoil = NoahmpIO%ACC_SSOILXY(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%accqinsur = NoahmpIO%ACC_QINSURXY(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%accqseva = NoahmpIO%ACC_QSEVAXY(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%accetrani = NoahmpIO%ACC_ETRANIXY(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%accdwater = NoahmpIO%ACC_DWATERXY(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%accprcp = NoahmpIO%ACC_PRCPXY(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%accecan = NoahmpIO%ACC_ECANXY(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%accetran = NoahmpIO%ACC_ETRANXY(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%accedir = NoahmpIO%ACC_EDIRXY (1,1) + + ! for irrigation + if (NoahmpIO%IOPT_IRR > 0) then + NoahMPnew_struc(n)%noahmpnew(t)%irnumsi = NoahmpIO%irnumsi(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%irnummi = NoahmpIO%irnummi(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%irnumfi = NoahmpIO%irnumfi(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%irwatsi = NoahmpIO%irwatsi(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%irwatmi = NoahmpIO%irwatmi(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%irwatfi = NoahmpIO%irwatfi(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%ireloss = NoahmpIO%ireloss(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%irrsplh = NoahmpIO%irrsplh(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%irsivol = NoahmpIO%irsivol(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%irmivol = NoahmpIO%irmivol(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%irfivol = NoahmpIO%irfivol(1,1) + endif + + ! for tile drainage + if (NoahmpIO%IOPT_TDRN > 0) then + NoahMPnew_struc(n)%noahmpnew(t)%qtdrain = NoahmpIO%qtdrain(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%qtdrainflx = NoahmpIO%qtdrainflx(1,1) + endif + + ! for MMF groundwater + if (NoahmpIO%IOPT_RUNSUB == 5) then + NoahMPnew_struc(n)%noahmpnew(t)%fdepth = NoahmpIO%fdepthxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%eqzwt = NoahmpIO%eqzwt(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%riverbed = NoahmpIO%riverbedxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%rivercond = NoahmpIO%rivercondxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%pexp = NoahmpIO%pexpxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%area = NoahmpIO%areaxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%qrfs = NoahmpIO%qrfsxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%qspring = NoahmpIO%qspringxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%qrf = NoahmpIO%qrfxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%qsprings = NoahmpIO%qspringsxy(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%qslat = NoahmpIO%qslatxy(1,1) + endif ! EMK Update RHMin for 557WW if (NoahmpIO%T_PHY(1,1,1) .lt. & diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_module.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_module.F90 index 1687b727c..610def3da 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_module.F90 +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_module.F90 @@ -443,13 +443,58 @@ module NoahMPnew_module real :: lai real :: sai real :: tauss + real :: grain + real :: gdd + integer :: pgs + ! for mmf groundwater real, pointer :: smoiseq(:) real :: smcwtd real :: deeprech real :: rech - real :: grain - real :: gdd - integer :: pgs + real :: pexp + real :: area + real :: qrf + real :: qspring + real :: qslat + real :: qrfs + real :: qsprings + real :: fdepth + real :: rivercond + real :: riverbed + real :: eqzwt + real :: rechclim + real :: rivermask + real :: nonriver + ! for irrigation + integer :: irnumsi + integer :: irnummi + integer :: irnumfi + real :: irfract + real :: sifract + real :: mifract + real :: fifract + real :: irwatsi + real :: irwatmi + real :: irwatfi + real :: ireloss + real :: irrsplh + real :: irsivol + real :: irmivol + real :: irfivol + ! for tile drainage + real :: tdfract + real :: qtdrain + real :: qtdrainflx + ! for water budget with different soil time step + real :: accssoil + real :: accqinsur + real :: accqseva + real :: accetrani + real :: accdwater + real :: accprcp + real :: accecan + real :: accetran + real :: accedir !ag (05Jan2021) ! 2-way coupling parameters real :: rivsto diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_readcrd.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_readcrd.F90 index eb2d14a31..c9ea6735c 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_readcrd.F90 +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_readcrd.F90 @@ -459,21 +459,25 @@ subroutine NoahMPnew_readcrd() do n=1, LIS_rc%nnest ! NoahmpNew_struc(n)%LDT_ncvar_vegetype = ' ! Edit here if hard code name ! NoahmpNew_struc(n)%LDT_ncvar_soiltype = ' ! Edit here if hard code name - NoahmpNew_struc(n)%LDT_ncvar_tbot = 'TBOT' !'NOAHMPnew_TBOT' - NoahmpNew_struc(n)%LDT_ncvar_shdfac_monthly = 'GREENNESS' !'NOAHMPnew_SHDFAC_MONTHLY' - NoahmpNew_struc(n)%LDT_ncvar_planting = 'PLANTING' !'NOAHMPnew_PLANTING' - NoahmpNew_struc(n)%LDT_ncvar_harvest = 'HARVEST' !'NOAHMPnew_HARVEST' - NoahmpNew_struc(n)%LDT_ncvar_season_gdd = 'SEASON_GDD' !'NOAHMPnew_SEASON_GDD' - NoahmpNew_struc(n)%LDT_ncvar_soilcomp = 'SOILCOMP' !'NOAHMPnew_SOILCOMP' - NoahmpNew_struc(n)%LDT_ncvar_soilcL1 = 'SOILCL1' !'NOAHMPnew_SOILCL1' - NoahmpNew_struc(n)%LDT_ncvar_soilcL2 = 'SOILCL2' !'NOAHMPnew_SOILCL2' - NoahmpNew_struc(n)%LDT_ncvar_soilcL3 = 'SOILCL3' !'NOAHMPnew_SOILCL3' - NoahmpNew_struc(n)%LDT_ncvar_soilcL4 = 'SOILCL4' !'NOAHMPnew_SOILCL4' - NoahmpNew_struc(n)%LDT_ncvar_irfract = 'IRFRACT' - NoahmpNew_struc(n)%LDT_ncvar_sifract = 'SIFRACT' - NoahmpNew_struc(n)%LDT_ncvar_mifract = 'MIFRACT' - NoahmpNew_struc(n)%LDT_ncvar_fifract = 'FIFRACT' - NoahmpNew_struc(n)%LDT_ncvar_tdfract = 'TD_FRACTION' + NoahmpNew_struc(n)%LDT_ncvar_tbot = 'TBOT' !'NOAHMPnew_TBOT' + NoahmpNew_struc(n)%LDT_ncvar_shdfac_monthly = 'GREENNESS' !'NOAHMPnew_SHDFAC_MONTHLY' + NoahmpNew_struc(n)%LDT_ncvar_planting = 'PLANTING' !'NOAHMPnew_PLANTING' + NoahmpNew_struc(n)%LDT_ncvar_harvest = 'HARVEST' !'NOAHMPnew_HARVEST' + NoahmpNew_struc(n)%LDT_ncvar_season_gdd = 'SEASON_GDD' !'NOAHMPnew_SEASON_GDD' + NoahmpNew_struc(n)%LDT_ncvar_soilcomp = 'SOILCOMP' !'NOAHMPnew_SOILCOMP' + NoahmpNew_struc(n)%LDT_ncvar_soilcL1 = 'SOILCL1' !'NOAHMPnew_SOILCL1' + NoahmpNew_struc(n)%LDT_ncvar_soilcL2 = 'SOILCL2' !'NOAHMPnew_SOILCL2' + NoahmpNew_struc(n)%LDT_ncvar_soilcL3 = 'SOILCL3' !'NOAHMPnew_SOILCL3' + NoahmpNew_struc(n)%LDT_ncvar_soilcL4 = 'SOILCL4' !'NOAHMPnew_SOILCL4' + NoahmpNew_struc(n)%LDT_ncvar_irfract = 'IRFRACT' + NoahmpNew_struc(n)%LDT_ncvar_sifract = 'SIFRACT' + NoahmpNew_struc(n)%LDT_ncvar_mifract = 'MIFRACT' + NoahmpNew_struc(n)%LDT_ncvar_fifract = 'FIFRACT' + NoahmpNew_struc(n)%LDT_ncvar_tdfract = 'TD_FRACTION' + NoahmpNew_struc(n)%LDT_ncvar_fdepth = 'FDEPTH' + NoahmpNew_struc(n)%LDT_ncvar_eqzwt = 'EQZWT' + NoahmpNew_struc(n)%LDT_ncvar_rechclim = 'RECHCLIM' + NoahmpNew_struc(n)%LDT_ncvar_riverbed = 'RIVERBED' enddo !------------------------------------------------------------------------------------------ diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_readrst.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_readrst.F90 new file mode 100644 index 000000000..8b3f60dcd --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_readrst.F90 @@ -0,0 +1,550 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- + +#include "LIS_misc.h" +!BOP +! +! !ROUTINE: NoahMPnew_readrst +! \label{NoahMPnew_readrst} +! +! !REVISION HISTORY: +! This subroutine is generated with the Model Implementation Toolkit developed +! by Shugong Wang for the NASA Land Information System Version 7. The initial +! specification of the subroutine is defined by Sujay Kumar. +! 10/25/18: Shugong Wang, Zhuo Wang; initial implementation for LIS 7 and Noah-MP-4.0.1 +! 01/08/2021 Bailing Li; implemented code for reading GRACE DA restart file +! May 2023: Cenlin He, modified for refactored NoahMP v5 and later + +! !INTERFACE: +subroutine NoahMPnew_readrst() +! !USES: + use LIS_coreMod, only : LIS_rc, LIS_masterproc + use LIS_historyMod, only : LIS_readvar_restart + use LIS_logMod, only : LIS_logunit, LIS_endrun, & + LIS_getNextUnitNumber, & + LIS_releaseUnitNumber, & + LIS_verify + use LIS_constantsMod, only : LIS_CONST_PATH_LEN + use NoahMPnew_lsmMod + use ESMF + use LIS_fileIOMod + use LIS_timeMgrMod + +#if (defined USE_NETCDF3 || defined USE_NETCDF4) + use netcdf +#endif + +! +! !DESCRIPTION: +! This program reads restart files for Noah-MP-4.0.1 LSM. +! This includes all relevant water/energy storages and tile information. +! The following is the list of variables specified in the Noah-MP-4.0.1 +! restart file: +! \begin{verbatim} +! nc, nr, ntiles - grid and tile space dimensions +! sfcrunoff - NoahMP accumulated surface runoff [m] +! udrrunoff - NoahMP accumulated sub-surface runoff [m] +! smc - NoahMP volumtric soil moisture [m3/m3] +! sh2o - NoahMP volumtric liquid soil moisture [m3/m3] +! tslb - NoahMP soil temperature [K] +! sneqv - NoahMP snow water equivalent [mm] +! snowh - NoahMP physical snow depth [m] +! canwat - NoahMP total canopy water + ice [mm] +! acsnom - NoahMP accumulated snow melt leaving pack [-] +! acsnow - NoahMP accumulated snow on grid [mm] +! isnow - NoahMP actual no. of snow layers [-] +! tv - NoahMP vegetation leaf temperature [K] +! tg - NoahMP bulk ground surface temperature [K] +! canice - NoahMP canopy-intercepted ice [mm] +! canliq - NoahMP canopy-intercepted liquid water [mm] +! eah - NoahMP canopy air vapor pressure [Pa] +! tah - NoahMP canopy air temperature [K] +! cm - NoahMP bulk momentum drag coefficient [-] +! ch - NoahMP bulk sensible heat exchange coefficient [-] +! fwet - NoahMP wetted or snowed fraction of canopy [-] +! sneqvo - NoahMP snow mass at last time step [mm h2o] +! albold - NoahMP snow albedo at last time step [-] +! qsnow - NoahMP snowfall on the ground [mm/s] +! wslake - NoahMP lake water storage [mm] +! zwt - NoahMP water table depth [m] +! wa - NoahMP water in the "aquifer" [mm] +! wt - NoahMP water in aquifer and saturated soil [mm] +! tsno - NoahMP snow layer temperature [K] +! zss - NoahMP snow/soil layer depth from snow surface [m] +! snowice - NoahMP snow layer ice [mm] +! snowliq - NoahMP snow layer liquid water [mm] +! lfmass - NoahMP leaf mass [g/m2] +! rtmass - NoahMP mass of fine roots [g/m2] +! stmass - NoahMP stem mass [g/m2] +! wood - NoahMP mass of wood (including woody roots) [g/m2] +! stblcp - NoahMP stable carbon in deep soil [g/m2] +! fastcp - NoahMP short-lived carbon in shallow soil [g/m2] +! lai - NoahMP leaf area index [-] +! sai - NoahMP stem area index [-] +! tauss - NoahMP snow age factor [-] +! smoiseq - NoahMP equilibrium volumetric soil moisture content [m3/m3] +! smcwtd - NoahMP soil moisture content in the layer to the water table when deep [-] +! deeprech - NoahMP recharge to the water table when deep [-] +! rech - NoahMP recharge to the water table (diagnostic) [-] +! grain - NoahMP mass of grain XING [g/m2] +! gdd - NoahMP growing degree days XING (based on 10C) [-] +! pgs - NoahMP growing degree days XING [-] +! \end{verbatim} +! +! The routines invoked are: +! \begin{description} +! \item[LIS\_readvar\_restart](\ref{LIS_readvar_restart})\\ +! reads a variable from the restart file +! \item[NoahMPnew\_coldstart](\ref{NoahMPnew_coldstart})\\ +! initializes the NoahMP state variables +! \end{description} +!EOP + + implicit none + + integer :: t, l + integer :: nc, nr, npatch + integer :: n + integer :: ftn + integer :: status + real, allocatable :: tmptilen(:) + logical :: file_exists + character*20 :: wformat + character(len=LIS_CONST_PATH_LEN) :: filen + integer :: yr,mo,da,hr,mn,ss,doy + real*8 :: time + real :: gmt + real :: ts + + + do n=1, LIS_rc%nnest + wformat = trim(NoahMPnew_struc(n)%rformat) + ! coldstart + if(LIS_rc%startcode .eq. "coldstart") then + call NoahMPnew_coldstart(LIS_rc%lsm_index) + ! restart + elseif(LIS_rc%startcode .eq. "restart") then + !---create restart filename based on timewindow for EnKS + if(LIS_rc%runmode.eq."ensemble smoother") then + if(LIS_rc%iterationId(n).gt.1) then + if(NoahMPnew_struc(n)%rstInterval.eq.2592000) then + !create the restart filename based on the timewindow start time + call ESMF_TimeGet(LIS_twStartTime,yy=yr,mm=mo,& + dd=da,calendar=LIS_calendar,rc=status) + hr = 0 + mn = 0 + ss = 0 + call LIS_tick(time,doy,gmt,yr,mo,da,hr,mn,ss,(-1)*LIS_rc%ts) + else + call ESMF_TimeGet(LIS_twStartTime,yy=yr,mm=mo,& + dd=da,calendar=LIS_calendar,rc=status) + hr = 0 + mn = 0 + ss = 0 + endif + + call LIS_create_restart_filename(n,filen,'SURFACEMODEL','NOAHMPnew', & + yr,mo,da,hr,mn,ss, wformat=wformat) + NoahMPnew_struc(n)%rfile = filen + endif + endif + + + allocate(tmptilen(LIS_rc%npatch(n, LIS_rc%lsm_index))) + ! check the existance of restart file + inquire(file=NoahMPnew_struc(n)%rfile, exist=file_exists) + If (.not. file_exists) then + write(LIS_logunit,*) "[ERR] NoahMPnew restart file: ", & + trim(NoahMPnew_struc(n)%rfile) + write(LIS_logunit,*) "[ERR] does not exist." + write(LIS_logunit,*) "[ERR] Program stopping ..." + call LIS_endrun + endif + write(LIS_logunit,*) & + "[INFO] Noah-MP.New restart file used: ",trim(NoahMPnew_struc(n)%rfile) + + ! open restart file + if(wformat .eq. "binary") then + ftn = LIS_getNextUnitNumber() + open(ftn, file=NoahMPnew_struc(n)%rfile, & + form="unformatted") + read(ftn) nc, nr, npatch !time, veg class, no. tiles + + ! check for grid space conflict + if((nc .ne. LIS_rc%gnc(n)) .or. (nr .ne. LIS_rc%gnr(n))) then + write(LIS_logunit,*) "[ERR]",trim(NoahMPnew_struc(n)%rfile) + write(LIS_logunit,*) "[ERR] grid space mismatch" + write(LIS_logunit,*) "[ERR] Program stopping..." + call LIS_endrun + endif + + if(npatch .ne. LIS_rc%glbnpatch_red(n, LIS_rc%lsm_index)) then + write(LIS_logunit,*) "[ERR]",trim(NoahMPnew_struc(n)%rfile) + write(LIS_logunit,*) "[ERR] tile space mismatch" + write(LIS_logunit,*) "[ERR] Program stopping..." + call LIS_endrun + endif + elseif(wformat .eq. "netcdf") then +#if (defined USE_NETCDF3 || defined USE_NETCDF4) + status = nf90_open(path=NoahMPnew_struc(n)%rfile, & + mode=NF90_NOWRITE, ncid=ftn) + call LIS_verify(status, "Error opening file "//NoahMPnew_struc(n)%rfile) +#endif + endif + + ! read: accumulated surface runoff + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%sfcrunoff, & + varname="SFCRUNOFF", wformat=wformat) + + ! read: accumulated sub-surface runoff + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%udrrunoff, & + varname="UDRRUNOFF", wformat=wformat) + + ! read: volumtric soil moisture + do l=1, NoahMPnew_struc(n)%nsoil ! TODO: check loop + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, varname="SMC", & + dim=l, vlevels = NoahMPnew_struc(n)%nsoil, wformat=wformat) + do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) + NoahMPnew_struc(n)%noahmpnew(t)%smc(l) = tmptilen(t) + enddo + enddo + + ! read: volumtric liquid soil moisture + do l=1, NoahMPnew_struc(n)%nsoil ! TODO: check loop + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, varname="SH2O", & + dim=l, vlevels = NoahMPnew_struc(n)%nsoil, wformat=wformat) + do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) + NoahMPnew_struc(n)%noahmpnew(t)%sh2o(l) = tmptilen(t) + enddo + enddo + + ! read: soil temperature + do l=1, NoahMPnew_struc(n)%nsoil ! TODO: check loop + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, varname="TSLB", & + dim=l, vlevels = NoahMPnew_struc(n)%nsoil, wformat=wformat) + do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) + NoahMPnew_struc(n)%noahmpnew(t)%tslb(l) = tmptilen(t) + enddo + enddo + + ! read: snow water equivalent + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%sneqv, & + varname="SNEQV", wformat=wformat) + + ! read: physical snow depth + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%snowh, & + varname="SNOWH", wformat=wformat) + + ! read: total canopy water + ice + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%canwat, & + varname="CANWAT", wformat=wformat) + + ! read: accumulated snow melt leaving pack + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%acsnom, & + varname="ACSNOM", wformat=wformat) + + ! read: accumulated snow on grid + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%acsnow, & + varname="ACSNOW", wformat=wformat) + + ! read: actual no. of snow layers + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%isnow, & + varname="ISNOW", wformat=wformat) + + ! read: vegetation leaf temperature + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%tv, & + varname="TV", wformat=wformat) + + ! read: bulk ground surface temperature + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%tg, & + varname="TG", wformat=wformat) + + ! read: canopy-intercepted ice + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%canice, & + varname="CANICE", wformat=wformat) + + ! read: canopy-intercepted liquid water + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%canliq, & + varname="CANLIQ", wformat=wformat) + + ! read: canopy air vapor pressure + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%eah, & + varname="EAH", wformat=wformat) + + ! read: canopy air temperature + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%tah, & + varname="TAH", wformat=wformat) + + ! read: bulk momentum drag coefficient + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%cm, & + varname="CM", wformat=wformat) + + ! read: bulk sensible heat exchange coefficient + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%ch, & + varname="CH", wformat=wformat) + + ! read: wetted or snowed fraction of canopy + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%fwet, & + varname="FWET", wformat=wformat) + + ! read: snow mass at last time step + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%sneqvo, & + varname="SNEQVO", wformat=wformat) + + ! read: snow albedo at last time step + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%albold, & + varname="ALBOLD", wformat=wformat) + + ! read: snowfall on the ground + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%qsnow, & + varname="QSNOW", wformat=wformat) + + ! read: lake water storage + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%wslake, & + varname="WSLAKE", wformat=wformat) + + ! read: water table depth + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%zwt, & + varname="ZWT", wformat=wformat) + + ! read: water in the "aquifer" + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%wa, & + varname="WA", wformat=wformat) + + ! read: water in aquifer and saturated soil + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%wt, & + varname="WT", wformat=wformat) + + ! read: snow layer temperature + do l=1, NoahMPnew_struc(n)%nsnow ! TODO: check loop + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, varname="TSNO", & + dim=l, vlevels = NoahMPnew_struc(n)%nsnow, wformat=wformat) + do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) + NoahMPnew_struc(n)%noahmpnew(t)%tsno(l) = tmptilen(t) + enddo + enddo + + ! read: snow/soil layer depth from snow surface + do l=1, NoahMPnew_struc(n)%nsnow + NoahMPnew_struc(n)%nsoil + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, varname="ZSS", & + dim=l, vlevels = NoahMPnew_struc(n)%nsnow + NoahMPnew_struc(n)%nsoil, wformat=wformat) + do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) + NoahMPnew_struc(n)%noahmpnew(t)%zss(l) = tmptilen(t) + enddo + enddo + + ! read: snow layer ice + do l=1, NoahMPnew_struc(n)%nsnow ! TODO: check loop + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, varname="SNOWICE", & + dim=l, vlevels = NoahMPnew_struc(n)%nsnow, wformat=wformat) + do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) + NoahMPnew_struc(n)%noahmpnew(t)%snowice(l) = tmptilen(t) + enddo + enddo + + ! read: snow layer liquid water + do l=1, NoahMPnew_struc(n)%nsnow ! TODO: check loop + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, varname="SNOWLIQ", & + dim=l, vlevels = NoahMPnew_struc(n)%nsnow, wformat=wformat) + do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) + NoahMPnew_struc(n)%noahmpnew(t)%snowliq(l) = tmptilen(t) + enddo + enddo + + ! read: leaf mass + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%lfmass, & + varname="LFMASS", wformat=wformat) + + ! read: mass of fine roots + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%rtmass, & + varname="RTMASS", wformat=wformat) + + ! read: stem mass + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%stmass, & + varname="STMASS", wformat=wformat) + + ! read: mass of wood (including woody roots) + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%wood, & + varname="WOOD", wformat=wformat) + + ! read: stable carbon in deep soil + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%stblcp, & + varname="STBLCP", wformat=wformat) + + ! read: short-lived carbon in shallow soil + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%fastcp, & + varname="FASTCP", wformat=wformat) + + ! read: leaf area index + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%lai, & + varname="LAI", wformat=wformat) + + ! read: stem area index + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%sai, & + varname="SAI", wformat=wformat) + + ! read: snow age factor + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%tauss, & + varname="TAUSS", wformat=wformat) + + if (NoahMPnew_struc(n)%runsub_opt == 5) then + ! read: equilibrium volumetric soil moisture content + do l=1, NoahMPnew_struc(n)%nsoil ! TODO: check loop + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, varname="SMOISEQ", & + dim=l, vlevels = NoahMPnew_struc(n)%nsoil, wformat=wformat) + do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) + NoahMPnew_struc(n)%noahmpnew(t)%smoiseq(l) = tmptilen(t) + enddo + enddo + + ! read: soil moisture content in the layer to the water table when deep + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%smcwtd, & + varname="SMCWTD", wformat=wformat) + + ! read: recharge to the water table when deep + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%deeprech, & + varname="DEEPRECH", wformat=wformat) + + ! read: recharge to the water table (diagnostic) + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%rech, & + varname="RECH", wformat=wformat) + + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%pexp, & + varname="PEXP", wformat=wformat) + + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%area, & + varname="AREA", wformat=wformat) + + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%qrf, & + varname="QRF", wformat=wformat) + + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%qspring, & + varname="QSPRING", wformat=wformat) + + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%qslat, & + varname="QSLAT", wformat=wformat) + + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%qrfs, & + varname="QRFS", wformat=wformat) + + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%qsprings, & + varname="QSPRINGS", wformat=wformat) + + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%fdepth, & + varname="FDEPTH", wformat=wformat) + + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%rivercond, & + varname="RIVERCOND", wformat=wformat) + + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%riverbed, & + varname="RIVERBED", wformat=wformat) + + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%eqzwt, & + varname="EQZWT", wformat=wformat) + endif ! MMF groundwater + + ! for irrigation + if (NoahMPnew_struc(n)%irr_opt >0) then + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irnumsi, & + varname="IRNUMSI", wformat=wformat) + + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irnummi, & + varname="IRNUMMI", wformat=wformat) + + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irnumfi, & + varname="IRNUMFI", wformat=wformat) + + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irwatsi, & + varname="IRWATSI", wformat=wformat) + + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irwatmi, & + varname="IRWATMI", wformat=wformat) + + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irwatfi, & + varname="IRWATFI", wformat=wformat) + + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irsivol, & + varname="IRSIVOL", wformat=wformat) + + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irmivol, & + varname="IRMIVOL", wformat=wformat) + + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irfivol, & + varname="IRFIVOL", wformat=wformat) + + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%ireloss, & + varname="IRELOSS", wformat=wformat) + + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irrsplh, & + varname="IRRSPLH", wformat=wformat) + endif ! irrigation + + ! for tile drainage + if (NoahMPnew_struc(n)%tdrn_opt >0) then + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%qtdrain, & + varname="QTDRAIN", wformat=wformat) + endif + + ! for crop + ! read: mass of grain XING + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%grain, & + varname="GRAIN", wformat=wformat) + + ! read: growing degree days XING (based on 10C) + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%gdd, & + varname="GDD", wformat=wformat) + + ! read: growing degree days XING + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%pgs, & + varname="PGS", wformat=wformat) + + ! for additional restart variables + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accssoil, & + varname="ACC_SSOIL", wformat=wformat) + + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accqinsur, & + varname="ACC_QINSUR", wformat=wformat) + + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accqseva, & + varname="ACC_QSEVA", wformat=wformat) + + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accetrani, & + varname="ACC_ETRANI", wformat=wformat) + + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accdwater, & + varname="ACC_DWATER", wformat=wformat) + + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accprcp, & + varname="ACC_PRCP", wformat=wformat) + + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accecan, & + varname="ACC_ECAN", wformat=wformat) + + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accetran, & + varname="ACC_ETRAN", wformat=wformat) + + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accedir, & + varname="ACC_EDIR", wformat=wformat) + + ! close restart file + if(wformat .eq. "binary") then + call LIS_releaseUnitNumber(ftn) + elseif(wformat .eq. "netcdf") then +#if (defined USE_NETCDF3 || defined USE_NETCDF4) + status = nf90_close(ftn) + call LIS_verify(status, & + "Error in nf90_close in NoahMPnew_readrst") +#endif + endif + deallocate(tmptilen) + endif + enddo +end subroutine NoahMPnew_readrst + diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_setup.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_setup.F90 index e040e421c..5c63b575c 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_setup.F90 +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_setup.F90 @@ -264,6 +264,53 @@ subroutine NoahMPnew_setup() enddo endif + ! CH 05/01/2023: for MMF groundwater + if(NOAHMPnew_struc(n)%runsub_opt == 5) then + ! read: efolding depth for transmissivity (m) + write(LIS_logunit,*) & + "[INFO] Noah-MP.New reading parameter FDEPTH from ", & + trim(LIS_rc%paramfile(n)) + call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_fdepth), placeholder) + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + NOAHMPnew_struc(n)%noahmpnew(t)%fdepth = placeholder(col, row) + enddo + + ! read: equilibrium water table depth (m) + write(LIS_logunit,*) & + "[INFO] Noah-MP.New reading parameter EQZWT from ", & + trim(LIS_rc%paramfile(n)) + call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_eqzwt), placeholder) + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + NOAHMPnew_struc(n)%noahmpnew(t)%eqzwt = placeholder(col, row) + enddo + + ! read: riverbed depth (m) + write(LIS_logunit,*) & + "[INFO] Noah-MP.New reading parameter RIVERBED from ", & + trim(LIS_rc%paramfile(n)) + call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_riverbed), placeholder) + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + NOAHMPnew_struc(n)%noahmpnew(t)%riverbed = placeholder(col, row) + enddo + + ! read: climatology recharge + write(LIS_logunit,*) & + "[INFO] Noah-MP.New reading parameter RECHCLIM from ", & + trim(LIS_rc%paramfile(n)) + call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_rechclim), placeholder) + do t = 1, LIS_rc%npatch(n, mtype) + col = LIS_surface(n, mtype)%tile(t)%col + row = LIS_surface(n, mtype)%tile(t)%row + NOAHMPnew_struc(n)%noahmpnew(t)%rechclim = placeholder(col, row) + enddo + endif + !----------------------------------------------! ! MULTILEVEL reading spatial spatial parameters ! !----------------------------------------------! diff --git a/lis/surfacemodels/land/noahmp.new/kwm_date_utilities_401.F90 b/lis/surfacemodels/land/noahmp.new/kwm_date_utilities_new.F90 similarity index 99% rename from lis/surfacemodels/land/noahmp.new/kwm_date_utilities_401.F90 rename to lis/surfacemodels/land/noahmp.new/kwm_date_utilities_new.F90 index e5d02bb70..380dd0c8f 100644 --- a/lis/surfacemodels/land/noahmp.new/kwm_date_utilities_401.F90 +++ b/lis/surfacemodels/land/noahmp.new/kwm_date_utilities_new.F90 @@ -7,7 +7,7 @@ ! Administrator of the National Aeronautics and Space Administration. ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- -module kwm_date_utilities_401 +module kwm_date_utilities_new contains subroutine geth_newdate (ndate, odate, idt) implicit none @@ -819,4 +819,4 @@ integer function nmdays(hdate) nmdays = ndays(month) endif end function nmdays -end module kwm_date_utilities_401 +end module kwm_date_utilities_new diff --git a/lis/surfacemodels/land/noahmp.new/noahmp_driver_new.F90 b/lis/surfacemodels/land/noahmp.new/noahmp_driver_new.F90 index 11269174a..a81aee31c 100644 --- a/lis/surfacemodels/land/noahmp.new/noahmp_driver_new.F90 +++ b/lis/surfacemodels/land/noahmp.new/noahmp_driver_new.F90 @@ -103,7 +103,8 @@ subroutine noahmp_driver_new(n, NoahmpIO, LISparam) call calc_declin(nowdate(1:4)//"-"//nowdate(5:6)//"-"//nowdate(7:8)//"_"//nowdate(9:10)//":"//nowdate(11:12)//":00", & NoahmpIO%xlat(1,1), NoahmpIO%xlon(1,1), NoahmpIO%coszen(1,1), NoahmpIO%yearlen, NoahmpIO%julian) - NoahmpIO%YR = locyr + read(nowdate(1:4), '(I4)') NoahmpIO%YR + if ((NoahmpIO%IOPT_DVEG .eq. 1).or.(NoahmpIO%IOPT_DVEG .eq. 6).or.(NoahmpIO%IOPT_DVEG .eq. 7)) then ! with dveg_opt==1/6/7, shdfac is fed directly to fveg NoahmpIO%vegfra(1,1) = month_d_new(shdfac_monthly(1,:,1), nowdate) @@ -150,143 +151,9 @@ subroutine noahmp_driver_new(n, NoahmpIO, LISparam) ! main NoahMP driver physics call NoahmpDriverMain(NoahmpIO,LISparam) - - ! Added by Zhuo Wang and Shugong on 10/30/2018 - tsk = tskinout(1,1) - hfx = hfxinout(1,1) - qfx = qfxinout(1,1) - lh = lhinout(1,1) - grdflx = grdflxinout(1,1) - smstav = smstavinout(1,1) - smstot = smstotinout(1,1) - sfcrunoff = sfcrunoffinout(1,1) - udrunoff = udrunoffinout(1,1) -! albedo = albedoinout(1,1) - albedo = albedoout(1,1) - snowc = snowcinout(1,1) - smc(:) = smcinout(1,:,1) - sh2o(:) = sh2oinout(1,:,1) - tslb(:) = tslbinout(1,:,1) - sneqv = sneqvinout(1,1) - snowh = snowhinout(1,1) - canwat = canwatinout(1,1) - acsnom = acsnominout(1,1) - acsnow = acsnowinout(1,1) - emiss = emissinout(1,1) - qsfc = qsfcinout(1,1) - isnow = isnowinout(1,1) - tv = tvinout(1,1) - tg = tginout(1,1) - canice = caniceinout(1,1) - canliq = canliqinout(1,1) - eah = eahinout(1,1) - tah = tahinout(1,1) - cm = cminout(1,1) - ch = chinout(1,1) - fwet = fwetinout(1,1) - sneqvo = sneqvoinout(1,1) - albold = alboldinout(1,1) - qsnow = qsnowinout(1,1) - wslake = wslakeinout(1,1) - zwt = zwtinout(1,1) - wa = wainout(1,1) - wt = wtinout(1,1) - - ! Modified by Zhuo Wang on 12/31/2018 - tsnow(-nsnow+1:0) = tsnowinout(1,-nsnow+1:0,1) - zsnso(-nsnow+1:nsoil) = zsnsoinout(1,-nsnow+1:nsoil,1) - snice(-nsnow+1:0) = sniceinout(1,-nsnow+1:0,1) - snliq(-nsnow+1:0) = snliqinout(1,-nsnow+1:0,1) - tsno(1:nsnow) = tsnow(-nsnow+1:0) - zss(1:nsnow+nsoil) = zsnso(-nsnow+1:nsoil) - snowice(1:nsnow) = snice(-nsnow+1:0) - snowliq(1:nsnow) = snliq(-nsnow+1:0) - - lfmass = lfmassinout(1,1) - rtmass = rtmassinout(1,1) - stmass = stmassinout(1,1) - wood = woodinout(1,1) - stblcp = stblcpinout(1,1) - fastcp = fastcpinout(1,1) - lai = laiinout(1,1) - sai = saiinout(1,1) - tauss = taussinout(1,1) - smoiseq(:) = smoiseqinout(1,:,1) - smcwtd = smcwtdinout(1,1) - deeprech = deeprechinout(1,1) - rech = rechinout(1,1) - grain = graininout(1,1) - gdd = gddinout(1,1) - pgs = pgsinout(1,1) - gecros_state(:) = gecros_stateinout(1,:,1) - t2mv = t2mvout(1,1) - t2mb = t2mbout(1,1) - q2mv = q2mvout(1,1) - q2mb = q2mbout(1,1) - trad = tradout(1,1) - nee = neeout(1,1) - gpp = gppout(1,1) - npp = nppout(1,1) - fveg = fvegout(1,1) - runsf = runsfout(1,1) - runsb = runsbout(1,1) - ecan = ecanout(1,1) - edir = edirout(1,1) - etran = etranout(1,1) - fsa = fsaout(1,1) - fira = firaout(1,1) - apar = aparout(1,1) - psn = psnout(1,1) - sav = savout(1,1) - sag = sagout(1,1) - rssun = rssunout(1,1) - rssha = rsshaout(1,1) - bgap = bgapout(1,1) - wgap = wgapout(1,1) - tgv = tgvout(1,1) - tgb = tgbout(1,1) - chv = chvout(1,1) - chb = chbout(1,1) - shg = shgout(1,1) - shc = shcout(1,1) - shb = shbout(1,1) - evg = evgout(1,1) - evb = evbout(1,1) - ghv = ghvout(1,1) - ghb = ghbout(1,1) - irg = irgout(1,1) - irc = ircout(1,1) - irb = irbout(1,1) - tr = trout(1,1) - evc = evcout(1,1) - chleaf = chleafout(1,1) - chuc = chucout(1,1) - chv2 = chv2out(1,1) - chb2 = chb2out(1,1) - relsmc(:) = relsmcout(1,:,1) - rs = rsout(1,1) - - rainf = prcp * (1.0 - fpice)/dt ! added by Shugong for LIS output - snowf = prcp * fpice/dt ! added by Shugong for LIS output - fgev_pet = fgev_petout(1,1) ! 08/30/2021 Shugong - fcev_pet = fcev_petout(1,1) - fctr_pet = fctr_petout(1,1) - -#ifndef WRF_HYDRO - INFXSRT = 0.0 - soldrain = 0.0 -#endif - - deallocate(zsoil) - deallocate(zsnso) - - deallocate(snice) - deallocate(snliq) - deallocate(tsnow) ! Added by Zhuo Wang and Shugong Wang on 10/30/2018 - -end subroutine noahmp_driver_401 +end subroutine noahmp_driver_new -real function month_d_401(a12, nowdate) result (nowval) +real function month_d_new(a12, nowdate) result (nowval) ! ! Given a set of 12 values, taken to be valid on the fifteenth of each month (Jan through Dec) ! and a date in the form .... @@ -294,7 +161,7 @@ real function month_d_401(a12, nowdate) result (nowval) ! Return a value valid for the day given in , as an interpolation from the 12 ! monthly values. ! - use kwm_date_utilities_401 + use kwm_date_utilities_new implicit none real, dimension(12), intent(in) :: a12 ! 12 monthly values, taken to be valid on the 15th of ! ! the month @@ -329,10 +196,10 @@ real function month_d_401(a12, nowdate) result (nowval) nowval = a12(prevm)*(1.0-factor) + a12(postm)*factor -end function month_d_401 +end function month_d_new -SUBROUTINE calc_declin_401 ( nowdate, latitude, longitude, cosz, yearlen, julian) - use kwm_date_utilities_401 +SUBROUTINE calc_declin ( nowdate, latitude, longitude, cosz, yearlen, julian) + use kwm_date_utilities_new !--------------------------------------------------------------------- IMPLICIT NONE !--------------------------------------------------------------------- @@ -419,10 +286,10 @@ SUBROUTINE calc_declin_401 ( nowdate, latitude, longitude, cosz, yearlen, julian !KWM10 FORMAT(1X,'*** SOLAR DECLINATION ANGLE = ',F6.2,' DEGREES.',' ***') !KWM CALL wrf_debug (50, wrf_err_message) -END SUBROUTINE calc_declin_401 +END SUBROUTINE calc_declin ! Subroutine SNOW_INIT grabbed from NOAH-MP-WRF -SUBROUTINE SNOW_INIT_401 ( jts, jtf, its, itf, ims, ime, jms, jme, NSNOW, NSOIL, ZSOIL, & +SUBROUTINE SNOW_INIT_new ( jts, jtf, its, itf, ims, ime, jms, jme, NSNOW, NSOIL, ZSOIL, & SWE, tgxy, SNODEP, ZSNSOXY, TSNOXY, SNICEXY, SNLIQXY, ISNOWXY) ! ------------------------------------------------------------------------------------------ @@ -507,4 +374,4 @@ SUBROUTINE SNOW_INIT_401 ( jts, jtf, its, itf, ims, ime, jms, jme, NSNOW, NSOIL, END DO END DO -END SUBROUTINE SNOW_INIT_401 +END SUBROUTINE SNOW_INIT_new diff --git a/lis/surfacemodels/land/noahmp.new/phys/noahmp b/lis/surfacemodels/land/noahmp.new/phys/noahmp index 1d778fc36..0234965da 160000 --- a/lis/surfacemodels/land/noahmp.new/phys/noahmp +++ b/lis/surfacemodels/land/noahmp.new/phys/noahmp @@ -1 +1 @@ -Subproject commit 1d778fc36bb64e133ab6fe37ed7e405367a5f00a +Subproject commit 0234965da56d1f5b589f9bd8494335e877880aee From 274706e10e6865f6df4f0118c074e0b4e8d379f6 Mon Sep 17 00:00:00 2001 From: cenlinhe Date: Fri, 14 Jul 2023 13:58:11 -0600 Subject: [PATCH 05/27] update integration for additional vars --- .../land/noahmp.new/NoahMPnew_finalize.F90 | 49 +- .../land/noahmp.new/NoahMPnew_lsmMod.F90 | 1 + .../land/noahmp.new/NoahMPnew_main.F90 | 36 +- .../land/noahmp.new/NoahMPnew_module.F90 | 2 +- ...oahMP401_reset.F90 => NoahMPnew_reset.F90} | 36 +- ...01_writerst.F90 => NoahMPnew_writerst.F90} | 494 ++++++++++++------ 6 files changed, 410 insertions(+), 208 deletions(-) rename lis/surfacemodels/land/noahmp.new/{NoahMP401_reset.F90 => NoahMPnew_reset.F90} (55%) rename lis/surfacemodels/land/noahmp.new/{NoahMP401_writerst.F90 => NoahMPnew_writerst.F90} (57%) diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_finalize.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_finalize.F90 index 6c1d68277..eb6f73b7a 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_finalize.F90 +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_finalize.F90 @@ -10,8 +10,8 @@ !BOP ! -! !ROUTINE: NoahMP401_finalize -! \label{NoahMP401_finalize} +! !ROUTINE: NoahMPnew_finalize +! \label{NoahMPnew_finalize} ! ! !REVISION HISTORY: ! This subroutine is generated with the Model Implementation Toolkit developed @@ -19,16 +19,17 @@ ! specification of the subroutine is defined by Sujay Kumar. ! ! 10/25/18: Shugong Wang, Zhuo Wang; initial implementation for NoahMP401 with LIS-7 -! +! May 2023: Cenlin He, modified for refactored NoahMP v5 and later + ! !INTERFACE: -subroutine NoahMP401_finalize() +subroutine NoahMPnew_finalize() ! !USES: use LIS_coreMod, only : LIS_rc - use NoahMP401_lsmMod + use NoahMPnew_lsmMod ! ! !DESCRIPTION: ! -! This routine cleans up the allocated memory structures in NoahMP401 +! This routine cleans up the allocated memory structures in NoahMPnew ! !EOP implicit none @@ -38,33 +39,31 @@ subroutine NoahMP401_finalize() do n=1, LIS_rc%nnest ! free memory allocated for each tile do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - deallocate(NOAHMP401_struc(n)%noahmp401(t)%shdfac_monthly) - deallocate(NOAHMP401_struc(n)%noahmp401(t)%soilcomp) - deallocate(NOAHMP401_struc(n)%noahmp401(t)%smc) - deallocate(NOAHMP401_struc(n)%noahmp401(t)%sh2o) - deallocate(NOAHMP401_struc(n)%noahmp401(t)%tslb) - deallocate(NOAHMP401_struc(n)%noahmp401(t)%tsno) - deallocate(NOAHMP401_struc(n)%noahmp401(t)%zss) - deallocate(NOAHMP401_struc(n)%noahmp401(t)%snowice) - deallocate(NOAHMP401_struc(n)%noahmp401(t)%snowliq) - deallocate(NOAHMP401_struc(n)%noahmp401(t)%smoiseq) - deallocate(NOAHMP401_struc(n)%noahmp401(t)%gecros_state) + deallocate(NoahMPnew_struc(n)%noahmpnew(t)%shdfac_monthly) + deallocate(NoahMPnew_struc(n)%noahmpnew(t)%soilcomp) + deallocate(NoahMPnew_struc(n)%noahmpnew(t)%smc) + deallocate(NoahMPnew_struc(n)%noahmpnew(t)%sh2o) + deallocate(NoahMPnew_struc(n)%noahmpnew(t)%tslb) + deallocate(NoahMPnew_struc(n)%noahmpnew(t)%tsno) + deallocate(NoahMPnew_struc(n)%noahmpnew(t)%zss) + deallocate(NoahMPnew_struc(n)%noahmpnew(t)%snowice) + deallocate(NoahMPnew_struc(n)%noahmpnew(t)%snowliq) + deallocate(NoahMPnew_struc(n)%noahmpnew(t)%smoiseq) end do ! tile loop - ! free memory for noahmp401, the data at tile level - deallocate(NOAHMP401_struc(n)%noahmp401) + ! free memory for noahmpnew, the data at tile level + deallocate(NoahMPnew_struc(n)%noahmpnew) ! free momory for constant parameter - deallocate(NOAHMP401_struc(n)%sldpth) + deallocate(NoahMPnew_struc(n)%sldpth) ! free momory for initial state variable - deallocate(NOAHMP401_struc(n)%init_smc) - deallocate(NOAHMP401_struc(n)%init_tslb) - deallocate(NOAHMP401_struc(n)%init_gecros_state) + deallocate(NoahMPnew_struc(n)%init_smc) + deallocate(NoahMPnew_struc(n)%init_tslb) end do ! nest loop - deallocate(NOAHMP401_struc) + deallocate(NoahMPnew_struc) -end subroutine NoahMP401_finalize +end subroutine NoahMPnew_finalize diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_lsmMod.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_lsmMod.F90 index e302c1129..ab2b6995e 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_lsmMod.F90 +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_lsmMod.F90 @@ -310,6 +310,7 @@ subroutine NoahMPnew_ini() allocate(NoahmpNew_struc(n)%noahmpnew(t)%snowice(NoahmpNew_struc(n)%nsnow)) allocate(NoahmpNew_struc(n)%noahmpnew(t)%snowliq(NoahmpNew_struc(n)%nsnow)) allocate(NoahmpNew_struc(n)%noahmpnew(t)%smoiseq(NoahmpNew_struc(n)%nsoil)) + allocate(NoahmpNew_struc(n)%noahmpnew(t)%accetrani(NoahmpNew_struc(n)%nsoil)) enddo ! initialize forcing variables to zeros diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_main.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_main.F90 index 4a0342dd2..2f37900f4 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_main.F90 +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_main.F90 @@ -404,15 +404,15 @@ subroutine NoahMPnew_main(n) NoahmpIO%fastcpxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%fastcp ! additional accumulated variables - NoahmpIO%ACC_SSOILXY(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%accssoil - NoahmpIO%ACC_QINSURXY(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%accqinsur - NoahmpIO%ACC_QSEVAXY(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%accqseva - NoahmpIO%ACC_ETRANIXY(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%accetrani - NoahmpIO%ACC_DWATERXY(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%accdwater - NoahmpIO%ACC_PRCPXY(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%accprcp - NoahmpIO%ACC_ECANXY(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%accecan - NoahmpIO%ACC_ETRANXY(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%accetran - NoahmpIO%ACC_EDIRXY (1,1) = NoahMPnew_struc(n)%noahmpnew(t)%accedir + NoahmpIO%ACC_SSOILXY(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%accssoil + NoahmpIO%ACC_QINSURXY(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%accqinsur + NoahmpIO%ACC_QSEVAXY(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%accqseva + NoahmpIO%ACC_ETRANIXY(1,:,1) = NoahMPnew_struc(n)%noahmpnew(t)%accetrani(:) + NoahmpIO%ACC_DWATERXY(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%accdwater + NoahmpIO%ACC_PRCPXY(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%accprcp + NoahmpIO%ACC_ECANXY(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%accecan + NoahmpIO%ACC_ETRANXY(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%accetran + NoahmpIO%ACC_EDIRXY (1,1) = NoahMPnew_struc(n)%noahmpnew(t)%accedir ! DMM - If dynamic vegetation option DVEG = 7, 8, or 9 for "input LAI", ! then send LAI/SAI from input to the Noah-MP physics. If any @@ -583,15 +583,15 @@ subroutine NoahMPnew_main(n) NoahMPnew_struc(n)%noahmpnew(t)%sfcheadrt = NoahmpIO%sfcheadrt(1,1) ! additional accumulated variables - NoahMPnew_struc(n)%noahmpnew(t)%accssoil = NoahmpIO%ACC_SSOILXY(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%accqinsur = NoahmpIO%ACC_QINSURXY(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%accqseva = NoahmpIO%ACC_QSEVAXY(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%accetrani = NoahmpIO%ACC_ETRANIXY(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%accdwater = NoahmpIO%ACC_DWATERXY(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%accprcp = NoahmpIO%ACC_PRCPXY(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%accecan = NoahmpIO%ACC_ECANXY(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%accetran = NoahmpIO%ACC_ETRANXY(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%accedir = NoahmpIO%ACC_EDIRXY (1,1) + NoahMPnew_struc(n)%noahmpnew(t)%accssoil = NoahmpIO%ACC_SSOILXY(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%accqinsur = NoahmpIO%ACC_QINSURXY(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%accqseva = NoahmpIO%ACC_QSEVAXY(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%accetrani(:) = NoahmpIO%ACC_ETRANIXY(1,:,1) + NoahMPnew_struc(n)%noahmpnew(t)%accdwater = NoahmpIO%ACC_DWATERXY(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%accprcp = NoahmpIO%ACC_PRCPXY(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%accecan = NoahmpIO%ACC_ECANXY(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%accetran = NoahmpIO%ACC_ETRANXY(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%accedir = NoahmpIO%ACC_EDIRXY (1,1) ! for irrigation if (NoahmpIO%IOPT_IRR > 0) then diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_module.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_module.F90 index 610def3da..fce9e40cd 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_module.F90 +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_module.F90 @@ -489,7 +489,7 @@ module NoahMPnew_module real :: accssoil real :: accqinsur real :: accqseva - real :: accetrani + real, pointer :: accetrani(:) real :: accdwater real :: accprcp real :: accecan diff --git a/lis/surfacemodels/land/noahmp.new/NoahMP401_reset.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_reset.F90 similarity index 55% rename from lis/surfacemodels/land/noahmp.new/NoahMP401_reset.F90 rename to lis/surfacemodels/land/noahmp.new/NoahMPnew_reset.F90 index 8d041f4c5..3a49bdb30 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMP401_reset.F90 +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_reset.F90 @@ -9,25 +9,27 @@ !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP ! -! !ROUTINE: NoahMP401_reset -! \label{NoahMP401_reset} +! !ROUTINE: NoahMPnew_reset +! \label{NoahMPnew_reset} ! ! !REVISION HISTORY: ! Modified by Shugong Wang for Noah-MP.4.0.1 +! modified by Cenlin He for refactored Noah-MP v5 and later + ! !INTERFACE: -subroutine NoahMP401_reset() +subroutine NoahMPnew_reset() ! !USES: use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_logunit - use NoahMP401_lsmMod + use NoahMPnew_lsmMod ! ! !DESCRIPTION: ! ! This routine is the entry point to set up the parameters -! required for Noah-MP.4.0.1 LSM. These include the soils, greenness, +! required for Noah-MP LSM. These include the soils, greenness, ! albedo, bottom temperature and the initialization of state -! variables in Noah-MP.4.0.1. +! variables in Noah-MP. ! !EOP implicit none @@ -36,20 +38,20 @@ subroutine NoahMP401_reset() do n=1,LIS_rc%nnest - write(LIS_logunit,*) "Noah-MP.4.0.1 resetting" + write(LIS_logunit,*) "Noah-MP.New resetting" ! initialize forcing variables to zeros do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - NOAHMP401_struc(n)%noahmp401(t)%lwdown = 0.0 - NOAHMP401_struc(n)%noahmp401(t)%swdown = 0.0 - NOAHMP401_struc(n)%noahmp401(t)%psurf = 0.0 - NOAHMP401_struc(n)%noahmp401(t)%prcp = 0.0 - NOAHMP401_struc(n)%noahmp401(t)%tair = 0.0 - NOAHMP401_struc(n)%noahmp401(t)%qair = 0.0 - NOAHMP401_struc(n)%noahmp401(t)%wind_e = 0.0 - NOAHMP401_struc(n)%noahmp401(t)%wind_n = 0.0 + NoahMPnew_struc(n)%noahmpnew(t)%lwdown = 0.0 + NoahMPnew_struc(n)%noahmpnew(t)%swdown = 0.0 + NoahMPnew_struc(n)%noahmpnew(t)%psurf = 0.0 + NoahMPnew_struc(n)%noahmpnew(t)%prcp = 0.0 + NoahMPnew_struc(n)%noahmpnew(t)%tair = 0.0 + NoahMPnew_struc(n)%noahmpnew(t)%qair = 0.0 + NoahMPnew_struc(n)%noahmpnew(t)%wind_e = 0.0 + NoahMPnew_struc(n)%noahmpnew(t)%wind_n = 0.0 enddo ! end of tile (t) loop - NOAHMP401_struc(n)%forc_count = 0 + NoahMPnew_struc(n)%forc_count = 0 enddo ! do n=1,LIS_rc%nnest -end subroutine NoahMP401_reset +end subroutine NoahMPnew_reset diff --git a/lis/surfacemodels/land/noahmp.new/NoahMP401_writerst.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_writerst.F90 similarity index 57% rename from lis/surfacemodels/land/noahmp.new/NoahMP401_writerst.F90 rename to lis/surfacemodels/land/noahmp.new/NoahMPnew_writerst.F90 index 66dce6a26..5a741bb21 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMP401_writerst.F90 +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_writerst.F90 @@ -11,17 +11,18 @@ #include "LIS_misc.h" !BOP ! -! !ROUTINE: NoahMP401_writerst -! \label{NoahMP401_writerst} +! !ROUTINE: NoahMPnew_writerst +! \label{NoahMPnew_writerst} ! ! !REVISION HISTORY: ! This subroutine is generated with the Model Implementation Toolkit developed ! by Shugong Wang for the NASA Land Information System Version 7. The initial ! specification of the subroutine is defined by Sujay Kumar. ! 10/25/18: Shugong Wang, Zhuo Wang; initial implementation for LIS 7 and NoahMP401 -! +! May 2023: Cenlin He, modified for refactored NoahMP v5 and later + ! !INTERFACE: -subroutine NoahMP401_writerst(n) +subroutine NoahMPnew_writerst(n) ! !USES: use LIS_coreMod, only : LIS_rc, LIS_masterproc use LIS_timeMgrMod, only : LIS_isAlarmRinging @@ -30,7 +31,7 @@ subroutine NoahMP401_writerst(n) use LIS_fileIOMod, only : LIS_create_output_directory, & LIS_create_restart_filename use LIS_constantsMod, only : LIS_CONST_PATH_LEN - use NoahMP401_lsmMod + use NoahMPnew_lsmMod #if (defined USE_NETCDF3 || defined USE_NETCDF4) use netcdf @@ -50,8 +51,8 @@ subroutine NoahMP401_writerst(n) ! creates a timestamped directory for the restart files ! \item[LIS\_create\_restart\_filename](\ref{LIS_create_restart_filename})\\ ! generates a timestamped restart filename -! \item[NoahMP401\_dump\_restart](\ref{NoahMP401_dump_restart})\\ -! writes the NoahMP401 variables into the restart file +! \item[NoahMPnew\_dump\_restart](\ref{NoahMPnew_dump_restart})\\ +! writes the NoahMPnew variables into the restart file ! \end{description} !EOP @@ -62,16 +63,16 @@ subroutine NoahMP401_writerst(n) integer :: status ! set restart alarm - alarmCheck = LIS_isAlarmRinging(LIS_rc, "NoahMP401 restart alarm") + alarmCheck = LIS_isAlarmRinging(LIS_rc, "NoahMPnew restart alarm") ! set restart file format (read from LIS configration file_ - wformat = trim(NOAHMP401_struc(n)%rformat) + wformat = trim(NoahMPnew_struc(n)%rformat) if(alarmCheck .or. (LIS_rc%endtime ==1)) then If (LIS_masterproc) Then call LIS_create_output_directory("SURFACEMODEL") call LIS_create_restart_filename(n, filen, "SURFACEMODEL", & - "NOAHMP401",wformat=wformat) + "NOAHMPnew",wformat=wformat) if(wformat .eq. "binary") then ftn = LIS_getNextUnitNumber() open(ftn,file=filen,status="unknown", form="unformatted") @@ -79,17 +80,17 @@ subroutine NoahMP401_writerst(n) #if (defined USE_NETCDF4) status = nf90_create(path=filen, cmode=nf90_hdf5, ncid = ftn) call LIS_verify(status, & - "Error in nf90_open in NoahMP401_writerst") + "Error in nf90_open in NoahMPnew_writerst") #endif #if (defined USE_NETCDF3) status = nf90_create(Path = filen, cmode = nf90_clobber, ncid = ftn) call LIS_verify(status, & - "Error in nf90_open in NoahMP401_writerst") + "Error in nf90_open in NoahMPnew_writerst") #endif endif endif - call NoahMP401_dump_restart(n, ftn, wformat) + call NoahMPnew_dump_restart(n, ftn, wformat) if (LIS_masterproc) then if(wformat .eq. "binary") then @@ -98,33 +99,34 @@ subroutine NoahMP401_writerst(n) #if (defined USE_NETCDF3 || defined USE_NETCDF4) status = nf90_close(ftn) call LIS_verify(status, & - "Error in nf90_close in NoahMP401_writerst") + "Error in nf90_close in NoahMPnew_writerst") #endif endif write(LIS_logunit, *)& - "[INFO] Noah-MP.4.0.1 archive restart written: ",trim(filen) + "[INFO] Noah-MP.New archive restart written: ",trim(filen) endif endif -end subroutine NoahMP401_writerst +end subroutine NoahMPnew_writerst !BOP ! -! !ROUTINE: NoahMP401_dump_restart -! \label{NoahMP401_dump_restart} +! !ROUTINE: NoahMPnew_dump_restart +! \label{NoahMPnew_dump_restart} ! ! !REVISION HISTORY: ! This subroutine is generated with the Model Implementation Toolkit developed ! by Shugong Wang for the NASA Land Information System Version 7. The initial ! specification of the subroutine is defined by Sujay Kumar. ! 10/25/18: Shugong Wang, Zhuo Wang, initial implementation for LIS 7 and NoahMP401 +! May 2023: Cenlin He, modified for refactored NoahMP v5 and later ! !INTERFACE: -subroutine NoahMP401_dump_restart(n, ftn, wformat) +subroutine NoahMPnew_dump_restart(n, ftn, wformat) ! !USES: use LIS_coreMod, only : LIS_rc, LIS_masterproc use LIS_logMod, only : LIS_logunit use LIS_historyMod - use NoahMP401_lsmMod + use NoahMPnew_lsmMod implicit none @@ -151,54 +153,53 @@ subroutine NoahMP401_dump_restart(n, ftn, wformat) ! restart file: ! \begin{verbatim} ! nc, nr, ntiles - grid and tile space dimensions -! sfcrunoff - NoahMP401 accumulated surface runoff [m] -! udrrunoff - NoahMP401 accumulated sub-surface runoff [m] -! smc - NoahMP401 volumtric soil moisture [m3/m3] -! sh2o - NoahMP401 volumtric liquid soil moisture [m3/m3] -! tslb - NoahMP401 soil temperature [K] -! sneqv - NoahMP401 snow water equivalent [mm] -! snowh - NoahMP401 physical snow depth [m] -! canwat - NoahMP401 total canopy water + ice [mm] -! acsnom - NoahMP401 accumulated snow melt leaving pack [-] -! acsnow - NoahMP401 accumulated snow on grid [mm] -! isnow - NoahMP401 actual no. of snow layers [-] -! tv - NoahMP401 vegetation leaf temperature [K] -! tg - NoahMP401 bulk ground surface temperature [K] -! canice - NoahMP401 canopy-intercepted ice [mm] -! canliq - NoahMP401 canopy-intercepted liquid water [mm] -! eah - NoahMP401 canopy air vapor pressure [Pa] -! tah - NoahMP401 canopy air temperature [K] -! cm - NoahMP401 bulk momentum drag coefficient [-] -! ch - NoahMP401 bulk sensible heat exchange coefficient [-] -! fwet - NoahMP401 wetted or snowed fraction of canopy [-] -! sneqvo - NoahMP401 snow mass at last time step [mm h2o] -! albold - NoahMP401 snow albedo at last time step [-] -! qsnow - NoahMP401 snowfall on the ground [mm/s] -! wslake - NoahMP401 lake water storage [mm] -! zwt - NoahMP401 water table depth [m] -! wa - NoahMP401 water in the "aquifer" [mm] -! wt - NoahMP401 water in aquifer and saturated soil [mm] -! tsno - NoahMP401 snow layer temperature [K] -! zss - NoahMP401 snow/soil layer depth from snow surface [m] -! snowice - NoahMP401 snow layer ice [mm] -! snowliq - NoahMP401 snow layer liquid water [mm] -! lfmass - NoahMP401 leaf mass [g/m2] -! rtmass - NoahMP401 mass of fine roots [g/m2] -! stmass - NoahMP401 stem mass [g/m2] -! wood - NoahMP401 mass of wood (including woody roots) [g/m2] -! stblcp - NoahMP401 stable carbon in deep soil [g/m2] -! fastcp - NoahMP401 short-lived carbon in shallow soil [g/m2] -! lai - NoahMP401 leaf area index [-] -! sai - NoahMP401 stem area index [-] -! tauss - NoahMP401 snow age factor [-] -! smoiseq - NoahMP401 equilibrium volumetric soil moisture content [m3/m3] -! smcwtd - NoahMP401 soil moisture content in the layer to the water table when deep [-] -! deeprech - NoahMP401 recharge to the water table when deep [-] -! rech - NoahMP401 recharge to the water table (diagnostic) [-] -! grain - NoahMP401 mass of grain XING [g/m2] -! gdd - NoahMP401 growing degree days XING (based on 10C) [-] -! pgs - NoahMP401 growing degree days XING [-] -! gecros_state - NoahMP401 optional gecros crop [-] +! sfcrunoff - NoahMP accumulated surface runoff [m] +! udrrunoff - NoahMP accumulated sub-surface runoff [m] +! smc - NoahMP volumtric soil moisture [m3/m3] +! sh2o - NoahMP volumtric liquid soil moisture [m3/m3] +! tslb - NoahMP soil temperature [K] +! sneqv - NoahMP snow water equivalent [mm] +! snowh - NoahMP physical snow depth [m] +! canwat - NoahMP total canopy water + ice [mm] +! acsnom - NoahMP accumulated snow melt leaving pack [-] +! acsnow - NoahMP accumulated snow on grid [mm] +! isnow - NoahMP actual no. of snow layers [-] +! tv - NoahMP vegetation leaf temperature [K] +! tg - NoahMP bulk ground surface temperature [K] +! canice - NoahMP canopy-intercepted ice [mm] +! canliq - NoahMP canopy-intercepted liquid water [mm] +! eah - NoahMP canopy air vapor pressure [Pa] +! tah - NoahMP canopy air temperature [K] +! cm - NoahMP bulk momentum drag coefficient [-] +! ch - NoahMP bulk sensible heat exchange coefficient [-] +! fwet - NoahMP wetted or snowed fraction of canopy [-] +! sneqvo - NoahMP snow mass at last time step [mm h2o] +! albold - NoahMP snow albedo at last time step [-] +! qsnow - NoahMP snowfall on the ground [mm/s] +! wslake - NoahMP lake water storage [mm] +! zwt - NoahMP water table depth [m] +! wa - NoahMP water in the "aquifer" [mm] +! wt - NoahMP water in aquifer and saturated soil [mm] +! tsno - NoahMP snow layer temperature [K] +! zss - NoahMP snow/soil layer depth from snow surface [m] +! snowice - NoahMP snow layer ice [mm] +! snowliq - NoahMP snow layer liquid water [mm] +! lfmass - NoahMP leaf mass [g/m2] +! rtmass - NoahMP mass of fine roots [g/m2] +! stmass - NoahMP stem mass [g/m2] +! wood - NoahMP mass of wood (including woody roots) [g/m2] +! stblcp - NoahMP stable carbon in deep soil [g/m2] +! fastcp - NoahMP short-lived carbon in shallow soil [g/m2] +! lai - NoahMP leaf area index [-] +! sai - NoahMP stem area index [-] +! tauss - NoahMP snow age factor [-] +! smoiseq - NoahMP equilibrium volumetric soil moisture content [m3/m3] +! smcwtd - NoahMP soil moisture content in the layer to the water table when deep [-] +! deeprech - NoahMP recharge to the water table when deep [-] +! rech - NoahMP recharge to the water table (diagnostic) [-] +! grain - NoahMP mass of grain XING [g/m2] +! gdd - NoahMP growing degree days XING (based on 10C) [-] +! pgs - NoahMP growing degree days XING [-] ! \end{verbatim} ! ! The routines invoked are: @@ -265,15 +266,45 @@ subroutine NoahMP401_dump_restart(n, ftn, wformat) integer :: grain_ID integer :: gdd_ID integer :: pgs_ID - integer :: gecros_state_ID + integer :: pexp_ID + integer :: area_ID + integer :: qrf_ID + integer :: qspring_ID + integer :: qslat_ID + integer :: qrfs_ID + integer :: qsprings_ID + integer :: fdepth_ID + integer :: rivercond_ID + integer :: riverbed_ID + integer :: eqzwt_ID + integer :: irnumsi_ID + integer :: irnummi_ID + integer :: irnumfi_ID + integer :: irwatsi_ID + integer :: irwatmi_ID + integer :: irwatfi_ID + integer :: irsivol_ID + integer :: irmivol_ID + integer :: irfivol_ID + integer :: ireloss_ID + integer :: irrsplh_ID + integer :: qtdrain_ID + integer :: accssoil_ID + integer :: accqinsur_ID + integer :: accqseva_ID + integer :: accetrani_ID + integer :: accdwater_ID + integer :: accprcp_ID + integer :: accecan_ID + integer :: accetran_ID + integer :: accedir_ID ! write the header of the restart file call LIS_writeGlobalHeader_restart(ftn, n, LIS_rc%lsm_index, & - "NOAHMP401", & - dim1=NOAHMP401_struc(n)%nsoil+NOAHMP401_struc(n)%nsnow, & - dim2=NOAHMP401_struc(n)%nsoil, & - dim3=NOAHMP401_struc(n)%nsnow, & -! dim4=60, & ! GECROS + "NOAHMPnew", & + dim1=NoahMPnew_struc(n)%nsoil+NoahMPnew_struc(n)%nsnow, & + dim2=NoahMPnew_struc(n)%nsoil, & + dim3=NoahMPnew_struc(n)%nsnow, & dim4=1, & dimID=dimID, & output_format = trim(wformat)) @@ -293,7 +324,7 @@ subroutine NoahMP401_dump_restart(n, ftn, wformat) !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max call LIS_writeHeader_restart(ftn, n, dimID, smc_ID, "SMC", & "volumtric soil moisture", & - "m3/m3", vlevels=NOAHMP401_struc(n)%nsoil , valid_min=-99999.0, valid_max=99999.0, & + "m3/m3", vlevels=NoahMPnew_struc(n)%nsoil , valid_min=-99999.0, valid_max=99999.0, & var_flag = "dim2") ! write the header for state variable sh2o @@ -301,7 +332,7 @@ subroutine NoahMP401_dump_restart(n, ftn, wformat) !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max call LIS_writeHeader_restart(ftn, n, dimID, sh2o_ID, "SH2O", & "volumtric liquid soil moisture", & - "m3/m3", vlevels=NOAHMP401_struc(n)%nsoil , valid_min=-99999.0, valid_max=99999.0, & + "m3/m3", vlevels=NoahMPnew_struc(n)%nsoil , valid_min=-99999.0, valid_max=99999.0, & var_flag = "dim2") ! write the header for state variable tslb @@ -309,7 +340,7 @@ subroutine NoahMP401_dump_restart(n, ftn, wformat) !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max call LIS_writeHeader_restart(ftn, n, dimID, tslb_ID, "TSLB", & "soil temperature", & - "K", vlevels=NOAHMP401_struc(n)%nsoil , valid_min=-99999.0, valid_max=99999.0, & + "K", vlevels=NoahMPnew_struc(n)%nsoil , valid_min=-99999.0, valid_max=99999.0, & var_flag = "dim2") ! write the header for state variable sneqv @@ -427,7 +458,7 @@ subroutine NoahMP401_dump_restart(n, ftn, wformat) !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max call LIS_writeHeader_restart(ftn, n, dimID, tsno_ID, "TSNO", & "snow layer temperature", & - "K", vlevels=NOAHMP401_struc(n)%nsnow , valid_min=-99999.0, valid_max=99999.0, & + "K", vlevels=NoahMPnew_struc(n)%nsnow , valid_min=-99999.0, valid_max=99999.0, & var_flag = "dim3") ! write the header for state variable zss @@ -435,7 +466,7 @@ subroutine NoahMP401_dump_restart(n, ftn, wformat) !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max call LIS_writeHeader_restart(ftn, n, dimID, zss_ID, "ZSS", & "snow/soil layer depth from snow surface", & - "m", vlevels=NOAHMP401_struc(n)%nsnow+NOAHMP401_struc(n)%nsoil , valid_min=-99999.0, valid_max=99999.0, & + "m", vlevels=NoahMPnew_struc(n)%nsnow+NoahMPnew_struc(n)%nsoil , valid_min=-99999.0, valid_max=99999.0, & var_flag = "dim1") ! write the header for state variable snowice @@ -443,7 +474,7 @@ subroutine NoahMP401_dump_restart(n, ftn, wformat) !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max call LIS_writeHeader_restart(ftn, n, dimID, snowice_ID, "SNOWICE", & "snow layer ice", & - "mm", vlevels=NOAHMP401_struc(n)%nsnow , valid_min=-99999.0, valid_max=99999.0, & + "mm", vlevels=NoahMPnew_struc(n)%nsnow , valid_min=-99999.0, valid_max=99999.0, & var_flag = "dim3") ! write the header for state variable snowliq @@ -451,7 +482,7 @@ subroutine NoahMP401_dump_restart(n, ftn, wformat) !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max call LIS_writeHeader_restart(ftn, n, dimID, snowliq_ID, "SNOWLIQ", & "snow layer liquid water", & - "mm", vlevels=NOAHMP401_struc(n)%nsnow , valid_min=-99999.0, valid_max=99999.0, & + "mm", vlevels=NoahMPnew_struc(n)%nsnow , valid_min=-99999.0, valid_max=99999.0, & var_flag = "dim3") ! write the header for state variable lfmass @@ -499,29 +530,157 @@ subroutine NoahMP401_dump_restart(n, ftn, wformat) call LIS_writeHeader_restart(ftn, n, dimID, tauss_ID, "TAUSS", & "snow age factor", & "-", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + + ! for MMF groundwater + if (NoahMPnew_struc(n)%runsub_opt == 5) then ! write the header for state variable smoiseq !TODO: check dimension of the state variable following "vlevels=" !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max call LIS_writeHeader_restart(ftn, n, dimID, smoiseq_ID, "SMOISEQ", & "equilibrium volumetric soil moisture content", & - "m3/m3", vlevels=NOAHMP401_struc(n)%nsoil , valid_min=-99999.0, valid_max=99999.0, & + "m3/m3", vlevels=NoahMPnew_struc(n)%nsoil , valid_min=-99999.0, valid_max=99999.0, & var_flag = "dim2") ! write the header for state variable smcwtd !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max call LIS_writeHeader_restart(ftn, n, dimID, smcwtd_ID, "SMCWTD", & "soil moisture content in the layer to the water table when deep", & - "-", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + "m3/m3", vlevels=1, valid_min=-99999.0, valid_max=99999.0) ! write the header for state variable deeprech !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max call LIS_writeHeader_restart(ftn, n, dimID, deeprech_ID, "DEEPRECH", & "recharge to the water table when deep", & - "-", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + "m", vlevels=1, valid_min=-99999.0, valid_max=99999.0) ! write the header for state variable rech !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max call LIS_writeHeader_restart(ftn, n, dimID, rech_ID, "RECH", & "recharge to the water table (diagnostic)", & + "m", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable pexp + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, pexp_ID, "PEXP", & + "groundwater expotential parameter", & + "-", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable area + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, area_ID, "AREA", & + "river area", & + "m2", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable qrf + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, qrf_ID, "QRF", & + "groundwater baselow", & + "m", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable qspring + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, qspring_ID, "QSPRING", & + "seeping water", & + "m", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable qslat + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, qslat_ID, "QSLAT", & + "accumulated lateral flow", & + "mm", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable qrfs + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, qrfs_ID, "QRFS", & + "accumulated GW baseflow", & + "mm", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable qsprings + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, qsprings_ID, "QSPRINGS", & + "accumulated seeping water", & + "mm", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable fdepth + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, fdepth_ID, "FDEPTH", & + "depth", & + "m", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable rivercond + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, rivercond_ID, "RIVERCOND", & + "river conductivity", & "-", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable riverbed + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, riverbed_ID, "RIVERBED", & + "riverbed depth", & + "m", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable eqzwt + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, eqzwt_ID, "EQZWT", & + "equilibrium water table depth", & + "m", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + endif + + ! for irrigation + if (NoahMPnew_struc(n)%irr_opt >0) then + ! write the header for state variable irnumsi + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, irnumsi_ID, "IRNUMSI", & + "sprinkler irrigation count", & + "-", vlevels=1, valid_min=-99999, valid_max=99999) + ! write the header for state variable irnummi + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, irnummi_ID, "IRNUMMI", & + "micro irrigation count", & + "-", vlevels=1, valid_min=-99999, valid_max=99999) + ! write the header for state variable irnumfi + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, irnumfi_ID, "IRNUMFI", & + "flood irrigation count", & + "-", vlevels=1, valid_min=-99999, valid_max=99999) + ! write the header for state variable irwatsi + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, irwatsi_ID, "IRWATSI", & + "sprinkler irrigation water amount", & + "m", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable irwatmi + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, irwatmi_ID, "IRWATMI", & + "micro irrigation water amount", & + "m", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable irwatfi + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, irwatfi_ID, "IRWATFI", & + "flood irrigation water amount", & + "m", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable irsivol + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, irsivol_ID, "IRSIVOL", & + "sprinkler irrigation water volume", & + "mm", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable irmivol + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, irmivol_ID, "IRMIVOL", & + "micro irrigation water volume", & + "mm", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable irfivol + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, irfivol_ID, "IRFIVOL", & + "flood irrigation water volume", & + "mm", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable ireloss + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, ireloss_ID, "IRELOSS", & + "loss of irrigation water to evaporation", & + "m", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable irrsplh + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, irrsplh_ID, "IRRSPLH", & + "latent heating from sprinkler evaporation", & + "W/m2", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + endif + + ! for tile drainage + if (NoahMPnew_struc(n)%tdrn_opt >0) then + ! write the header for state variable qtdrain + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, qtdrain_ID, "QTDRAIN", & + "accumulated tile drainage discharge", & + "mm", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + endif + ! write the header for state variable grain !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max call LIS_writeHeader_restart(ftn, n, dimID, grain_ID, "GRAIN", & @@ -537,252 +696,293 @@ subroutine NoahMP401_dump_restart(n, ftn, wformat) call LIS_writeHeader_restart(ftn, n, dimID, pgs_ID, "PGS", & "growing degree days XING", & "-", vlevels=1, valid_min=-99999.0, valid_max=99999.0) - ! write the header for state variable gecros_state + ! for additional restart variables + ! write the header for state variable accssoil + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, accssoil_ID, "ACC_SSOIL", & + "accumulated ground heat flux", & + "W/m2", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable accqinsur + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, accqinsur_ID, "ACC_QINSUR", & + "accumulated soil surface water flux", & + "m/s", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable accqseva + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, accqseva_ID, "ACC_QSEVA", & + "accumulated soil surface evaporation", & + "m/s", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable accetrani !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max -! call LIS_writeHeader_restart(ftn, n, dimID, gecros_state_ID, "GECROS_STATE", & -! "optional gecros crop", & -! "-", vlevels=60, valid_min=-99999.0, valid_max=99999.0, & -! var_flag = "dim4") + call LIS_writeHeader_restart(ftn, n, dimID, accetrani_ID, "ACC_ETRANI", & + "accumulated plant transpiration", & + "m/s", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable accdwater + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, accdwater_ID, "ACC_DWATER", & + "accumulated water storage change", & + "m/s", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable accprcp + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, accprcp_ID, "ACC_PRCP", & + "accumulated precipitation", & + "m/s", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable accecan + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, accecan_ID, "ACC_ECAN", & + "accumulated canopy evaporation", & + "m/s", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable accetran + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, accetran_ID, "ACC_ETRAN", & + "accumulated transpiration", & + "m/s", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! write the header for state variable accedir + !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max + call LIS_writeHeader_restart(ftn, n, dimID, accedir_ID, "ACC_EDIR", & + "accumulated net soil evaporation", & + "m/s", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + ! close header of restart file - call LIS_closeHeader_restart(ftn, n, LIS_rc%lsm_index, dimID, NOAHMP401_struc(n)%rstInterval) + call LIS_closeHeader_restart(ftn, n, LIS_rc%lsm_index, dimID, NoahMPnew_struc(n)%rstInterval) ! write state variables into restart file ! accumulated surface runoff - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%sfcrunoff, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%sfcrunoff, & varid=sfcrunoff_ID, dim=1, wformat=wformat) ! accumulated sub-surface runoff - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%udrrunoff, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%udrrunoff, & varid=udrrunoff_ID, dim=1, wformat=wformat) ! volumtric soil moisture - do l=1, NOAHMP401_struc(n)%nsoil ! TODO: check loop + do l=1, NoahMPnew_struc(n)%nsoil ! TODO: check loop tmptilen = 0 do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - tmptilen(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(l) + tmptilen(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(l) enddo call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, & varid=smc_ID, dim=l, wformat=wformat) enddo ! volumtric liquid soil moisture - do l=1, NOAHMP401_struc(n)%nsoil ! TODO: check loop + do l=1, NoahMPnew_struc(n)%nsoil ! TODO: check loop tmptilen = 0 do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - tmptilen(t) = NOAHMP401_struc(n)%noahmp401(t)%sh2o(l) + tmptilen(t) = NoahMPnew_struc(n)%noahmpnew(t)%sh2o(l) enddo call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, & varid=sh2o_ID, dim=l, wformat=wformat) enddo ! soil temperature - do l=1, NOAHMP401_struc(n)%nsoil ! TODO: check loop + do l=1, NoahMPnew_struc(n)%nsoil ! TODO: check loop tmptilen = 0 do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - tmptilen(t) = NOAHMP401_struc(n)%noahmp401(t)%tslb(l) + tmptilen(t) = NoahMPnew_struc(n)%noahmpnew(t)%tslb(l) enddo call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, & varid=tslb_ID, dim=l, wformat=wformat) enddo ! snow water equivalent - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%sneqv, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%sneqv, & varid=sneqv_ID, dim=1, wformat=wformat) ! physical snow depth - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%snowh, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%snowh, & varid=snowh_ID, dim=1, wformat=wformat) ! total canopy water + ice - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%canwat, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%canwat, & varid=canwat_ID, dim=1, wformat=wformat) ! accumulated snow melt leaving pack - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%acsnom, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%acsnom, & varid=acsnom_ID, dim=1, wformat=wformat) ! accumulated snow on grid - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%acsnow, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%acsnow, & varid=acsnow_ID, dim=1, wformat=wformat) ! actual no. of snow layers - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%isnow, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%isnow, & varid=isnow_ID, dim=1, wformat=wformat) ! vegetation leaf temperature - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%tv, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%tv, & varid=tv_ID, dim=1, wformat=wformat) ! bulk ground surface temperature - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%tg, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%tg, & varid=tg_ID, dim=1, wformat=wformat) ! canopy-intercepted ice - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%canice, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%canice, & varid=canice_ID, dim=1, wformat=wformat) ! canopy-intercepted liquid water - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%canliq, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%canliq, & varid=canliq_ID, dim=1, wformat=wformat) ! canopy air vapor pressure - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%eah, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%eah, & varid=eah_ID, dim=1, wformat=wformat) ! canopy air temperature - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%tah, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%tah, & varid=tah_ID, dim=1, wformat=wformat) ! bulk momentum drag coefficient - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%cm, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%cm, & varid=cm_ID, dim=1, wformat=wformat) ! bulk sensible heat exchange coefficient - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%ch, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%ch, & varid=ch_ID, dim=1, wformat=wformat) ! wetted or snowed fraction of canopy - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%fwet, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%fwet, & varid=fwet_ID, dim=1, wformat=wformat) ! snow mass at last time step - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%sneqvo, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%sneqvo, & varid=sneqvo_ID, dim=1, wformat=wformat) ! snow albedo at last time step - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%albold, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%albold, & varid=albold_ID, dim=1, wformat=wformat) ! snowfall on the ground - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%qsnow, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%qsnow, & varid=qsnow_ID, dim=1, wformat=wformat) ! lake water storage - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%wslake, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%wslake, & varid=wslake_ID, dim=1, wformat=wformat) ! water table depth - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%zwt, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%zwt, & varid=zwt_ID, dim=1, wformat=wformat) ! water in the "aquifer" - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%wa, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%wa, & varid=wa_ID, dim=1, wformat=wformat) ! water in aquifer and saturated soil - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%wt, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%wt, & varid=wt_ID, dim=1, wformat=wformat) ! snow layer temperature - do l=1, NOAHMP401_struc(n)%nsnow ! TODO: check loop + do l=1, NoahMPnew_struc(n)%nsnow ! TODO: check loop tmptilen = 0 do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - tmptilen(t) = NOAHMP401_struc(n)%noahmp401(t)%tsno(l) + tmptilen(t) = NoahMPnew_struc(n)%noahmpnew(t)%tsno(l) enddo call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, & varid=tsno_ID, dim=l, wformat=wformat) enddo ! snow/soil layer depth from snow surface - do l=1, NOAHMP401_struc(n)%nsnow+NOAHMP401_struc(n)%nsoil ! TODO: check loop + do l=1, NoahMPnew_struc(n)%nsnow+NoahMPnew_struc(n)%nsoil ! TODO: check loop tmptilen = 0 do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - tmptilen(t) = NOAHMP401_struc(n)%noahmp401(t)%zss(l) + tmptilen(t) = NoahMPnew_struc(n)%noahmpnew(t)%zss(l) enddo call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, & varid=zss_ID, dim=l, wformat=wformat) enddo ! snow layer ice - do l=1, NOAHMP401_struc(n)%nsnow ! TODO: check loop + do l=1, NoahMPnew_struc(n)%nsnow ! TODO: check loop tmptilen = 0 do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - tmptilen(t) = NOAHMP401_struc(n)%noahmp401(t)%snowice(l) + tmptilen(t) = NoahMPnew_struc(n)%noahmpnew(t)%snowice(l) enddo call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, & varid=snowice_ID, dim=l, wformat=wformat) enddo ! snow layer liquid water - do l=1, NOAHMP401_struc(n)%nsnow ! TODO: check loop + do l=1, NoahMPnew_struc(n)%nsnow ! TODO: check loop tmptilen = 0 do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - tmptilen(t) = NOAHMP401_struc(n)%noahmp401(t)%snowliq(l) + tmptilen(t) = NoahMPnew_struc(n)%noahmpnew(t)%snowliq(l) enddo call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, & varid=snowliq_ID, dim=l, wformat=wformat) enddo ! leaf mass - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%lfmass, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%lfmass, & varid=lfmass_ID, dim=1, wformat=wformat) ! mass of fine roots - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%rtmass, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%rtmass, & varid=rtmass_ID, dim=1, wformat=wformat) ! stem mass - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%stmass, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%stmass, & varid=stmass_ID, dim=1, wformat=wformat) ! mass of wood (including woody roots) - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%wood, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%wood, & varid=wood_ID, dim=1, wformat=wformat) ! stable carbon in deep soil - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%stblcp, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%stblcp, & varid=stblcp_ID, dim=1, wformat=wformat) ! short-lived carbon in shallow soil - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%fastcp, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%fastcp, & varid=fastcp_ID, dim=1, wformat=wformat) ! leaf area index - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%lai, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%lai, & varid=lai_ID, dim=1, wformat=wformat) ! stem area index - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%sai, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%sai, & varid=sai_ID, dim=1, wformat=wformat) ! snow age factor - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%tauss, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%tauss, & varid=tauss_ID, dim=1, wformat=wformat) ! equilibrium volumetric soil moisture content - do l=1, NOAHMP401_struc(n)%nsoil ! TODO: check loop + do l=1, NoahMPnew_struc(n)%nsoil ! TODO: check loop tmptilen = 0 do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - tmptilen(t) = NOAHMP401_struc(n)%noahmp401(t)%smoiseq(l) + tmptilen(t) = NoahMPnew_struc(n)%noahmpnew(t)%smoiseq(l) enddo call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, & varid=smoiseq_ID, dim=l, wformat=wformat) enddo ! soil moisture content in the layer to the water table when deep - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%smcwtd, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%smcwtd, & varid=smcwtd_ID, dim=1, wformat=wformat) ! recharge to the water table when deep - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%deeprech, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%deeprech, & varid=deeprech_ID, dim=1, wformat=wformat) ! recharge to the water table (diagnostic) - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%rech, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%rech, & varid=rech_ID, dim=1, wformat=wformat) ! mass of grain XING - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%grain, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%grain, & varid=grain_ID, dim=1, wformat=wformat) ! growing degree days XING (based on 10C) - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%gdd, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%gdd, & varid=gdd_ID, dim=1, wformat=wformat) ! growing degree days XING - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NOAHMP401_struc(n)%noahmp401%pgs, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%pgs, & varid=pgs_ID, dim=1, wformat=wformat) ! optional gecros crop ! do l=1, 60 ! TODO: check loop ! tmptilen = 0 ! do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) -! tmptilen(t) = NOAHMP401_struc(n)%noahmp401(t)%gecros_state(l) +! tmptilen(t) = NoahMPnew_struc(n)%noahmpnew(t)%gecros_state(l) ! enddo ! call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, & ! varid=gecros_state_ID, dim=l, wformat=wformat) ! enddo -end subroutine NoahMP401_dump_restart +end subroutine NoahMPnew_dump_restart From ce277bdabc90b416fa19d1e75c3a3cf89bfb21a3 Mon Sep 17 00:00:00 2001 From: cenlinhe Date: Thu, 20 Jul 2023 16:50:03 -0600 Subject: [PATCH 06/27] update initialization --- .../land/noahmp.new/NoahMPnew_coldstart.F90 | 562 ++++++------------ .../land/noahmp.new/NoahMPnew_finalize.F90 | 1 + .../land/noahmp.new/NoahMPnew_main.F90 | 44 +- .../land/noahmp.new/NoahMPnew_module.F90 | 2 +- .../land/noahmp.new/NoahMPnew_readrst.F90 | 14 +- .../land/noahmp.new/NoahMPnew_setup.F90 | 155 +++-- .../land/noahmp.new/NoahMPnew_writerst.F90 | 169 +++++- .../land/noahmp.new/noahmp_driver_new.F90 | 125 +--- lis/surfacemodels/land/noahmp.new/phys/noahmp | 2 +- 9 files changed, 468 insertions(+), 606 deletions(-) diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_coldstart.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_coldstart.F90 index e220da5c8..efa1835f6 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_coldstart.F90 +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_coldstart.F90 @@ -11,8 +11,8 @@ #include "LIS_misc.h" !BOP ! -! !ROUTINE: NoahMP401_coldstart -! \label{NoahMP401_coldstart} +! !ROUTINE: NoahMPnew_coldstart +! \label{NoahMPnew_coldstart} ! ! !REVISION HISTORY: ! This subroutine is generated with the Model Implementation Toolkit developed @@ -35,11 +35,12 @@ subroutine NoahMPnew_coldstart(mtype) use LIS_timeMgrMod, only: LIS_date2time use NoahMPnew_lsmMod - + use NoahmpIOVarType + use NoahmpInitMainMod, only : NoahmpInitMain ! ! !DESCRIPTION: ! -! This routine initializes the NoahMP401 state variables with +! This routine initializes the NoahMP state variables with ! some predefined values constantly for the entire domain. ! !EOP @@ -49,409 +50,210 @@ subroutine NoahMPnew_coldstart(mtype) integer :: mtype integer :: t, l, n, i integer :: c, r - - ! Added by Zhuo Wang on 11/21/2018 - integer :: ids,ide, jds,jde, kds,kde, & - & ims,ime, jms,jme, kms,kme, & - & its,ite, jts,jte, kts,kte - - !------------------------------------------------------------------------ - ! End 2D variables not used in WRF - !------------------------------------------------------------------------ - CHARACTER(LEN=256) :: LLANDUSE ! (=USGS, using USGS landuse classification) - !------------------------------------------------------------------------ - integer :: row, col - integer :: NSOIL ! number of soil layers - LOGICAL :: restart, & - & allowed_to_read - - real, dimension(4) :: DZS ! Thickness of the soil layers [m] - real :: dx, dy - real, dimension( 1, 1 ) :: msftx, msfty - real :: wtddt, dtbl - integer :: stepwtd - - real, dimension( 1, 1 ) :: & - & snowxy, & ! snow water equivalent [mm] - & snowhxy, & ! physical snow depth [m] - & canwatxy ! total canopy water + ice [mm] - - integer, dimension( 1, 1 ) :: & - & ISLTYP, & ! soil type - IVGTYP ! vegetation type - - real, dimension( 1, 4, 1 ) :: & - & tslb_3d, & ! soil temperature [K] - & smois_3d, & ! volumetric soil moisture [m3/m3] - & sh2o_3d ! volumetric liquid soil moisture [m3/m3] - - LOGICAL :: FNDSOILW, & ! soil water present in input - & FNDSNOWH ! snow depth present in input - - integer :: runoff_option - integer :: crop_option - - real, dimension(1,1) :: XLAT !latitude - real, dimension(1,1) :: TSK !skin temperature (k) - real, dimension(1,1) :: tvxy !vegetation canopy temperature - real, dimension(1,1) :: tgxy !ground surface temperature - real, dimension(1,1) :: canicexy !canopy-intercepted ice (mm) - real, dimension(1,1) :: canliqxy !canopy-intercepted liquid water (mm) - real, dimension(1,1) :: tmnxy !deep soil temperature (k) - real, dimension(1,1) :: XICE !sea ice fraction - real, dimension(1,1) :: eahxy !canopy air vapor pressure (pa) - real, dimension(1,1) :: tahxy !canopy air temperature (k) - real, dimension(1,1) :: cmxy !momentum drag coefficient - real, dimension(1,1) :: chxy !sensible heat exchange coefficient - real, dimension(1,1) :: fwetxy !wetted or snowed fraction of the canopy (-) - real, dimension(1,1) :: sneqvoxy !snow mass at last time step(mm h2o) - real, dimension(1,1) :: alboldxy !snow albedo at last time step (-) - real, dimension(1,1) :: qsnowxy !snowfall on the ground [mm/s] - real, dimension(1,1) :: wslakexy !lake water storage [mm] - real, dimension(1,1) :: zwtxy !water table depth [m] - real, dimension(1,1) :: waxy !water in the "aquifer" [mm] - real, dimension(1,1) :: wtxy !groundwater storage [mm] - real, allocatable, dimension(:,:,:) :: tsnoxy !snow temperature [K] - real, allocatable, dimension(:,:,:) :: zsnsoxy !snow layer depth [m] - real, allocatable, dimension(:,:,:) :: snicexy !snow layer ice [mm] - real, allocatable, dimension(:,:,:) :: snliqxy !snow layer liquid water [mm] - real, dimension(1,1) :: lfmassxy !leaf mass [g/m2] - real, dimension(1,1) :: rtmassxy !mass of fine roots [g/m2] - real, dimension(1,1) :: stmassxy !stem mass [g/m2] - real, dimension(1,1) :: woodxy !mass of wood (incl. woody roots) [g/m2] - real, dimension(1,1) :: stblcpxy !stable carbon in deep soil [g/m2] - real, dimension(1,1) :: fastcpxy !short-lived carbon, shallow soil [g/m2] - real, dimension(1,1) :: saixy !stem area index - real, dimension(1,1) :: laixy !leaf area index - real, dimension(1,1) :: grainxy !mass of grain [g/m2] !XING - real, dimension(1,1) :: gddxy !growing degree days !XING - integer, dimension(1, 1) :: cropcatxy - - real, dimension(1,1) :: t2mvxy !2m temperature vegetation part (k) - real, dimension(1,1) :: t2mbxy !2m temperature bare ground part (k) - real, dimension(1,1) :: chstarxy !dummy - - ! Optional - real, dimension(1,1) :: smcwtdxy !deep soil moisture content [m3 m-3] - real, dimension(1,1) :: deeprechxy !deep recharge [m] - real, dimension(1,1) :: rechxy !accumulated recharge [mm] - real, dimension(1,1) :: qrfsxy !accumulated flux from groundwater to rivers [mm] - real, dimension(1,1) :: qspringsxy !accumulated seeping water [mm] - real, dimension(1,1) :: qslatxy !accumulated lateral flow [mm] - real, dimension(1,1) :: areaxy !grid cell area [m2] - real, dimension(1,1) :: FDEPTHXY !efolding depth for transmissivity (m) - real, dimension(1,1) :: HT !terrain height (m) - real, dimension(1,1) :: RIVERBEDXY !riverbed depth (m) - real, dimension(1,1) :: EQZWT !equilibrium water table depth (m) - real, dimension(1,1) :: RIVERCONDXY !river conductance - real, dimension(1,1) :: PEXPXY !factor for river conductance - real, dimension(1,1) :: rechclim - integer :: sf_urban_physics - real, dimension(1,1) :: taussxy - real, dimension(1,1) :: acsnomxy - real, dimension(1,1) :: acsnowxy - real, dimension(1,1) :: sfcrunoffxy - real, dimension(1,1) :: udrrunoffxy - real, allocatable, dimension(:,:,:) :: smoiseqxy - - integer, dimension(1,1) :: pgsxy - real, allocatable, dimension(:,:,:) :: croptype -! integer, dimension(1,1) :: PLANTING,HARVEST,SEASON_GDD -! integer, dimension(1,1) :: SLOPETYP - - ! added by Shugong Wang - integer :: isnow - real, allocatable, dimension(:) :: zsnso - real, allocatable, dimension(:) :: snice - real, allocatable, dimension(:) :: snliq - real, allocatable, dimension(:) :: zsoil - -! Modified by Zhuo Wang - real, allocatable, dimension(:) :: tsnow - ! end add - - !EMK...Temporary arrays. - real :: tmp_swe(1,1),tmp_snodep(1,1) - integer :: isnowxy(1,1) - integer :: tmp_isnowxy(1,1) - -! PLANTING(1,1) = 126 ! default planting date -! HARVEST(1,1) = 290 ! default harvest date -! SEASON_GDD(1,1) = 1605 ! default total seasonal growing degree days -! SLOPETYP = 2 !--------------------------------------------------------------------- - ids = 1 - ide = 2 - jds = 1 - jde = 2 - kds = 1 - kde = 1 - ims = 1 - ime = 1 - jms = 1 - jme = 1 - kms = 1 - kme = 1 - its = 1 - ite = 1 - jts = 1 - jte = 1 - kts = 1 - kte = 1 + !-------- initialize NoahmpIO dimension (1-D) + NoahmpIO%xstart = 1 + NoahmpIO%xend = 1 + NoahmpIO%ystart = 1 + NoahmpIO%yend = 1 + NoahmpIO%ids = NoahmpIO%xstart + NoahmpIO%ide = NoahmpIO%xend + NoahmpIO%jds = NoahmpIO%ystart + NoahmpIO%jde = NoahmpIO%yend + NoahmpIO%kds = 1 + NoahmpIO%kde = 2 + NoahmpIO%its = NoahmpIO%xstart + NoahmpIO%ite = NoahmpIO%xend + NoahmpIO%jts = NoahmpIO%ystart + NoahmpIO%jte = NoahmpIO%yend + NoahmpIO%kts = 1 + NoahmpIO%kte = 2 + NoahmpIO%ims = NoahmpIO%xstart + NoahmpIO%ime = NoahmpIO%xend + NoahmpIO%jms = NoahmpIO%ystart + NoahmpIO%jme = NoahmpIO%yend + NoahmpIO%kms = 1 + NoahmpIO%kme = 2 + + ! start initialization of NoahmpIO and NoahmpNew_struc do n=1, LIS_rc%nnest - isnow = -NoahmpNew_struc(n)%nsnow - - ! Added by Shugong - allocate(zsnso(-NoahmpNew_struc(n)%nsnow+1:NoahmpNew_struc(n)%nsoil)) - ! Modified by Zhuo Wang - allocate(tsnow(-NoahmpNew_struc(n)%nsnow+1:0)) - allocate(snice(-NoahmpNew_struc(n)%nsnow+1:0)) - allocate(snliq(-NoahmpNew_struc(n)%nsnow+1:0)) - allocate(zsoil(NoahmpNew_struc(n)%nsoil)) - ! Added by David - allocate(tsnoxy(1,-NoahmpNew_struc(n)%nsnow+1:0,1)) - allocate(zsnsoxy(1,-NoahmpNew_struc(n)%nsnow+1:NoahmpNew_struc(n)%nsoil,1)) - allocate(snicexy(1,-NoahmpNew_struc(n)%nsnow+1:0,1)) - allocate(snliqxy(1,-NoahmpNew_struc(n)%nsnow+1:0,1)) - allocate(smoiseqxy(1,NoahmpNew_struc(n)%nsoil,1)) - allocate(croptype(1,5,1)) ! Check to see if 5 should be hard-coded - zsoil(1) = -NoahmpNew_struc(n)%sldpth(1) - do l=2, NoahmpNew_struc(n)%nsoil - zsoil(l) = zsoil(l-1) - NoahmpNew_struc(n)%sldpth(l) - enddo - ! end add + ! initialize NoahmpIO variables + NoahmpIO%nsoil = NoahMPnew_struc(n)%nsoil + NoahmpIO%nsnow = NoahMPnew_struc(n)%nsnow + NoahmpIO%restart_flag = .false. + NoahmpIO%FNDSNOWH = .true. -!------------------------------------ -! Initialize Model State Variables -!---------------------------------------------------------------------- if (trim(LIS_rc%startcode) .eq. "coldstart") then write(LIS_logunit,*) & "[INFO] NoahMPnew_coldstart -- cold-starting Noah-MP.New" do t=1, LIS_rc%npatch(n,mtype) - row = LIS_surface(n, LIS_rc%lsm_index)%tile(t)%row - col = LIS_surface(n, LIS_rc%lsm_index)%tile(t)%col - XLAT(1,1) = LIS_domain(n)%grid(LIS_domain(n)%gindex(col,row))%lat - - ! added by shugong - zsnso = 0.0 - tmp_swe(1,1) = NoahmpNew_struc(n)%init_sneqv - tgxy(1,1) = NoahmpNew_struc(n)%init_tskin - tmp_snodep(1,1) = NoahmpNew_struc(n)%init_snowh - - call snow_init_new(1, 1, 1, 1, 1, 1, 1, 1, & !input - NoahmpNew_struc(n)%nsnow, & !input - NoahmpNew_struc(n)%nsoil, & !input - zsoil, & !input - tmp_swe, & !input - tgxy, & !input - tmp_snodep, & !input - zsnso, tsnow, snice, snliq, & !output - isnowxy) ! output - isnow = isnowxy(1,1) - ! end add - - snicexy(1,-NoahmpNew_struc(n)%nsnow+1:0,1) = snice(-NoahmpNew_struc(n)%nsnow+1:0) - snliqxy(1,-NoahmpNew_struc(n)%nsnow+1:0,1) = snliq(-NoahmpNew_struc(n)%nsnow+1:0) - zsnsoxy(1,-NoahmpNew_struc(n)%nsnow+1:NoahmpNew_struc(n)%nsoil,1) = zsnso(-NoahmpNew_struc(n)%nsnow+1:NoahmpNew_struc(n)%nsoil) - tsnoxy(1,-NoahmpNew_struc(n)%nsnow+1:0,1) = tsnow(-NoahmpNew_struc(n)%nsnow+1:0) - - do l=1,5 - croptype(1,l,1) = 0.0 + NoahmpIO%ISNOWXY(1,1) = -NoahmpNew_struc(n)%nsnow + NoahmpIO%ZSOIL(1) = -NoahmpNew_struc(n)%sldpth(1) + do l=2, NoahmpNew_struc(n)%nsoil + NoahmpIO%ZSOIL(l) = NoahmpIO%ZSOIL(l-1) - NoahmpNew_struc(n)%sldpth(l) enddo - cropcatxy(1,1) = LIS_rc%cropclass - - canwatxy(1,1) = NoahmpNew_struc(n)%init_canwat - IVGTYP(1,1) = NoahmpNew_struc(n)%noahmpnew(t)%vegetype - ISLTYP(1,1) = NoahmpNew_struc(n)%noahmpnew(t)%soiltype - do l=1, NoahmpNew_struc(n)%nsoil - tslb_3d(1,l,1) = NoahmpNew_struc(n)%init_tslb(l) ! Noah-MP.4.0.1 initial soil temperatures: - smois_3d(1,l,1) = NoahmpNew_struc(n)%init_smc(l) ! Noah-MP.4.0.1 initial total soil moistures: - sh2o_3d(1,l,1) = 0.0 ! Noah-MP.4.0.1 initial liquid soil moistures set in NOAHMP_INIT - DZS(l) = NoahmpNew_struc(n)%sldpth(l) ! Noah-MP.4.0.1 thickness of soil layers: + NoahmpIO%TSLB(1,l,1) = NoahmpNew_struc(n)%init_tslb(l) + NoahmpIO%SMOIS(1,l,1) = NoahmpNew_struc(n)%init_smc(l) + NoahmpIO%SH2O(1,l,1) = 0.0 + NoahmpIO%DZS(l) = NoahmpNew_struc(n)%sldpth(l) enddo - FNDSOILW = .true. - FNDSNOWH = .true. - - TSK(1,1) = NoahmpNew_struc(n)%init_tskin ! Noah-MP.4.0.1 surface skin temperature: - tvxy(1,1) = 0.0 ! Noah-MP.4.0.1 initial vegetation temperature set in NOAHMP_INIT - tgxy(1,1) = 0.0 ! Noah-MP.4.0.1 initial ground temperature set in NOAHMP_INIT - canicexy(1,1) = 0.0 ! Noah-MP.4.0.1 initial canopy-intercepted ice set in NOAHMP_INIT - canliqxy(1,1) = 0.0 ! Noah-MP.4.0.1 initial canopy-intercepted liquid water set in NOAHMP_INIT - tmnxy(1,1) = NoahmpNew_struc(n)%noahmpnew(t)%tbot ! Noah-MP.4.0.1 soil temperature lower boundary: -! Fix later (should it be zero?) -! XICE(1,1) = NoahmpNew_struc(n)%seaice ! Noah-MP.4.0.1 sea ice fraction: - XICE(1,1) = 0.0 - eahxy(1,1) = 0.0 - tahxy(1,1) = 0.0 - cmxy(1,1) = 0.0 - chxy(1,1) = 0.0 - fwetxy(1,1) = 0.0 - sneqvoxy(1,1) = 0.0 ! Noah-MP.4.0.1 initial snow mass at last time step set in NOAHMP_INIT - alboldxy(1,1) = 0.0 ! Noah-MP.4.0.1 initial snow albedo at last time step set in NOAHMP_INIT - qsnowxy(1,1) = 0.0 ! Noah-MP.4.0.1 initial snowfall on the ground set in NOAHMP_INIT - wslakexy(1,1) = 0.0 - zwtxy(1,1) = NoahmpNew_struc(n)%init_zwt ! Noah-MP.4.0.1 initial water table depth: - waxy(1,1) = NoahmpNew_struc(n)%init_wa ! Noah-MP.4.0.1 initial water in the aquifer: - wtxy(1,1) = NoahmpNew_struc(n)%init_wt ! Noah-MP.4.0.1 initial water in aquifer and saturated soil: - lfmassxy(1,1) = 0.0 ! Noah-MP.4.0.1 initial leaf mass set in NOAHMP_INIT - rtmassxy(1,1) = 0.0 ! Noah-MP.4.0.1 initial mass of fine roots set in NOAHMP_INIT - stmassxy(1,1) = 0.0 ! Noah-MP.4.0.1 initial stem mass set in NOAHMP_INIT - woodxy(1,1) = 0.0 ! Noah-MP.4.0.1 initial mass of wood including woody roots set in NOAHMP_INIT - stblcpxy(1,1) = 0.0 ! Noah-MP.4.0.1 initial stable carbon in deep soil set in NOAHMP_INIT - fastcpxy(1,1) = 0.0 ! Noah-MP.4.0.1 initial short-lived carbon in shallow soil set in NOAHMP_INIT - saixy(1,1) = 0.0 ! Noah-MP.4.0.1 initial stem area index set in NOAHMP_INIT - laixy(1,1) = NoahmpNew_struc(n)%init_lai ! Noah-MP.4.0.1 initial leaf area index: - grainxy(1,1) = 0.0 - gddxy(1,1) = 0.0 - cropcatxy(1,1) = 0.0 - t2mvxy(1,1) = 0.0 ! set in NOAHMP_INIT - t2mbxy(1,1) = 0.0 ! set in NOAHMP_INIT - chstarxy(1,1) = 0.0 ! dummy - NSOIL = NoahmpNew_struc(n)%nsoil - restart = .false. - allowed_to_read = .true. - runoff_option = NoahmpNew_struc(n)%run_opt ! Noah-MP.4.0.1 runoff and groundwater option: - crop_option = NoahmpNew_struc(n)%crop_opt ! Noah-MP.4.0.1 crop model option: - sf_urban_physics = NoahmpNew_struc(n)%urban_opt ! Noah-MP.4.0.1 urban physics option: + NoahmpIO%croptype(1,:,1) = 0.0 + row = LIS_surface(n, LIS_rc%lsm_index)%tile(t)%row + col = LIS_surface(n, LIS_rc%lsm_index)%tile(t)%col + NoahmpIO%XLAT(1,1) = LIS_domain(n)%grid(LIS_domain(n)%gindex(col,row))%lat + + NoahmpIO%CROPCAT(1,1) = LIS_rc%cropclass + NoahmpIO%CANWAT(1,1) = NoahmpNew_struc(n)%init_canwat + NoahmpIO%IVGTYP(1,1) = NoahmpNew_struc(n)%noahmpnew(t)%vegetype + NoahmpIO%ISLTYP(1,1) = NoahmpNew_struc(n)%noahmpnew(t)%soiltype + NoahmpIO%TSK(1,1) = NoahmpNew_struc(n)%init_tskin + NoahmpIO%tvxy(1,1) = NoahmpNew_struc(n)%init_tskin + NoahmpIO%tgxy(1,1) = NoahmpNew_struc(n)%init_tskin + NoahmpIO%canicexy(1,1) = 0.0 + NoahmpIO%canliqxy(1,1) = 0.0 + NoahmpIO%TMN(1,1) = NoahmpNew_struc(n)%noahmpnew(t)%tbot + NoahmpIO%XICE(1,1) = 0.0 + NoahmpIO%eahxy(1,1) = 0.0 + NoahmpIO%tahxy(1,1) = 0.0 + NoahmpIO%cmxy(1,1) = 0.0 + NoahmpIO%chxy(1,1) = 0.0 + NoahmpIO%fwetxy(1,1) = 0.0 + NoahmpIO%sneqvoxy(1,1) = 0.0 + NoahmpIO%alboldxy(1,1) = 0.0 + NoahmpIO%qsnowxy(1,1) = 0.0 + NoahmpIO%wslakexy(1,1) = 0.0 + NoahmpIO%zwtxy(1,1) = NoahmpNew_struc(n)%init_zwt + NoahmpIO%waxy(1,1) = NoahmpNew_struc(n)%init_wa + NoahmpIO%wtxy(1,1) = NoahmpNew_struc(n)%init_wt + NoahmpIO%lfmassxy(1,1) = 0.0 + NoahmpIO%rtmassxy(1,1) = 0.0 + NoahmpIO%stmassxy(1,1) = 0.0 + NoahmpIO%woodxy(1,1) = 0.0 + NoahmpIO%stblcpxy(1,1) = 0.0 + NoahmpIO%fastcpxy(1,1) = 0.0 + NoahmpIO%xsaixy(1,1) = 0.0 + NoahmpIO%lai(1,1) = NoahmpNew_struc(n)%init_lai + NoahmpIO%grainxy(1,1) = 0.0 + NoahmpIO%gddxy(1,1) = 0.0 + NoahmpIO%cropcat(1,1) = 0.0 + NoahmpIO%t2mvxy(1,1) = 0.0 + NoahmpIO%t2mbxy(1,1) = 0.0 + NoahmpIO%IOPT_RUNSUB = NoahmpNew_struc(n)%runsub_opt + NoahmpIO%IOPT_CROP = NoahmpNew_struc(n)%crop_opt + NoahmpIO%sf_urban_physics = NoahmpNew_struc(n)%urban_opt + NoahmpIO%IOPT_IRR = NoahmpNew_struc(n)%irr_opt + NoahmpIO%IOPT_IRRM = NoahmpNew_struc(n)%irrm_opt ! The following variables are optional for groundwater dynamics iopt_run=5, ! so some random values are set temporarily. - do l=1, NoahmpNew_struc(n)%nsoil - smoiseqxy(1,l,1) = 0.0 ! Noah-MP.4.0.1 initial equilibrium soil moisture content + NoahmpIO%smoiseq(1,l,1) = 0.0 end do - - smcwtdxy(1,1) = 0.0 - rechxy(1,1) = 0.0 - deeprechxy(1,1) = 0.0 - areaxy(1,1) = 100. - dx = 10.0 - dy = 10.0 - msftx(1,1) = 0.0 - msfty(1,1) = 0.0 - wtddt = 0.0 - stepwtd = 0 - dtbl = 0.0 - qrfsxy(1,1) = 0.0 - qslatxy(1,1) = 0.0 - fdepthxy(1,1) = 0.0 -! Fix terrain height later for crop model (Get from lis_input file) - HT(1,1) = -9999.9 - riverbedxy(1,1) = 0.0 - eqzwt(1,1) = 0.0 - rivercondxy(1,1) = 0.0 - pexpxy(1,1) = 0.0 - rechclim(1,1) = 0.0 - sfcrunoffxy(1,1) = 0.0 - udrrunoffxy(1,1) = 0.0 - acsnomxy(1,1) = 0.0 - acsnowxy(1,1) = 0.0 - taussxy(1,1) = 0.0 - pgsxy(1,1) = 0 - - CALL NOAHMP_INIT( LLANDUSE, tmp_swe, tmp_snodep, canwatxy, ISLTYP, IVGTYP, XLAT, & - tslb_3d, smois_3d, sh2o_3d, DZS, FNDSOILW, FNDSNOWH, & - TSK, isnowxy, tvxy, tgxy, canicexy, tmnxy, XICE, & - canliqxy, eahxy, tahxy, cmxy, chxy, & - fwetxy, sneqvoxy, alboldxy, qsnowxy, wslakexy, zwtxy, waxy, & - wtxy, tsnoxy, zsnsoxy, snicexy, snliqxy, lfmassxy, rtmassxy, & - stmassxy, woodxy, stblcpxy, fastcpxy, saixy, laixy, & - grainxy, gddxy, & - croptype, cropcatxy, & - t2mvxy, t2mbxy, chstarxy, & - NSOIL, restart, & - allowed_to_read,runoff_option, crop_option, & - sf_urban_physics, & ! urban scheme - ids,ide, jds,jde, kds,kde, & ! domain - ims,ime, jms,jme, kms,kme, & ! memory - its,ite, jts,jte, kts,kte & ! tile - ,smoiseqxy,smcwtdxy ,rechxy ,deeprechxy, areaxy ,dx, dy, msftx, msfty,& - wtddt ,stepwtd ,dtbl ,qrfsxy ,qspringsxy ,qslatxy, & - fdepthxy ,HT ,riverbedxy ,eqzwt ,rivercondxy ,pexpxy, & - rechclim ,gecros_state & - ) - - NoahmpNew_struc(n)%noahmpnew(t)%sfcrunoff = sfcrunoffxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%udrrunoff = udrrunoffxy(1,1) - - do l=1, NoahmpNew_struc(n)%nsoil - NoahmpNew_struc(n)%noahmpnew(t)%smc(l) = smois_3d(1,l,1) - enddo - do l=1, NoahmpNew_struc(n)%nsoil - NoahmpNew_struc(n)%noahmpnew(t)%sh2o(l) = sh2o_3d(1,l,1) - enddo - do l=1, NoahmpNew_struc(n)%nsoil - NoahmpNew_struc(n)%noahmpnew(t)%tslb(l) = tslb_3d(1,l,1) - enddo - NoahmpNew_struc(n)%noahmpnew(t)%sneqv = tmp_swe(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%snowh = tmp_snodep(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%canwat = canwatxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%acsnom = acsnomxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%acsnow = acsnowxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%isnow = isnowxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%tv = tvxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%tg = tgxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%canice = canicexy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%canliq = canliqxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%fwet = fwetxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%sneqvo = sneqvoxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%albold = alboldxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%qsnow = qsnowxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%wslake = wslakexy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%zwt = zwtxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%wa = waxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%wt = wtxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%lfmass = lfmassxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%rtmass = rtmassxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%stmass = stmassxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%wood = woodxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%stblcp = stblcpxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%fastcp = fastcpxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%lai = laixy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%sai = saixy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%tauss = taussxy(1,1) - - do l=1, NoahmpNew_struc(n)%nsoil - NoahmpNew_struc(n)%noahmpnew(t)%smoiseq(l) = smoiseqxy(1,l,1) - enddo - NoahmpNew_struc(n)%noahmpnew(t)%smcwtd = smcwtdxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%deeprech = deeprechxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%rech = rechxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%grain = grainxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%gdd = gddxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%pgs = pgsxy(1,1) - - NoahmpNew_struc(n)%noahmpnew(t)%snowice(1:NoahmpNew_struc(n)%nsnow) = snicexy(1,-NoahmpNew_struc(n)%nsnow+1:0,1) - NoahmpNew_struc(n)%noahmpnew(t)%snowliq(1:NoahmpNew_struc(n)%nsnow) = snliqxy(1,-NoahmpNew_struc(n)%nsnow+1:0,1) - NoahmpNew_struc(n)%noahmpnew(t)%zss(1:NoahmpNew_struc(n)%nsnow+NoahmpNew_struc(n)%nsoil) = zsnsoxy(1,-NoahmpNew_struc(n)%nsnow+1:NoahmpNew_struc(n)%nsoil,1) - NoahmpNew_struc(n)%noahmpnew(t)%isnow = isnowxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%tsno(1:NoahmpNew_struc(n)%nsnow) = tsnoxy(1,-NoahmpNew_struc(n)%nsnow+1:0,1) + NoahmpIO%smcwtdxy(1,1) = 0.0 + NoahmpIO%rechxy(1,1) = 0.0 + NoahmpIO%deeprechxy(1,1) = 0.0 + NoahmpIO%areaxy(1,1) = 100.0 + NoahmpIO%dx = 10.0 + NoahmpIO%dy = 10.0 + NoahmpIO%msftx(1,1) = 0.0 + NoahmpIO%msfty(1,1) = 0.0 + NoahmpIO%wtddt = 30.0 + NoahmpIO%stepwtd = 0 + NoahmpIO%dtbl = NoahMPnew_struc(n)%ts + NoahmpIO%qrfsxy(1,1) = 0.0 + NoahmpIO%qslatxy(1,1) = 0.0 + NoahmpIO%fdepthxy(1,1) = 0.0 + NoahmpIO%riverbedxy(1,1) = 0.0 + NoahmpIO%eqzwt(1,1) = 0.0 + NoahmpIO%rivercondxy(1,1) = 0.0 + NoahmpIO%pexpxy(1,1) = 0.0 + NoahmpIO%rechclim(1,1) = 0.0 + NoahmpIO%sfcrunoff(1,1) = 0.0 + NoahmpIO%udrunoff(1,1) = 0.0 + NoahmpIO%acsnom(1,1) = 0.0 + NoahmpIO%acsnow(1,1) = 0.0 + NoahmpIO%taussxy(1,1) = 0.0 + NoahmpIO%pgsxy(1,1) = 0 + NoahmpIO%zsnsoxy(1,:,1) = 0.0 + NoahmpIO%SNOW(1,1) = NoahMPnew_struc(n)%init_sneqv + NoahmpIO%SNOWH(1,1) = NoahMPnew_struc(n)%init_snowh + NoahmpIO%snicexy(1,:,1) = 0.0 + NoahmpIO%snliqxy(1,:,1) = 0.0 + NoahmpIO%tsnoxy(1,:,1) = 0.0 + + ! main Noah-MP initialization module + call NoahmpInitMain(NoahmpIO) + + ! update NoahmpNew_struc initial values + NoahmpNew_struc(n)%noahmpnew(t)%sfcrunoff = NoahmpIO%sfcrunoff(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%udrrunoff = NoahmpIO%udrunoff(1,1) + do l=1, NoahmpNew_struc(n)%nsoil + NoahmpNew_struc(n)%noahmpnew(t)%smc(l) = NoahmpIO%SMOIS(1,l,1) + enddo + do l=1, NoahmpNew_struc(n)%nsoil + NoahmpNew_struc(n)%noahmpnew(t)%sh2o(l) = NoahmpIO%SH2O(1,l,1) + enddo + do l=1, NoahmpNew_struc(n)%nsoil + NoahmpNew_struc(n)%noahmpnew(t)%tslb(l) = NoahmpIO%TSLB(1,l,1) + enddo + NoahmpNew_struc(n)%noahmpnew(t)%sneqv = NoahmpIO%SNOW(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%snowh = NoahmpIO%SNOWH(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%canwat = NoahmpIO%canwat(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%acsnom = NoahmpIO%acsnom(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%acsnow = NoahmpIO%acsnow(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%isnow = NoahmpIO%isnowxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%tv = NoahmpIO%tvxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%tg = NoahmpIO%tgxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%canice = NoahmpIO%canicexy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%canliq = NoahmpIO%canliqxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%fwet = NoahmpIO%fwetxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%sneqvo = NoahmpIO%sneqvoxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%albold = NoahmpIO%alboldxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%qsnow = NoahmpIO%qsnowxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%wslake = NoahmpIO%wslakexy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%zwt = NoahmpIO%zwtxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%wa = NoahmpIO%waxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%wt = NoahmpIO%wtxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%lfmass = NoahmpIO%lfmassxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%rtmass = NoahmpIO%rtmassxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%stmass = NoahmpIO%stmassxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%wood = NoahmpIO%woodxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%stblcp = NoahmpIO%stblcpxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%fastcp = NoahmpIO%fastcpxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%lai = NoahmpIO%lai(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%sai = NoahmpIO%xsaixy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%tauss = NoahmpIO%taussxy(1,1) + do l=1, NoahmpNew_struc(n)%nsoil + NoahmpNew_struc(n)%noahmpnew(t)%smoiseq(l) = NoahmpIO%smoiseq(1,l,1) + enddo + NoahmpNew_struc(n)%noahmpnew(t)%smcwtd = NoahmpIO%smcwtdxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%deeprech = NoahmpIO%deeprechxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%rech = NoahmpIO%rechxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%grain = NoahmpIO%grainxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%gdd = NoahmpIO%gddxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%pgs = NoahmpIO%pgsxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%snowice(1:NoahmpNew_struc(n)%nsnow) = & + NoahmpIO%snicexy(1,-NoahmpNew_struc(n)%nsnow+1:0,1) + NoahmpNew_struc(n)%noahmpnew(t)%snowliq(1:NoahmpNew_struc(n)%nsnow) = & + NoahmpIO%snliqxy(1,-NoahmpNew_struc(n)%nsnow+1:0,1) + NoahmpNew_struc(n)%noahmpnew(t)%zss(1:NoahmpNew_struc(n)%nsnow+NoahmpNew_struc(n)%nsoil) = & + NoahmpIO%zsnsoxy(1,-NoahmpNew_struc(n)%nsnow+1:NoahmpNew_struc(n)%nsoil,1) + NoahmpNew_struc(n)%noahmpnew(t)%isnow = NoahmpIO%isnowxy(1,1) + NoahmpNew_struc(n)%noahmpnew(t)%tsno(1:NoahmpNew_struc(n)%nsnow) = & + NoahmpIO%tsnoxy(1,-NoahmpNew_struc(n)%nsnow+1:0,1) !----------------------------------------------------------------------- enddo ! t=1,1 - endif ! coldstart - deallocate(zsnso) - deallocate(tsnow) - deallocate(snice) - deallocate(snliq) - deallocate(zsoil) - deallocate(tsnoxy) - deallocate(zsnsoxy) - deallocate(snicexy) - deallocate(snliqxy) - deallocate(smoiseqxy) - deallocate(croptype) - LIS_rc%yr = LIS_rc%syr LIS_rc%mo = LIS_rc%smo LIS_rc%da = LIS_rc%sda diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_finalize.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_finalize.F90 index eb6f73b7a..fb206ade2 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_finalize.F90 +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_finalize.F90 @@ -49,6 +49,7 @@ subroutine NoahMPnew_finalize() deallocate(NoahMPnew_struc(n)%noahmpnew(t)%snowice) deallocate(NoahMPnew_struc(n)%noahmpnew(t)%snowliq) deallocate(NoahMPnew_struc(n)%noahmpnew(t)%smoiseq) + deallocate(NoahMPnew_struc(n)%noahmpnew(t)%accetrani) end do ! tile loop ! free memory for noahmpnew, the data at tile level diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_main.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_main.F90 index 2f37900f4..465eeff7b 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_main.F90 +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_main.F90 @@ -38,7 +38,6 @@ subroutine NoahMPnew_main(n) use LIS_FORC_AttributesMod use NoahMPnew_lsmMod use NoahmpIOVarType - use NoahmpIOVarInitMod, only : NoahmpIOVarInitDefault implicit none ! !ARGUMENTS: @@ -84,35 +83,6 @@ subroutine NoahMPnew_main(n) alarmCheck = LIS_isAlarmRinging(LIS_rc, "NoahMPnew model alarm") - ! initialize NoahmpIO 1-D variables - NoahmpIO%xstart = 1 - NoahmpIO%xend = 1 - NoahmpIO%ystart = 1 - NoahmpIO%yend = 1 - NoahmpIO%ids = NoahmpIO%xstart - NoahmpIO%ide = NoahmpIO%xend - NoahmpIO%jds = NoahmpIO%ystart - NoahmpIO%jde = NoahmpIO%yend - NoahmpIO%kds = 1 - NoahmpIO%kde = 2 - NoahmpIO%its = NoahmpIO%xstart - NoahmpIO%ite = NoahmpIO%xend - NoahmpIO%jts = NoahmpIO%ystart - NoahmpIO%jte = NoahmpIO%yend - NoahmpIO%kts = 1 - NoahmpIO%kte = 2 - NoahmpIO%ims = NoahmpIO%xstart - NoahmpIO%ime = NoahmpIO%xend - NoahmpIO%jms = NoahmpIO%ystart - NoahmpIO%jme = NoahmpIO%yend - NoahmpIO%kms = 1 - NoahmpIO%kme = 2 - - NoahmpIO%NSOIL = NoahMPnew_struc(n)%nsoil - NoahmpIO%NSNOW = NoahMPnew_struc(n)%nsnow - - call NoahmpIOVarInitDefault() ! initialize NoahmpIO to undefined/default value - if (alarmCheck) Then do t = 1, LIS_rc%npatch(n, LIS_rc%lsm_index) dt = LIS_rc%ts @@ -248,13 +218,13 @@ subroutine NoahMPnew_main(n) NoahmpIO%itimestep = LIS_rc%tscount(n) ! get parameters - NoahmpIO%dtbl = NoahMPnew_struc(n)%ts - NoahmpIO%soiltstep = NoahMPnew_struc(n)%ts_soil - NoahmpIO%dzs(:) = NoahMPnew_struc(n)%sldpth(:) - NoahmpIO%nsoil = NoahMPnew_struc(n)%nsoil - NoahmpIO%nsnow = NoahMPnew_struc(n)%nsnow - NoahmpIO%ivgtyp(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%vegetype - NoahmpIO%isltyp(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%soiltype + NoahmpIO%dtbl = NoahMPnew_struc(n)%ts + NoahmpIO%soiltstep = NoahMPnew_struc(n)%ts_soil + NoahmpIO%dzs(:) = NoahMPnew_struc(n)%sldpth(:) + NoahmpIO%nsoil = NoahMPnew_struc(n)%nsoil + NoahmpIO%nsnow = NoahMPnew_struc(n)%nsnow + NoahmpIO%ivgtyp(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%vegetype + NoahmpIO%isltyp(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%soiltype ! Multiply shdfac by 100.0 because noahmpdrv.f90 ! expects it in units of percentage, not fraction. NoahmpIO%shdfac_monthly(1,:,1) = NoahMPnew_struc(n)%noahmpnew(t)%shdfac_monthly(:) * 100.0 diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_module.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_module.F90 index fce9e40cd..63287e269 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_module.F90 +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_module.F90 @@ -112,7 +112,7 @@ module NoahMPnew_module ! \item[pedo\_opt] ! soil pedotransfer function option. unit: - ! \item[crop\_opt] -! crop model option (0-$>$none; 1-$>$Liu et al.; 2-$>$Gecros). unit: - +! crop model option (0-$>$none; 1-$>$Liu et al.2016). unit: - ! \item[irr\_opt] ! irrigation scheme option (0->none; 1->always on; 2->trigger by planting/harvest dates; 3->trigger by LAI) ! \item[irrm\_opt] diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_readrst.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_readrst.F90 index 8b3f60dcd..7a117aff6 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_readrst.F90 +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_readrst.F90 @@ -515,9 +515,6 @@ subroutine NoahMPnew_readrst() call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accqseva, & varname="ACC_QSEVA", wformat=wformat) - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accetrani, & - varname="ACC_ETRANI", wformat=wformat) - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accdwater, & varname="ACC_DWATER", wformat=wformat) @@ -533,6 +530,14 @@ subroutine NoahMPnew_readrst() call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accedir, & varname="ACC_EDIR", wformat=wformat) + do l=1, NoahMPnew_struc(n)%nsoil ! TODO: check loop + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, varname="ACC_ETRANI", & + dim=l, vlevels = NoahMPnew_struc(n)%nsoil, wformat=wformat) + do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) + NoahMPnew_struc(n)%noahmpnew(t)%accetrani(l) = tmptilen(t) + enddo + enddo + ! close restart file if(wformat .eq. "binary") then call LIS_releaseUnitNumber(ftn) @@ -546,5 +551,4 @@ subroutine NoahMPnew_readrst() deallocate(tmptilen) endif enddo -end subroutine NoahMPnew_readrst - +end subroutine NoahMPnew_readrst diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_setup.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_setup.F90 index 5c63b575c..f577bb871 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_setup.F90 +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_setup.F90 @@ -31,6 +31,8 @@ subroutine NoahMPnew_setup() use LIS_fileIOMod, only: LIS_read_param!, LIS_convertParamDataToLocalDomain use LIS_coreMod, only: LIS_rc, LIS_surface use NoahmpReadTableMod, only : NoahmpReadTable + use NoahmpIOVarInitMod, only : NoahmpIOVarInitDefault + ! ! !DESCRIPTION: ! @@ -81,18 +83,18 @@ subroutine NoahMPnew_setup() write(LIS_logunit,*) & "[INFO] Noah-MP.New retrieve parameter VEGETYPE from LIS" do t=1, LIS_rc%npatch(n, mtype) - NOAHMPnew_struc(n)%noahmpnew(t)%vegetype= LIS_surface(n, mtype)%tile(t)%vegt + NoahMPnew_struc(n)%noahmpnew(t)%vegetype= LIS_surface(n, mtype)%tile(t)%vegt enddo else ! read: vegetype write(LIS_logunit,*) & "[INFO] Noah-MP.New reading parameter VEGETYPE from ", & trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_vegetype), placeholder) + call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_vegetype), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NOAHMPnew_struc(n)%noahmpnew(t)%vegetype = placeholder(col, row) + NoahMPnew_struc(n)%noahmpnew(t)%vegetype = placeholder(col, row) enddo endif ! soiltype takes value from the LIS built-in parameter soilt @@ -101,213 +103,213 @@ subroutine NoahMPnew_setup() write(LIS_logunit,*) & "[INFO] Noah-MP.New retrieve parameter SOILTYPE from LIS" do t=1, LIS_rc%npatch(n, mtype) - NOAHMPnew_struc(n)%noahmpnew(t)%soiltype= LIS_surface(n, mtype)%tile(t)%soilt + NoahMPnew_struc(n)%noahmpnew(t)%soiltype= LIS_surface(n, mtype)%tile(t)%soilt enddo else ! read: soiltype write(LIS_logunit,*) & "[INFO] Noah-MP.New reading parameter SOILTYPE from ", & trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_soiltype), placeholder) + call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_soiltype), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NOAHMPnew_struc(n)%noahmpnew(t)%soiltype = placeholder(col, row) + NoahMPnew_struc(n)%noahmpnew(t)%soiltype = placeholder(col, row) enddo endif ! read: tbot write(LIS_logunit,*) & "[INFO] Noah-MP.New reading parameter TBOT from ", & trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_tbot), placeholder) + call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_tbot), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NOAHMPnew_struc(n)%noahmpnew(t)%tbot = placeholder(col, row) + NoahMPnew_struc(n)%noahmpnew(t)%tbot = placeholder(col, row) enddo !!! SW 11/06/2018 - if(NOAHMPnew_struc(n)%crop_opt .ne.0) then + if(NoahMPnew_struc(n)%crop_opt > 0) then ! read: planting write(LIS_logunit,*) & "[INFO] Noah-MP.New reading parameter PLANTING from ", & trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_planting), placeholder) + call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_planting), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NOAHMPnew_struc(n)%noahmpnew(t)%planting = placeholder(col, row) + NoahMPnew_struc(n)%noahmpnew(t)%planting = placeholder(col, row) enddo ! read: harvest write(LIS_logunit,*) "[INFO] Noah-MP.New reading parameter HARVEST from ",& trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_harvest), placeholder) + call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_harvest), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NOAHMPnew_struc(n)%noahmpnew(t)%harvest = placeholder(col, row) + NoahMPnew_struc(n)%noahmpnew(t)%harvest = placeholder(col, row) enddo ! read: season_gdd write(LIS_logunit,*) "[INFO] Noah-MP.New reading parameter SEASON_GDD from ", & trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_season_gdd), placeholder) + call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_season_gdd), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NOAHMPnew_struc(n)%noahmpnew(t)%season_gdd = placeholder(col, row) + NoahMPnew_struc(n)%noahmpnew(t)%season_gdd = placeholder(col, row) enddo endif ! CH 05/01/2023: for irrigation - if(NOAHMPnew_struc(n)%irr_opt > 0) then + if(NoahMPnew_struc(n)%irr_opt > 0) then ! read: total irrigation fraction write(LIS_logunit,*) & "[INFO] Noah-MP.New reading parameter IRFRACT from ", & trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_irfract), placeholder) + call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_irfract), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NOAHMPnew_struc(n)%noahmpnew(t)%irfract = placeholder(col, row) + NoahMPnew_struc(n)%noahmpnew(t)%irfract = placeholder(col, row) enddo ! read: sprinkler irrigation fraction write(LIS_logunit,*) & "[INFO] Noah-MP.New reading parameter SIFRACT from ", & trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_sifract), placeholder) + call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_sifract), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NOAHMPnew_struc(n)%noahmpnew(t)%sifract = placeholder(col, row) + NoahMPnew_struc(n)%noahmpnew(t)%sifract = placeholder(col, row) enddo ! read: micro/drip irrigation fraction write(LIS_logunit,*) & "[INFO] Noah-MP.New reading parameter MIFRACT from ", & trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_mifract), placeholder) + call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_mifract), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NOAHMPnew_struc(n)%noahmpnew(t)%mifract = placeholder(col, row) + NoahMPnew_struc(n)%noahmpnew(t)%mifract = placeholder(col, row) enddo ! read: flood irrigation fraction write(LIS_logunit,*) & "[INFO] Noah-MP.New reading parameter FIFRACT from ", & trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_fifract), placeholder) + call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_fifract), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NOAHMPnew_struc(n)%noahmpnew(t)%fifract = placeholder(col, row) + NoahMPnew_struc(n)%noahmpnew(t)%fifract = placeholder(col, row) enddo endif ! CH 05/01/2023: for tile drainage - if(NOAHMPnew_struc(n)%tdrn_opt > 0) then + if(NoahMPnew_struc(n)%tdrn_opt > 0) then ! read: tile drainage fraction write(LIS_logunit,*) & "[INFO] Noah-MP.New reading parameter TDFRACT from ", & trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_tdfract), placeholder) + call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_tdfract), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NOAHMPnew_struc(n)%noahmpnew(t)%tdfract = placeholder(col, row) + NoahMPnew_struc(n)%noahmpnew(t)%tdfract = placeholder(col, row) enddo endif !!! SW 11/06/2018 - if(NOAHMPnew_struc(n)%soil_opt .eq. 2) then + if(NoahMPnew_struc(n)%soil_opt .eq. 2) then ! read: soilcL1 write(LIS_logunit,*) "[INFO] Noah-MP.New reading parameter SOILCL1 from ", & trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_soilcL1), placeholder) + call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_soilcL1), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NOAHMPnew_struc(n)%noahmpnew(t)%soilcl1 = placeholder(col, row) + NoahMPnew_struc(n)%noahmpnew(t)%soilcl1 = placeholder(col, row) enddo ! read: soilcL2 write(LIS_logunit,*) "[INFO] Noah-MP.New reading parameter SOILCL2 from ", & trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_soilcL2), placeholder) + call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_soilcL2), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NOAHMPnew_struc(n)%noahmpnew(t)%soilcl2 = placeholder(col, row) + NoahMPnew_struc(n)%noahmpnew(t)%soilcl2 = placeholder(col, row) enddo ! read: soilcL3 write(LIS_logunit,*) "[INFO] Noah-MP.New reading parameter SOILCL3 from ", & trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_soilcL3), placeholder) + call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_soilcL3), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NOAHMPnew_struc(n)%noahmpnew(t)%soilcl3 = placeholder(col, row) + NoahMPnew_struc(n)%noahmpnew(t)%soilcl3 = placeholder(col, row) enddo ! read: soilcL4 write(LIS_logunit,*) "[INFO] Noah-MP.New reading parameter SOILCL4 from ", & trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_soilcL4), placeholder) + call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_soilcL4), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NOAHMPnew_struc(n)%noahmpnew(t)%soilcl4 = placeholder(col, row) + NoahMPnew_struc(n)%noahmpnew(t)%soilcl4 = placeholder(col, row) enddo endif ! CH 05/01/2023: for MMF groundwater - if(NOAHMPnew_struc(n)%runsub_opt == 5) then + if(NoahMPnew_struc(n)%runsub_opt == 5) then ! read: efolding depth for transmissivity (m) write(LIS_logunit,*) & "[INFO] Noah-MP.New reading parameter FDEPTH from ", & trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_fdepth), placeholder) + call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_fdepth), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NOAHMPnew_struc(n)%noahmpnew(t)%fdepth = placeholder(col, row) + NoahMPnew_struc(n)%noahmpnew(t)%fdepth = placeholder(col, row) enddo ! read: equilibrium water table depth (m) write(LIS_logunit,*) & "[INFO] Noah-MP.New reading parameter EQZWT from ", & trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_eqzwt), placeholder) + call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_eqzwt), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NOAHMPnew_struc(n)%noahmpnew(t)%eqzwt = placeholder(col, row) + NoahMPnew_struc(n)%noahmpnew(t)%eqzwt = placeholder(col, row) enddo ! read: riverbed depth (m) write(LIS_logunit,*) & "[INFO] Noah-MP.New reading parameter RIVERBED from ", & trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_riverbed), placeholder) + call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_riverbed), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NOAHMPnew_struc(n)%noahmpnew(t)%riverbed = placeholder(col, row) + NoahMPnew_struc(n)%noahmpnew(t)%riverbed = placeholder(col, row) enddo ! read: climatology recharge write(LIS_logunit,*) & "[INFO] Noah-MP.New reading parameter RECHCLIM from ", & trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NOAHMPnew_struc(n)%LDT_ncvar_rechclim), placeholder) + call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_rechclim), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NOAHMPnew_struc(n)%noahmpnew(t)%rechclim = placeholder(col, row) + NoahMPnew_struc(n)%noahmpnew(t)%rechclim = placeholder(col, row) enddo endif @@ -317,55 +319,83 @@ subroutine NoahMPnew_setup() write(LIS_logunit,*) "[INFO] Noah-MP.New reading parameter SHDFAC_MONTHLY from ",& trim(LIS_rc%paramfile(n)) do k = 1, 12 - call NOAHMPnew_read_MULTILEVEL_param(n, NOAHMPnew_struc(n)%LDT_ncvar_shdfac_monthly, k, placeholder) + call NOAHMPnew_read_MULTILEVEL_param(n, NoahMPnew_struc(n)%LDT_ncvar_shdfac_monthly, k, placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NOAHMPnew_struc(n)%noahmpnew(t)%shdfac_monthly(k) = placeholder(col, row) + NoahMPnew_struc(n)%noahmpnew(t)%shdfac_monthly(k) = placeholder(col, row) enddo enddo - if(NOAHMPnew_struc(n)%soil_opt .eq. 3) then + if(NoahMPnew_struc(n)%soil_opt .eq. 3) then ! read: soilcomp write(LIS_logunit,*) "[INFO] Noah-MP.New reading parameter SOILCOMP from ", & trim(LIS_rc%paramfile(n)) do k = 1, 8 - call NOAHMPnew_read_MULTILEVEL_param(n, NOAHMPnew_struc(n)%LDT_ncvar_soilcomp, k, placeholder) + call NOAHMPnew_read_MULTILEVEL_param(n, NoahMPnew_struc(n)%LDT_ncvar_soilcomp, k, placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NOAHMPnew_struc(n)%noahmpnew(t)%soilcomp(k) = placeholder(col, row) + NoahMPnew_struc(n)%noahmpnew(t)%soilcomp(k) = placeholder(col, row) enddo enddo endif deallocate(placeholder) - !!!! read Noah-MP parameter tables + !!!! read Noah-MP parameter tables write(LIS_logunit,*) "[INFO] Noah-MP.New parameter table (veg, soil, general): ", & - trim(NOAHMPnew_struc(n)%noahmp_tbl_name) + trim(NoahMPnew_struc(n)%noahmp_tbl_name) write(LIS_logunit,*) "[INFO] Noah-MP.New Landuse classification scheme: ", & - trim(NOAHMPnew_struc(n)%landuse_scheme_name) + trim(NoahMPnew_struc(n)%landuse_scheme_name) write(LIS_logunit,*) "[INFO] Noah-MP.New Soil classification scheme: ", & "STAS (default, cannot change)" - call NoahmpReadTable(trim(NOAHMPnew_struc(n)%landuse_scheme_name), & - trim(NOAHMPnew_struc(n)%noahmp_tbl_name)) + call NoahmpReadTable(trim(NoahMPnew_struc(n)%landuse_scheme_name), & + trim(NoahMPnew_struc(n)%noahmp_tbl_name)) do t=1,LIS_rc%npatch(n,mtype) SOILTYP = NoahMPnew_struc(n)%noahmpnew(t)%soiltype VEGTYP = NoahMPnew_struc(n)%noahmpnew(t)%vegetype SLOPETYP = 1 ! set underground runoff slope term SOILCOLOR = 4 ! soil color: assuming a middle color category ????????? - ! if (NOAHMPnew_struc(n)%crop_opt > 0 .and. VEGTYP == NoahmpIO%ISCROP_TABLE) & + ! if (NoahMPnew_struc(n)%crop_opt > 0 .and. VEGTYP == NoahmpIO%ISCROP_TABLE) & ! CROPTYPE = NoahmpIO%DEFAULT_CROP_TABLE CROPTYPE = 0 - CALL TRANSFER_MP_PARAMETERS(VEGTYP,SOILTYP,SLOPETYP,SOILCOLOR,CROPTYPE,& + CALL TRANSFER_MP_PARAMETERS(VEGTYP,SOILTYP,SLOPETYP,SOILCOLOR,CROPTYPE,NoahmpIO,& NoahMPnew_struc(n)%noahmpnew(t)%param) - enddo - !optional read of Optimized parameters + ! optional read of Optimized parameters + call NoahMPnew_read_OPT_parameters() + + !-------- initialize NoahmpIO 1-D interface variables + NoahmpIO%xstart = 1 + NoahmpIO%xend = 1 + NoahmpIO%ystart = 1 + NoahmpIO%yend = 1 + NoahmpIO%ids = NoahmpIO%xstart + NoahmpIO%ide = NoahmpIO%xend + NoahmpIO%jds = NoahmpIO%ystart + NoahmpIO%jde = NoahmpIO%yend + NoahmpIO%kds = 1 + NoahmpIO%kde = 2 + NoahmpIO%its = NoahmpIO%xstart + NoahmpIO%ite = NoahmpIO%xend + NoahmpIO%jts = NoahmpIO%ystart + NoahmpIO%jte = NoahmpIO%yend + NoahmpIO%kts = 1 + NoahmpIO%kte = 2 + NoahmpIO%ims = NoahmpIO%xstart + NoahmpIO%ime = NoahmpIO%xend + NoahmpIO%jms = NoahmpIO%ystart + NoahmpIO%jme = NoahmpIO%yend + NoahmpIO%kms = 1 + NoahmpIO%kme = 2 + NoahmpIO%nsoil = NoahMPnew_struc(n)%nsoil + NoahmpIO%nsnow = NoahMPnew_struc(n)%nsnow + + call NoahmpIOVarInitDefault(NoahmpIO) ! initialize NoahmpIO to undefined/default value + !-------- NoahmpIO init complete - call NoahMPnew_read_OPT_parameters() enddo end subroutine NoahMPnew_setup @@ -485,7 +515,7 @@ subroutine NOAHMPnew_read_MULTILEVEL_param(n, ncvar_name, level, placeholder) end subroutine NOAHMPnew_read_MULTILEVEL_param -SUBROUTINE TRANSFER_MP_PARAMETERS(VEGTYPE,SOILTYPE,SLOPETYPE,SOILCOLOR,CROPTYPE,parameters) +SUBROUTINE TRANSFER_MP_PARAMETERS(VEGTYPE,SOILTYPE,SLOPETYPE,SOILCOLOR,CROPTYPE,NoahmpIO,parameters) use NoahmpIOVarType @@ -497,7 +527,8 @@ SUBROUTINE TRANSFER_MP_PARAMETERS(VEGTYPE,SOILTYPE,SLOPETYPE,SOILCOLOR,CROPTYPE, INTEGER, INTENT(IN) :: SOILCOLOR INTEGER, INTENT(IN) :: CROPTYPE - type (LisNoahmpParam_type), intent(inout) :: parameters + type(NoahmpIO_type), intent(in) :: NoahmpIO + type(LisNoahmpParam_type), intent(inout) :: parameters REAL :: FRZK REAL :: FRZFACT diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_writerst.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_writerst.F90 index 5a741bb21..9127318fa 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_writerst.F90 +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_writerst.F90 @@ -569,7 +569,7 @@ subroutine NoahMPnew_dump_restart(n, ftn, wformat) ! write the header for state variable qrf !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max call LIS_writeHeader_restart(ftn, n, dimID, qrf_ID, "QRF", & - "groundwater baselow", & + "groundwater baseflow", & "m", vlevels=1, valid_min=-99999.0, valid_max=99999.0) ! write the header for state variable qspring !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max @@ -713,10 +713,10 @@ subroutine NoahMPnew_dump_restart(n, ftn, wformat) "accumulated soil surface evaporation", & "m/s", vlevels=1, valid_min=-99999.0, valid_max=99999.0) ! write the header for state variable accetrani - !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max call LIS_writeHeader_restart(ftn, n, dimID, accetrani_ID, "ACC_ETRANI", & - "accumulated plant transpiration", & - "m/s", vlevels=1, valid_min=-99999.0, valid_max=99999.0) + "accumulated plant transpiration each layer", & + "m/s", vlevels=NoahMPnew_struc(n)%nsoil , valid_min=-99999.0, valid_max=99999.0, & + var_flag = "dim2") ! write the header for state variable accdwater !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max call LIS_writeHeader_restart(ftn, n, dimID, accdwater_ID, "ACC_DWATER", & @@ -743,10 +743,10 @@ subroutine NoahMPnew_dump_restart(n, ftn, wformat) "accumulated net soil evaporation", & "m/s", vlevels=1, valid_min=-99999.0, valid_max=99999.0) - ! close header of restart file call LIS_closeHeader_restart(ftn, n, LIS_rc%lsm_index, dimID, NoahMPnew_struc(n)%rstInterval) + ! write state variables into restart file ! accumulated surface runoff call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%sfcrunoff, & @@ -952,6 +952,9 @@ subroutine NoahMPnew_dump_restart(n, ftn, wformat) call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, & varid=smoiseq_ID, dim=l, wformat=wformat) enddo + + ! for MMF groundwater + if (NoahMPnew_struc(n)%runsub_opt == 5) then ! soil moisture content in the layer to the water table when deep call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%smcwtd, & varid=smcwtd_ID, dim=1, wformat=wformat) @@ -964,6 +967,107 @@ subroutine NoahMPnew_dump_restart(n, ftn, wformat) call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%rech, & varid=rech_ID, dim=1, wformat=wformat) + ! groundwater expotential parameter + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%pexp, & + varid=pexp_ID, dim=1, wformat=wformat) + + ! river area + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%area, & + varid=area_ID, dim=1, wformat=wformat) + + ! groundwater baseflow + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%qrf, & + varid=qrf_ID, dim=1, wformat=wformat) + + ! seeping water + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%qspring, & + varid=qspring_ID, dim=1, wformat=wformat) + + ! accumulated lateral flow + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%qslat, & + varid=qslat_ID, dim=1, wformat=wformat) + + ! accumulated GW baseflow + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%qrfs, & + varid=qrfs_ID, dim=1, wformat=wformat) + + ! accumulated seeping water + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%qsprings, & + varid=qsprings_ID, dim=1, wformat=wformat) + + ! depth + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%fdepth, & + varid=fdepth_ID, dim=1, wformat=wformat) + + ! river conductivity + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%rivercond, & + varid=rivercond_ID, dim=1, wformat=wformat) + + ! riverbed depth + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%riverbed, & + varid=riverbed_ID, dim=1, wformat=wformat) + + ! equilibrium water table depth + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%eqzwt, & + varid=eqzwt_ID, dim=1, wformat=wformat) + + endif + + ! for irrigation + if (NoahMPnew_struc(n)%irr_opt >0) then + ! sprinkler irrigation count + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irnumsi, & + varid=irnumsi_ID, dim=1, wformat=wformat) + + ! micro irrigation count + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irnummi, & + varid=irnummi_ID, dim=1, wformat=wformat) + + ! flood irrigation count + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irnumfi, & + varid=irnumfi_ID, dim=1, wformat=wformat) + + ! sprinkler irrigation water amount + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irwatsi, & + varid=irwatsi_ID, dim=1, wformat=wformat) + + ! micro irrigation water amount + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irwatmi, & + varid=irwatmi_ID, dim=1, wformat=wformat) + + ! flood irrigation water amount + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irwatfi, & + varid=irwatfi_ID, dim=1, wformat=wformat) + + ! sprinkler irrigation water volume + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irsivol, & + varid=irsivol_ID, dim=1, wformat=wformat) + + ! micro irrigation water volume + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irmivol, & + varid=irmivol_ID, dim=1, wformat=wformat) + + ! flood irrigation water volume + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irfivol, & + varid=irfivol_ID, dim=1, wformat=wformat) + + ! loss of irrigation water to evaporation + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%ireloss, & + varid=ireloss_ID, dim=1, wformat=wformat) + + ! latent heating from sprinkler evaporation + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irrsplh, & + varid=irrsplh_ID, dim=1, wformat=wformat) + + endif + + ! for tile drainage + if (NoahMPnew_struc(n)%tdrn_opt >0) then + ! accumulated tile drainage discharge + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%qtdrain, & + varid=qtdrain_ID, dim=1, wformat=wformat) + endif + ! mass of grain XING call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%grain, & varid=grain_ID, dim=1, wformat=wformat) @@ -976,13 +1080,50 @@ subroutine NoahMPnew_dump_restart(n, ftn, wformat) call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%pgs, & varid=pgs_ID, dim=1, wformat=wformat) - ! optional gecros crop -! do l=1, 60 ! TODO: check loop -! tmptilen = 0 -! do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) -! tmptilen(t) = NoahMPnew_struc(n)%noahmpnew(t)%gecros_state(l) -! enddo -! call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, & -! varid=gecros_state_ID, dim=l, wformat=wformat) -! enddo + ! for additional variables + ! accumulated ground heat flux + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accssoil, & + varid=accssoil_ID, dim=1, wformat=wformat) + + ! accumulated soil surface water flux + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accqinsur, & + varid=accqinsur_ID, dim=1, wformat=wformat) + + ! accumulated soil surface evaporation + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accqseva, & + varid=accqseva_ID, dim=1, wformat=wformat) + + ! accumulated plant transpiration each layer + do l=1, NoahMPnew_struc(n)%nsoil ! TODO: check loop + tmptilen = 0 + do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) + tmptilen(t) = NoahMPnew_struc(n)%noahmpnew(t)%accetrani(l) + enddo + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, & + varid=accetrani_ID, dim=l, wformat=wformat) + enddo + + ! accumulated water storage change + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accdwater, & + varid=accdwater_ID, dim=1, wformat=wformat) + + ! accumulated precipitation + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accprcp, & + varid=accprcp_ID, dim=1, wformat=wformat) + + ! accumulated canopy evaporation + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accecan, & + varid=accecan_ID, dim=1, wformat=wformat) + + ! accumulated transpiration + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accetran, & + varid=accetran_ID, dim=1, wformat=wformat) + + ! accumulated net soil evaporation + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accedir, & + varid=accedir_ID, dim=1, wformat=wformat) + + + !!! END OF writing state variables + end subroutine NoahMPnew_dump_restart diff --git a/lis/surfacemodels/land/noahmp.new/noahmp_driver_new.F90 b/lis/surfacemodels/land/noahmp.new/noahmp_driver_new.F90 index a81aee31c..e21211f54 100644 --- a/lis/surfacemodels/land/noahmp.new/noahmp_driver_new.F90 +++ b/lis/surfacemodels/land/noahmp.new/noahmp_driver_new.F90 @@ -107,32 +107,32 @@ subroutine noahmp_driver_new(n, NoahmpIO, LISparam) if ((NoahmpIO%IOPT_DVEG .eq. 1).or.(NoahmpIO%IOPT_DVEG .eq. 6).or.(NoahmpIO%IOPT_DVEG .eq. 7)) then ! with dveg_opt==1/6/7, shdfac is fed directly to fveg - NoahmpIO%vegfra(1,1) = month_d_new(shdfac_monthly(1,:,1), nowdate) + NoahmpIO%vegfra(1,1) = month_d_new(NoahmpIO%shdfac_monthly(1,:,1), nowdate) else ! with dveg_opt==2/3/8, fveg is computed from lai and sai, and shdfac is unused ! with dveg_opt==4/5/9, fveg is set to the maximum shdfac, and shdfac is unused NoahmpIO%vegfra(1,1) = -1.E36 ! To match with HRLDAS initialization endif - NoahmpIO%gvfmax(1,1) = maxval(shdfac_monthly(1,:,1)) + NoahmpIO%gvfmax(1,1) = maxval(NoahmpIO%shdfac_monthly(1,:,1)) ! assign forcing variables - NoahmpIO%dz8w(1,2,1) = NoahmpIO%dz8w(1,1,1) - NoahmpIO%T_PHY(1,2,1) = NoahmpIO%T_PHY(1,1,1) - NoahmpIO%P8W(1,2,1) = NoahmpIO%P8W(1,1,1) - NoahmpIO%QV_CURR(1,1,1) = NoahmpIO%QV_CURR(1,1,1)/& - (1.0 - NoahmpIO%QV_CURR(1,1,1)) ! Convert specific humidity to water vapor mixing ratio - NoahmpIO%QV_CURR(1,2,1) = NoahmpIO%QV_CURR(1,1,1) - NoahmpIO%U_PHY(1,2,1) = NoahmpIO%U_PHY(1,1,1) - NoahmpIO%V_PHY(1,2,1) = NoahmpIO%V_PHY(1,1,1) - NoahmpIO%QSFC(1,1) = NoahmpIO%QV_CURR(1,1,1) - NoahmpIO%SNOWBL = 0.0 - NoahmpIO%SR = 0.0 ! Will only use component if opt_snf=4 - NoahmpIO%RAINCV = 0.0 - NoahmpIO%RAINNCV = NoahmpIO%RAINBL - NoahmpIO%RAINSHV = 0.0 - NoahmpIO%SNOWNCV = NoahmpIO%SNOWBL - NoahmpIO%GRAUPELNCV = 0.0 - NoahmpIO%HAILNCV = 0.0 + NoahmpIO%dz8w(1,2,1) = NoahmpIO%dz8w(1,1,1) + NoahmpIO%T_PHY(1,2,1) = NoahmpIO%T_PHY(1,1,1) + NoahmpIO%P8W(1,2,1) = NoahmpIO%P8W(1,1,1) + NoahmpIO%QV_CURR(1,1,1) = NoahmpIO%QV_CURR(1,1,1)/& + (1.0 - NoahmpIO%QV_CURR(1,1,1)) ! Convert specific humidity to water vapor mixing ratio + NoahmpIO%QV_CURR(1,2,1) = NoahmpIO%QV_CURR(1,1,1) + NoahmpIO%U_PHY(1,2,1) = NoahmpIO%U_PHY(1,1,1) + NoahmpIO%V_PHY(1,2,1) = NoahmpIO%V_PHY(1,1,1) + NoahmpIO%QSFC(1,1) = NoahmpIO%QV_CURR(1,1,1) + NoahmpIO%SNOWBL(1,1) = 0.0 + NoahmpIO%SR(1,1) = 0.0 ! Will only use component if opt_snf=4 + NoahmpIO%RAINCV(1,1) = 0.0 + NoahmpIO%RAINNCV(1,1) = NoahmpIO%RAINBL(1,1) + NoahmpIO%RAINSHV(1,1) = 0.0 + NoahmpIO%SNOWNCV(1,1) = NoahmpIO%SNOWBL(1,1) + NoahmpIO%GRAUPELNCV(1,1) = 0.0 + NoahmpIO%HAILNCV(1,1) = 0.0 ! If coupled to WRF, set these variables to realistic values, ! and then pass back to WRF after the call to noahmplsm_401. @@ -288,90 +288,3 @@ SUBROUTINE calc_declin ( nowdate, latitude, longitude, cosz, yearlen, julian) END SUBROUTINE calc_declin -! Subroutine SNOW_INIT grabbed from NOAH-MP-WRF -SUBROUTINE SNOW_INIT_new ( jts, jtf, its, itf, ims, ime, jms, jme, NSNOW, NSOIL, ZSOIL, & - SWE, tgxy, SNODEP, ZSNSOXY, TSNOXY, SNICEXY, SNLIQXY, ISNOWXY) - -! ------------------------------------------------------------------------------------------ - IMPLICIT NONE -! ------------------------------------------------------------------------------------------ - INTEGER, INTENT(IN) :: jts,jtf,its,itf,ims,ime, jms,jme,NSNOW,NSOIL - REAL, INTENT(IN), DIMENSION(ims:ime, jms:jme) :: SWE - REAL, INTENT(IN), DIMENSION(ims:ime, jms:jme) :: SNODEP - REAL, INTENT(IN), DIMENSION(ims:ime, jms:jme) :: tgxy - REAL, INTENT(IN), DIMENSION(1:NSOIL) :: ZSOIL - - INTEGER, INTENT(OUT), DIMENSION(ims:ime, jms:jme) :: ISNOWXY - REAL, INTENT(OUT), DIMENSION(ims:ime, -NSNOW+1:NSOIL,jms:jme) :: ZSNSOXY - REAL, INTENT(OUT), DIMENSION(ims:ime, -NSNOW+1: 0,jms:jme) :: TSNOXY - REAL, INTENT(OUT), DIMENSION(ims:ime, -NSNOW+1: 0,jms:jme) :: SNICEXY - REAL, INTENT(OUT), DIMENSION(ims:ime, -NSNOW+1: 0,jms:jme) :: SNLIQXY - -!local - INTEGER :: I,J,IZ - REAL, DIMENSION(ims:ime, -NSNOW+1: 0,jms:jme) :: DZSNOXY - REAL, DIMENSION(ims:ime, -NSNOW+1:NSOIL,jms:jme) :: DZSNSOXY -! ------------------------------------------------------------------------------------------ - - - DO J = jts,jtf - DO I = its,itf - IF (SNODEP(I,J) < 0.025) THEN - ISNOWXY(I,J) = 0 - DZSNOXY(I,-NSNOW+1:0,J) = 0. - ELSE - IF ((SNODEP(I,J) >= 0.025) .AND. (SNODEP(I,J) <= 0.05)) THEN - ISNOWXY(I,J) = -1 - DZSNOXY(I,0,J) = SNODEP(I,J) - ELSE IF ((SNODEP(I,J) > 0.05) .AND. (SNODEP(I,J) <= 0.10)) THEN - ISNOWXY(I,J) = -2 - DZSNOXY(I,-1,J) = SNODEP(I,J)/2. - DZSNOXY(I, 0,J) = SNODEP(I,J)/2. - ELSE IF ((SNODEP(I,J) > 0.10) .AND. (SNODEP(I,J) <= 0.25)) THEN - ISNOWXY(I,J) = -2 - DZSNOXY(I,-1,J) = 0.05 - DZSNOXY(I, 0,J) = SNODEP(I,J) - DZSNOXY(I,-1,J) - ELSE IF ((SNODEP(I,J) > 0.25) .AND. (SNODEP(I,J) <= 0.35)) THEN - ISNOWXY(I,J) = -3 - DZSNOXY(I,-2,J) = 0.05 - DZSNOXY(I,-1,J) = 0.5*(SNODEP(I,J)-DZSNOXY(I,-2,J)) - DZSNOXY(I, 0,J) = 0.5*(SNODEP(I,J)-DZSNOXY(I,-2,J)) - ELSE IF (SNODEP(I,J) > 0.35) THEN - ISNOWXY(I,J) = -3 - DZSNOXY(I,-2,J) = 0.05 - DZSNOXY(I,-1,J) = 0.10 - DZSNOXY(I, 0,J) = SNODEP(I,J) - DZSNOXY(I,-1,J) - DZSNOXY(I,-2,J) - END IF - END IF - ENDDO - ENDDO - - DO J = jts,jtf - DO I = its,itf - TSNOXY( I,-NSNOW+1:0,J) = 0. - SNICEXY(I,-NSNOW+1:0,J) = 0. - SNLIQXY(I,-NSNOW+1:0,J) = 0. - DO IZ = ISNOWXY(I,J)+1, 0 - TSNOXY(I,IZ,J) = tgxy(I,J) ! [k] - SNLIQXY(I,IZ,J) = 0.00 - SNICEXY(I,IZ,J) = 1.00 * DZSNOXY(I,IZ,J) * (SWE(I,J)/SNODEP(I,J)) ! [kg/m3] - END DO - - DO IZ = ISNOWXY(I,J)+1, 0 - DZSNSOXY(I,IZ,J) = -DZSNOXY(I,IZ,J) - END DO - - DZSNSOXY(I,1,J) = ZSOIL(1) - DO IZ = 2,NSOIL - DZSNSOXY(I,IZ,J) = (ZSOIL(IZ) - ZSOIL(IZ-1)) - END DO - - ZSNSOXY(I,ISNOWXY(I,J)+1,J) = DZSNSOXY(I,ISNOWXY(I,J)+1,J) - DO IZ = ISNOWXY(I,J)+2 ,NSOIL - ZSNSOXY(I,IZ,J) = ZSNSOXY(I,IZ-1,J) + DZSNSOXY(I,IZ,J) - ENDDO - - END DO - END DO - -END SUBROUTINE SNOW_INIT_new diff --git a/lis/surfacemodels/land/noahmp.new/phys/noahmp b/lis/surfacemodels/land/noahmp.new/phys/noahmp index 0234965da..186c61ee6 160000 --- a/lis/surfacemodels/land/noahmp.new/phys/noahmp +++ b/lis/surfacemodels/land/noahmp.new/phys/noahmp @@ -1 +1 @@ -Subproject commit 0234965da56d1f5b589f9bd8494335e877880aee +Subproject commit 186c61ee62cb0e7a929c3bf9d36f562c5bce3c0c From 52012eac0c0bf095ad8e21ea9037408a0d3298e9 Mon Sep 17 00:00:00 2001 From: cenlinhe Date: Tue, 25 Jul 2023 12:13:02 -0600 Subject: [PATCH 07/27] update DA and sublsm --- .../land/noahmp.new/NoahMPnew_main.F90 | 41 +- .../NoahMPnew_snowphys_updateMod.F90 | 496 +++++++++++++++++ ...fexport.F90 => noahMPnew_setwrfexport.F90} | 46 +- ...port.F90 => noahmpnew_getCROCUSexport.F90} | 21 +- ...t.F90 => noahmpnew_getSnowModelexport.F90} | 21 +- ...port.F90 => noahmpnew_setCROCUSimport.F90} | 17 +- ...t.F90 => noahmpnew_setSnowModelimport.F90} | 29 +- ..._daveg_Mod.F90 => noahmpnew_daveg_Mod.F90} | 16 +- ...cale_veg.F90 => noahmpnew_descale_veg.F90} | 10 +- ...etLAIpred.F90 => noahmpnew_getLAIpred.F90} | 14 +- ...etvegvars.F90 => noahmpnew_getvegvars.F90} | 12 +- ..._qc_LAIobs.F90 => noahmpnew_qc_LAIobs.F90} | 11 +- ...oahmp401_qcveg.F90 => noahmpnew_qcveg.F90} | 16 +- ..._scale_veg.F90 => noahmpnew_scale_veg.F90} | 10 +- ...etvegvars.F90 => noahmpnew_setvegvars.F90} | 20 +- ...egvars.F90 => noahmpnew_updatevegvars.F90} | 16 +- ..._veg_DAlog.F90 => noahmpnew_veg_DAlog.F90} | 4 +- ..._write_veg.F90 => noahmpnew_write_veg.F90} | 21 +- ...dep_Mod.F90 => noahmpnew_dasnodep_Mod.F90} | 16 +- ...nodep.F90 => noahmpnew_descale_snodep.F90} | 10 +- ...eppred.F90 => noahmpnew_getsnodeppred.F90} | 15 +- ...epvars.F90 => noahmpnew_getsnodepvars.F90} | 17 +- ...ap_snodep.F90 => noahmpnew_map_snodep.F90} | 35 +- ...odepobs.F90 => noahmpnew_qc_snodepobs.F90} | 23 +- ...01_qcsnodep.F90 => noahmpnew_qcsnodep.F90} | 19 +- ..._snodep.F90 => noahmpnew_scale_snodep.F90} | 11 +- ...epvars.F90 => noahmpnew_setsnodepvars.F90} | 21 +- ...update.F90 => noahmpnew_snodep_update.F90} | 169 +++--- ...dep.F90 => noahmpnew_transform_snodep.F90} | 17 +- ...ars.F90 => noahmpnew_updatesnodepvars.F90} | 21 +- ...asnow_Mod.F90 => noahmpnew_dasnow_Mod.F90} | 16 +- ...le_snow.F90 => noahmpnew_descale_snow.F90} | 10 +- ...snowpred.F90 => noahmpnew_getsnowpred.F90} | 13 +- ...snowvars.F90 => noahmpnew_getsnowvars.F90} | 15 +- ...etswepred.F90 => noahmpnew_getswepred.F90} | 13 +- ...c_snowobs.F90 => noahmpnew_qc_snowobs.F90} | 23 +- ...hmp401_qcsnow.F90 => noahmpnew_qcsnow.F90} | 19 +- ...cale_snow.F90 => noahmpnew_scale_snow.F90} | 10 +- ...snowvars.F90 => noahmpnew_setsnowvars.F90} | 19 +- ...w_update.F90 => noahmpnew_snow_update.F90} | 158 +++--- ...wvars.F90 => noahmpnew_updatesnowvars.F90} | 20 +- ...oilm_Mod.F90 => noahmpnew_dasoilm_Mod.F90} | 54 +- ..._soilm.F90 => noahmpnew_descale_soilm.F90} | 12 +- ..._getsmpred.F90 => noahmpnew_getsmpred.F90} | 39 +- ...01_getsoilm.F90 => noahmpnew_getsoilm.F90} | 38 +- ...soilmobs.F90 => noahmpnew_qc_soilmobs.F90} | 82 ++- ...p401_qcsoilm.F90 => noahmpnew_qcsoilm.F90} | 20 +- ...le_soilm.F90 => noahmpnew_scale_soilm.F90} | 12 +- ...01_setsoilm.F90 => noahmpnew_setsoilm.F90} | 205 ++++--- ...atesoilm.F90 => noahmpnew_updatesoilm.F90} | 42 +- ...te_soilm.F90 => noahmpnew_write_soilm.F90} | 21 +- ..._datws_Mod.F90 => noahmpnew_datws_Mod.F90} | 28 +- ...cale_tws.F90 => noahmpnew_descale_tws.F90} | 74 +-- ...hmp401_gettws.F90 => noahmpnew_gettws.F90} | 54 +- ...ettwspred.F90 => noahmpnew_gettwspred.F90} | 13 +- ..._qc_twsobs.F90 => noahmpnew_qc_twsobs.F90} | 11 +- ...oahmp401_qctws.F90 => noahmpnew_qctws.F90} | 53 +- ..._scale_tws.F90 => noahmpnew_scale_tws.F90} | 43 +- ...hmp401_settws.F90 => noahmpnew_settws.F90} | 148 ++--- ...AlogMod.F90 => noahmpnew_tws_DAlogMod.F90} | 61 +- ..._updatetws.F90 => noahmpnew_updatetws.F90} | 61 +- ..._write_tws.F90 => noahmpnew_write_tws.F90} | 21 +- .../da_usafsi/noahmpnew_transform_usafsi.F90 | 2 +- .../da_usafsi/noahmpnew_usafsi_update.F90 | 125 +++-- .../noahmpnew_getirrigationstates.F90 | 45 +- .../land/noahmp.new/noahmp_driver_new.F90 | 2 +- .../noahmp.new/pe/NoahMP401_set_pedecvars.F90 | 523 ----------------- ...oahMP401_peMod.F90 => NoahMPnew_peMod.F90} | 266 ++++----- .../noahmp.new/pe/NoahMPnew_set_pedecvars.F90 | 524 ++++++++++++++++++ ...0 => NoahMPnew_getpeobspred_UAsnowobs.F90} | 14 +- ...0 => NoahMPnew_setupobspred_UAsnowobs.F90} | 10 +- ...etrunoffs.F90 => noahmpnew_getrunoffs.F90} | 33 +- ...p2.F90 => noahmpnew_getrunoffs_hymap2.F90} | 33 +- ...ffs_mm.F90 => noahmpnew_getrunoffs_mm.F90} | 33 +- ...pid.F90 => noahmpnew_getrunoffs_rapid.F90} | 23 +- ...hymap2.F90 => noahmpnew_getsws_hymap2.F90} | 17 +- 76 files changed, 2397 insertions(+), 1856 deletions(-) create mode 100755 lis/surfacemodels/land/noahmp.new/NoahMPnew_snowphys_updateMod.F90 rename lis/surfacemodels/land/noahmp.new/cpl_wrf_noesmf/{noahMP401_setwrfexport.F90 => noahMPnew_setwrfexport.F90} (74%) rename lis/surfacemodels/land/noahmp.new/cplsubLSM/{noahmp401_getCROCUSexport.F90 => noahmpnew_getCROCUSexport.F90} (76%) rename lis/surfacemodels/land/noahmp.new/cplsubLSM/{noahmp401_getSnowModelexport.F90 => noahmpnew_getSnowModelexport.F90} (77%) rename lis/surfacemodels/land/noahmp.new/cplsubLSM/{noahmp401_setCROCUSimport.F90 => noahmpnew_setCROCUSimport.F90} (74%) rename lis/surfacemodels/land/noahmp.new/cplsubLSM/{noahmp401_setSnowModelimport.F90 => noahmpnew_setSnowModelimport.F90} (64%) rename lis/surfacemodels/land/noahmp.new/da_LAI/{noahmp401_daveg_Mod.F90 => noahmpnew_daveg_Mod.F90} (78%) rename lis/surfacemodels/land/noahmp.new/da_LAI/{noahmp401_descale_veg.F90 => noahmpnew_descale_veg.F90} (84%) rename lis/surfacemodels/land/noahmp.new/da_LAI/{noahmp401_getLAIpred.F90 => noahmpnew_getLAIpred.F90} (85%) rename lis/surfacemodels/land/noahmp.new/da_LAI/{noahmp401_getvegvars.F90 => noahmpnew_getvegvars.F90} (87%) rename lis/surfacemodels/land/noahmp.new/da_LAI/{noahmp401_qc_LAIobs.F90 => noahmpnew_qc_LAIobs.F90} (86%) rename lis/surfacemodels/land/noahmp.new/da_LAI/{noahmp401_qcveg.F90 => noahmpnew_qcveg.F90} (94%) rename lis/surfacemodels/land/noahmp.new/da_LAI/{noahmp401_scale_veg.F90 => noahmpnew_scale_veg.F90} (85%) rename lis/surfacemodels/land/noahmp.new/da_LAI/{noahmp401_setvegvars.F90 => noahmpnew_setvegvars.F90} (85%) rename lis/surfacemodels/land/noahmp.new/da_LAI/{noahmp401_updatevegvars.F90 => noahmpnew_updatevegvars.F90} (93%) rename lis/surfacemodels/land/noahmp.new/da_LAI/{noahmp401_veg_DAlog.F90 => noahmpnew_veg_DAlog.F90} (89%) rename lis/surfacemodels/land/noahmp.new/da_LAI/{noahmp401_write_veg.F90 => noahmpnew_write_veg.F90} (73%) rename lis/surfacemodels/land/noahmp.new/da_snodep/{noahmp401_dasnodep_Mod.F90 => noahmpnew_dasnodep_Mod.F90} (77%) rename lis/surfacemodels/land/noahmp.new/da_snodep/{noahmp401_descale_snodep.F90 => noahmpnew_descale_snodep.F90} (90%) rename lis/surfacemodels/land/noahmp.new/da_snodep/{noahmp401_getsnodeppred.F90 => noahmpnew_getsnodeppred.F90} (81%) rename lis/surfacemodels/land/noahmp.new/da_snodep/{noahmp401_getsnodepvars.F90 => noahmpnew_getsnodepvars.F90} (83%) rename lis/surfacemodels/land/noahmp.new/da_snodep/{noahmp401_map_snodep.F90 => noahmpnew_map_snodep.F90} (81%) rename lis/surfacemodels/land/noahmp.new/da_snodep/{noahmp401_qc_snodepobs.F90 => noahmpnew_qc_snodepobs.F90} (84%) rename lis/surfacemodels/land/noahmp.new/da_snodep/{noahmp401_qcsnodep.F90 => noahmpnew_qcsnodep.F90} (87%) rename lis/surfacemodels/land/noahmp.new/da_snodep/{noahmp401_scale_snodep.F90 => noahmpnew_scale_snodep.F90} (88%) rename lis/surfacemodels/land/noahmp.new/da_snodep/{noahmp401_setsnodepvars.F90 => noahmpnew_setsnodepvars.F90} (85%) rename lis/surfacemodels/land/noahmp.new/da_snodep/{noahmp401_snodep_update.F90 => noahmpnew_snodep_update.F90} (64%) rename lis/surfacemodels/land/noahmp.new/da_snodep/{noahmp401_transform_snodep.F90 => noahmpnew_transform_snodep.F90} (82%) rename lis/surfacemodels/land/noahmp.new/da_snodep/{noahmp401_updatesnodepvars.F90 => noahmpnew_updatesnodepvars.F90} (90%) rename lis/surfacemodels/land/noahmp.new/da_snow/{noahmp401_dasnow_Mod.F90 => noahmpnew_dasnow_Mod.F90} (78%) rename lis/surfacemodels/land/noahmp.new/da_snow/{noahmp401_descale_snow.F90 => noahmpnew_descale_snow.F90} (88%) rename lis/surfacemodels/land/noahmp.new/da_snow/{noahmp401_getsnowpred.F90 => noahmpnew_getsnowpred.F90} (84%) rename lis/surfacemodels/land/noahmp.new/da_snow/{noahmp401_getsnowvars.F90 => noahmpnew_getsnowvars.F90} (84%) rename lis/surfacemodels/land/noahmp.new/da_snow/{noahmp401_getswepred.F90 => noahmpnew_getswepred.F90} (78%) rename lis/surfacemodels/land/noahmp.new/da_snow/{noahmp401_qc_snowobs.F90 => noahmpnew_qc_snowobs.F90} (85%) rename lis/surfacemodels/land/noahmp.new/da_snow/{noahmp401_qcsnow.F90 => noahmpnew_qcsnow.F90} (88%) rename lis/surfacemodels/land/noahmp.new/da_snow/{noahmp401_scale_snow.F90 => noahmpnew_scale_snow.F90} (89%) rename lis/surfacemodels/land/noahmp.new/da_snow/{noahmp401_setsnowvars.F90 => noahmpnew_setsnowvars.F90} (81%) rename lis/surfacemodels/land/noahmp.new/da_snow/{noahmp401_snow_update.F90 => noahmpnew_snow_update.F90} (64%) rename lis/surfacemodels/land/noahmp.new/da_snow/{noahmp401_updatesnowvars.F90 => noahmpnew_updatesnowvars.F90} (90%) rename lis/surfacemodels/land/noahmp.new/da_soilm/{noahmp401_dasoilm_Mod.F90 => noahmpnew_dasoilm_Mod.F90} (63%) rename lis/surfacemodels/land/noahmp.new/da_soilm/{noahmp401_descale_soilm.F90 => noahmpnew_descale_soilm.F90} (81%) rename lis/surfacemodels/land/noahmp.new/da_soilm/{noahmp401_getsmpred.F90 => noahmpnew_getsmpred.F90} (69%) rename lis/surfacemodels/land/noahmp.new/da_soilm/{noahmp401_getsoilm.F90 => noahmpnew_getsoilm.F90} (80%) rename lis/surfacemodels/land/noahmp.new/da_soilm/{noahmp401_qc_soilmobs.F90 => noahmpnew_qc_soilmobs.F90} (79%) rename lis/surfacemodels/land/noahmp.new/da_soilm/{noahmp401_qcsoilm.F90 => noahmpnew_qcsoilm.F90} (85%) rename lis/surfacemodels/land/noahmp.new/da_soilm/{noahmp401_scale_soilm.F90 => noahmpnew_scale_soilm.F90} (82%) rename lis/surfacemodels/land/noahmp.new/da_soilm/{noahmp401_setsoilm.F90 => noahmpnew_setsoilm.F90} (70%) rename lis/surfacemodels/land/noahmp.new/da_soilm/{noahmp401_updatesoilm.F90 => noahmpnew_updatesoilm.F90} (75%) rename lis/surfacemodels/land/noahmp.new/da_soilm/{noahmp401_write_soilm.F90 => noahmpnew_write_soilm.F90} (75%) rename lis/surfacemodels/land/noahmp.new/da_tws/{noahmp401_datws_Mod.F90 => noahmpnew_datws_Mod.F90} (74%) rename lis/surfacemodels/land/noahmp.new/da_tws/{noahmp401_descale_tws.F90 => noahmpnew_descale_tws.F90} (79%) rename lis/surfacemodels/land/noahmp.new/da_tws/{noahmp401_gettws.F90 => noahmpnew_gettws.F90} (79%) rename lis/surfacemodels/land/noahmp.new/da_tws/{noahmp401_gettwspred.F90 => noahmpnew_gettwspred.F90} (85%) rename lis/surfacemodels/land/noahmp.new/da_tws/{noahmp401_qc_twsobs.F90 => noahmpnew_qc_twsobs.F90} (86%) rename lis/surfacemodels/land/noahmp.new/da_tws/{noahmp401_qctws.F90 => noahmpnew_qctws.F90} (84%) rename lis/surfacemodels/land/noahmp.new/da_tws/{noahmp401_scale_tws.F90 => noahmpnew_scale_tws.F90} (83%) rename lis/surfacemodels/land/noahmp.new/da_tws/{noahmp401_settws.F90 => noahmpnew_settws.F90} (65%) rename lis/surfacemodels/land/noahmp.new/da_tws/{noahmp401_tws_DAlogMod.F90 => noahmpnew_tws_DAlogMod.F90} (77%) rename lis/surfacemodels/land/noahmp.new/da_tws/{noahmp401_updatetws.F90 => noahmpnew_updatetws.F90} (81%) rename lis/surfacemodels/land/noahmp.new/da_tws/{noahmp401_write_tws.F90 => noahmpnew_write_tws.F90} (76%) delete mode 100755 lis/surfacemodels/land/noahmp.new/pe/NoahMP401_set_pedecvars.F90 rename lis/surfacemodels/land/noahmp.new/pe/{NoahMP401_peMod.F90 => NoahMPnew_peMod.F90} (66%) create mode 100755 lis/surfacemodels/land/noahmp.new/pe/NoahMPnew_set_pedecvars.F90 rename lis/surfacemodels/land/noahmp.new/pe/obspred/UAsnow/{NoahMP401_getpeobspred_UAsnowobs.F90 => NoahMPnew_getpeobspred_UAsnowobs.F90} (81%) rename lis/surfacemodels/land/noahmp.new/pe/obspred/UAsnow/{NoahMP401_setupobspred_UAsnowobs.F90 => NoahMPnew_setupobspred_UAsnowobs.F90} (86%) rename lis/surfacemodels/land/noahmp.new/routing/{noahmp401_getrunoffs.F90 => noahmpnew_getrunoffs.F90} (82%) rename lis/surfacemodels/land/noahmp.new/routing/{noahmp401_getrunoffs_hymap2.F90 => noahmpnew_getrunoffs_hymap2.F90} (81%) rename lis/surfacemodels/land/noahmp.new/routing/{noahmp401_getrunoffs_mm.F90 => noahmpnew_getrunoffs_mm.F90} (82%) rename lis/surfacemodels/land/noahmp.new/routing/{noahmp401_getrunoffs_rapid.F90 => noahmpnew_getrunoffs_rapid.F90} (80%) rename lis/surfacemodels/land/noahmp.new/routing/{noahmp401_getsws_hymap2.F90 => noahmpnew_getsws_hymap2.F90} (83%) diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_main.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_main.F90 index 465eeff7b..347729159 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_main.F90 +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_main.F90 @@ -203,21 +203,17 @@ subroutine NoahMPnew_main(n) write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon call LIS_endrun() endif - ! - - NoahmpIO%latitude = lat - NoahmpIO%longitude = lon - NoahmpIO%year = LIS_rc%yr - NoahmpIO%month = LIS_rc%mo - NoahmpIO%day = LIS_rc%da - NoahmpIO%hour = LIS_rc%hr - NoahmpIO%minute = LIS_rc%mn - - ! Added by Zhuo Wang on 11/13/2018 - NoahmpIO%ttile = t - NoahmpIO%itimestep = LIS_rc%tscount(n) ! get parameters + NoahmpIO%latitude = lat + NoahmpIO%longitude = lon + NoahmpIO%year = LIS_rc%yr + NoahmpIO%month = LIS_rc%mo + NoahmpIO%day = LIS_rc%da + NoahmpIO%hour = LIS_rc%hr + NoahmpIO%minute = LIS_rc%mn + NoahmpIO%ttile = t + NoahmpIO%itimestep = LIS_rc%tscount(n) NoahmpIO%dtbl = NoahMPnew_struc(n)%ts NoahmpIO%soiltstep = NoahMPnew_struc(n)%ts_soil NoahmpIO%dzs(:) = NoahMPnew_struc(n)%sldpth(:) @@ -225,8 +221,7 @@ subroutine NoahMPnew_main(n) NoahmpIO%nsnow = NoahMPnew_struc(n)%nsnow NoahmpIO%ivgtyp(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%vegetype NoahmpIO%isltyp(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%soiltype - ! Multiply shdfac by 100.0 because noahmpdrv.f90 - ! expects it in units of percentage, not fraction. + ! Multiply shdfac by 100.0 because noahmpdrv.f90, expects it in units of percentage, not fraction. NoahmpIO%shdfac_monthly(1,:,1) = NoahMPnew_struc(n)%noahmpnew(t)%shdfac_monthly(:) * 100.0 NoahmpIO%tmn(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%tbot NoahmpIO%urban_vegtype(1,1) = LIS_rc%urbanclass @@ -415,8 +410,8 @@ subroutine NoahMPnew_main(n) NoahmpIO%xsaixy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%sai endif else - NoahmpIO%lai(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%lai - NoahmpIO%xsaixy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%sai + NoahmpIO%lai(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%lai + NoahmpIO%xsaixy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%sai endif NoahmpIO%taussxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%tauss NoahmpIO%smoiseq(1,:,1) = NoahMPnew_struc(n)%noahmpnew(t)%smoiseq(:) @@ -549,8 +544,8 @@ subroutine NoahMPnew_main(n) NoahMPnew_struc(n)%noahmpnew(t)%chv2 = NoahmpIO%chv2xy(1,1) NoahMPnew_struc(n)%noahmpnew(t)%chb2 = NoahmpIO%chb2xy(1,1) NoahMPnew_struc(n)%noahmpnew(t)%infxs1rt = NoahmpIO%infxsrt(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%soldrain1rt = NoahmpIO%soldrain(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%sfcheadrt = NoahmpIO%sfcheadrt(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%soldrain1rt = NoahmpIO%soldrain(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%sfcheadrt = NoahmpIO%sfcheadrt(1,1) ! additional accumulated variables NoahMPnew_struc(n)%noahmpnew(t)%accssoil = NoahmpIO%ACC_SSOILXY(1,1) @@ -1130,14 +1125,14 @@ subroutine NoahMPnew_main(n) enddo ! reset forcing variables to zeros - NoahMPnew_struc(n)%noahmpnew(t)%tair = 0.0 - NoahMPnew_struc(n)%noahmpnew(t)%psurf = 0.0 + NoahMPnew_struc(n)%noahmpnew(t)%tair = 0.0 + NoahMPnew_struc(n)%noahmpnew(t)%psurf = 0.0 NoahMPnew_struc(n)%noahmpnew(t)%wind_e = 0.0 NoahMPnew_struc(n)%noahmpnew(t)%wind_n = 0.0 - NoahMPnew_struc(n)%noahmpnew(t)%qair = 0.0 + NoahMPnew_struc(n)%noahmpnew(t)%qair = 0.0 NoahMPnew_struc(n)%noahmpnew(t)%swdown = 0.0 NoahMPnew_struc(n)%noahmpnew(t)%lwdown = 0.0 - NoahMPnew_struc(n)%noahmpnew(t)%prcp = 0.0 + NoahMPnew_struc(n)%noahmpnew(t)%prcp = 0.0 enddo ! end of tile (t) loop ! reset forcing counter to be zero diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_snowphys_updateMod.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_snowphys_updateMod.F90 new file mode 100755 index 000000000..e52b3d08e --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_snowphys_updateMod.F90 @@ -0,0 +1,496 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !Module: NoahMPnew_snowphys_updateMod +! \label{NoahMPnew_snowphys_updateMod} +! +! !REVISION HISTORY: +! May 2023: Cenlin He; copied from NoahMP v4.5 (same physics as NoahMP v5.0) +! +! TODO: This is only for snow DA use. May need a better integration with NoahMP +! refactored source code directly. + +Module NoahMPnew_snowphys_updateMod + + use LisNoahmpParamType + + implicit none + +contains + +! ------ snow compaction subroutine copied from NoahMP v4.5 (same physics as v5.0) + subroutine Compact (parameters,NSNOW ,NSOIL ,DT ,STC ,SNICE , & !in + SNLIQ ,ZSOIL ,IMELT ,FICEOLD,ILOC , JLOC , & !in + ISNOW ,DZSNSO ,ZSNSO ) !inout +! ---------------------------------------------------------------------- + IMPLICIT NONE +! ---------------------------------------------------------------------- +! input + type (LisNoahmpParam_type), INTENT(IN) :: parameters + INTEGER, INTENT(IN) :: ILOC !grid index + INTEGER, INTENT(IN) :: JLOC !grid index + INTEGER, INTENT(IN) :: NSOIL !no. of soil layers [ =4] + INTEGER, INTENT(IN) :: NSNOW !maximum no. of snow layers [ =3] + INTEGER, DIMENSION(-NSNOW+1:0) , INTENT(IN) :: IMELT !melting state index [0-no melt;1-melt] + REAL, INTENT(IN) :: DT !time step (sec) + REAL, DIMENSION(-NSNOW+1:NSOIL), INTENT(IN) :: STC !snow layer temperature [k] + REAL, DIMENSION(-NSNOW+1: 0), INTENT(IN) :: SNICE !snow layer ice [mm] + REAL, DIMENSION(-NSNOW+1: 0), INTENT(IN) :: SNLIQ !snow layer liquid water [mm] + REAL, DIMENSION( 1:NSOIL), INTENT(IN) :: ZSOIL !depth of layer-bottom from soil srf + REAL, DIMENSION(-NSNOW+1: 0), INTENT(IN) :: FICEOLD!ice fraction at last timestep + +! input and output + INTEGER, INTENT(INOUT) :: ISNOW ! actual no. of snow layers + REAL, DIMENSION(-NSNOW+1:NSOIL), INTENT(INOUT) :: DZSNSO ! snow layer thickness [m] + REAL, DIMENSION(-NSNOW+1:NSOIL), INTENT(INOUT) :: ZSNSO ! depth of snow/soil layer-bottom + +! local + real, parameter :: TFRZ = 273.16 !freezing/melting point (k) + real, parameter :: DENH2O = 1000.0 !density of water (kg/m3) + REAL, PARAMETER :: DENICE = 917.0 !density of ice (kg/m3) + REAL, PARAMETER :: C2 = 21.0e-3 ![m3/kg] ! default 21.e-3 + REAL, PARAMETER :: C3 = 2.5e-6 ![1/s] + REAL, PARAMETER :: C4 = 0.04 ![1/k] + REAL, PARAMETER :: C5 = 2.0 ! + REAL, PARAMETER :: DM = 100.0 !upper Limit on destructive metamorphism compaction [kg/m3] +! REAL, PARAMETER :: ETA0 = 0.8e+6 !viscosity coefficient [kg-s/m2] + !according to Anderson, it is between 0.52e6~1.38e6 + REAL, PARAMETER :: ETA0 = 1.33e+6 ! C.He: optimized based on SNOTEL obs (He et al. 2021 JGR) + REAL :: BURDEN !pressure of overlying snow [kg/m2] + REAL :: DDZ1 !rate of settling of snow pack due to destructive metamorphism. + REAL :: DDZ2 !rate of compaction of snow pack due to overburden. + REAL :: DDZ3 !rate of compaction of snow pack due to melt [1/s] + REAL :: DEXPF !EXPF=exp(-c4*(273.15-STC)). + REAL :: TD !STC - TFRZ [K] + REAL :: PDZDTC !nodal rate of change in fractional-thickness due to compaction [fraction/s] + REAL :: VOID !void (1 - SNICE - SNLIQ) + REAL :: WX !water mass (ice + liquid) [kg/m2] + REAL :: BI !partial density of ice [kg/m3] + REAL, DIMENSION(-NSNOW+1:0) :: FICE !fraction of ice at current time step + + INTEGER :: J + +! ---------------------------------------------------------------------- + BURDEN = 0.0 + + DO J = ISNOW+1, 0 + + WX = SNICE(J) + SNLIQ(J) + FICE(J) = SNICE(J) / WX + VOID = 1.0 - (SNICE(J)/DENICE + SNLIQ(J)/DENH2O) / DZSNSO(J) + + ! Allow compaction only for non-saturated node and higher ice lens node. + IF (VOID > 0.001 .AND. SNICE(J) > 0.1) THEN + BI = SNICE(J) / DZSNSO(J) + TD = MAX(0.0,TFRZ-STC(J)) + DEXPF = EXP(-C4*TD) + + ! Settling as a result of destructive metamorphism + + DDZ1 = -C3*DEXPF + + IF (BI > DM) DDZ1 = DDZ1*EXP(-46.0E-3*(BI-DM)) + + ! Liquid water term + + IF (SNLIQ(J) > 0.01*DZSNSO(J)) DDZ1=DDZ1*C5 + + ! Compaction due to overburden + + DDZ2 = -(BURDEN+0.5*WX)*EXP(-0.08*TD-C2*BI)/ETA0 ! 0.5*WX -> self-burden + + ! Compaction occurring during melt + + IF (IMELT(J) == 1) THEN + DDZ3 = MAX(0.0,(FICEOLD(J) - FICE(J))/MAX(1.0E-6,FICEOLD(J))) + DDZ3 = - DDZ3/DT ! sometimes too large + ELSE + DDZ3 = 0.0 + END IF + + ! Time rate of fractional change in DZ (units of s-1) + + PDZDTC = (DDZ1 + DDZ2 + DDZ3)*DT + PDZDTC = MAX(-0.5,PDZDTC) + + ! The change in DZ due to compaction + + DZSNSO(J) = DZSNSO(J)*(1.0+PDZDTC) + DZSNSO(J) = max(DZSNSO(J),SNICE(J)/DENICE + SNLIQ(J)/DENH2O) + + ! C.He: constrain snow density to a reasonable range (50~500 kg/m3) + DZSNSO(J) = MIN(MAX(DZSNSO(J),(SNICE(J)+SNLIQ(J))/500.0),(SNICE(J)+SNLIQ(J))/50.0) + + END IF + + ! Pressure of overlying snow + + BURDEN = BURDEN + WX + + END DO + + end subroutine Compact + + +! ------ snow layer combination subroutine copied from NoahMP v4.5 (same physics as v5.0) + subroutine Combine (parameters,NSNOW ,NSOIL ,ILOC ,JLOC , & !in + ISNOW ,SH2O ,STC ,SNICE ,SNLIQ , & !inout + DZSNSO ,SICE ,SNOWH ,SNEQV , & !inout + PONDING1 ,PONDING2) !out +! ---------------------------------------------------------------------- + IMPLICIT NONE +! ---------------------------------------------------------------------- +! input + type (LisNoahmpParam_type), INTENT(IN) :: parameters + INTEGER, INTENT(IN) :: ILOC + INTEGER, INTENT(IN) :: JLOC + INTEGER, INTENT(IN) :: NSNOW !maximum no. of snow layers + INTEGER, INTENT(IN) :: NSOIL !no. of soil layers +! input and output + INTEGER, INTENT(INOUT) :: ISNOW !actual no. of snow layers + REAL, DIMENSION( 1:NSOIL), INTENT(INOUT) :: SH2O !soil liquid moisture (m3/m3) + REAL, DIMENSION( 1:NSOIL), INTENT(INOUT) :: SICE !soil ice moisture (m3/m3) + REAL, DIMENSION(-NSNOW+1:NSOIL), INTENT(INOUT) :: STC !snow layer temperature [k] + REAL, DIMENSION(-NSNOW+1: 0), INTENT(INOUT) :: SNICE !snow layer ice [mm] + REAL, DIMENSION(-NSNOW+1: 0), INTENT(INOUT) :: SNLIQ !snow layer liquid water [mm] + REAL, DIMENSION(-NSNOW+1:NSOIL), INTENT(INOUT) :: DZSNSO!snow layer depth [m] + REAL, INTENT(INOUT) :: sneqv !snow water equivalent [m] + REAL, INTENT(INOUT) :: snowh !snow depth [m] + REAL, INTENT(OUT) :: PONDING1 + REAL, INTENT(OUT) :: PONDING2 + +! local variables: + INTEGER :: I,J,K,L ! node indices + INTEGER :: ISNOW_OLD ! number of top snow layer + INTEGER :: MSSI ! node index + INTEGER :: NEIBOR ! adjacent node selected for combination + REAL :: ZWICE ! total ice mass in snow + REAL :: ZWLIQ ! total liquid water in snow + + REAL :: DZMIN(3) ! minimum of top snow layer +! DATA DZMIN /0.045, 0.05, 0.2/ + DATA DZMIN /0.025, 0.025, 0.1/ ! MB: change limit +!----------------------------------------------------------------------- + + ISNOW_OLD = ISNOW + + DO J = ISNOW_OLD+1,0 + IF (SNICE(J) <= 0.1) THEN + IF(J /= 0) THEN + SNLIQ(J+1) = SNLIQ(J+1) + SNLIQ(J) + SNICE(J+1) = SNICE(J+1) + SNICE(J) + DZSNSO(J+1) = DZSNSO(J+1) + DZSNSO(J) + ELSE + IF (ISNOW_OLD < -1) THEN ! MB/KM: change to ISNOW + SNLIQ(J-1) = SNLIQ(J-1) + SNLIQ(J) + SNICE(J-1) = SNICE(J-1) + SNICE(J) + DZSNSO(J-1) = DZSNSO(J-1) + DZSNSO(J) + ELSE + IF(SNICE(J) >= 0.0) THEN + PONDING1 = SNLIQ(J) ! ISNOW WILL GET SET TO ZERO BELOW; PONDING1 WILL GET + SNEQV = SNICE(J) ! ADDED TO PONDING FROM PHASECHANGE PONDING SHOULD BE + SNOWH = DZSNSO(J) ! ZERO HERE BECAUSE IT WAS CALCULATED FOR THIN SNOW + ELSE ! SNICE OVER-SUBLIMATED EARLIER + PONDING1 = SNLIQ(J) + SNICE(J) + IF(PONDING1 < 0.0) THEN ! IF SNICE AND SNLIQ SUBLIMATES REMOVE FROM SOIL + SICE(1) = SICE(1)+PONDING1/(DZSNSO(1)*1000.0) ! negative SICE due to oversublimation is adjusted below + PONDING1 = 0.0 + END IF + SNEQV = 0.0 + SNOWH = 0.0 + END IF + SNLIQ(J) = 0.0 + SNICE(J) = 0.0 + DZSNSO(J) = 0.0 + ENDIF +! SH2O(1) = SH2O(1)+SNLIQ(J)/(DZSNSO(1)*1000.0) +! SICE(1) = SICE(1)+SNICE(J)/(DZSNSO(1)*1000.0) + ENDIF + + ! shift all elements above this down by one. + IF (J > ISNOW+1 .AND. ISNOW < -1) THEN + DO I = J, ISNOW+2, -1 + STC(I) = STC(I-1) + SNLIQ(I) = SNLIQ(I-1) + SNICE(I) = SNICE(I-1) + DZSNSO(I)= DZSNSO(I-1) + END DO + END IF + ISNOW = ISNOW + 1 + END IF + END DO + +! to conserve water in case of too large surface sublimation + + IF(SICE(1) < 0.0) THEN + SH2O(1) = SH2O(1) + SICE(1) + SICE(1) = 0.0 + END IF + + IF(ISNOW ==0) RETURN ! MB: get out if no longer multi-layer + + SNEQV = 0.0 + SNOWH = 0.0 + ZWICE = 0.0 + ZWLIQ = 0.0 + + DO J = ISNOW+1,0 + SNEQV = SNEQV + SNICE(J) + SNLIQ(J) + SNOWH = SNOWH + DZSNSO(J) + ZWICE = ZWICE + SNICE(J) + ZWLIQ = ZWLIQ + SNLIQ(J) + END DO + +! check the snow depth - all snow gone +! the liquid water assumes ponding on soil surface. + + IF (SNOWH < 0.025 .AND. ISNOW < 0 ) THEN ! MB: change limit +! IF (SNOWH < 0.05 .AND. ISNOW < 0 ) THEN + ISNOW = 0 + SNEQV = ZWICE + PONDING2 = ZWLIQ ! LIMIT OF ISNOW < 0 MEANS INPUT PONDING + IF(SNEQV <= 0.0) SNOWH = 0.0 ! SHOULD BE ZERO; SEE ABOVE + END IF + + +! check the snow depth - snow layers combined + + IF (ISNOW < -1) THEN + + ISNOW_OLD = ISNOW + MSSI = 1 + + DO I = ISNOW_OLD+1,0 + IF (DZSNSO(I) < DZMIN(MSSI)) THEN + + IF (I == ISNOW+1) THEN + NEIBOR = I + 1 + ELSE IF (I == 0) THEN + NEIBOR = I - 1 + ELSE + NEIBOR = I + 1 + IF ((DZSNSO(I-1)+DZSNSO(I)) < (DZSNSO(I+1)+DZSNSO(I))) NEIBOR = I-1 + END IF + + ! Node l and j are combined and stored as node j. + IF (NEIBOR > I) THEN + J = NEIBOR + L = I + ELSE + J = I + L = NEIBOR + END IF + + CALL COMBO (parameters,DZSNSO(J), SNLIQ(J), SNICE(J), & + STC(J), DZSNSO(L), SNLIQ(L), SNICE(L), STC(L) ) + + ! Now shift all elements above this down one. + IF (J-1 > ISNOW+1) THEN + DO K = J-1, ISNOW+2, -1 + STC(K) = STC(K-1) + SNICE(K) = SNICE(K-1) + SNLIQ(K) = SNLIQ(K-1) + DZSNSO(K) = DZSNSO(K-1) + END DO + END IF + + ! Decrease the number of snow layers + ISNOW = ISNOW + 1 + IF (ISNOW >= -1) EXIT + ELSE + + ! The layer thickness is greater than the prescribed minimum value + MSSI = MSSI + 1 + + END IF + END DO + + END IF + + end subroutine Combine + + +! ------ snow layer division subroutine copied from NoahMP v4.5 (same physics as v5.0) + subroutine Divide (parameters,NSNOW ,NSOIL , & !in + ISNOW ,STC ,SNICE ,SNLIQ ,DZSNSO ) !inout +! ---------------------------------------------------------------------- + IMPLICIT NONE +! ---------------------------------------------------------------------- +! input + type (LisNoahmpParam_type), INTENT(IN) :: parameters + INTEGER, INTENT(IN) :: NSNOW !maximum no. of snow layers [ =3] + INTEGER, INTENT(IN) :: NSOIL !no. of soil layers [ =4] + +! input and output + INTEGER , INTENT(INOUT) :: ISNOW !actual no. of snow layers + REAL, DIMENSION(-NSNOW+1:NSOIL), INTENT(INOUT) :: STC !snow layer temperature [k] + REAL, DIMENSION(-NSNOW+1: 0), INTENT(INOUT) :: SNICE !snow layer ice [mm] + REAL, DIMENSION(-NSNOW+1: 0), INTENT(INOUT) :: SNLIQ !snow layer liquid water [mm] + REAL, DIMENSION(-NSNOW+1:NSOIL), INTENT(INOUT) :: DZSNSO!snow layer depth [m] + +! local variables: + INTEGER :: J !indices + INTEGER :: MSNO !number of layer (top) to MSNO (bot) + REAL :: DRR !thickness of the combined [m] + REAL, DIMENSION( 1:NSNOW) :: DZ !snow layer thickness [m] + REAL, DIMENSION( 1:NSNOW) :: SWICE !partial volume of ice [m3/m3] + REAL, DIMENSION( 1:NSNOW) :: SWLIQ !partial volume of liquid water [m3/m3] + REAL, DIMENSION( 1:NSNOW) :: TSNO !node temperature [k] + REAL :: ZWICE !temporary + REAL :: ZWLIQ !temporary + REAL :: PROPOR!temporary + REAL :: DTDZ !temporary +! ---------------------------------------------------------------------- + + DO J = 1,NSNOW + IF (J <= ABS(ISNOW)) THEN + DZ(J) = DZSNSO(J+ISNOW) + SWICE(J) = SNICE(J+ISNOW) + SWLIQ(J) = SNLIQ(J+ISNOW) + TSNO(J) = STC(J+ISNOW) + END IF + END DO + + MSNO = ABS(ISNOW) + + IF (MSNO == 1) THEN + ! Specify a new snow layer + IF (DZ(1) > 0.05) THEN + MSNO = 2 + DZ(1) = DZ(1)/2.0 + SWICE(1) = SWICE(1)/2.0 + SWLIQ(1) = SWLIQ(1)/2.0 + DZ(2) = DZ(1) + SWICE(2) = SWICE(1) + SWLIQ(2) = SWLIQ(1) + TSNO(2) = TSNO(1) + END IF + END IF + + IF (MSNO > 1) THEN + IF (DZ(1) > 0.05) THEN + DRR = DZ(1) - 0.05 + PROPOR = DRR/DZ(1) + ZWICE = PROPOR*SWICE(1) + ZWLIQ = PROPOR*SWLIQ(1) + PROPOR = 0.05/DZ(1) + SWICE(1) = PROPOR*SWICE(1) + SWLIQ(1) = PROPOR*SWLIQ(1) + DZ(1) = 0.05 + + CALL COMBO (parameters,DZ(2), SWLIQ(2), SWICE(2), TSNO(2), DRR, & + ZWLIQ, ZWICE, TSNO(1)) + + ! subdivide a new layer + IF (MSNO <= 2 .AND. DZ(2) > 0.20) THEN ! MB: change limit +! IF (MSNO <= 2 .AND. DZ(2) > 0.10) THEN + MSNO = 3 + DTDZ = (TSNO(1) - TSNO(2))/((DZ(1)+DZ(2))/2.0) + DZ(2) = DZ(2)/2.0 + SWICE(2) = SWICE(2)/2.0 + SWLIQ(2) = SWLIQ(2)/2.0 + DZ(3) = DZ(2) + SWICE(3) = SWICE(2) + SWLIQ(3) = SWLIQ(2) + TSNO(3) = TSNO(2) - DTDZ*DZ(2)/2.0 + IF (TSNO(3) >= TFRZ) THEN + TSNO(3) = TSNO(2) + ELSE + TSNO(2) = TSNO(2) + DTDZ*DZ(2)/2.0 + ENDIF + + END IF + END IF + END IF + + IF (MSNO > 2) THEN + IF (DZ(2) > 0.2) THEN + DRR = DZ(2) - 0.2 + PROPOR = DRR/DZ(2) + ZWICE = PROPOR*SWICE(2) + ZWLIQ = PROPOR*SWLIQ(2) + PROPOR = 0.2/DZ(2) + SWICE(2) = PROPOR*SWICE(2) + SWLIQ(2) = PROPOR*SWLIQ(2) + DZ(2) = 0.2 + CALL COMBO (parameters,DZ(3), SWLIQ(3), SWICE(3), TSNO(3), DRR, & + ZWLIQ, ZWICE, TSNO(2)) + END IF + END IF + + ISNOW = -MSNO + + DO J = ISNOW+1,0 + DZSNSO(J) = DZ(J-ISNOW) + SNICE(J) = SWICE(J-ISNOW) + SNLIQ(J) = SWLIQ(J-ISNOW) + STC(J) = TSNO(J-ISNOW) + END DO + + end subroutine Divide + + +! ------ snow layer combo subroutine copied from NoahMP v4.5 (same physics as v5.0) + subroutine Combo(parameters,DZ, WLIQ, WICE, T, DZ2, WLIQ2, WICE2, T2) + +! ---------------------------------------------------------------------- + IMPLICIT NONE +! ---------------------------------------------------------------------- +! input + type (LisNoahmpParam_type), INTENT(IN) :: parameters + + REAL, INTENT(IN) :: DZ2 !nodal thickness of 2 elements being combined [m] + REAL, INTENT(IN) :: WLIQ2 !liquid water of element 2 [kg/m2] + REAL, INTENT(IN) :: WICE2 !ice of element 2 [kg/m2] + REAL, INTENT(IN) :: T2 !nodal temperature of element 2 [k] + REAL, INTENT(INOUT) :: DZ !nodal thickness of 1 elements being combined [m] + REAL, INTENT(INOUT) :: WLIQ !liquid water of element 1 + REAL, INTENT(INOUT) :: WICE !ice of element 1 [kg/m2] + REAL, INTENT(INOUT) :: T !node temperature of element 1 [k] + + real, parameter :: CICE = 2.094E06 !specific heat capacity of ice (j/m3/k) + real, parameter :: CWAT = 4.188E06 !specific heat capacity of water (j/m3/k) + real, parameter :: TFRZ = 273.16 !freezing/melting point (k) + real, parameter :: HFUS = 0.3336E06 !latent heat of fusion (j/kg) + +! local + REAL :: DZC !total thickness of nodes 1 and 2 (DZC=DZ+DZ2). + REAL :: WLIQC !combined liquid water [kg/m2] + REAL :: WICEC !combined ice [kg/m2] + REAL :: TC !combined node temperature [k] + REAL :: H !enthalpy of element 1 [J/m2] + REAL :: H2 !enthalpy of element 2 [J/m2] + REAL :: HC !temporary + +!----------------------------------------------------------------------- + + DZC = DZ+DZ2 + WICEC = (WICE+WICE2) + WLIQC = (WLIQ+WLIQ2) + H = (CICE*WICE+CWAT*WLIQ) * (T-TFRZ)+HFUS*WLIQ + H2= (CICE*WICE2+CWAT*WLIQ2) * (T2-TFRZ)+HFUS*WLIQ2 + + HC = H + H2 + IF(HC < 0.0)THEN + TC = TFRZ + HC/(CICE*WICEC + CWAT*WLIQC) + ELSE IF (HC.LE.HFUS*WLIQC) THEN + TC = TFRZ + ELSE + TC = TFRZ + (HC - HFUS*WLIQC) / (CICE*WICEC + CWAT*WLIQC) + END IF + + DZ = DZC + WICE = WICEC + WLIQ = WLIQC + T = TC + + end subroutine Combo + +end module NoahMPnew_snowphys_updateMod diff --git a/lis/surfacemodels/land/noahmp.new/cpl_wrf_noesmf/noahMP401_setwrfexport.F90 b/lis/surfacemodels/land/noahmp.new/cpl_wrf_noesmf/noahMPnew_setwrfexport.F90 similarity index 74% rename from lis/surfacemodels/land/noahmp.new/cpl_wrf_noesmf/noahMP401_setwrfexport.F90 rename to lis/surfacemodels/land/noahmp.new/cpl_wrf_noesmf/noahMPnew_setwrfexport.F90 index e81a4b346..9b59dd1b5 100755 --- a/lis/surfacemodels/land/noahmp.new/cpl_wrf_noesmf/noahMP401_setwrfexport.F90 +++ b/lis/surfacemodels/land/noahmp.new/cpl_wrf_noesmf/noahMPnew_setwrfexport.F90 @@ -9,10 +9,10 @@ !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP ! -! !ROUTINE: noahMP401_setwrfexport.F90 +! !ROUTINE: NoahMPnew_setwrfexport.F90 ! ! !DESCRIPTION: -! Defines the export states from Noah to WRF in coupled mode +! Defines the export states from NoahMP to WRF in coupled mode ! surface albedo (albedo) ! soil moisture content (smc 1:4) ! soil temperature (stc 1:4) @@ -27,17 +27,17 @@ ! 02 Dec 2003; Sujay Kumar, Initial Version ! 17 Nov 2008; Sujay Kumar, Modified for the ESMF coupled version ! 28 Jun 2018; Chandana Gangodagamage Modified for the NoahMP.3.6 +! May 2023: Cenlin He, modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahMP401_setwrfexport(n) +subroutine NoahMPnew_setwrfexport(n) ! !USES: use ESMF use LIS_coreMod use LIS_historyMod, only : LIS_patch2tile use LIS_logMod use LISWRFGridCompMod, only : LISWRF_export -! use noah33_lsmMod - use NoahMP401_lsmMod + use NoahMPnew_lsmMod implicit none ! !ARGUMENTS: @@ -49,77 +49,77 @@ subroutine noahMP401_setwrfexport(n) allocate(temp(LIS_rc%npatch(n,LIS_rc%lsm_index))) ! surface albedo call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%albedo_t,& - NOAHMP401_struc(n)%noahmp401%albedo) + NoahMPnew_struc(n)%noahmpnew%albedo) #ifdef WRF_HYDRO ! infiltration excess call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%infxsrt_t,& - NOAHMP401_struc(n)%noahmp401%infxs1rt) + NoahMPnew_struc(n)%noahmpnew%infxs1rt) ! soil drainage call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%soldrain_t,& - NOAHMP401_struc(n)%noahmp401%soldrain1rt) + NoahMPnew_struc(n)%noahmpnew%soldrain1rt) #endif ! soil moisture content layers 1:4 do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - temp(i) = NOAHMP401_struc(n)%noahmp401(i)%smc(1) + temp(i) = NoahMPnew_struc(n)%noahmpnew(i)%smc(1) enddo call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%smc1_t,& temp) do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - temp(i) = NOAHMP401_struc(n)%noahmp401(i)%smc(2) + temp(i) = NoahMPnew_struc(n)%noahmpnew(i)%smc(2) enddo call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%smc2_t,& temp) do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - temp(i) = NOAHMP401_struc(n)%noahmp401(i)%smc(3) + temp(i) = NoahMPnew_struc(n)%noahmpnew(i)%smc(3) enddo call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%smc3_t,& temp) do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - temp(i) = NOAHMP401_struc(n)%noahmp401(i)%smc(4) + temp(i) = NoahMPnew_struc(n)%noahmpnew(i)%smc(4) enddo call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%smc4_t,& temp) do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - temp(i) = NOAHMP401_struc(n)%noahmp401(i)%tslb(1) + temp(i) = NoahMPnew_struc(n)%noahmpnew(i)%tslb(1) enddo ! soil temperature layers 1:4 call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%stc1_t,temp) do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - temp(i) = NOAHMP401_struc(n)%noahmp401(i)%tslb(2) + temp(i) = NoahMPnew_struc(n)%noahmpnew(i)%tslb(2) enddo call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%stc2_t,temp) do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - temp(i) = NOAHMP401_struc(n)%noahmp401(i)%tslb(3) + temp(i) = NoahMPnew_struc(n)%noahmpnew(i)%tslb(3) enddo call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%stc3_t,temp) do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - temp(i) = NOAHMP401_struc(n)%noahmp401(i)%tslb(4) + temp(i) = NoahMPnew_struc(n)%noahmpnew(i)%tslb(4) enddo call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%stc4_t,temp) ! snow water equivalent call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%snow_t,& - NOAHMP401_struc(n)%noahmp401%sneqv*1000.0) + NoahMPnew_struc(n)%noahmpnew%sneqv*1000.0) ! snow height NUWRF EMK call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%snowh_t,& - NOAHMP401_struc(n)%noahmp401%snowh) + NoahMPnew_struc(n)%noahmpnew%snowh) ! volumetric liquid soil moisture layers 1:4 do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - temp(i) = NOAHMP401_struc(n)%noahmp401(i)%sh2o(1) + temp(i) = NoahMPnew_struc(n)%noahmpnew(i)%sh2o(1) enddo call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%sh2o1_t,temp) do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - temp(i) = NOAHMP401_struc(n)%noahmp401(i)%sh2o(2) + temp(i) = NoahMPnew_struc(n)%noahmpnew(i)%sh2o(2) enddo call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%sh2o2_t,temp) do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - temp(i) = NOAHMP401_struc(n)%noahmp401(i)%sh2o(3) + temp(i) = NoahMPnew_struc(n)%noahmpnew(i)%sh2o(3) enddo call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%sh2o3_t,temp) do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - temp(i) = NOAHMP401_struc(n)%noahmp401(i)%sh2o(4) + temp(i) = NoahMPnew_struc(n)%noahmpnew(i)%sh2o(4) enddo call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%sh2o4_t,temp) deallocate(temp) -end subroutine noahMP401_setwrfexport +end subroutine NoahMPnew_setwrfexport diff --git a/lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmp401_getCROCUSexport.F90 b/lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmpnew_getCROCUSexport.F90 similarity index 76% rename from lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmp401_getCROCUSexport.F90 rename to lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmpnew_getCROCUSexport.F90 index 1241fa81e..26dcaab39 100644 --- a/lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmp401_getCROCUSexport.F90 +++ b/lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmpnew_getCROCUSexport.F90 @@ -8,21 +8,22 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_getCROCUSexport -! \label{noahmp401_getCROCUSexport} +! !ROUTINE: noahmpnew_getCROCUSexport +! \label{noahmpnew_getCROCUSexport} ! ! !REVISION HISTORY: ! 19 Sep 2020: Sujay Kumar; Initial Specification ! 17 Nov 2020: Mahdi Navari; In analogous to ISBA-Crocus %tgb replaced with %tslb ! 2 Dec 2020: Mahdi Navari; Edited to add soil volumetric liquid and frozen water content +! May 2023: Cenlin He; modified to work with refactored Noah-MP v5 and later ! ! !INTERFACE: -subroutine noahmp401_getCROCUSexport(n, LSM2SUBLSM_State) +subroutine noahmpnew_getCROCUSexport(n, LSM2SUBLSM_State) ! !USES: use ESMF use LIS_coreMod use LIS_logMod - use noahmp401_lsmMod + use noahmpnew_lsmMod implicit none ! !ARGUMENTS: @@ -62,13 +63,11 @@ subroutine noahmp401_getCROCUSexport(n, LSM2SUBLSM_State) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - gt(t) = NOAHMP401_struc(n)%noahmp401(t)%tslb(1) - !gt(t) = NOAHMP401_struc(n)%noahmp401(t)%tgb - XWGI(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(1) - NOAHMP401_struc(n)%noahmp401(t)%sh2o(1) ! volumetric frozen soil moisture [m3/m3] - XWG(t) = NOAHMP401_struc(n)%noahmp401(t)%sh2o(1) ! volumetric liquid soil moisture [m3/m3] + gt(t) = NoahMPnew_struc(n)%noahmpnew(t)%tslb(1) + !gt(t) = NoahMPnew_struc(n)%noahmpnew(t)%tgb + XWGI(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(1) - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(1) ! volumetric frozen soil moisture [m3/m3] + XWG(t) = NoahMPnew_struc(n)%noahmpnew(t)%sh2o(1) ! volumetric liquid soil moisture [m3/m3] enddo -end subroutine noahmp401_getCROCUSexport - - +end subroutine noahmpnew_getCROCUSexport diff --git a/lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmp401_getSnowModelexport.F90 b/lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmpnew_getSnowModelexport.F90 similarity index 77% rename from lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmp401_getSnowModelexport.F90 rename to lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmpnew_getSnowModelexport.F90 index 8346a1798..3b853126a 100644 --- a/lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmp401_getSnowModelexport.F90 +++ b/lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmpnew_getSnowModelexport.F90 @@ -8,22 +8,23 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_getSnowModelexport -! \label{noahmp401_getSnowModelexport} +! !ROUTINE: noahmpnew_getSnowModelexport +! \label{noahmpnew_getSnowModelexport} ! ! !REVISION HISTORY: ! 19 Sep 2020: Sujay Kumar; Initial Specification ! 17 Nov 2020: Mahdi Navari; In analogous to ISBA-Crocus %tgb replaced with %tslb ! 2 Dec 2020: Mahdi Navari; Edited to add soil volumetric liquid and frozen water content ! 12 Aug 2021: Kristi Arsenault; Added SnowModel connections +! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmp401_getSnowModelexport(n, LSM2SUBLSM_State) +subroutine noahmpnew_getSnowModelexport(n, LSM2SUBLSM_State) ! !USES: use ESMF use LIS_coreMod use LIS_logMod - use noahmp401_lsmMod + use NoahMPnew_lsmMod implicit none ! !ARGUMENTS: @@ -59,17 +60,15 @@ subroutine noahmp401_getSnowModelexport(n, LSM2SUBLSM_State) call ESMF_FieldGet(XWGIField,localDE=0,farrayPtr=XWGI,rc=status) call LIS_verify(status) - - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - gt(t) = NOAHMP401_struc(n)%noahmp401(t)%tslb(1) - !gt(t) = NOAHMP401_struc(n)%noahmp401(t)%tgb - XWGI(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(1) - NOAHMP401_struc(n)%noahmp401(t)%sh2o(1) ! volumetric frozen soil moisture [m3/m3] - XWG(t) = NOAHMP401_struc(n)%noahmp401(t)%sh2o(1) ! volumetric liquid soil moisture [m3/m3] + gt(t) = NoahMPnew_struc(n)%noahmpnew(t)%tslb(1) + !gt(t) = NoahMPnew_struc(n)%noahmpnew(t)%tgb + XWGI(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(1) - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(1) ! volumetric frozen soil moisture [m3/m3] + XWG(t) = NoahMPnew_struc(n)%noahmpnew(t)%sh2o(1) ! volumetric liquid soil moisture [m3/m3] enddo #endif -end subroutine noahmp401_getSnowModelexport +end subroutine noahmpnew_getSnowModelexport diff --git a/lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmp401_setCROCUSimport.F90 b/lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmpnew_setCROCUSimport.F90 similarity index 74% rename from lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmp401_setCROCUSimport.F90 rename to lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmpnew_setCROCUSimport.F90 index 6889274e6..3d84b640a 100755 --- a/lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmp401_setCROCUSimport.F90 +++ b/lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmpnew_setCROCUSimport.F90 @@ -8,19 +8,20 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_setCROCUSimport -! \label{noahmp401_setCROCUSimport} +! !ROUTINE: noahmpnew_setCROCUSimport +! \label{noahmpnew_setCROCUSimport} ! ! !REVISION HISTORY: ! 19 Sep 2020: Sujay Kumar; Initial Specification +! May 2023: Cenlin He; Modified to work with refactored Noah-MP v5 and later ! ! !INTERFACE: -subroutine noahmp401_setCROCUSimport(n, SubLSM2LSM_State) +subroutine noahmpnew_setCROCUSimport(n, SubLSM2LSM_State) ! !USES: use ESMF use LIS_coreMod use LIS_logMod - use noahmp401_lsmMod + use noahmpnew_lsmMod implicit none ! !ARGUMENTS: @@ -48,14 +49,14 @@ subroutine noahmp401_setCROCUSimport(n, SubLSM2LSM_State) call LIS_verify(status) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - dsneqv = swe(t) - noahmp401_struc(n)%noahmp401(t)%sneqv !in mm - dsnowh = snwd(t) - noahmp401_struc(n)%noahmp401(t)%snowh !in m + dsneqv = swe(t) - NoahMPnew_struc(n)%noahmpnew(t)%sneqv !in mm + dsnowh = snwd(t) - NoahMPnew_struc(n)%noahmpnew(t)%snowh !in m ! update - call noahmp401_snow_update(n, t, dsneqv, dsnowh) + call noahmpnew_snow_update(n, t, dsneqv, dsnowh) enddo -end subroutine noahmp401_setCROCUSimport +end subroutine noahmpnew_setCROCUSimport diff --git a/lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmp401_setSnowModelimport.F90 b/lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmpnew_setSnowModelimport.F90 similarity index 64% rename from lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmp401_setSnowModelimport.F90 rename to lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmpnew_setSnowModelimport.F90 index 51d3723a9..9be479cac 100755 --- a/lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmp401_setSnowModelimport.F90 +++ b/lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmpnew_setSnowModelimport.F90 @@ -8,20 +8,21 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_setSnowModelimport -! \label{noahmp401_setSnowModelimport} +! !ROUTINE: noahmpnew_setSnowModelimport +! \label{noahmpnew_setSnowModelimport} ! ! !REVISION HISTORY: ! 19 Sep 2020: Sujay Kumar; Initial Specification ! 12 Aug 2021: Kristi Arsenault; Added SnowModel +! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmp401_setSnowModelimport(n, SubLSM2LSM_State) +subroutine noahmpnew_setSnowModelimport(n, SubLSM2LSM_State) ! !USES: use ESMF use LIS_coreMod use LIS_logMod - use noahmp401_lsmMod + use NoahMPnew_lsmMod implicit none ! !ARGUMENTS: @@ -39,30 +40,30 @@ subroutine noahmp401_setSnowModelimport(n, SubLSM2LSM_State) integer :: status call ESMF_StateGet(SubLSM2LSM_State,"Total SWE",sweField,rc=status) - call LIS_verify(status,"noahmp401_setSnowModelimport: error in swe state get from SnowModel") + call LIS_verify(status,"noahmpnew_setSnowModelimport: error in swe state get from SnowModel") call ESMF_StateGet(SubLSM2LSM_State,"Total snowdepth",snwdField,rc=status) - call LIS_verify(status,"noahmp401_setSnowModelimport: error in snwd state get from SnowModel") + call LIS_verify(status,"noahmpnew_setSnowModelimport: error in snwd state get from SnowModel") call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) - call LIS_verify(status,"noahmp401_setSnowModelimport: error in swe data values") + call LIS_verify(status,"noahmpnew_setSnowModelimport: error in swe data values") call ESMF_FieldGet(snwdField,localDE=0,farrayPtr=snwd,rc=status) - call LIS_verify(status,"noahmp401_setSnowModelimport: error in snwd data values") + call LIS_verify(status,"noahmpnew_setSnowModelimport: error in snwd data values") do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) ! SnowModel has its SWE in meters -- conversion here to mm: - dsneqv = (swe(t)*1000.) - noahmp401_struc(n)%noahmp401(t)%sneqv !in mm - dsnowh = snwd(t) - noahmp401_struc(n)%noahmp401(t)%snowh !in m + dsneqv = (swe(t)*1000.) - NoahMPnew_struc(n)%noahmpnew(t)%sneqv !in mm + dsnowh = snwd(t) - NoahMPnew_struc(n)%noahmpnew(t)%snowh !in m ! if( dsneqv > 0. .or. dsnowh > 0. ) then -! write(501,*) t, swe(t), noahmp401_struc(n)%noahmp401(t)%sneqv, & -! snwd(t), noahmp401_struc(n)%noahmp401(t)%snowh +! write(501,*) t, swe(t), noahmpnew_struc(n)%noahmpnew(t)%sneqv, & +! snwd(t), noahmpnew_struc(n)%noahmpnew(t)%snowh ! endif ! Update NoahMP's Snow states: - call noahmp401_snow_update(n, t, dsneqv, dsnowh) + call noahmpnew_snow_update(n, t, dsneqv, dsnowh) enddo -end subroutine noahmp401_setSnowModelimport +end subroutine noahmpnew_setSnowModelimport diff --git a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_daveg_Mod.F90 b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_daveg_Mod.F90 similarity index 78% rename from lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_daveg_Mod.F90 rename to lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_daveg_Mod.F90 index 3630931d2..917c87b28 100755 --- a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_daveg_Mod.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_daveg_Mod.F90 @@ -8,10 +8,10 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- #include "LIS_misc.h" -module noahmp401_daveg_Mod +module noahmpnew_daveg_Mod !BOP ! -! !MODULE: noahmp401_daveg_Mod +! !MODULE: noahmpnew_daveg_Mod ! ! !DESCRIPTION: ! @@ -30,17 +30,17 @@ module noahmp401_daveg_Mod !----------------------------------------------------------------------------- ! !PUBLIC MEMBER FUNCTIONS: !----------------------------------------------------------------------------- - public :: noahmp401_daveg_init + public :: noahmpnew_daveg_init !EOP contains !BOP ! -! !ROUTINE: noahmp401_daveg_init -! \label{noahmp401_daveg_init} +! !ROUTINE: noahmpnew_daveg_init +! \label{noahmpnew_daveg_init} ! ! !INTERFACE: - subroutine noahmp401_daveg_init(k) + subroutine noahmpnew_daveg_init(k) ! !USES: ! !DESCRIPTION: ! @@ -49,5 +49,5 @@ subroutine noahmp401_daveg_init(k) implicit none integer, intent(in) :: k - end subroutine noahmp401_daveg_init -end module noahmp401_daveg_Mod + end subroutine noahmpnew_daveg_init +end module noahmpnew_daveg_Mod diff --git a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_descale_veg.F90 b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_descale_veg.F90 similarity index 84% rename from lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_descale_veg.F90 rename to lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_descale_veg.F90 index bd317c20b..5b3da8b39 100755 --- a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_descale_veg.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_descale_veg.F90 @@ -8,20 +8,20 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_descale_veg -! \label{noahmp401_descale_veg} +! !ROUTINE: noahmpnew_descale_veg +! \label{noahmpnew_descale_veg} ! ! !REVISION HISTORY: ! 13 Feb 2020: Sujay Kumar; Initial Specification ! ! !INTERFACE: -subroutine noahmp401_descale_veg(n, LSM_State, LSM_Incr_State) +subroutine noahmpnew_descale_veg(n, LSM_State, LSM_Incr_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_verify - use noahmp401_lsmMod + use noahmpnew_lsmMod implicit none ! !ARGUMENTS: @@ -42,5 +42,5 @@ subroutine noahmp401_descale_veg(n, LSM_State, LSM_Incr_State) !EOP -end subroutine noahmp401_descale_veg +end subroutine noahmpnew_descale_veg diff --git a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_getLAIpred.F90 b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_getLAIpred.F90 similarity index 85% rename from lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_getLAIpred.F90 rename to lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_getLAIpred.F90 index d0fe9d6b1..0c7ce35ec 100755 --- a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_getLAIpred.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_getLAIpred.F90 @@ -8,22 +8,22 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_getLAIpred -! \label{noahmp401_getLAIpred} +! !ROUTINE: noahmpnew_getLAIpred +! \label{noahmpnew_getLAIpred} ! ! !REVISION HISTORY: ! 13 Feb 2020: Sujay Kumar; Initial Specification ! ! !INTERFACE: -subroutine noahmp401_getLAIpred(n, k,obs_pred) +subroutine noahmpnew_getLAIpred(n, k,obs_pred) ! !USES: use ESMF use LIS_constantsMod use LIS_coreMod use LIS_dataAssimMod use LIS_DAobservationsMod - use noahmp401_lsmMod - use noahmp401_dasoilm_Mod + use noahmpnew_lsmMod + use noahmpnew_dasoilm_Mod !EOP implicit none @@ -51,12 +51,12 @@ subroutine noahmp401_getLAIpred(n, k,obs_pred) do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) - lai(t) = noahmp401_struc(n)%noahmp401(t)%lai + lai(t) = NoahMPnew_struc(n)%noahmpnew(t)%lai enddo call LIS_convertPatchSpaceToObsEnsSpace(n,k,& LIS_rc%lsm_index, & lai,& obs_pred) -end subroutine noahmp401_getLAIpred +end subroutine noahmpnew_getLAIpred diff --git a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_getvegvars.F90 b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_getvegvars.F90 similarity index 87% rename from lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_getvegvars.F90 rename to lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_getvegvars.F90 index e7ce945f7..27cf6875a 100755 --- a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_getvegvars.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_getvegvars.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_getvegvars -! \label{noahmp401_getvegvars} +! !ROUTINE: noahmpnew_getvegvars +! \label{noahmpnew_getvegvars} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -17,13 +17,13 @@ ! 1 Aug 2016: Mahdi Navari; Modified for Noahmp401 ! To do: makes it general for x layers (currently hard coded for 4 layers) ! !INTERFACE: -subroutine noahmp401_getvegvars(n, LSM_State) +subroutine noahmpnew_getvegvars(n, LSM_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_verify - use noahmp401_lsmMod + use noahmpnew_lsmMod implicit none ! !ARGUMENTS: @@ -56,8 +56,8 @@ subroutine noahmp401_getvegvars(n, LSM_State) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - lai(t) = NOAHMP401_struc(n)%noahmp401(t)%lai + lai(t) = NoahMPnew_struc(n)%noahmpnew(t)%lai enddo -end subroutine noahmp401_getvegvars +end subroutine noahmpnew_getvegvars diff --git a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_qc_LAIobs.F90 b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_qc_LAIobs.F90 similarity index 86% rename from lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_qc_LAIobs.F90 rename to lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_qc_LAIobs.F90 index cb6be1e72..f1f1d2cf0 100755 --- a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_qc_LAIobs.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_qc_LAIobs.F90 @@ -8,23 +8,22 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_qc_LAIobs -! \label{noahmp401_qc_LAIobs} +! !ROUTINE: noahmpnew_qc_LAIobs +! \label{noahmpnew_qc_LAIobs} ! ! !REVISION HISTORY: ! 25Feb2008: Sujay Kumar: Initial Specification ! 1 Aug 2016: Mahdi Navari; Modified for Noahmp401 ! ! !INTERFACE: -subroutine noahmp401_qc_LAIobs(n,k,OBS_State) +subroutine noahmpnew_qc_LAIobs(n,k,OBS_State) ! !USES: use ESMF use LIS_coreMod use LIS_logMod, only : LIS_verify use LIS_constantsMod, only : LIS_CONST_TKFRZ use LIS_DAobservationsMod - use noahmp401_lsmMod - use NOAHMP_TABLES_401, ONLY : SMCMAX_TABLE,SMCWLT_TABLE + use noahmpnew_lsmMod implicit none @@ -50,5 +49,5 @@ subroutine noahmp401_qc_LAIobs(n,k,OBS_State) !EOP -end subroutine noahmp401_qc_LAIobs +end subroutine noahmpnew_qc_LAIobs diff --git a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_qcveg.F90 b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_qcveg.F90 similarity index 94% rename from lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_qcveg.F90 rename to lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_qcveg.F90 index 546655de7..031f90018 100755 --- a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_qcveg.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_qcveg.F90 @@ -8,20 +8,20 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_qcveg -! \label{noahmp401_qcveg} +! !ROUTINE: noahmpnew_qcveg +! \label{noahmpnew_qcveg} ! ! !REVISION HISTORY: ! 13 Feb 2020: Sujay Kumar; Initial Specification ! ! !INTERFACE: -subroutine noahmp401_qcveg(n, LSM_State) +subroutine noahmpnew_qcveg(n, LSM_State) ! !USES: use ESMF use LIS_coreMod use LIS_logMod, only : LIS_verify - use noahmp401_lsmMod + use noahmpnew_lsmMod implicit none ! !ARGUMENTS: @@ -39,7 +39,7 @@ subroutine noahmp401_qcveg(n, LSM_State) ! \item[LSM\_State] ESMF State container for LSM state variables \newline ! \end{description} !EOP - type(ESMF_Field) :: laiField + type(ESMF_Field) :: laiField integer :: t integer :: status real, pointer :: lai(:) @@ -76,8 +76,8 @@ subroutine noahmp401_qcveg(n, LSM_State) update_flag = .true. perc_violation = 0.0 - laimean = 0.0 - nlaimean = 0 + laimean = 0.0 + nlaimean = 0 do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) @@ -165,5 +165,5 @@ subroutine noahmp401_qcveg(n, LSM_State) #endif -end subroutine noahmp401_qcveg +end subroutine noahmpnew_qcveg diff --git a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_scale_veg.F90 b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_scale_veg.F90 similarity index 85% rename from lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_scale_veg.F90 rename to lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_scale_veg.F90 index d617f0f8e..86f31cb22 100755 --- a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_scale_veg.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_scale_veg.F90 @@ -8,20 +8,20 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_scale_veg -! \label{noahmp401_scale_veg} +! !ROUTINE: noahmpnew_scale_veg +! \label{noahmpnew_scale_veg} ! ! !REVISION HISTORY: ! 13 Feb 2020: Sujay Kumar; Initial Specification ! ! !INTERFACE: -subroutine noahmp401_scale_veg(n, LSM_State) +subroutine noahmpnew_scale_veg(n, LSM_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_verify - use noahmp401_lsmMod + use noahmpnew_lsmMod implicit none ! !ARGUMENTS: @@ -41,5 +41,5 @@ subroutine noahmp401_scale_veg(n, LSM_State) !EOP -end subroutine noahmp401_scale_veg +end subroutine noahmpnew_scale_veg diff --git a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_setvegvars.F90 b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_setvegvars.F90 similarity index 85% rename from lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_setvegvars.F90 rename to lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_setvegvars.F90 index 2ef4fc49d..69e775814 100755 --- a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_setvegvars.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_setvegvars.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_setvegvars -! \label{noahmp401_setvegvars} +! !ROUTINE: noahmpnew_setvegvars +! \label{noahmpnew_setvegvars} ! ! !REVISION HISTORY: ! 13 Feb 2020: Sujay Kumar; Initial Specification @@ -28,14 +28,12 @@ ! !INTERFACE: -subroutine noahmp401_setvegvars(n, LSM_State) +subroutine noahmpnew_setvegvars(n, LSM_State) ! !USES: use ESMF use LIS_coreMod use LIS_logMod - use noahmp401_lsmMod - use NOAHMP_TABLES_401, ONLY : SMCMAX_TABLE,SMCWLT_TABLE - + use noahmpnew_lsmMod implicit none ! !ARGUMENTS: @@ -80,12 +78,12 @@ subroutine noahmp401_setvegvars(n, LSM_State) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - if(NOAHMP401_struc(n)%noahmp401(t)%param%sla.ne.0) then - NOAHMP401_struc(n)%noahmp401(t)%lai = lai(t) - lfmass = lai(t)*1000.0/(NOAHMP401_struc(n)%noahmp401(t)%param%sla) - NOAHMP401_struc(n)%noahmp401(t)%lfmass = lfmass + if(NoahMPnew_struc(n)%noahmpnew(t)%param%sla.ne.0) then + NoahMPnew_struc(n)%noahmpnew(t)%lai = lai(t) + lfmass = lai(t)*1000.0/(NoahMPnew_struc(n)%noahmpnew(t)%param%sla) + NoahMPnew_struc(n)%noahmpnew(t)%lfmass = lfmass endif enddo -end subroutine noahmp401_setvegvars +end subroutine noahmpnew_setvegvars diff --git a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_updatevegvars.F90 b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_updatevegvars.F90 similarity index 93% rename from lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_updatevegvars.F90 rename to lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_updatevegvars.F90 index 38760e06d..e423a5e2c 100755 --- a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_updatevegvars.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_updatevegvars.F90 @@ -8,19 +8,19 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_updatevegvars -! \label{noahmp401_updatevegvars} +! !ROUTINE: noahmpnew_updatevegvars +! \label{noahmpnew_updatevegvars} ! ! !REVISION HISTORY: ! 13 Feb 2020: Sujay Kumar; Initial Specification ! ! !INTERFACE: -subroutine noahmp401_updatevegvars(n, LSM_State, LSM_Incr_State) +subroutine noahmpnew_updatevegvars(n, LSM_State, LSM_Incr_State) ! !USES: use ESMF use LIS_coreMod use LIS_logMod - use noahmp401_lsmMod + use noahmpnew_lsmMod implicit none ! !ARGUMENTS: @@ -70,8 +70,8 @@ subroutine noahmp401_updatevegvars(n, LSM_State, LSM_Incr_State) update_flag = .true. perc_violation = 0.0 - laimean = 0.0 - nlaimean = 0 + laimean = 0.0 + nlaimean = 0 do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) @@ -83,7 +83,7 @@ subroutine noahmp401_updatevegvars(n, LSM_State, LSM_Incr_State) if(laitmp.lt.laimin.or.laitmp.gt.laimax) then - update_flag(gid) = .false. + update_flag(gid) = .false. perc_violation(gid) = perc_violation(gid) +1 endif @@ -144,5 +144,5 @@ subroutine noahmp401_updatevegvars(n, LSM_State, LSM_Incr_State) endif enddo -end subroutine noahmp401_updatevegvars +end subroutine noahmpnew_updatevegvars diff --git a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_veg_DAlog.F90 b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_veg_DAlog.F90 similarity index 89% rename from lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_veg_DAlog.F90 rename to lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_veg_DAlog.F90 index 5f9bcb19e..4a3ab144f 100755 --- a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_veg_DAlog.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_veg_DAlog.F90 @@ -11,7 +11,7 @@ ! 15 Apr 2021: Wanshu Nie; created for Noah-MP4.0.1 ! -subroutine noahmp401_veg_DAlog(n) +subroutine noahmpnew_veg_DAlog(n) ! USES: @@ -21,5 +21,5 @@ subroutine noahmp401_veg_DAlog(n) ! DESCRIPTION: -end subroutine noahmp401_veg_DAlog +end subroutine noahmpnew_veg_DAlog diff --git a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_write_veg.F90 b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_write_veg.F90 similarity index 73% rename from lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_write_veg.F90 rename to lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_write_veg.F90 index 83ec93f15..9b6bcd78d 100755 --- a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmp401_write_veg.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_write_veg.F90 @@ -8,19 +8,20 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_write_veg -! \label{noahmp401_write_veg} +! !ROUTINE: noahmpnew_write_veg +! \label{noahmpnew_write_veg} ! ! !REVISION HISTORY: ! 13 Feb 2020: Sujay Kumar; Initial Specification +! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmp401_write_veg(ftn,n, LSM_State) +subroutine noahmpnew_write_veg(ftn,n, LSM_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc - use noahmp401_lsmMod + use noahmpnew_lsmMod use LIS_historyMod, only : LIS_writevar_restart implicit none ! !ARGUMENTS: @@ -30,7 +31,7 @@ subroutine noahmp401_write_veg(ftn,n, LSM_State) ! ! !DESCRIPTION: ! -! Returns the esioisture related state prognostic variables for +! Returns the soil moisture related state prognostic variables for ! data assimilation ! ! The arguments are: @@ -45,25 +46,25 @@ subroutine noahmp401_write_veg(ftn,n, LSM_State) allocate(tmp(LIS_rc%npatch(n,LIS_rc%lsm_index))) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(1) + tmp(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(1) enddo call LIS_writevar_restart(ftn,n,1,tmp) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(2) + tmp(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(2) enddo call LIS_writevar_restart(ftn,n,1,tmp) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(3) + tmp(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(3) enddo call LIS_writevar_restart(ftn,n,1,tmp) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(4) + tmp(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(4) enddo call LIS_writevar_restart(ftn,n,1,tmp) deallocate(tmp) -end subroutine noahmp401_write_veg +end subroutine noahmpnew_write_veg diff --git a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_dasnodep_Mod.F90 b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_dasnodep_Mod.F90 similarity index 77% rename from lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_dasnodep_Mod.F90 rename to lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_dasnodep_Mod.F90 index 8db8ac65c..82797da00 100755 --- a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_dasnodep_Mod.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_dasnodep_Mod.F90 @@ -8,10 +8,10 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- #include "LIS_misc.h" -module noahmp401_dasnodep_Mod +module noahmpnew_dasnodep_Mod !BOP ! -! !MODULE: noahmp401_dasnodep_Mod +! !MODULE: noahmpnew_dasnodep_Mod ! ! !DESCRIPTION: ! @@ -25,7 +25,7 @@ module noahmp401_dasnodep_Mod !----------------------------------------------------------------------------- ! !PUBLIC MEMBER FUNCTIONS: !----------------------------------------------------------------------------- - public :: noahmp401_dasnodep_init + public :: noahmpnew_dasnodep_init !----------------------------------------------------------------------------- ! !PUBLIC TYPES: !----------------------------------------------------------------------------- @@ -35,15 +35,15 @@ module noahmp401_dasnodep_Mod contains !BOP ! -! !ROUTINE: noahmp401_dasnodep_init -! \label{noahmp401_dasnodep_init} +! !ROUTINE: noahmpnew_dasnodep_init +! \label{noahmpnew_dasnodep_init} ! ! !INTERFACE: - subroutine noahmp401_dasnodep_init() + subroutine noahmpnew_dasnodep_init() ! !USES: ! !DESCRIPTION: ! !EOP implicit none - end subroutine noahmp401_dasnodep_init -end module noahmp401_dasnodep_Mod + end subroutine noahmpnew_dasnodep_init +end module noahmpnew_dasnodep_Mod diff --git a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_descale_snodep.F90 b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_descale_snodep.F90 similarity index 90% rename from lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_descale_snodep.F90 rename to lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_descale_snodep.F90 index 1776e2864..f7b0e03a5 100644 --- a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_descale_snodep.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_descale_snodep.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_descale_snodep -! \label{noahmp401_descale_snodep} +! !ROUTINE: noahmpnew_descale_snodep +! \label{noahmpnew_descale_snodep} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -18,12 +18,12 @@ ! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 ! ! !INTERFACE: -subroutine noahmp401_descale_snodep(n, LSM_State, LSM_Incr_State) +subroutine noahmpnew_descale_snodep(n, LSM_State, LSM_Incr_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc - use noahmp401_lsmMod + use noahmpnew_lsmMod use LIS_logMod implicit none @@ -68,5 +68,5 @@ subroutine noahmp401_descale_snodep(n, LSM_State, LSM_Incr_State) enddo #endif -end subroutine noahmp401_descale_snodep +end subroutine noahmpnew_descale_snodep diff --git a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_getsnodeppred.F90 b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_getsnodeppred.F90 similarity index 81% rename from lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_getsnodeppred.F90 rename to lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_getsnodeppred.F90 index da3b4a3c0..cf6b7d0ca 100644 --- a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_getsnodeppred.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_getsnodeppred.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_getsnodeppred -! \label{noahmp401_getsnodeppred} +! !ROUTINE: noahmpnew_getsnodeppred +! \label{noahmpnew_getsnodeppred} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -20,14 +20,15 @@ ! space updates. ! 03 Oct 2018: Yeosang Yoon; Modified for NoahMP 3.6 ! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 +! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmp401_getsnodeppred(n, k, obs_pred) +subroutine noahmpnew_getsnodeppred(n, k, obs_pred) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc,LIS_surface - use noahmp401_lsmMod + use noahmpnew_lsmMod use SNODEPobs_Mod, only: SNODEP_obs_obj use LIS_DAobservationsMod @@ -43,9 +44,9 @@ subroutine noahmp401_getsnodeppred(n, k, obs_pred) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) if (SNODEP_obs_obj(n)%mesh .eq. 8) then - snwd(t) = noahmp401_struc(n)%noahmp401(t)%snowh*39.37 !convert from meter to inch + snwd(t) = NoahMPnew_struc(n)%noahmpnew(t)%snowh*39.37 !convert from meter to inch elseif (SNODEP_obs_obj(n)%mesh .eq. 16 .or. SNODEP_obs_obj(n)%mesh .eq. 25) then - snwd(t) = noahmp401_struc(n)%noahmp401(t)%snowh + snwd(t) = NoahMPnew_struc(n)%noahmpnew(t)%snowh endif enddo @@ -54,5 +55,5 @@ subroutine noahmp401_getsnodeppred(n, k, obs_pred) snwd,& obs_pred) -end subroutine noahmp401_getsnodeppred +end subroutine noahmpnew_getsnodeppred diff --git a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_getsnodepvars.F90 b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_getsnodepvars.F90 similarity index 83% rename from lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_getsnodepvars.F90 rename to lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_getsnodepvars.F90 index abdeea682..7121a6648 100644 --- a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_getsnodepvars.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_getsnodepvars.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_getsnodepvars -! \label{noahmp401_getsnodepvars} +! !ROUTINE: noahmpnew_getsnodepvars +! \label{noahmpnew_getsnodepvars} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -17,14 +17,15 @@ ! 02 Mar 2010: Sujay Kumar; Modified for Noah 3.1 ! 03OC2018: Yeosang Yoon; Modified for NoahMP 3.6 ! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 - +! May 2023: Cenlin He; Modified for refactored NoahMP v5 and later +! ! !INTERFACE: -subroutine noahmp401_getsnodepvars(n, LSM_State) +subroutine noahmpnew_getsnodepvars(n, LSM_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_verify - use noahmp401_lsmMod + use noahmpnew_lsmMod implicit none ! !ARGUMENTS: @@ -62,8 +63,8 @@ subroutine noahmp401_getsnodepvars(n, LSM_State) call LIS_verify(status) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - swe(t) = noahmp401_struc(n)%noahmp401(t)%sneqv - snod(t) = noahmp401_struc(n)%noahmp401(t)%snowh + swe(t) = NoahMPnew_struc(n)%noahmpnew(t)%sneqv + snod(t) = NoahMPnew_struc(n)%noahmpnew(t)%snowh enddo -end subroutine noahmp401_getsnodepvars +end subroutine noahmpnew_getsnodepvars diff --git a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_map_snodep.F90 b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_map_snodep.F90 similarity index 81% rename from lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_map_snodep.F90 rename to lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_map_snodep.F90 index 7b08f8f1b..f73175888 100644 --- a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_map_snodep.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_map_snodep.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_map_snodep -! \label{noahmp401_map_snodep} +! !ROUTINE: noahmpnew_map_snodep +! \label{noahmpnew_map_snodep} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -17,16 +17,17 @@ ! 02 Mar 2010: Sujay Kumar; Modified for Noah 3.1 ! 21 Jul 2011: James Geiger; Modified for Noah 3.2 ! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 +! May 2023: Cenlin He; Modified for NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmp401_map_snodep(n,k,OBS_State,LSM_Incr_State) +subroutine noahmpnew_map_snodep(n,k,OBS_State,LSM_Incr_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc, LIS_surface use LIS_constantsMod, only : LIS_CONST_TKFRZ use LIS_logMod, only : LIS_logunit, LIS_verify use LIS_lsmMod - use noahmp401_lsmMod + use noahmpnew_lsmMod implicit none ! !ARGUMENTS: @@ -59,12 +60,12 @@ subroutine noahmp401_map_snodep(n,k,OBS_State,LSM_Incr_State) integer :: obs_state_count integer :: st_id, en_id character*100,allocatable :: obs_state_objs(:) - real, allocatable :: noahmp401_swe(:) - real, allocatable :: noahmp401_snod(:) + real, allocatable :: noahmpnew_swe(:) + real, allocatable :: noahmpnew_snod(:) real, allocatable :: snod(:) - allocate(noahmp401_swe(LIS_rc%npatch(n,LIS_rc%lsm_index))) - allocate(noahmp401_snod(LIS_rc%npatch(n,LIS_rc%lsm_index))) + allocate(noahmpnew_swe(LIS_rc%npatch(n,LIS_rc%lsm_index))) + allocate(noahmpnew_snod(LIS_rc%npatch(n,LIS_rc%lsm_index))) allocate(snod(LIS_rc%npatch(n,LIS_rc%lsm_index))) call ESMF_StateGet(LSM_Incr_State,"SWE",sweIncrField,rc=status) @@ -93,8 +94,8 @@ subroutine noahmp401_map_snodep(n,k,OBS_State,LSM_Incr_State) call LIS_verify(status) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - noahmp401_swe(t) = noahmp401_struc(n)%noahmp401(t)%sneqv - noahmp401_snod(t) = noahmp401_struc(n)%noahmp401(t)%snowh + noahmpnew_swe(t) = NoahMPnew_struc(n)%noahmpnew(t)%sneqv + noahmpnew_snod(t) = NoahMPnew_struc(n)%noahmpnew(t)%snowh enddo do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) @@ -105,8 +106,8 @@ subroutine noahmp401_map_snodep(n,k,OBS_State,LSM_Incr_State) ! working with an model grid finer than the observation grid if(snodepobs(st_id).ge.0) then - if(noahmp401_snod(t).gt.1e-6) then - tmpsneqv = noahmp401_swe(t)/noahmp401_snod(t) + if(noahmpnew_snod(t).gt.1e-6) then + tmpsneqv = noahmpnew_swe(t)/noahmpnew_snod(t) else tmpsneqv = 0.0 endif @@ -118,8 +119,8 @@ subroutine noahmp401_map_snodep(n,k,OBS_State,LSM_Incr_State) if(snod(t).ge.2.54E-3.and.tmpsneqv.lt.0.001) then tmpsneqv = 0.20 endif - sweincr(t) = tmpsneqv*snod(t) - noahmp401_swe(t) - snodincr(t) = snod(t) - noahmp401_snod(t) + sweincr(t) = tmpsneqv*snod(t) - noahmpnew_swe(t) + snodincr(t) = snod(t) - noahmpnew_snod(t) else sweincr(t) = 0 snodincr(t) = 0 @@ -127,9 +128,9 @@ subroutine noahmp401_map_snodep(n,k,OBS_State,LSM_Incr_State) enddo ! stop deallocate(obs_state_objs) - deallocate(noahmp401_swe) - deallocate(noahmp401_snod) + deallocate(noahmpnew_swe) + deallocate(noahmpnew_snod) deallocate(snod) -end subroutine noahmp401_map_snodep +end subroutine noahmpnew_map_snodep diff --git a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_qc_snodepobs.F90 b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_qc_snodepobs.F90 similarity index 84% rename from lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_qc_snodepobs.F90 rename to lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_qc_snodepobs.F90 index a563d03e2..f98e30962 100755 --- a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_qc_snodepobs.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_qc_snodepobs.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_qc_snodepobs -! \label{noahmp401_qc_snodepobs} +! !ROUTINE: noahmpnew_qc_snodepobs +! \label{noahmpnew_qc_snodepobs} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -19,16 +19,17 @@ ! 30 Jan 2015: Yuqiong Liu; added additional QC ! 03 Oct 2018: Yeosang Yoon; Modified for NoahMP 3.6 ! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 +! May 2023: Cenlin He; Modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmp401_qc_snodepobs(n,k,OBS_State) +subroutine noahmpnew_qc_snodepobs(n,k,OBS_State) ! !USES: use ESMF use LIS_coreMod use LIS_logMod, only : LIS_verify use LIS_constantsMod, only : LIS_CONST_TKFRZ use LIS_DAobservationsMod - use noahmp401_lsmMod + use noahmpnew_lsmMod implicit none ! !ARGUMENTS: @@ -65,21 +66,21 @@ subroutine noahmp401_qc_snodepobs(n,k,OBS_State) call ESMF_StateGet(OBS_State,"Observation01",obs_snow_field,rc=status) call LIS_verify(status,& - "ESMF_StateGet failed in noahmp401_qc_snodepobs") + "ESMF_StateGet failed in noahmpnew_qc_snodepobs") call ESMF_FieldGet(obs_snow_field,localDE=0,farrayPtr=snowobs,rc=status) call LIS_verify(status,& - "ESMF_FieldGet failed in noahmp401_qc_snodepobs") + "ESMF_FieldGet failed in noahmpnew_qc_snodepobs") do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) - !stc1(t) = noahmp401_struc(n)%noahmp401(t)%sstc(1) ! get snow/veg temp. - stc1(t) = noahmp401_struc(n)%noahmp401(t)%tslb(1) ! get snow/veg temp. + !stc1(t) = NoahMPnew_struc(n)%noahmpnew(t)%sstc(1) ! get snow/veg temp. + stc1(t) = NoahMPnew_struc(n)%noahmpnew(t)%tslb(1) ! get snow/veg temp. vegt(t) = LIS_surface(n,1)%tile(t)%vegt enddo call LIS_convertPatchSpaceToObsSpace(n,k,& - LIS_rc%lsm_index, noahmp401_struc(n)%noahmp401(:)%tv,tv_obs) !tv: vegetation temperature. unit: K + LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew(:)%tv,tv_obs) !tv: vegetation temperature. unit: K call LIS_convertPatchSpaceToObsSpace(n,k,LIS_rc%lsm_index, & !fveg: green vegetation fraction. unit: - - noahmp401_struc(n)%noahmp401(:)%fveg,fveg_obs) + NoahMPnew_struc(n)%noahmpnew(:)%fveg,fveg_obs) call LIS_convertPatchSpaceToObsSpace(n,k,& LIS_rc%lsm_index,stc1,stc1_obs) @@ -101,5 +102,5 @@ subroutine noahmp401_qc_snodepobs(n,k,OBS_State) ! endif ! enddo -end subroutine noahmp401_qc_snodepobs +end subroutine noahmpnew_qc_snodepobs diff --git a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_qcsnodep.F90 b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_qcsnodep.F90 similarity index 87% rename from lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_qcsnodep.F90 rename to lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_qcsnodep.F90 index c63b36e0f..a8eb4e391 100644 --- a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_qcsnodep.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_qcsnodep.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_qcsnodep -! \label{noahmp401_qcsnow} +! !ROUTINE: noahmpnew_qcsnodep +! \label{noahmpnew_qcsnow} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -20,14 +20,15 @@ ! 03 Oct 2018: Yeosang Yoon; Modified for NoahMP 3.6 ! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 ! 09 Jan 2020: Yeosang Yoon; update QC +! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmp401_qcsnodep(n, LSM_State) +subroutine noahmpnew_qcsnodep(n, LSM_State) ! !USES: use ESMF use LIS_coreMod - use noahmp401_lsmMod + use noahmpnew_lsmMod use LIS_logMod implicit none @@ -98,8 +99,8 @@ subroutine noahmp401_qcsnodep(n, LSM_State) !Use the model's snow density from the previous timestep sndens = 0.0 - if(noahmp401_struc(n)%noahmp401(t)%snowh.gt.0) then - sndens = noahmp401_struc(n)%noahmp401(t)%sneqv/noahmp401_struc(n)%noahmp401(t)%snowh + if(NoahMPnew_struc(n)%noahmpnew(t)%snowh.gt.0) then + sndens = NoahMPnew_struc(n)%noahmpnew(t)%sneqv/NoahMPnew_struc(n)%noahmpnew(t)%snowh endif !If the update is unphysical, do not update. @@ -107,8 +108,8 @@ subroutine noahmp401_qcsnodep(n, LSM_State) snod(t) = snod(t) swe(t) = snod(t)*sndens else ! do not update - snod(t) = noahmp401_struc(n)%noahmp401(t)%snowh - swe(t) = noahmp401_struc(n)%noahmp401(t)%sneqv + snod(t) = NoahMPnew_struc(n)%noahmpnew(t)%snowh + swe(t) = NoahMPnew_struc(n)%noahmpnew(t)%sneqv end if if(swe(t).gt.swemax) then @@ -120,5 +121,5 @@ subroutine noahmp401_qcsnodep(n, LSM_State) end do -end subroutine noahmp401_qcsnodep +end subroutine noahmpnew_qcsnodep diff --git a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_scale_snodep.F90 b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_scale_snodep.F90 similarity index 88% rename from lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_scale_snodep.F90 rename to lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_scale_snodep.F90 index f5e10c834..69cd80134 100644 --- a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_scale_snodep.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_scale_snodep.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_scale_snodep -! \label{noahmp401_scale_snodep} +! !ROUTINE: noahmpnew_scale_snodep +! \label{noahmpnew_scale_snodep} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -17,14 +17,15 @@ ! 02 Mar 2010: Sujay Kumar; Modified for Noah 3.1 ! 03 Oct 2018: Yeosang Yoon; Modified for NoahMP 3.6 ! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 +! May 2023: Cenlin He; Modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmp401_scale_snodep(n, LSM_State) +subroutine noahmpnew_scale_snodep(n, LSM_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc - use noahmp401_lsmMod + use noahmpnew_lsmMod use LIS_logMod implicit none @@ -68,5 +69,5 @@ subroutine noahmp401_scale_snodep(n, LSM_State) enddo #endif -end subroutine noahmp401_scale_snodep +end subroutine noahmpnew_scale_snodep diff --git a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_setsnodepvars.F90 b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_setsnodepvars.F90 similarity index 85% rename from lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_setsnodepvars.F90 rename to lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_setsnodepvars.F90 index df7ce3975..5e52df310 100644 --- a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_setsnodepvars.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_setsnodepvars.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_setsnodepvars -! \label{noahmp401_setsnodepvars} +! !ROUTINE: noahmpnew_setsnodepvars +! \label{noahmpnew_setsnodepvars} ! ! !REVISION HISTORY: ! 15 Aug 2017: Sujay Kumar; Initial Specification @@ -22,15 +22,16 @@ ! 03 Oct 2018: Yeosang Yoon; Modified for NoahMP 3.6 ! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 ! 10 Nov 2020: Eric Kemp; Added update to LIS_snow_struc +! May 2023: Cenlin He; Modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmp401_setsnodepvars(n, LSM_State) +subroutine noahmpnew_setsnodepvars(n, LSM_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc, LIS_domain, LIS_surface use LIS_logMod, only : LIS_logunit, LIS_verify use LIS_snowMod, only : LIS_snow_struc - use noahmp401_lsmMod + use noahmpnew_lsmMod implicit none ! !ARGUMENTS: @@ -67,11 +68,11 @@ subroutine noahmp401_setsnodepvars(n, LSM_State) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - dsneqv = swe(t) - noahmp401_struc(n)%noahmp401(t)%sneqv !in mm - dsnowh = snod(t) - noahmp401_struc(n)%noahmp401(t)%snowh !in m + dsneqv = swe(t) - NoahMPnew_struc(n)%noahmpnew(t)%sneqv !in mm + dsnowh = snod(t) - NoahMPnew_struc(n)%noahmpnew(t)%snowh !in m ! update - call noahmp401_snodep_update(n, t, dsneqv, dsnowh) + call noahmpnew_snodep_update(n, t, dsneqv, dsnowh) enddo @@ -85,7 +86,7 @@ subroutine noahmp401_setsnodepvars(n, LSM_State) do t = 1, LIS_rc%npatch(n, LIS_rc%lsm_index) tid = LIS_surface(n, LIS_rc%lsm_index)%tile(t)%tile_id LIS_snow_struc(n)%sneqv(tid) = LIS_snow_struc(n)%sneqv(tid) + & - noahmp401_struc(n)%noahmp401(t)%sneqv + NoahMPnew_struc(n)%noahmpnew(t)%sneqv end do ! Collect mean snow depth at grid points @@ -93,7 +94,7 @@ subroutine noahmp401_setsnodepvars(n, LSM_State) gid = LIS_surface(n,LIS_rc%lsm_index)%tile(t)%index LIS_snow_struc(n)%snowdepth(gid) = & LIS_snow_struc(n)%snowdepth(gid) + & - noahmp401_struc(n)%noahmp401(t)%snowh + NoahMPnew_struc(n)%noahmpnew(t)%snowh ncount(gid) = ncount(gid) + 1 end do do t = 1, LIS_rc%ngrid(n) @@ -106,6 +107,6 @@ subroutine noahmp401_setsnodepvars(n, LSM_State) end do end if -end subroutine noahmp401_setsnodepvars +end subroutine noahmpnew_setsnodepvars diff --git a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_snodep_update.F90 b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_snodep_update.F90 similarity index 64% rename from lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_snodep_update.F90 rename to lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_snodep_update.F90 index e8cff9847..172c6ad60 100644 --- a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_snodep_update.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_snodep_update.F90 @@ -8,20 +8,20 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_snodep_update -! \label{noahmp401_snodep_update} +! !ROUTINE: noahmpnew_snodep_update +! \label{noahmpnew_snodep_update} ! ! !REVISION HISTORY: ! 13 Aug 2017: Sujay Kumar; Initial specification ! 14 Dec 2018: Yeosang Yoon; Modified code for NoahMP 4.0.1 +! May 2023: Cenlin He; Modified for refactored NoahMP v5 and later ! ! !INTERFACE -subroutine noahmp401_snodep_update(n, t, dsneqv, dsnowh) +subroutine noahmpnew_snodep_update(n, t, dsneqv, dsnowh) use LIS_coreMod - use NoahMP401_lsmMod - USE MODULE_SF_NOAHMPLSM_401 - USE NOAHMP_TABLES_401 + use NoahMPnew_lsmMod + use NoahMPnew_snowphys_updateMod implicit none ! @@ -38,7 +38,10 @@ subroutine noahmp401_snodep_update(n, t, dsneqv, dsnowh) real :: dsneqv !mm real :: dsnowh !m !EOP - + real, parameter :: tfrz = 273.16 !freezing/melting point (k) + real, parameter :: hfus = 0.3336E06 !latent heat of fusion (j/kg) + real, parameter :: grav = 9.80616 !acceleration due to gravity (m/s2) + real, parameter :: DENH2O = 1000.0 !density of water (kg/m3) real, allocatable, dimension(:) :: zsoil real, allocatable, dimension(:) :: ficeold real, allocatable, dimension(:) :: snice @@ -49,6 +52,9 @@ subroutine noahmp401_snodep_update(n, t, dsneqv, dsnowh) real, allocatable, dimension(:) :: mliq real, allocatable, dimension(:) :: dzsnso real, allocatable, dimension(:) :: zsnso + real, allocatable, dimension(:) :: BEXP + real, allocatable, dimension(:) :: PSISAT + real, allocatable, dimension(:) :: SMCMAX integer, allocatable, dimension(:) :: imelt !phase change index real, allocatable, dimension(:) :: sice @@ -63,11 +69,10 @@ subroutine noahmp401_snodep_update(n, t, dsneqv, dsnowh) ! local real :: SNOFLOW, BDSNOW - type (noahmp_parameters) :: parameters - isnow = noahmp401_struc(n)%noahmp401(t)%isnow - nsoil = noahmp401_struc(n)%nsoil - nsnow = noahmp401_struc(n)%nsnow + isnow = NoahMPnew_struc(n)%noahmpnew(t)%isnow + nsoil = NoahMPnew_struc(n)%nsoil + nsnow = NoahMPnew_struc(n)%nsnow allocate(ficeold(-nsnow+1:0)) allocate(snice(-nsnow+1:0)) @@ -80,30 +85,33 @@ subroutine noahmp401_snodep_update(n, t, dsneqv, dsnowh) allocate(dzsnso(-nsnow+1:nsoil)) allocate(zsnso(-nsnow+1:nsoil)) allocate(sice(nsoil)) + allocate(BEXP(nsoil)) + allocate(PSISAT(nsoil)) + allocate(SMCMAX(nsoil)) imelt = 0 !set empty snow layers to zero do iz = -nsnow+1, isnow - snice(iz) = 0. - snliq(iz) = 0. - stc(iz) = 0. - dzsnso(iz)= 0. - zsnso(iz) = 0. + snice(iz) = 0.0 + snliq(iz) = 0.0 + stc(iz) = 0.0 + dzsnso(iz)= 0.0 + zsnso(iz) = 0.0 enddo ! initialize the variables - soiltype = noahmp401_struc(n)%noahmp401(t)%soiltype + soiltype = NoahMPnew_struc(n)%noahmpnew(t)%soiltype do isoil = 1, size(soiltype) - parameters%BEXP(isoil) = BEXP_TABLE (SOILTYPE(isoil)) - parameters%PSISAT(isoil) = PSISAT_TABLE (SOILTYPE(isoil)) - parameters%SMCMAX(isoil) = SMCMAX_TABLE (SOILTYPE(isoil)) + BEXP(isoil) = NoahmpNew_struc(n)%noahmpnew(t)%param%BEXP(isoil) + PSISAT(isoil) = NoahmpNew_struc(n)%noahmpnew(t)%param%PSISAT(isoil) + SMCMAX(isoil) = NoahmpNew_struc(n)%noahmpnew(t)%param%SMCMAX(isoil) end do - sneqv = noahmp401_struc(n)%noahmp401(t)%sneqv - snowh = noahmp401_struc(n)%noahmp401(t)%snowh + sneqv = NoahMPnew_struc(n)%noahmpnew(t)%sneqv + snowh = NoahMPnew_struc(n)%noahmpnew(t)%snowh - zsnso(-nsnow+1:nsoil) = noahmp401_struc(n)%noahmp401(t)%zss(1:nsnow+nsoil) + zsnso(-nsnow+1:nsoil) = NoahMPnew_struc(n)%noahmpnew(t)%zss(1:nsnow+nsoil) ! snow/soil layer thickness (m) do iz = isnow+1, nsoil @@ -117,22 +125,22 @@ subroutine noahmp401_snodep_update(n, t, dsneqv, dsnowh) ! set ZSOIL allocate(zsoil(nsoil)) ! zsoil is negative. - zsoil(1) = -NOAHMP401_struc(n)%sldpth(1) + zsoil(1) = -NoahMPnew_struc(n)%sldpth(1) do i = 2, nsoil - zsoil(i) = zsoil(i-1) - NOAHMP401_struc(n)%sldpth(i) + zsoil(i) = zsoil(i-1) - NoahMPnew_struc(n)%sldpth(i) enddo ! state variables snice(-nsnow+1:0) = & - NOAHMP401_struc(n)%noahmp401(t)%snowice(1:nsnow) + NoahMPnew_struc(n)%noahmpnew(t)%snowice(1:nsnow) snliq(-nsnow+1:0) = & - NOAHMP401_struc(n)%noahmp401(t)%snowliq(1:nsnow) + NoahMPnew_struc(n)%noahmpnew(t)%snowliq(1:nsnow) stc(-nsnow+1:0) = & - NOAHMP401_struc(n)%noahmp401(t)%tsno(1:nsnow) + NoahMPnew_struc(n)%noahmpnew(t)%tsno(1:nsnow) ! soil temperature stc(1:nsoil) = & - NOAHMP401_struc(n)%noahmp401(t)%tslb(1:nsoil) + NoahMPnew_struc(n)%noahmpnew(t)%tslb(1:nsoil) ! from snowfall routine @@ -150,7 +158,7 @@ subroutine noahmp401_snodep_update(n, t, dsneqv, dsnowh) NEWNODE = 1 DZSNSO(0)= SNOWH SNOWH = 0. - STC(0) = MIN(273.16, NOAHMP401_struc(n)%noahmp401(t)%sfctmp) ! temporary setup + STC(0) = MIN(273.16, NoahMPnew_struc(n)%noahmpnew(t)%sfctmp) ! temporary setup SNICE(0) = SNEQV SNLIQ(0) = 0. END IF @@ -195,8 +203,8 @@ subroutine noahmp401_snodep_update(n, t, dsneqv, dsnowh) endif enddo - sice(:) = max(0.0, NOAHMP401_struc(n)%noahmp401(t)%smc(:)& - - NOAHMP401_struc(n)%noahmp401(t)%sh2o(:)) + sice(:) = max(0.0, NoahMPnew_struc(n)%noahmpnew(t)%smc(:)& + - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(:)) !imelt do j = -nsnow+1, nsoil @@ -209,9 +217,9 @@ subroutine noahmp401_snodep_update(n, t, dsneqv, dsnowh) end do do j = 1, nsoil ! soil - mliq(j) = NOAHMP401_struc(n)%noahmp401(t)%sh2o(j) * dzsnso(j) * 1000. - mice(j) = (NOAHMP401_struc(n)%noahmp401(t)%smc(j) - & - NOAHMP401_struc(n)%noahmp401(t)%sh2o(j)) * dzsnso(j) * 1000. + mliq(j) = NoahMPnew_struc(n)%noahmpnew(t)%sh2o(j) * dzsnso(j) * 1000. + mice(j) = (NoahMPnew_struc(n)%noahmpnew(t)%smc(j) - & + NoahMPnew_struc(n)%noahmpnew(t)%sh2o(j)) * dzsnso(j) * 1000. end do do j = isnow+1,nsoil ! all layers @@ -223,15 +231,15 @@ subroutine noahmp401_snodep_update(n, t, dsneqv, dsnowh) ! Assuming the use of option 1 for now if(stc(j) < tfrz) then smp = hfus*(tfrz-stc(j))/(grav*stc(j)) !(m) - SUPERCOOL(J) = parameters%SMCMAX(J)*(SMP/parameters%PSISAT(J))**(-1./parameters%BEXP(J)) + SUPERCOOL(J) = SMCMAX(J)*(SMP/PSISAT(J))**(-1./BEXP(J)) SUPERCOOL(J) = SUPERCOOL(J)*DZSNSO(J)*1000. !(mm) end if ! end if ! if (opt_frz == 2) then ! call frh2o (supercool(j),& -! NOAHMP401_struc(n)%noahmp401(t)%sstc(j),& -! NOAHMP401_struc(n)%noahmp401(t)%smc(j),& -! NOAHMP401_struc(n)%noahmp401(t)%sh2o(j)) +! NoahMPnew_struc(n)%noahmpnew(t)%sstc(j),& +! NoahMPnew_struc(n)%noahmpnew(t)%smc(j),& +! NoahMPnew_struc(n)%noahmpnew(t)%sh2o(j)) ! supercool(j) = supercool(j)*dzsnso(j)*1000. !(mm) ! end if enddo @@ -259,31 +267,33 @@ subroutine noahmp401_snodep_update(n, t, dsneqv, dsnowh) ponding2 = 0.0 if(isnow < 0) & ! when multi-layer - call compact (parameters, nsnow, nsoil, noahmp401_struc(n)%ts, & !in + call compact (NoahmpNew_struc(n)%noahmpnew(t)%param, & + nsnow, nsoil, NoahMPnew_struc(n)%ts, & !in stc, snice, snliq, zsoil, imelt, ficeold, iloc, jloc, & !in isnow, dzsnso ,zsnso) !inout if(isnow < 0) & - call combine (parameters, nsnow, nsoil ,iloc, jloc, & !in - isnow, noahmp401_struc(n)%noahmp401(t)%sh2o, & !inout - stc, snice, snliq, dzsnso, sice, snowh, sneqv, & !inout - ponding1, ponding2) !out + call combine (NoahmpNew_struc(n)%noahmpnew(t)%param, & + nsnow, nsoil ,iloc, jloc, & !in + isnow, NoahMPnew_struc(n)%noahmpnew(t)%sh2o, & !inout + stc, snice, snliq, dzsnso, sice, snowh, sneqv, & !inout + ponding1, ponding2) !out if(isnow < 0) & - call divide (parameters, nsnow, nsoil, & !in + call divide (NoahmpNew_struc(n)%noahmpnew(t)%param, nsnow, nsoil, & !in isnow, stc, snice, snliq, dzsnso) !inout !set empty snow layers to zero do iz = -nsnow+1, isnow - snice(iz) = 0. - snliq(iz) = 0. - stc(iz) = 0. - dzsnso(iz)= 0. - zsnso(iz) = 0. + snice(iz) = 0.0 + snliq(iz) = 0.0 + stc(iz) = 0.0 + dzsnso(iz)= 0.0 + zsnso(iz) = 0.0 enddo !to obtain equilibrium state of snow in glacier region - IF(SNEQV > 2000.) THEN ! 2000 mm -> maximum water depth + IF(SNEQV > 5000.0) THEN ! 5000 mm -> maximum water depth BDSNOW = SNICE(0) / DZSNSO(0) - SNOFLOW = (SNEQV - 2000.) + SNOFLOW = (SNEQV - 5000.0) SNICE(0) = SNICE(0) - SNOFLOW DZSNSO(0) = DZSNSO(0) - SNOFLOW/BDSNOW !SNOFLOW = SNOFLOW / DT @@ -291,22 +301,12 @@ subroutine noahmp401_snodep_update(n, t, dsneqv, dsnowh) ! sum up snow mass for layered snow IF(ISNOW < 0) THEN ! MB: only do for multi-layer - SNEQV = 0. - SNOWH = 0. ! Yeosang Yoon + SNEQV = 0.0 DO IZ = ISNOW+1,0 SNEQV = SNEQV + SNICE(IZ) + SNLIQ(IZ) - SNOWH = SNOWH + DZSNSO(IZ) ! Yeosang Yoon ENDDO END IF - ! Yeosag Yoon, no snow layer case, limit snow density to 1000 - IF (ISNOW == 0 .AND. SNEQV > 0. .AND. SNOWH > 0.) THEN - BDSNOW = SNEQV/SNOWH - IF (BDSNOW >= DENH2O) THEN - SNOWH = SNOWH*(BDSNOW/1000.) ! change unit, SNEQV=[mm] SNOWH=[m] - END IF - END IF - ! Reset ZSNSO and layer thinkness DZSNSO DO IZ = ISNOW+1, 0 DZSNSO(IZ) = -DZSNSO(IZ) @@ -326,19 +326,32 @@ subroutine noahmp401_snodep_update(n, t, dsneqv, dsnowh) DZSNSO(IZ) = -DZSNSO(IZ) END DO + ! sum up snow thickness for layered snow + IF(ISNOW < 0) THEN ! MB: only do for multi-layer + SNOWH = 0.0 ! Yeosang Yoon + DO IZ = ISNOW+1,0 + SNOWH = SNOWH + DZSNSO(IZ) ! Yeosang Yoon + ENDDO + END IF + + ! Yeosag Yoon, no snow layer case, limit snow density to 1000 + IF (ISNOW == 0 .AND. SNEQV > 0.0 .AND. SNOWH > 0.0) THEN + BDSNOW = SNEQV/SNOWH + IF (BDSNOW >= DENH2O) THEN + SNOWH = SNOWH*(BDSNOW/DENH2O) ! change unit, SNEQV=[mm] SNOWH=[m] + END IF + END IF + ! update state vars - noahmp401_struc(n)%noahmp401(t)%isnow = isnow - noahmp401_struc(n)%noahmp401(t)%sneqv = sneqv - noahmp401_struc(n)%noahmp401(t)%snowh = snowh - - NOAHMP401_struc(n)%noahmp401(t)%zss(1:nsnow+& - nsoil) = zsnso(-nsnow+1:nsoil) - NOAHMP401_struc(n)%noahmp401(t)%snowice(1:nsnow) = & - snice(-nsnow+1:0) - NOAHMP401_struc(n)%noahmp401(t)%snowliq(1:nsnow) = & - snliq(-nsnow+1:0) - NOAHMP401_struc(n)%noahmp401(t)%tsno(1:nsnow) = stc(-nsnow+1:0) - NOAHMP401_struc(n)%noahmp401(t)%tslb(1:nsoil) = stc(1:nsoil) + NoahMPnew_struc(n)%noahmpnew(t)%isnow = isnow + NoahMPnew_struc(n)%noahmpnew(t)%sneqv = sneqv + NoahMPnew_struc(n)%noahmpnew(t)%snowh = snowh + + NoahMPnew_struc(n)%noahmpnew(t)%zss(1:nsnow+nsoil) = zsnso(-nsnow+1:nsoil) + NoahMPnew_struc(n)%noahmpnew(t)%snowice(1:nsnow) = snice(-nsnow+1:0) + NoahMPnew_struc(n)%noahmpnew(t)%snowliq(1:nsnow) = snliq(-nsnow+1:0) + NoahMPnew_struc(n)%noahmpnew(t)%tsno(1:nsnow) = stc(-nsnow+1:0) + NoahMPnew_struc(n)%noahmpnew(t)%tslb(1:nsoil) = stc(1:nsoil) deallocate(ficeold) deallocate(snice) @@ -351,5 +364,9 @@ subroutine noahmp401_snodep_update(n, t, dsneqv, dsnowh) deallocate(dzsnso) deallocate(zsnso) deallocate(sice) + deallocate(bexp) + deallocate(psisat) + deallocate(smcmax) + +end subroutine noahmpnew_snodep_update -end subroutine noahmp401_snodep_update diff --git a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_transform_snodep.F90 b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_transform_snodep.F90 similarity index 82% rename from lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_transform_snodep.F90 rename to lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_transform_snodep.F90 index f7796c12f..11f248e03 100755 --- a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_transform_snodep.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_transform_snodep.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_transform_snodep -! \label{noahmp401_transform_snodep} +! !ROUTINE: noahmpnew_transform_snodep +! \label{noahmpnew_transform_snodep} ! ! !REVISION HISTORY: ! 25Jun2006: Sujay Kumar: Initial Specification @@ -17,15 +17,16 @@ ! 21 Jul 2011: James Geiger; Modified for Noah 3.2 ! 03 Oct 2018; Yeosang Yoon; Modified for NoahMP 3.6 ! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 +! May 2023: Cenlin He; Modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmp401_transform_snodep(n,OBS_State) +subroutine noahmpnew_transform_snodep(n,OBS_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_verify - use noahmp401_lsmMod + use noahmpnew_lsmMod use SNODEPobs_Mod, only : SNODEP_obs_obj !EOP implicit none @@ -52,12 +53,12 @@ subroutine noahmp401_transform_snodep(n,OBS_State) call ESMF_AttributeGet(OBS_State,name="Number Of Observations",& value=N_obs_size,rc=status) - call LIS_verify(status, 'attributeget error in noahmp401_transform_snodep') + call LIS_verify(status, 'attributeget error in noahmpnew_transform_snodep') call ESMF_StateGet(OBS_State,"Observation01",obs_snodep_field,& rc=status) - call LIS_verify(status,'stateget error in noahmp401_transform_snodep') + call LIS_verify(status,'stateget error in noahmpnew_transform_snodep') call ESMF_FieldGet(obs_snodep_field,localDE=0,farrayPtr=snodepobs,rc=status) - call LIS_verify(status,'fieldget error in noahmp401_transform_snodep') + call LIS_verify(status,'fieldget error in noahmpnew_transform_snodep') ! If using 8th mesh SNODEP data, convert it from inches to meters. ! 16th mesh SNODEP data are already in meters. @@ -71,4 +72,4 @@ subroutine noahmp401_transform_snodep(n,OBS_State) endif enddo endif -end subroutine noahmp401_transform_snodep +end subroutine noahmpnew_transform_snodep diff --git a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_updatesnodepvars.F90 b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_updatesnodepvars.F90 similarity index 90% rename from lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_updatesnodepvars.F90 rename to lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_updatesnodepvars.F90 index 3a41edc43..eff9b6a1b 100644 --- a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmp401_updatesnodepvars.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_updatesnodepvars.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_updatesnodepvars -! \label{noahmp401_updatesnodepvars} +! !ROUTINE: noahmpnew_updatesnodepvars +! \label{noahmpnew_updatesnodepvars} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -17,13 +17,14 @@ ! 02 Mar 2010: Sujay Kumar; Modified for Noah 3.1 ! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 ! 09 Jan 2020: Yeosang Yoon; Updated QC +! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmp401_updatesnodepvars(n, LSM_State, LSM_Incr_State) +subroutine noahmpnew_updatesnodepvars(n, LSM_State, LSM_Incr_State) ! !USES: use ESMF use LIS_coreMod - use noahmp401_lsmMod + use noahmpnew_lsmMod use LIS_logMod, only : LIS_logunit, LIS_verify implicit none @@ -56,7 +57,6 @@ subroutine noahmp401_updatesnodepvars(n, LSM_State, LSM_Incr_State) real :: swetmp, snodtmp,sndens logical :: update_flag(LIS_rc%ngrid(n)) real :: perc_violation(LIS_rc%ngrid(n)) - real :: snodmean(LIS_rc%ngrid(n)) integer :: nsnodmean(LIS_rc%ngrid(n)) @@ -69,7 +69,6 @@ subroutine noahmp401_updatesnodepvars(n, LSM_State, LSM_Incr_State) call LIS_verify(status) call ESMF_StateGet(LSM_Incr_State,"Snowdepth",snodIncrField,rc=status) call LIS_verify(status) - call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) call LIS_verify(status) @@ -147,8 +146,8 @@ subroutine noahmp401_updatesnodepvars(n, LSM_State, LSM_Incr_State) !Use the model's snow density from the previous timestep sndens = 0.0 - if(noahmp401_struc(n)%noahmp401(t)%snowh.gt.0) then - sndens = noahmp401_struc(n)%noahmp401(t)%sneqv/noahmp401_struc(n)%noahmp401(t)%snowh + if(NoahMPnew_struc(n)%noahmpnew(t)%snowh.gt.0) then + sndens = NoahMPnew_struc(n)%noahmpnew(t)%sneqv/NoahMPnew_struc(n)%noahmpnew(t)%snowh endif if(update_flag(gid)) then @@ -163,11 +162,11 @@ subroutine noahmp401_updatesnodepvars(n, LSM_State, LSM_Incr_State) swe(t) = swetmp endif else ! do not update - snod(t) = noahmp401_struc(n)%noahmp401(t)%snowh - swe(t) = noahmp401_struc(n)%noahmp401(t)%sneqv + snod(t) = NoahMPnew_struc(n)%noahmpnew(t)%snowh + swe(t) = NoahMPnew_struc(n)%noahmpnew(t)%sneqv end if enddo -end subroutine noahmp401_updatesnodepvars +end subroutine noahmpnew_updatesnodepvars diff --git a/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_dasnow_Mod.F90 b/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_dasnow_Mod.F90 similarity index 78% rename from lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_dasnow_Mod.F90 rename to lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_dasnow_Mod.F90 index 0c869bd91..a04fbf6f7 100755 --- a/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_dasnow_Mod.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_dasnow_Mod.F90 @@ -8,10 +8,10 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- #include "LIS_misc.h" -module noahmp401_dasnow_Mod +module noahmpnew_dasnow_Mod !BOP ! -! !MODULE: noahmp401_dasnow_Mod +! !MODULE: noahmpnew_dasnow_Mod ! ! !DESCRIPTION: ! @@ -25,7 +25,7 @@ module noahmp401_dasnow_Mod !----------------------------------------------------------------------------- ! !PUBLIC MEMBER FUNCTIONS: !----------------------------------------------------------------------------- - public :: noahmp401_dasnow_init + public :: noahmpnew_dasnow_init !----------------------------------------------------------------------------- ! !PUBLIC TYPES: !----------------------------------------------------------------------------- @@ -35,15 +35,15 @@ module noahmp401_dasnow_Mod contains !BOP ! -! !ROUTINE: noahmp401_dasnow_init -! \label{noahmp401_dasnow_init} +! !ROUTINE: noahmpnew_dasnow_init +! \label{noahmpnew_dasnow_init} ! ! !INTERFACE: - subroutine noahmp401_dasnow_init() + subroutine noahmpnew_dasnow_init() ! !USES: ! !DESCRIPTION: ! !EOP implicit none - end subroutine noahmp401_dasnow_init -end module noahmp401_dasnow_Mod + end subroutine noahmpnew_dasnow_init +end module noahmpnew_dasnow_Mod diff --git a/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_descale_snow.F90 b/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_descale_snow.F90 similarity index 88% rename from lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_descale_snow.F90 rename to lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_descale_snow.F90 index 9a363f08d..ed9fda131 100755 --- a/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_descale_snow.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_descale_snow.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_descale_snow -! \label{noahmp401_descale_snow} +! !ROUTINE: noahmpnew_descale_snow +! \label{noahmpnew_descale_snow} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -20,12 +20,12 @@ ! 13 Dec 2019: Eric Kemp; Replaced LDTSI with SNOW ! ! !INTERFACE: -subroutine noahmp401_descale_snow(n, LSM_State, LSM_Incr_State) +subroutine noahmpnew_descale_snow(n, LSM_State, LSM_Incr_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc - use noahmp401_lsmMod + use noahmpnew_lsmMod use LIS_logMod implicit none @@ -55,5 +55,5 @@ subroutine noahmp401_descale_snow(n, LSM_State, LSM_Incr_State) real, pointer :: snod(:) -end subroutine noahmp401_descale_snow +end subroutine noahmpnew_descale_snow diff --git a/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_getsnowpred.F90 b/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_getsnowpred.F90 similarity index 84% rename from lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_getsnowpred.F90 rename to lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_getsnowpred.F90 index 6fa842c3c..a4861f671 100755 --- a/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_getsnowpred.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_getsnowpred.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_getsnowpred -! \label{noahmp401_getsnowpred} +! !ROUTINE: noahmpnew_getsnowpred +! \label{noahmpnew_getsnowpred} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -22,14 +22,15 @@ ! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 and SNODEP ! 15 May 2019: Yeosang Yoon; Modified for NoahMP 4.0.1 and LDTSI ! 13 Dec 2019: Eric Kemp; Replaced LDTSI with SNOW +! May 2023: Cenlin He; Modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmp401_getsnowpred(n, k, obs_pred) +subroutine noahmpnew_getsnowpred(n, k, obs_pred) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc,LIS_surface - use noahmp401_lsmMod + use noahmpnew_lsmMod use LIS_DAobservationsMod implicit none @@ -47,7 +48,7 @@ subroutine noahmp401_getsnowpred(n, k, obs_pred) integer :: t do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - snwd(t) = noahmp401_struc(n)%noahmp401(t)%snowh ! Keep in meters + snwd(t) = NoahMPnew_struc(n)%noahmpnew(t)%snowh ! Keep in meters enddo call LIS_convertPatchSpaceToObsEnsSpace(n,k,& @@ -55,5 +56,5 @@ subroutine noahmp401_getsnowpred(n, k, obs_pred) snwd,& obs_pred) -end subroutine noahmp401_getsnowpred +end subroutine noahmpnew_getsnowpred diff --git a/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_getsnowvars.F90 b/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_getsnowvars.F90 similarity index 84% rename from lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_getsnowvars.F90 rename to lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_getsnowvars.F90 index 50e2ca540..372e7fe80 100755 --- a/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_getsnowvars.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_getsnowvars.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_getsnowvars -! \label{noahmp401_getsnowvars} +! !ROUTINE: noahmpnew_getsnowvars +! \label{noahmpnew_getsnowvars} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -19,15 +19,16 @@ ! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 and SNODEP ! 15 May 2019: Yeosang Yoon; Modified for NoahMP 4.0.1 and LDTSI ! 13 Dec 2019: Eric Kemp; Replaced LDTSI with SNOW +! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: ! -subroutine noahmp401_getsnowvars(n, LSM_State) +subroutine noahmpnew_getsnowvars(n, LSM_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_verify - use noahmp401_lsmMod + use noahmpnew_lsmMod implicit none ! !ARGUMENTS: @@ -65,8 +66,8 @@ subroutine noahmp401_getsnowvars(n, LSM_State) call LIS_verify(status) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - swe(t) = noahmp401_struc(n)%noahmp401(t)%sneqv - snod(t) = noahmp401_struc(n)%noahmp401(t)%snowh + swe(t) = NoahMPnew_struc(n)%noahmpnew(t)%sneqv + snod(t) = NoahMPnew_struc(n)%noahmpnew(t)%snowh enddo -end subroutine noahmp401_getsnowvars +end subroutine noahmpnew_getsnowvars diff --git a/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_getswepred.F90 b/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_getswepred.F90 similarity index 78% rename from lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_getswepred.F90 rename to lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_getswepred.F90 index 5ffb0c359..3a162a739 100644 --- a/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_getswepred.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_getswepred.F90 @@ -8,21 +8,22 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_getswepred -! \label{noahmp401_getswepred} +! !ROUTINE: noahmpnew_getswepred +! \label{noahmpnew_getswepred} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification ! 25Jun2006: Sujay Kumar: Updated for the ESMF design ! 02 Mar 2010: Sujay Kumar; Modified for Noah 3.1 +! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmp401_getswepred(n, k, obs_pred) +subroutine noahmpnew_getswepred(n, k, obs_pred) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc,LIS_surface - use noahmp401_lsmMod + use noahmpnew_lsmMod use LIS_DAobservationsMod implicit none @@ -36,7 +37,7 @@ subroutine noahmp401_getswepred(n, k, obs_pred) integer :: t do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - swe(t) = noahmp401_struc(n)%noahmp401(t)%sneqv !obs in mm + swe(t) = NoahMPnew_struc(n)%noahmpnew(t)%sneqv !obs in mm enddo call LIS_convertPatchSpaceToObsEnsSpace(n,k,& @@ -44,5 +45,5 @@ subroutine noahmp401_getswepred(n, k, obs_pred) swe,& obs_pred) -end subroutine noahmp401_getswepred +end subroutine noahmpnew_getswepred diff --git a/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_qc_snowobs.F90 b/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_qc_snowobs.F90 similarity index 85% rename from lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_qc_snowobs.F90 rename to lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_qc_snowobs.F90 index 4849d1b66..bf1636b8a 100755 --- a/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_qc_snowobs.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_qc_snowobs.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_qc_snowobs -! \label{noahmp401_qc_snowobs} +! !ROUTINE: noahmpnew_qc_snowobs +! \label{noahmpnew_qc_snowobs} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -21,16 +21,17 @@ ! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 ! 15 May 2019: Yeosang Yoon; Modified for NoahMP 4.0.1 and LDTSI ! 13 Dec 2019: Eric Kemp; Replaced LDTSI with SNOW +! May 2023: Cenlin He; modified for NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmp401_qc_snowobs(n,k,OBS_State) +subroutine noahmpnew_qc_snowobs(n,k,OBS_State) ! !USES: use ESMF use LIS_coreMod use LIS_logMod, only : LIS_verify use LIS_constantsMod, only : LIS_CONST_TKFRZ use LIS_DAobservationsMod - use noahmp401_lsmMod + use noahmpnew_lsmMod implicit none ! !ARGUMENTS: @@ -67,21 +68,21 @@ subroutine noahmp401_qc_snowobs(n,k,OBS_State) call ESMF_StateGet(OBS_State,"Observation01",obs_snow_field,rc=status) call LIS_verify(status,& - "ESMF_StateGet failed in noahmp401_qc_snowobs") + "ESMF_StateGet failed in noahmpnew_qc_snowobs") call ESMF_FieldGet(obs_snow_field,localDE=0,farrayPtr=snowobs,rc=status) call LIS_verify(status,& - "ESMF_FieldGet failed in noahmp401_qc_snowobs") + "ESMF_FieldGet failed in noahmpnew_qc_snowobs") do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) - !stc1(t) = noahmp401_struc(n)%noahmp401(t)%sstc(1) ! get snow/veg temp. - stc1(t) = noahmp401_struc(n)%noahmp401(t)%tslb(1) ! get snow/veg temp. + !stc1(t) = NoahMPnew_struc(n)%noahmpnew(t)%sstc(1) ! get snow/veg temp. + stc1(t) = NoahMPnew_struc(n)%noahmpnew(t)%tslb(1) ! get snow/veg temp. vegt(t) = LIS_surface(n,1)%tile(t)%vegt enddo call LIS_convertPatchSpaceToObsSpace(n,k,& - LIS_rc%lsm_index, noahmp401_struc(n)%noahmp401(:)%tv,tv_obs) !tv: vegetation temperature. unit: K + LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew(:)%tv,tv_obs) !tv: vegetation temperature. unit: K call LIS_convertPatchSpaceToObsSpace(n,k,LIS_rc%lsm_index, & !fveg: green vegetation fraction. unit: - - noahmp401_struc(n)%noahmp401(:)%fveg,fveg_obs) + NoahMPnew_struc(n)%noahmpnew(:)%fveg,fveg_obs) call LIS_convertPatchSpaceToObsSpace(n,k,& LIS_rc%lsm_index,stc1,stc1_obs) @@ -105,5 +106,5 @@ subroutine noahmp401_qc_snowobs(n,k,OBS_State) endif enddo -end subroutine noahmp401_qc_snowobs +end subroutine noahmpnew_qc_snowobs diff --git a/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_qcsnow.F90 b/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_qcsnow.F90 similarity index 88% rename from lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_qcsnow.F90 rename to lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_qcsnow.F90 index fe465f285..ef770516c 100755 --- a/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_qcsnow.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_qcsnow.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_qcsnow -! \label{noahmp401_qcsnow} +! !ROUTINE: noahmpnew_qcsnow +! \label{noahmpnew_qcsnow} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -22,14 +22,15 @@ ! 15 May 2019: Yeosang Yoon; Modified for NoahMP 4.0.1 and LDTSI ! 13 Dec 2019: Eric Kemp; Replaced LDTSI with SNOW ! 09 Jan 2020: Yeosang Yoon; update QC +! May 2023: Cenlin He; modified for NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmp401_qcsnow(n, LSM_State) +subroutine noahmpnew_qcsnow(n, LSM_State) ! !USES: use ESMF use LIS_coreMod - use noahmp401_lsmMod + use noahmpnew_lsmMod use LIS_logMod implicit none @@ -100,8 +101,8 @@ subroutine noahmp401_qcsnow(n, LSM_State) !Use the model's snow density from the previous timestep sndens = 0.0 - if(noahmp401_struc(n)%noahmp401(t)%snowh.gt.0) then - sndens = noahmp401_struc(n)%noahmp401(t)%sneqv/noahmp401_struc(n)%noahmp401(t)%snowh + if(NoahMPnew_struc(n)%noahmpnew(t)%snowh.gt.0) then + sndens = NoahMPnew_struc(n)%noahmpnew(t)%sneqv/NoahMPnew_struc(n)%noahmpnew(t)%snowh endif !If the update is unphysical, do not update. @@ -109,8 +110,8 @@ subroutine noahmp401_qcsnow(n, LSM_State) snod(t) = snod(t) swe(t) = snod(t)*sndens else ! do not update - snod(t) = noahmp401_struc(n)%noahmp401(t)%snowh - swe(t) = noahmp401_struc(n)%noahmp401(t)%sneqv + snod(t) = NoahMPnew_struc(n)%noahmpnew(t)%snowh + swe(t) = NoahMPnew_struc(n)%noahmpnew(t)%sneqv end if if(swe(t).gt.swemax) then @@ -122,5 +123,5 @@ subroutine noahmp401_qcsnow(n, LSM_State) end do -end subroutine noahmp401_qcsnow +end subroutine noahmpnew_qcsnow diff --git a/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_scale_snow.F90 b/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_scale_snow.F90 similarity index 89% rename from lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_scale_snow.F90 rename to lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_scale_snow.F90 index 2165f3a84..1489b5e9f 100755 --- a/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_scale_snow.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_scale_snow.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_scale_snow -! \label{noahmp401_scale_snow} +! !ROUTINE: noahmpnew_scale_snow +! \label{noahmpnew_scale_snow} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -21,12 +21,12 @@ ! 13 Dec 2019: Eric Kemp; Replaced LDTSI with SNOW ! ! !INTERFACE: -subroutine noahmp401_scale_snow(n, LSM_State) +subroutine noahmpnew_scale_snow(n, LSM_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc - use noahmp401_lsmMod + use noahmpnew_lsmMod use LIS_logMod implicit none @@ -54,5 +54,5 @@ subroutine noahmp401_scale_snow(n, LSM_State) real, pointer :: swe(:) real, pointer :: snod(:) -end subroutine noahmp401_scale_snow +end subroutine noahmpnew_scale_snow diff --git a/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_setsnowvars.F90 b/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_setsnowvars.F90 similarity index 81% rename from lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_setsnowvars.F90 rename to lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_setsnowvars.F90 index b40e85c5b..702eb7ba0 100755 --- a/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_setsnowvars.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_setsnowvars.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_setsnowvars -! \label{noahmp401_setsnowvars} +! !ROUTINE: noahmpnew_setsnowvars +! \label{noahmpnew_setsnowvars} ! ! !REVISION HISTORY: ! 15 Aug 2017: Sujay Kumar; Initial Specification @@ -23,15 +23,16 @@ ! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 and SNODEP ! 15 May 2019: Yeosang Yoon; Modified for NoahMP 4.0.1 and LDTSI ! 13 Dec 2019: Eric Kemp; Replaced LDTSI with SNOW +! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmp401_setsnowvars(n, LSM_State) +subroutine noahmpnew_setsnowvars(n, LSM_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc, LIS_domain, LIS_surface use LIS_snowMod, only : LIS_snow_struc use LIS_logMod, only : LIS_logunit, LIS_verify, LIS_endrun - use noahmp401_lsmMod + use noahmpnew_lsmMod implicit none ! !ARGUMENTS: @@ -40,7 +41,7 @@ subroutine noahmp401_setsnowvars(n, LSM_State) ! ! !DESCRIPTION: ! -! This routine assigns the snow progognostic variables to noah's +! This routine assigns the snow progognostic variables to noahmp's ! model space. The state vector consists of total SWE and snow depth. ! This routine also updates other model prognostics (snice, snliq, ! snow thickness, snow temperature) based on the update. @@ -66,13 +67,13 @@ subroutine noahmp401_setsnowvars(n, LSM_State) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - dsneqv = swe(t) - noahmp401_struc(n)%noahmp401(t)%sneqv !in mm - dsnowh = snod(t) - noahmp401_struc(n)%noahmp401(t)%snowh !in m + dsneqv = swe(t) - NoahMPnew_struc(n)%noahmpnew(t)%sneqv !in mm + dsnowh = snod(t) - NoahMPnew_struc(n)%noahmpnew(t)%snowh !in m ! update - call noahmp401_snow_update(n, t, dsneqv, dsnowh) + call noahmpnew_snow_update(n, t, dsneqv, dsnowh) enddo -end subroutine noahmp401_setsnowvars +end subroutine noahmpnew_setsnowvars diff --git a/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_snow_update.F90 b/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_snow_update.F90 similarity index 64% rename from lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_snow_update.F90 rename to lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_snow_update.F90 index 93e105177..9ed940777 100755 --- a/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_snow_update.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_snow_update.F90 @@ -8,23 +8,22 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_snow_update -! \label{noahmp401_snow_update} +! !ROUTINE: noahmpnew_snow_update +! \label{noahmpnew_snow_update} ! ! !REVISION HISTORY: ! 13 Aug 2017: Sujay Kumar; Initial specification ! 14 Dec 2018: Yeosang Yoon; Modified code for NoahMP 4.0.1 and SNODEP ! 15 May 2019: Yeosang Yoon; Modified for NoahMP 4.0.1 and LDTSI ! 13 Dec 2019: Eric Kemp; Replaced LDTSI with SNOW - +! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE -subroutine noahmp401_snow_update(n, t, dsneqv, dsnowh) +subroutine noahmpnew_snow_update(n, t, dsneqv, dsnowh) use LIS_coreMod - use NoahMP401_lsmMod - use module_sf_noahmplsm_401 - use noahmp_tables_401 + use NoahMPnew_lsmMod + use NoahMPnew_snowphys_updateMod implicit none ! @@ -41,7 +40,10 @@ subroutine noahmp401_snow_update(n, t, dsneqv, dsnowh) real :: dsneqv !mm real :: dsnowh !m !EOP - + real, parameter :: tfrz = 273.16 !freezing/melting point (k) + real, parameter :: hfus = 0.3336E06 !latent heat of fusion (j/kg) + real, parameter :: grav = 9.80616 !acceleration due to gravity (m/s2) + real, parameter :: DENH2O = 1000.0 !density of water (kg/m3) real, allocatable, dimension(:) :: zsoil real, allocatable, dimension(:) :: ficeold real, allocatable, dimension(:) :: snice @@ -52,6 +54,9 @@ subroutine noahmp401_snow_update(n, t, dsneqv, dsnowh) real, allocatable, dimension(:) :: mliq real, allocatable, dimension(:) :: dzsnso real, allocatable, dimension(:) :: zsnso + real, allocatable, dimension(:) :: BEXP + real, allocatable, dimension(:) :: PSISAT + real, allocatable, dimension(:) :: SMCMAX integer, allocatable, dimension(:) :: imelt !phase change index real, allocatable, dimension(:) :: sice @@ -66,11 +71,10 @@ subroutine noahmp401_snow_update(n, t, dsneqv, dsnowh) ! local real :: SNOFLOW, BDSNOW - type (noahmp_parameters) :: parameters - isnow = noahmp401_struc(n)%noahmp401(t)%isnow - nsoil = noahmp401_struc(n)%nsoil - nsnow = noahmp401_struc(n)%nsnow + isnow = NoahMPnew_struc(n)%noahmpnew(t)%isnow + nsoil = NoahMPnew_struc(n)%nsoil + nsnow = NoahMPnew_struc(n)%nsnow allocate(ficeold(-nsnow+1:0)) allocate(snice(-nsnow+1:0)) @@ -83,30 +87,33 @@ subroutine noahmp401_snow_update(n, t, dsneqv, dsnowh) allocate(dzsnso(-nsnow+1:nsoil)) allocate(zsnso(-nsnow+1:nsoil)) allocate(sice(nsoil)) + allocate(BEXP(nsoil)) + allocate(PSISAT(nsoil)) + allocate(SMCMAX(nsoil)) imelt = 0 !set empty snow layers to zero do iz = -nsnow+1, isnow - snice(iz) = 0. - snliq(iz) = 0. - stc(iz) = 0. - dzsnso(iz)= 0. - zsnso(iz) = 0. + snice(iz) = 0.0 + snliq(iz) = 0.0 + stc(iz) = 0.0 + dzsnso(iz)= 0.0 + zsnso(iz) = 0.0 enddo ! initialize the variables - soiltype = noahmp401_struc(n)%noahmp401(t)%soiltype + soiltype = NoahMPnew_struc(n)%noahmpnew(t)%soiltype do isoil = 1, size(soiltype) - parameters%BEXP(isoil) = BEXP_TABLE (SOILTYPE(isoil)) - parameters%PSISAT(isoil) = PSISAT_TABLE (SOILTYPE(isoil)) - parameters%SMCMAX(isoil) = SMCMAX_TABLE (SOILTYPE(isoil)) + BEXP(isoil) = NoahmpNew_struc(n)%noahmpnew(t)%param%BEXP(isoil) + PSISAT(isoil) = NoahmpNew_struc(n)%noahmpnew(t)%param%PSISAT(isoil) + SMCMAX(isoil) = NoahmpNew_struc(n)%noahmpnew(t)%param%SMCMAX(isoil) end do - sneqv = noahmp401_struc(n)%noahmp401(t)%sneqv - snowh = noahmp401_struc(n)%noahmp401(t)%snowh + sneqv = NoahMPnew_struc(n)%noahmpnew(t)%sneqv + snowh = NoahMPnew_struc(n)%noahmpnew(t)%snowh - zsnso(-nsnow+1:nsoil) = noahmp401_struc(n)%noahmp401(t)%zss(1:nsnow+nsoil) + zsnso(-nsnow+1:nsoil) = NoahMPnew_struc(n)%noahmpnew(t)%zss(1:nsnow+nsoil) ! snow/soil layer thickness (m) do iz = isnow+1, nsoil @@ -120,22 +127,22 @@ subroutine noahmp401_snow_update(n, t, dsneqv, dsnowh) ! set ZSOIL allocate(zsoil(nsoil)) ! zsoil is negative. - zsoil(1) = -noahmp401_struc(n)%sldpth(1) + zsoil(1) = -NoahMPnew_struc(n)%sldpth(1) do i = 2, nsoil - zsoil(i) = zsoil(i-1) - NOAHMP401_struc(n)%sldpth(i) + zsoil(i) = zsoil(i-1) - NoahMPnew_struc(n)%sldpth(i) enddo ! state variables snice(-nsnow+1:0) = & - noahmp401_struc(n)%noahmp401(t)%snowice(1:nsnow) + NoahMPnew_struc(n)%noahmpnew(t)%snowice(1:nsnow) snliq(-nsnow+1:0) = & - noahmp401_struc(n)%noahmp401(t)%snowliq(1:nsnow) + NoahMPnew_struc(n)%noahmpnew(t)%snowliq(1:nsnow) stc(-nsnow+1:0) = & - noahmp401_struc(n)%noahmp401(t)%tsno(1:nsnow) + NoahMPnew_struc(n)%noahmpnew(t)%tsno(1:nsnow) ! soil temperature stc(1:nsoil) = & - noahmp401_struc(n)%noahmp401(t)%tslb(1:nsoil) + NoahMPnew_struc(n)%noahmpnew(t)%tslb(1:nsoil) ! from snowfall routine @@ -153,7 +160,7 @@ subroutine noahmp401_snow_update(n, t, dsneqv, dsnowh) newnode = 1 dzsnso(0)= snowh snowh = 0. - stc(0) = min(273.16, noahmp401_struc(n)%noahmp401(t)%sfctmp) + stc(0) = min(273.16, NoahMPnew_struc(n)%noahmpnew(t)%sfctmp) snice(0) = sneqv snliq(0) = 0. end if @@ -198,8 +205,8 @@ subroutine noahmp401_snow_update(n, t, dsneqv, dsnowh) endif enddo - sice(:) = max(0.0, noahmp401_struc(n)%noahmp401(t)%smc(:)& - - noahmp401_struc(n)%noahmp401(t)%sh2o(:)) + sice(:) = max(0.0, NoahMPnew_struc(n)%noahmpnew(t)%smc(:)& + - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(:)) !imelt do j = -nsnow+1, nsoil @@ -212,9 +219,9 @@ subroutine noahmp401_snow_update(n, t, dsneqv, dsnowh) end do do j = 1, nsoil ! soil - mliq(j) = noahmp401_struc(n)%noahmp401(t)%sh2o(j) * dzsnso(j) * 1000. - mice(j) = (noahmp401_struc(n)%noahmp401(t)%smc(j) - & - noahmp401_struc(n)%noahmp401(t)%sh2o(j)) * dzsnso(j) * 1000. + mliq(j) = NoahMPnew_struc(n)%noahmpnew(t)%sh2o(j) * dzsnso(j) * 1000. + mice(j) = (NoahMPnew_struc(n)%noahmpnew(t)%smc(j) - & + NoahMPnew_struc(n)%noahmpnew(t)%sh2o(j)) * dzsnso(j) * 1000. end do do j = isnow+1,nsoil ! all layers @@ -224,7 +231,7 @@ subroutine noahmp401_snow_update(n, t, dsneqv, dsnowh) do j = 1,nsoil if(stc(j) < tfrz) then smp = hfus*(tfrz-stc(j))/(grav*stc(j)) !(m) - supercool(j) = parameters%smcmax(j)*(smp/parameters%psisat(j))**(-1./parameters%bexp(j)) + supercool(j) = smcmax(j)*(smp/psisat(j))**(-1./bexp(j)) supercool(j) = supercool(j)*dzsnso(j)*1000. !(mm) end if enddo @@ -252,31 +259,33 @@ subroutine noahmp401_snow_update(n, t, dsneqv, dsnowh) ponding2 = 0.0 if(isnow < 0) & ! when multi-layer - call compact (parameters, nsnow, nsoil, noahmp401_struc(n)%ts, & !in + call compact (NoahmpNew_struc(n)%noahmpnew(t)%param, & + nsnow, nsoil, NoahMPnew_struc(n)%ts, & !in stc, snice, snliq, zsoil, imelt, ficeold, iloc, jloc, & !in isnow, dzsnso ,zsnso) !inout if(isnow < 0) & - call combine (parameters, nsnow, nsoil ,iloc, jloc, & !in - isnow, noahmp401_struc(n)%noahmp401(t)%sh2o, & !inout - stc, snice, snliq, dzsnso, sice, snowh, sneqv, & !inout - ponding1, ponding2) !out + call combine (NoahmpNew_struc(n)%noahmpnew(t)%param, & + nsnow, nsoil ,iloc, jloc, & !in + isnow, NoahMPnew_struc(n)%noahmpnew(t)%sh2o, & !inout + stc, snice, snliq, dzsnso, sice, snowh, sneqv, & !inout + ponding1, ponding2) !out if(isnow < 0) & - call divide (parameters, nsnow, nsoil, & !in + call divide (NoahmpNew_struc(n)%noahmpnew(t)%param, nsnow, nsoil, & !in isnow, stc, snice, snliq, dzsnso) !inout !set empty snow layers to zero do iz = -nsnow+1, isnow - snice(iz) = 0. - snliq(iz) = 0. - stc(iz) = 0. - dzsnso(iz)= 0. - zsnso(iz) = 0. + snice(iz) = 0.0 + snliq(iz) = 0.0 + stc(iz) = 0.0 + dzsnso(iz)= 0.0 + zsnso(iz) = 0.0 enddo !to obtain equilibrium state of snow in glacier region - if(sneqv > 2000.) then ! 2000 mm -> maximum water depth + if(sneqv > 5000.0) then ! 5000 mm -> maximum water depth bdsnow = snice(0) / dzsnso(0) - snoflow = (sneqv - 2000.) + snoflow = (sneqv - 5000.0) snice(0) = snice(0) - snoflow dzsnso(0) = dzsnso(0) - snoflow/bdsnow !snoflow = snoflow / dt @@ -284,22 +293,12 @@ subroutine noahmp401_snow_update(n, t, dsneqv, dsnowh) ! sum up snow mass for layered snow if(isnow < 0) then ! mb: only do for multi-layer - sneqv = 0. - snowh = 0. ! yeosang yoon + sneqv = 0.0 do iz = isnow+1,0 sneqv = sneqv + snice(iz) + snliq(iz) - snowh = snowh + dzsnso(iz) ! yeosang yoon enddo end if - ! no snow layer case, limit snow density to 1000 - if (isnow == 0 .and. sneqv > 0. .and. snowh > 0.) then - bdsnow = sneqv/snowh - if (bdsnow >= denh2o) then - snowh = snowh*(bdsnow/1000.) ! change unit, sneqv=[mm] snowh=[m] - end if - end if - ! reset zsnso and layer thinkness dzsnso do iz = isnow+1, 0 dzsnso(iz) = -dzsnso(iz) @@ -319,19 +318,35 @@ subroutine noahmp401_snow_update(n, t, dsneqv, dsnowh) dzsnso(iz) = -dzsnso(iz) end do + ! sum up snow thickness for layered snow + IF(ISNOW < 0) THEN ! MB: only do for multi-layer + SNOWH = 0.0 ! Yeosang Yoon + DO IZ = ISNOW+1,0 + SNOWH = SNOWH + DZSNSO(IZ) ! Yeosang Yoon + ENDDO + END IF + + ! Yeosag Yoon, no snow layer case, limit snow density to 1000 + IF (ISNOW == 0 .AND. SNEQV > 0.0 .AND. SNOWH > 0.0) THEN + BDSNOW = SNEQV/SNOWH + IF (BDSNOW >= DENH2O) THEN + SNOWH = SNOWH*(BDSNOW/DENH2O) ! change unit, SNEQV=[mm] SNOWH=[m] + END IF + END IF + ! update state vars - noahmp401_struc(n)%noahmp401(t)%isnow = isnow - noahmp401_struc(n)%noahmp401(t)%sneqv = sneqv - noahmp401_struc(n)%noahmp401(t)%snowh = snowh + NoahMPnew_struc(n)%noahmpnew(t)%isnow = isnow + NoahMPnew_struc(n)%noahmpnew(t)%sneqv = sneqv + NoahMPnew_struc(n)%noahmpnew(t)%snowh = snowh - noahmp401_struc(n)%noahmp401(t)%zss(1:nsnow+& + NoahMPnew_struc(n)%noahmpnew(t)%zss(1:nsnow+& nsoil) = zsnso(-nsnow+1:nsoil) - noahmp401_struc(n)%noahmp401(t)%snowice(1:nsnow) = & + NoahMPnew_struc(n)%noahmpnew(t)%snowice(1:nsnow) = & snice(-nsnow+1:0) - noahmp401_struc(n)%noahmp401(t)%snowliq(1:nsnow) = & + NoahMPnew_struc(n)%noahmpnew(t)%snowliq(1:nsnow) = & snliq(-nsnow+1:0) - noahmp401_struc(n)%noahmp401(t)%tsno(1:nsnow) = stc(-nsnow+1:0) - noahmp401_struc(n)%noahmp401(t)%tslb(1:nsoil) = stc(1:nsoil) + NoahMPnew_struc(n)%noahmpnew(t)%tsno(1:nsnow) = stc(-nsnow+1:0) + NoahMPnew_struc(n)%noahmpnew(t)%tslb(1:nsoil) = stc(1:nsoil) deallocate(ficeold) deallocate(snice) @@ -344,5 +359,8 @@ subroutine noahmp401_snow_update(n, t, dsneqv, dsnowh) deallocate(dzsnso) deallocate(zsnso) deallocate(sice) + deallocate(bexp) + deallocate(psisat) + deallocate(smcmax) -end subroutine noahmp401_snow_update +end subroutine noahmpnew_snow_update diff --git a/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_updatesnowvars.F90 b/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_updatesnowvars.F90 similarity index 90% rename from lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_updatesnowvars.F90 rename to lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_updatesnowvars.F90 index 35afc3c87..8dc8e48b1 100755 --- a/lis/surfacemodels/land/noahmp.new/da_snow/noahmp401_updatesnowvars.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_updatesnowvars.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_updatesnowvars -! \label{noahmp401_updatesnowvars} +! !ROUTINE: noahmpnew_updatesnowvars +! \label{noahmpnew_updatesnowvars} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -19,13 +19,13 @@ ! 15 May 2019: Yeosang Yoon; Modified for NoahMP 4.0.1 and LDTSI ! 13 Dec 2019: Eric Kemp; Replaced LDTSI with SNOW ! 09 Jan 2020: Yeosang Yoon; Updated QC -! +! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! !INTERFACE: -subroutine noahmp401_updatesnowvars(n, LSM_State, LSM_Incr_State) +subroutine noahmpnew_updatesnowvars(n, LSM_State, LSM_Incr_State) ! !USES: use ESMF use LIS_coreMod - use noahmp401_lsmMod + use noahmpnew_lsmMod use LIS_logMod, only : LIS_logunit, LIS_verify implicit none @@ -150,8 +150,8 @@ subroutine noahmp401_updatesnowvars(n, LSM_State, LSM_Incr_State) !Use the model's snow density from the previous timestep sndens = 0.0 - if(noahmp401_struc(n)%noahmp401(t)%snowh.gt.0) then - sndens = noahmp401_struc(n)%noahmp401(t)%sneqv/noahmp401_struc(n)%noahmp401(t)%snowh + if(NoahMPnew_struc(n)%noahmpnew(t)%snowh.gt.0) then + sndens = NoahMPnew_struc(n)%noahmpnew(t)%sneqv/NoahMPnew_struc(n)%noahmpnew(t)%snowh endif if(update_flag(gid)) then @@ -166,11 +166,11 @@ subroutine noahmp401_updatesnowvars(n, LSM_State, LSM_Incr_State) swe(t) = swetmp endif else ! do not update - snod(t) = noahmp401_struc(n)%noahmp401(t)%snowh - swe(t) = noahmp401_struc(n)%noahmp401(t)%sneqv + snod(t) = NoahMPnew_struc(n)%noahmpnew(t)%snowh + swe(t) = NoahMPnew_struc(n)%noahmpnew(t)%sneqv end if enddo -end subroutine noahmp401_updatesnowvars +end subroutine noahmpnew_updatesnowvars diff --git a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_dasoilm_Mod.F90 b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_dasoilm_Mod.F90 similarity index 63% rename from lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_dasoilm_Mod.F90 rename to lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_dasoilm_Mod.F90 index 38e7e3e84..cae4eb428 100644 --- a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_dasoilm_Mod.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_dasoilm_Mod.F90 @@ -8,17 +8,17 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- #include "LIS_misc.h" -module NoahMP401_dasoilm_Mod +module NoahMPnew_dasoilm_Mod !BOP ! -! !MODULE: NoahMP401_dasoilm_Mod +! !MODULE: NoahMPnew_dasoilm_Mod ! ! !DESCRIPTION: ! ! !REVISION HISTORY: ! 15 Dec 2018: Mahdi Navari, Sujay Kumar ; Modified for NoahMP401 ! - +! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! !USES: use ESMF use LIS_coreMod @@ -32,11 +32,11 @@ module NoahMP401_dasoilm_Mod !----------------------------------------------------------------------------- ! !PUBLIC MEMBER FUNCTIONS: !----------------------------------------------------------------------------- - public :: NoahMP401_dasoilm_init + public :: NoahMPnew_dasoilm_init !----------------------------------------------------------------------------- ! !PUBLIC TYPES: !----------------------------------------------------------------------------- - public :: noahmp401_dasm_struc + public :: noahmpnew_dasm_struc !EOP type, public :: dasm_dec @@ -50,16 +50,16 @@ module NoahMP401_dasoilm_Mod end type dasm_dec - type(dasm_dec), allocatable :: noahmp401_dasm_struc(:) + type(dasm_dec), allocatable :: noahmpnew_dasm_struc(:) contains !BOP ! -! !ROUTINE: NoahMP401_dasoilm_init -! \label{NoahMP401_dasoilm_init} +! !ROUTINE: NoahMPnew_dasoilm_init +! \label{NoahMPnew_dasoilm_init} ! ! !INTERFACE: - subroutine NoahMP401_dasoilm_init(k) + subroutine NoahMPnew_dasoilm_init(k) ! !USES: ! !DESCRIPTION: ! @@ -73,46 +73,46 @@ subroutine NoahMP401_dasoilm_init(k) integer :: status integer :: ngrid - if(.not.allocated(noahmp401_dasm_struc)) then - allocate(noahmp401_dasm_struc(LIS_rc%nnest)) + if(.not.allocated(noahmpnew_dasm_struc)) then + allocate(noahmpnew_dasm_struc(LIS_rc%nnest)) endif !TBD: SVK #if 0 if(LIS_rc%dascaloption(k).eq."Linear scaling") then - call ESMF_ConfigFindLabel(LIS_config,"Noah-MP.3.6 soil moisture CDF file:",& + call ESMF_ConfigFindLabel(LIS_config,"Noah-MP.New soil moisture CDF file:",& rc=status) do n=1,LIS_rc%nnest call ESMF_ConfigGetAttribute(LIS_config,modelcdffile(n),rc=status) - call LIS_verify(status, 'Noah-MP.3.6 soil moisture CDF file: not defined') + call LIS_verify(status, 'Noah-MP.New soil moisture CDF file: not defined') enddo do n=1,LIS_rc%nnest !Hardcoded for now. - noahmp401_dasm_struc(n)%nbins = 100 + noahmpnew_dasm_struc(n)%nbins = 100 call LIS_getCDFattributes(modelcdffile(n),& - noahmp401_dasm_struc(n)%ntimes, ngrid) + noahmpnew_dasm_struc(n)%ntimes, ngrid) - allocate(noahmp401_dasm_struc(n)%model_xrange(& - LIS_rc%ngrid(n), noahmp401_dasm_struc(n)%ntimes, & - noahmp401_dasm_struc(n)%nbins)) - allocate(noahmp401_dasm_struc(n)%model_cdf(& - LIS_rc%ngrid(n), noahmp401_dasm_struc(n)%ntimes, & - noahmp401_dasm_struc(n)%nbins)) + allocate(noahmpnew_dasm_struc(n)%model_xrange(& + LIS_rc%ngrid(n), noahmpnew_dasm_struc(n)%ntimes, & + noahmpnew_dasm_struc(n)%nbins)) + allocate(noahmpnew_dasm_struc(n)%model_cdf(& + LIS_rc%ngrid(n), noahmpnew_dasm_struc(n)%ntimes, & + noahmpnew_dasm_struc(n)%nbins)) call LIS_readCDFdata(n,& - noahmp401_dasm_struc(n)%nbins, & - noahmp401_dasm_struc(n)%ntimes, & + noahmpnew_dasm_struc(n)%nbins, & + noahmpnew_dasm_struc(n)%ntimes, & ngrid, & modelcdffile(n), & "SoilMoist",& - noahmp401_dasm_struc(n)%model_xrange,& - noahmp401_dasm_struc(n)%model_cdf) + noahmpnew_dasm_struc(n)%model_xrange,& + noahmpnew_dasm_struc(n)%model_cdf) enddo endif #endif - end subroutine NoahMP401_dasoilm_init -end module NoahMP401_dasoilm_Mod + end subroutine NoahMPnew_dasoilm_init +end module NoahMPnew_dasoilm_Mod diff --git a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_descale_soilm.F90 b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_descale_soilm.F90 similarity index 81% rename from lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_descale_soilm.F90 rename to lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_descale_soilm.F90 index c0531e090..5067f8106 100644 --- a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_descale_soilm.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_descale_soilm.F90 @@ -8,22 +8,22 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: NoahMP401_descale_soilm -! \label{NoahMP401_descale_soilm} +! !ROUTINE: NoahMPnew_descale_soilm +! \label{NoahMPnew_descale_soilm} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification ! 25Jun2006: Sujay Kumar: Updated for the ESMF design -! 15 Dec 2018: Mahdi Navari; Modified for NoahMP401 +! 15 Dec 2018: Mahdi Navari; Modified for NoahMPnew ! ! !INTERFACE: -subroutine NoahMP401_descale_soilm(n, LSM_State, LSM_Incr_State) +subroutine NoahMPnew_descale_soilm(n, LSM_State, LSM_Incr_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_verify - use NoahMP401_lsmMod + use NoahMPnew_lsmMod implicit none ! !ARGUMENTS: @@ -44,5 +44,5 @@ subroutine NoahMP401_descale_soilm(n, LSM_State, LSM_Incr_State) !EOP -end subroutine NoahMP401_descale_soilm +end subroutine NoahMPnew_descale_soilm diff --git a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_getsmpred.F90 b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_getsmpred.F90 similarity index 69% rename from lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_getsmpred.F90 rename to lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_getsmpred.F90 index 3662eae99..1d486284d 100644 --- a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_getsmpred.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_getsmpred.F90 @@ -8,24 +8,25 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: NoahMP401_getsmpred -! \label{NoahMP401_getsmpred} +! !ROUTINE: NoahMPnew_getsmpred +! \label{NoahMPnew_getsmpred} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification ! 25Jun2006: Sujay Kumar: Updated for the ESMF design -! 9 Sep 2016: Mahdi Navari; Modified for NoahMP401 +! 9 Sep 2016: Mahdi Navari; Modified for NoahMPnew +! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine NoahMP401_getsmpred(n, k,obs_pred) +subroutine NoahMPnew_getsmpred(n, k,obs_pred) ! !USES: use ESMF use LIS_constantsMod use LIS_coreMod use LIS_dataAssimMod use LIS_DAobservationsMod - use NoahMP401_lsmMod - use NoahMP401_dasoilm_Mod + use NoahMPnew_lsmMod + use NoahMPnew_dasoilm_Mod !EOP implicit none @@ -53,7 +54,7 @@ subroutine NoahMP401_getsmpred(n, k,obs_pred) do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) - smc1(t) = noahmp401_struc(n)%noahmp401(t)%smc(1) + smc1(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(1) enddo call LIS_convertPatchSpaceToObsEnsSpace(n,k,& LIS_rc%lsm_index, & @@ -65,7 +66,7 @@ subroutine NoahMP401_getsmpred(n, k,obs_pred) !rescaling to relative wetness space. if(LIS_rc%dascaloption(k).eq."Linear scaling") then - if(noahmp401_dasm_struc(n)%ntimes.gt.1) then + if(noahmpnew_dasm_struc(n)%ntimes.gt.1) then kk = LIS_rc%mo else kk = 1 @@ -73,9 +74,9 @@ subroutine NoahMP401_getsmpred(n, k,obs_pred) do i=1,LIS_rc%obs_ngrid(k) do m=1,LIS_rc%nensem(n) - obs_tmp = (obs_pred(i,m) - noahmp401_dasm_struc(n)%model_xrange(i,kk,1))/& - (noahmp401_dasm_struc(n)%model_xrange(i,kk,noahmp401_dasm_struc(n)%nbins) - & - noahmp401_dasm_struc(n)%model_xrange(i,kk,1)) + obs_tmp = (obs_pred(i,m) - noahmpnew_dasm_struc(n)%model_xrange(i,kk,1))/& + (noahmpnew_dasm_struc(n)%model_xrange(i,kk,noahmpnew_dasm_struc(n)%nbins) - & + noahmpnew_dasm_struc(n)%model_xrange(i,kk,1)) obs_pred(i,m) = obs_tmp enddo enddo @@ -89,13 +90,13 @@ subroutine NoahMP401_getsmpred(n, k,obs_pred) t = i+m-1 gid = LIS_surface(n,LIS_rc%lsm_index)%tile(t)%index - inputs_tp(1) = noahmp401_struc(n)%noahmp401(t)%smc(1) - inputs_tp(2) = noahmp401_struc(n)%noahmp401(t)%prcp*(1-noahmp401_struc(n)%noahmp401(t)%fpice) !Noah33 rainf - inputs_tp(3) = noahmp401_struc(n)%noahmp401(t)%prcp*noahmp401_struc(n)%noahmp401(t)%fpice !Noah33 snowf - !MN: NOTE: noahmp401 --> prcp (total precip), fpice (snow fraction in precipitation [-]) - inputs_tp(4) = noahmp401_struc(n)%noahmp401(t)%fveg !Noah33 shdfac - inputs_tp(5) = noahmp401_struc(n)%noahmp401(t)%sstc(noahmp401_struc(n)%nsnow+1) !Noah33 stc(1) - inputs_tp(6) = noahmp401_struc(n)%noahmp401(t)%sneqv*LIS_CONST_RHOFW + inputs_tp(1) = NoahMPnew_struc(n)%noahmpnew(t)%smc(1) + inputs_tp(2) = NoahMPnew_struc(n)%noahmpnew(t)%prcp*(1-NoahMPnew_struc(n)%noahmpnew(t)%fpice) !Noah33 rainf + inputs_tp(3) = NoahMPnew_struc(n)%noahmpnew(t)%prcp*NoahMPnew_struc(n)%noahmpnew(t)%fpice !Noah33 snowf + !MN: NOTE: noahmpnew --> prcp (total precip), fpice (snow fraction in precipitation [-]) + inputs_tp(4) = NoahMPnew_struc(n)%noahmpnew(t)%fveg !Noah33 shdfac + inputs_tp(5) = NoahMPnew_struc(n)%noahmpnew(t)%sstc(NoahMPnew_struc(n)%nsnow+1) !Noah33 stc(1) + inputs_tp(6) = NoahMPnew_struc(n)%noahmpnew(t)%sneqv*LIS_CONST_RHOFW units_tp(1) = "m^3 m-3" units_tp(2) = "kg m-2 s-1" @@ -118,5 +119,5 @@ subroutine NoahMP401_getsmpred(n, k,obs_pred) enddo endif #endif -end subroutine NoahMP401_getsmpred +end subroutine NoahMPnew_getsmpred diff --git a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_getsoilm.F90 b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_getsoilm.F90 similarity index 80% rename from lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_getsoilm.F90 rename to lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_getsoilm.F90 index d461f2091..6285b18ce 100644 --- a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_getsoilm.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_getsoilm.F90 @@ -8,22 +8,22 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: NoahMP401_getsoilm -! \label{NoahMP401_getsoilm} +! !ROUTINE: NoahMPnew_getsoilm +! \label{NoahMPnew_getsoilm} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification ! 25Jun2006: Sujay Kumar: Updated for the ESMF design -! 15 Dec 2018: Mahdi Navari; Modified for NoahMP401 - +! 15 Dec 2018: Mahdi Navari; Modified for NoahMPnew +! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! !INTERFACE: -subroutine NoahMP401_getsoilm(n, LSM_State) +subroutine NoahMPnew_getsoilm(n, LSM_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_verify - use NoahMP401_lsmMod + use NoahMPnew_lsmMod implicit none ! !ARGUMENTS: @@ -54,30 +54,30 @@ subroutine NoahMP401_getsoilm(n, LSM_State) character*100 :: lsm_state_objs(4) call ESMF_StateGet(LSM_State,"Soil Moisture Layer 1",sm1Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm1 in NoahMP401_getsoilm') + call LIS_verify(status,'ESMF_StateGet failed for sm1 in NoahMPnew_getsoilm') call ESMF_StateGet(LSM_State,"Soil Moisture Layer 2",sm2Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm2 in NoahMP401_getsoilm') + call LIS_verify(status,'ESMF_StateGet failed for sm2 in NoahMPnew_getsoilm') call ESMF_StateGet(LSM_State,"Soil Moisture Layer 3",sm3Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm3 in NoahMP401_getsoilm') + call LIS_verify(status,'ESMF_StateGet failed for sm3 in NoahMPnew_getsoilm') call ESMF_StateGet(LSM_State,"Soil Moisture Layer 4",sm4Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm4 in NoahMP401_getsoilm') + call LIS_verify(status,'ESMF_StateGet failed for sm4 in NoahMPnew_getsoilm') call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm1,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm1 in NoahMP401_getsoilm') + call LIS_verify(status,'ESMF_FieldGet failed for sm1 in NoahMPnew_getsoilm') call ESMF_FieldGet(sm2Field,localDE=0,farrayPtr=soilm2,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm2 in NoahMP401_getsoilm') + call LIS_verify(status,'ESMF_FieldGet failed for sm2 in NoahMPnew_getsoilm') call ESMF_FieldGet(sm3Field,localDE=0,farrayPtr=soilm3,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm3 in NoahMP401_getsoilm') + call LIS_verify(status,'ESMF_FieldGet failed for sm3 in NoahMPnew_getsoilm') call ESMF_FieldGet(sm4Field,localDE=0,farrayPtr=soilm4,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm4 in NoahMP401_getsoilm') + call LIS_verify(status,'ESMF_FieldGet failed for sm4 in NoahMPnew_getsoilm') do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - soilm1(t) = noahmp401_struc(n)%noahmp401(t)%smc(1) - soilm2(t) = noahmp401_struc(n)%noahmp401(t)%smc(2) - soilm3(t) = noahmp401_struc(n)%noahmp401(t)%smc(3) - soilm4(t) = noahmp401_struc(n)%noahmp401(t)%smc(4) + soilm1(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(1) + soilm2(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(2) + soilm3(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(3) + soilm4(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(4) enddo -end subroutine NoahMP401_getsoilm +end subroutine NoahMPnew_getsoilm diff --git a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_qc_soilmobs.F90 b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_qc_soilmobs.F90 similarity index 79% rename from lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_qc_soilmobs.F90 rename to lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_qc_soilmobs.F90 index 17bdef5dd..621ccbd19 100644 --- a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_qc_soilmobs.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_qc_soilmobs.F90 @@ -8,26 +8,24 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: NoahMP401_qc_soilmobs -! \label{NoahMP401_qc_soilmobs} +! !ROUTINE: NoahMPnew_qc_soilmobs +! \label{NoahMPnew_qc_soilmobs} ! ! !REVISION HISTORY: ! 25Feb2008: Sujay Kumar: Initial Specification -! 15 Dec 2018: Mahdi Navari; Modified for NoahMP401 +! 15 Dec 2018: Mahdi Navari; Modified for NoahMPnew ! 15 Jun 2020: Yonghwan Kwon: Modified vegetation fraction threshold +! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine NoahMP401_qc_soilmobs(n,k,OBS_State) +subroutine NoahMPnew_qc_soilmobs(n,k,OBS_State) ! !USES: use ESMF use LIS_coreMod use LIS_logMod, only : LIS_verify use LIS_constantsMod, only : LIS_CONST_TKFRZ use LIS_DAobservationsMod - use NoahMP401_lsmMod - !use module_sf_noahlsm_36 !, only: MAXSMC !MN - !use module_sf_noahmpdrv_401, only: parameters - use NOAHMP_TABLES_401, ONLY : SMCMAX_TABLE,SMCWLT_TABLE + use NoahMPnew_lsmMod implicit none ! !ARGUMENTS: @@ -59,8 +57,8 @@ subroutine NoahMP401_qc_soilmobs(n,k,OBS_State) real :: lat,lon ! mn - integer :: SOILTYP ! soil type index [-] - real :: smc1(LIS_rc%npatch(n,LIS_rc%lsm_index)) + integer :: SOILTYP ! soil type index [-] + real :: smc1(LIS_rc%npatch(n,LIS_rc%lsm_index)) real :: smc2(LIS_rc%npatch(n,LIS_rc%lsm_index)) real :: smc3(LIS_rc%npatch(n,LIS_rc%lsm_index)) real :: smc4(LIS_rc%npatch(n,LIS_rc%lsm_index)) @@ -101,65 +99,65 @@ subroutine NoahMP401_qc_soilmobs(n,k,OBS_State) call ESMF_StateGet(OBS_State,"Observation01",obs_sm_field,& rc=status) call LIS_verify(status,& - "ESMF_StateGet failed in NoahMP401_qc_soilmobs") + "ESMF_StateGet failed in NoahMPnew_qc_soilmobs") call ESMF_FieldGet(obs_sm_field,localDE=0,farrayPtr=smobs,rc=status) call LIS_verify(status,& - "ESMF_FieldGet failed in NoahMP401_qc_soilmobs") + "ESMF_FieldGet failed in NoahMPnew_qc_soilmobs") do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) - smc1(t) = noahmp401_struc(n)%noahmp401(t)%smc(1) - smc2(t) = noahmp401_struc(n)%noahmp401(t)%smc(2) - smc3(t) = noahmp401_struc(n)%noahmp401(t)%smc(3) - smc4(t) = noahmp401_struc(n)%noahmp401(t)%smc(4) + smc1(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(1) + smc2(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(2) + smc3(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(3) + smc4(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(4) - sh2o1(t) = noahmp401_struc(n)%noahmp401(t)%sh2o(1) - sh2o2(t) = noahmp401_struc(n)%noahmp401(t)%sh2o(2) - sh2o3(t) = noahmp401_struc(n)%noahmp401(t)%sh2o(3) - sh2o4(t) = noahmp401_struc(n)%noahmp401(t)%sh2o(4) + sh2o1(t) = NoahMPnew_struc(n)%noahmpnew(t)%sh2o(1) + sh2o2(t) = NoahMPnew_struc(n)%noahmpnew(t)%sh2o(2) + sh2o3(t) = NoahMPnew_struc(n)%noahmpnew(t)%sh2o(3) + sh2o4(t) = NoahMPnew_struc(n)%noahmpnew(t)%sh2o(4) !--------------------------------------------------------------------------------------------------------- ! MN NOTE:sstc contain soil and snow temperature first snow ! temperature and then soil temeprature. ! But the number of snow layers changes from 0 to 3 !--------------------------------------------------------------------------------------------------------- - ! stc1(t) = noahmp401_struc(n)%noahmp401(t)%sstc(noahmp401_struc(n)%nsnow+1) - ! stc2(t) = noahmp401_struc(n)%noahmp401(t)%sstc(noahmp401_struc(n)%nsnow+2) - ! stc3(t) = noahmp401_struc(n)%noahmp401(t)%sstc(noahmp401_struc(n)%nsnow+3) - ! stc4(t) = noahmp401_struc(n)%noahmp401(t)%sstc(noahmp401_struc(n)%nsnow+4) + ! stc1(t) = NoahMPnew_struc(n)%noahmpnew(t)%sstc(NoahMPnew_struc(n)%nsnow+1) + ! stc2(t) = NoahMPnew_struc(n)%noahmpnew(t)%sstc(NoahMPnew_struc(n)%nsnow+2) + ! stc3(t) = NoahMPnew_struc(n)%noahmpnew(t)%sstc(NoahMPnew_struc(n)%nsnow+3) + ! stc4(t) = NoahMPnew_struc(n)%noahmpnew(t)%sstc(NoahMPnew_struc(n)%nsnow+4) - stc1(t) = noahmp401_struc(n)%noahmp401(t)%tslb(1) - stc2(t) = noahmp401_struc(n)%noahmp401(t)%tslb(2) - stc3(t) = noahmp401_struc(n)%noahmp401(t)%tslb(3) - stc4(t) = noahmp401_struc(n)%noahmp401(t)%tslb(4) + stc1(t) = NoahMPnew_struc(n)%noahmpnew(t)%tslb(1) + stc2(t) = NoahMPnew_struc(n)%noahmpnew(t)%tslb(2) + stc3(t) = NoahMPnew_struc(n)%noahmpnew(t)%tslb(3) + stc4(t) = NoahMPnew_struc(n)%noahmpnew(t)%tslb(4) - vegt(t) = noahmp401_struc(n)%noahmp401(t)%vegetype + vegt(t) = NoahMPnew_struc(n)%noahmpnew(t)%vegetype - !SOILTYP = noahmp401_struc(n)%noahmp401(t)%soiltype - !SMCMAX(t) = parameters%SMCMAX(SOILTYP) ! SMCMAX(t) = MAXSMC (SOILTYP) - !SMCWLT(t) = parameters%SMCWLT(SOILTYP) ! SMCWLT(t) = WLTSMC (SOILTYP) - SOILTYP = NOAHMP401_struc(n)%noahmp401(t)%soiltype - SMCMAX(t) = SMCMAX_TABLE(SOILTYP) - SMCWLT(t) = SMCWLT_TABLE(SOILTYP) + !SOILTYP = NoahMPnew_struc(n)%noahmpnew(t)%soiltype + !SMCMAX(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%SMCMAX(1) ! SMCMAX(t) = MAXSMC (SOILTYP) + !SMCWLT(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%SMCWLT(1) ! SMCWLT(t) = WLTSMC (SOILTYP) + SOILTYP = NoahMPnew_struc(n)%noahmpnew(t)%soiltype + SMCMAX(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%SMCMAX(1) !SMCMAX_TABLE(SOILTYP) + SMCWLT(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%SMCWLT(1) !SMCWLT_TABLE(SOILTYP) enddo call LIS_convertPatchSpaceToObsSpace(n,k,& LIS_rc%lsm_index, & - noahmp401_struc(n)%noahmp401(:)%prcp,& + NoahMPnew_struc(n)%noahmpnew(:)%prcp,& rainf_obs) ! MN prcp is total precip call LIS_convertPatchSpaceToObsSpace(n,k,& LIS_rc%lsm_index, & - noahmp401_struc(n)%noahmp401(:)%sneqv,& + NoahMPnew_struc(n)%noahmpnew(:)%sneqv,& sneqv_obs) call LIS_convertPatchSpaceToObsSpace(n,k,& LIS_rc%lsm_index, & - noahmp401_struc(n)%noahmp401(:)%snowc,& ! MP36 fsno + NoahMPnew_struc(n)%noahmpnew(:)%snowc,& ! MP36 fsno sca_obs) call LIS_convertPatchSpaceToObsSpace(n,k,& LIS_rc%lsm_index, & - noahmp401_struc(n)%noahmp401(:)%fveg,& + NoahMPnew_struc(n)%noahmpnew(:)%fveg,& shdfac_obs) call LIS_convertPatchSpaceToObsSpace(n,k,& LIS_rc%lsm_index, & - noahmp401_struc(n)%noahmp401(:)%tg,& + NoahMPnew_struc(n)%noahmpnew(:)%tg,& t1_obs) call LIS_convertPatchSpaceToObsSpace(n,k,& LIS_rc%lsm_index, & @@ -229,7 +227,7 @@ subroutine NoahMP401_qc_soilmobs(n,k,OBS_State) ! MN: check for rain if(rainf_obs(t).gt.3E-6) then ! Var name Noah36 --> rainf smobs(t) = LIS_rc%udef -! print*, 'rainf ',gid,t,noahmp401_struc(n)%noahmp401(t)%prcp +! print*, 'rainf ',gid,t,NoahMPnew_struc(n)%noahmpnew(t)%prcp ! MN: check for frozen soil elseif(abs(smc1_obs(t)- & sh2o1_obs(t)).gt.0.0001) then @@ -275,5 +273,5 @@ subroutine NoahMP401_qc_soilmobs(n,k,OBS_State) endif enddo -end subroutine NoahMP401_qc_soilmobs +end subroutine NoahMPnew_qc_soilmobs diff --git a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_qcsoilm.F90 b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_qcsoilm.F90 similarity index 85% rename from lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_qcsoilm.F90 rename to lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_qcsoilm.F90 index 7e7a3b3ed..1e4948534 100644 --- a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_qcsoilm.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_qcsoilm.F90 @@ -8,22 +8,22 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: NoahMP401_qcsoilm -! \label{NoahMP401_qcsoilm} +! !ROUTINE: NoahMPnew_qcsoilm +! \label{NoahMPnew_qcsoilm} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification ! 25Jun2006: Sujay Kumar: Updated for the ESMF design -! 15 Dec 2018: Mahdi Navari; Modified for NoahMP401 +! 15 Dec 2018: Mahdi Navari; Modified for NoahMPnew ! ! !INTERFACE: -subroutine NoahMP401_qcsoilm(n, LSM_State) +subroutine NoahMPnew_qcsoilm(n, LSM_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_verify - use NoahMP401_lsmMod + use NoahMPnew_lsmMod implicit none ! !ARGUMENTS: @@ -56,19 +56,19 @@ subroutine NoahMP401_qcsoilm(n, LSM_State) call ESMF_StateGet(LSM_State,"Soil Moisture Layer 1",sm1Field,rc=status) call LIS_verify(status,& - "ESMF_StateGet for Soil Moisture Layer 1 failed in NoahMP401_qcsoilm") + "ESMF_StateGet for Soil Moisture Layer 1 failed in NoahMPnew_qcsoilm") call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm1,rc=status) call LIS_verify(status,& - "ESMF_FieldGet for Soil Moisture Layer 1 failed in NoahMP401_qcsoilm") + "ESMF_FieldGet for Soil Moisture Layer 1 failed in NoahMPnew_qcsoilm") call ESMF_AttributeGet(sm1Field,"Max Value",smmax1,rc=status) call LIS_verify(status,& - "ESMF_AttributeGet: Max Value failed in NoahMP401_qcsoilm") + "ESMF_AttributeGet: Max Value failed in NoahMPnew_qcsoilm") call ESMF_AttributeGet(sm1Field,"Min Value",smmin1,rc=status) call LIS_verify(status,& - "ESMF_AttributeGet: Min Value failed in NoahMP401_qcsoilm") + "ESMF_AttributeGet: Min Value failed in NoahMPnew_qcsoilm") do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) @@ -76,5 +76,5 @@ subroutine NoahMP401_qcsoilm(n, LSM_State) if(soilm1(t).lt.smmin1) soilm1(t) = smmin1 enddo -end subroutine NoahMP401_qcsoilm +end subroutine NoahMPnew_qcsoilm diff --git a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_scale_soilm.F90 b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_scale_soilm.F90 similarity index 82% rename from lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_scale_soilm.F90 rename to lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_scale_soilm.F90 index 0595e7553..863f7faa3 100644 --- a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_scale_soilm.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_scale_soilm.F90 @@ -8,22 +8,22 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: NoahMP401_scale_soilm -! \label{NoahMP401_scale_soilm} +! !ROUTINE: NoahMPnew_scale_soilm +! \label{NoahMPnew_scale_soilm} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification ! 25Jun2006: Sujay Kumar: Updated for the ESMF design -! 15 Dec 2018: Mahdi Navari; Modified for NoahMP401 +! 15 Dec 2018: Mahdi Navari; Modified for NoahMPnew ! ! !INTERFACE: -subroutine NoahMP401_scale_soilm(n, LSM_State) +subroutine NoahMPnew_scale_soilm(n, LSM_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_verify - use NoahMP401_lsmMod + use NoahMPnew_lsmMod implicit none ! !ARGUMENTS: @@ -43,5 +43,5 @@ subroutine NoahMP401_scale_soilm(n, LSM_State) !EOP -end subroutine NoahMP401_scale_soilm +end subroutine NoahMPnew_scale_soilm diff --git a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_setsoilm.F90 b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_setsoilm.F90 similarity index 70% rename from lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_setsoilm.F90 rename to lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_setsoilm.F90 index 045bde466..a4c7c0131 100644 --- a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_setsoilm.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_setsoilm.F90 @@ -8,13 +8,14 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: NoahMP401_setsoilm -! \label{NoahMP401_setsoilm} +! !ROUTINE: NoahMPnew_setsoilm +! \label{NoahMPnew_setsoilm} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification ! 25Jun2006: Sujay Kumar: Updated for the ESMF design -! 15 Dec 2018: Mahdi Navari: Modified for NoahMP401 +! 15 Dec 2018: Mahdi Navari: Modified for NoahMPnew +! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! Apply the update if it met the update conditions ! Update conditions: @@ -30,16 +31,12 @@ ! !INTERFACE: -subroutine NoahMP401_setsoilm(n, LSM_State) +subroutine NoahMPnew_setsoilm(n, LSM_State) ! !USES: use ESMF use LIS_coreMod use LIS_logMod - use NoahMP401_lsmMod - !use module_sf_noahlsm_36 !MN - !use module_sf_noahmpdrv_401, only: parameters - use NOAHMP_TABLES_401, ONLY : SMCMAX_TABLE,SMCWLT_TABLE - + use NoahMPnew_lsmMod implicit none ! !ARGUMENTS: @@ -92,56 +89,53 @@ subroutine NoahMP401_setsoilm(n, LSM_State) call ESMF_StateGet(LSM_State,"Soil Moisture Layer 1",sm1Field,rc=status) call LIS_verify(status,& - "ESMF_StateSet: Soil Moisture Layer 1 failed in NoahMP401_setsoilm") + "ESMF_StateSet: Soil Moisture Layer 1 failed in NoahMPnew_setsoilm") call ESMF_StateGet(LSM_State,"Soil Moisture Layer 2",sm2Field,rc=status) call LIS_verify(status,& - "ESMF_StateSet: Soil Moisture Layer 2 failed in NoahMP401_setsoilm") + "ESMF_StateSet: Soil Moisture Layer 2 failed in NoahMPnew_setsoilm") call ESMF_StateGet(LSM_State,"Soil Moisture Layer 3",sm3Field,rc=status) call LIS_verify(status,& - "ESMF_StateSet: Soil Moisture Layer 3 failed in NoahMP401_setsoilm") + "ESMF_StateSet: Soil Moisture Layer 3 failed in NoahMPnew_setsoilm") call ESMF_StateGet(LSM_State,"Soil Moisture Layer 4",sm4Field,rc=status) call LIS_verify(status,& - "ESMF_StateSet: Soil Moisture Layer 4 failed in NoahMP401_setsoilm") + "ESMF_StateSet: Soil Moisture Layer 4 failed in NoahMPnew_setsoilm") call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm1,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 1 failed in NoahMP401_setsoilm") + "ESMF_FieldGet: Soil Moisture Layer 1 failed in NoahMPnew_setsoilm") call ESMF_FieldGet(sm2Field,localDE=0,farrayPtr=soilm2,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 2 failed in NoahMP401_setsoilm") + "ESMF_FieldGet: Soil Moisture Layer 2 failed in NoahMPnew_setsoilm") call ESMF_FieldGet(sm3Field,localDE=0,farrayPtr=soilm3,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 3 failed in NoahMP401_setsoilm") + "ESMF_FieldGet: Soil Moisture Layer 3 failed in NoahMPnew_setsoilm") call ESMF_FieldGet(sm4Field,localDE=0,farrayPtr=soilm4,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 4 failed in NoahMP401_setsoilm") + "ESMF_FieldGet: Soil Moisture Layer 4 failed in NoahMPnew_setsoilm") update_flag = .true. update_flag_tile= .true. do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - ! MN: NOTE: SMCMAX and SMCWLT are not stored in the data structure but we - ! can get module variables MAXSMC and WLTSMC from the module_sf_noahlsm_36 - ! In NoahMP401 module variables MAXSMC and WLTSMC from module_sf_noahmpdrv_401 - SOILTYP = noahmp401_struc(n)%noahmp401(t)%soiltype - MAX_THRESHOLD = SMCMAX_TABLE(SOILTYP) ! MAXSMC (SOILTYP) - sm_threshold = SMCMAX_TABLE(SOILTYP) - 0.02 ! MAXSMC (SOILTYP) - 0.02 + SOILTYP = NoahMPnew_struc(n)%noahmpnew(t)%soiltype + MAX_THRESHOLD = NoahMPnew_struc(n)%noahmpnew(t)%param%SMCMAX(1) ! MAXSMC (SOILTYP) + sm_threshold = NoahMPnew_struc(n)%noahmpnew(t)%param%SMCMAX(1) - 0.02 ! MAXSMC (SOILTYP) - 0.02 gid = LIS_domain(n)%gindex(& LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col,& LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) !MN: delta = X(+) - X(-) - !NOTE: "noahmp401_updatesoilm.F90" updates the soilm_(t) - delta1 = soilm1(t)-noahmp401_struc(n)%noahmp401(t)%smc(1) - delta2 = soilm2(t)-noahmp401_struc(n)%noahmp401(t)%smc(2) - delta3 = soilm3(t)-noahmp401_struc(n)%noahmp401(t)%smc(3) - delta4 = soilm4(t)-noahmp401_struc(n)%noahmp401(t)%smc(4) + !NOTE: "noahmpnew_updatesoilm.F90" updates the soilm_(t) + delta1 = soilm1(t)-NoahMPnew_struc(n)%noahmpnew(t)%smc(1) + delta2 = soilm2(t)-NoahMPnew_struc(n)%noahmpnew(t)%smc(2) + delta3 = soilm3(t)-NoahMPnew_struc(n)%noahmpnew(t)%smc(3) + delta4 = soilm4(t)-NoahMPnew_struc(n)%noahmpnew(t)%smc(4) ! MN: check MIN_THRESHOLD < volumetric liquid soil moisture < threshold - if(noahmp401_struc(n)%noahmp401(t)%sh2o(1)+delta1.gt.MIN_THRESHOLD .and.& - noahmp401_struc(n)%noahmp401(t)%sh2o(1)+delta1.lt.& + if(NoahMPnew_struc(n)%noahmpnew(t)%sh2o(1)+delta1.gt.MIN_THRESHOLD .and.& + NoahMPnew_struc(n)%noahmpnew(t)%sh2o(1)+delta1.lt.& sm_threshold) then update_flag(gid) = update_flag(gid).and.(.true.) ! MN save the flag for each tile (col*row*ens) (64*44)*20 @@ -150,24 +144,24 @@ subroutine NoahMP401_setsoilm(n, LSM_State) update_flag(gid) = update_flag(gid).and.(.false.) update_flag_tile(t) = update_flag_tile(t).and.(.false.) endif - if(noahmp401_struc(n)%noahmp401(t)%sh2o(2)+delta2.gt.MIN_THRESHOLD .and.& - noahmp401_struc(n)%noahmp401(t)%sh2o(2)+delta2.lt.sm_threshold) then + if(NoahMPnew_struc(n)%noahmpnew(t)%sh2o(2)+delta2.gt.MIN_THRESHOLD .and.& + NoahMPnew_struc(n)%noahmpnew(t)%sh2o(2)+delta2.lt.sm_threshold) then update_flag(gid) = update_flag(gid).and.(.true.) update_flag_tile(t) = update_flag_tile(t).and.(.true.) else update_flag(gid) = update_flag(gid).and.(.false.) update_flag_tile(t) = update_flag_tile(t).and.(.false.) endif - if(noahmp401_struc(n)%noahmp401(t)%sh2o(3)+delta3.gt.MIN_THRESHOLD .and.& - noahmp401_struc(n)%noahmp401(t)%sh2o(3)+delta3.lt.sm_threshold) then + if(NoahMPnew_struc(n)%noahmpnew(t)%sh2o(3)+delta3.gt.MIN_THRESHOLD .and.& + NoahMPnew_struc(n)%noahmpnew(t)%sh2o(3)+delta3.lt.sm_threshold) then update_flag(gid) = update_flag(gid).and.(.true.) update_flag_tile(t) = update_flag_tile(t).and.(.true.) else update_flag(gid) = update_flag(gid).and.(.false.) update_flag_tile(t) = update_flag_tile(t).and.(.false.) endif - if(noahmp401_struc(n)%noahmp401(t)%sh2o(4)+delta4.gt.MIN_THRESHOLD .and.& - noahmp401_struc(n)%noahmp401(t)%sh2o(4)+delta4.lt.sm_threshold) then + if(NoahMPnew_struc(n)%noahmpnew(t)%sh2o(4)+delta4.gt.MIN_THRESHOLD .and.& + NoahMPnew_struc(n)%noahmpnew(t)%sh2o(4)+delta4.lt.sm_threshold) then update_flag(gid) = update_flag(gid).and.(.true.) update_flag_tile(t) = update_flag_tile(t).and.(.true.) else @@ -278,45 +272,45 @@ subroutine NoahMP401_setsoilm(n, LSM_State) ! MN check update status for each tile if(update_flag_tile(t)) then - delta1 = soilm1(t)-noahmp401_struc(n)%noahmp401(t)%smc(1) - delta2 = soilm2(t)-noahmp401_struc(n)%noahmp401(t)%smc(2) - delta3 = soilm3(t)-noahmp401_struc(n)%noahmp401(t)%smc(3) - delta4 = soilm4(t)-noahmp401_struc(n)%noahmp401(t)%smc(4) + delta1 = soilm1(t)-NoahMPnew_struc(n)%noahmpnew(t)%smc(1) + delta2 = soilm2(t)-NoahMPnew_struc(n)%noahmpnew(t)%smc(2) + delta3 = soilm3(t)-NoahMPnew_struc(n)%noahmpnew(t)%smc(3) + delta4 = soilm4(t)-NoahMPnew_struc(n)%noahmpnew(t)%smc(4) - noahmp401_struc(n)%noahmp401(t)%sh2o(1) = noahmp401_struc(n)%noahmp401(t)%sh2o(1)+& + NoahMPnew_struc(n)%noahmpnew(t)%sh2o(1) = NoahMPnew_struc(n)%noahmpnew(t)%sh2o(1)+& delta1 - noahmp401_struc(n)%noahmp401(t)%smc(1) = soilm1(t) + NoahMPnew_struc(n)%noahmpnew(t)%smc(1) = soilm1(t) if(soilm1(t).lt.0) then print*, 'setsoilm1 ',t,soilm1(t) stop endif - if(noahmp401_struc(n)%noahmp401(t)%sh2o(2)+delta2.gt.MIN_THRESHOLD .and.& - noahmp401_struc(n)%noahmp401(t)%sh2o(2)+delta2.lt.sm_threshold) then - noahmp401_struc(n)%noahmp401(t)%sh2o(2) = noahmp401_struc(n)%noahmp401(t)%sh2o(2)+& - soilm2(t)-noahmp401_struc(n)%noahmp401(t)%smc(2) - noahmp401_struc(n)%noahmp401(t)%smc(2) = soilm2(t) + if(NoahMPnew_struc(n)%noahmpnew(t)%sh2o(2)+delta2.gt.MIN_THRESHOLD .and.& + NoahMPnew_struc(n)%noahmpnew(t)%sh2o(2)+delta2.lt.sm_threshold) then + NoahMPnew_struc(n)%noahmpnew(t)%sh2o(2) = NoahMPnew_struc(n)%noahmpnew(t)%sh2o(2)+& + soilm2(t)-NoahMPnew_struc(n)%noahmpnew(t)%smc(2) + NoahMPnew_struc(n)%noahmpnew(t)%smc(2) = soilm2(t) if(soilm2(t).lt.0) then print*, 'setsoilm2 ',t,soilm2(t) stop endif endif - if(noahmp401_struc(n)%noahmp401(t)%sh2o(3)+delta3.gt.MIN_THRESHOLD .and.& - noahmp401_struc(n)%noahmp401(t)%sh2o(3)+delta3.lt.sm_threshold) then - noahmp401_struc(n)%noahmp401(t)%sh2o(3) = noahmp401_struc(n)%noahmp401(t)%sh2o(3)+& - soilm3(t)-noahmp401_struc(n)%noahmp401(t)%smc(3) - noahmp401_struc(n)%noahmp401(t)%smc(3) = soilm3(t) + if(NoahMPnew_struc(n)%noahmpnew(t)%sh2o(3)+delta3.gt.MIN_THRESHOLD .and.& + NoahMPnew_struc(n)%noahmpnew(t)%sh2o(3)+delta3.lt.sm_threshold) then + NoahMPnew_struc(n)%noahmpnew(t)%sh2o(3) = NoahMPnew_struc(n)%noahmpnew(t)%sh2o(3)+& + soilm3(t)-NoahMPnew_struc(n)%noahmpnew(t)%smc(3) + NoahMPnew_struc(n)%noahmpnew(t)%smc(3) = soilm3(t) if(soilm3(t).lt.0) then print*, 'setsoilm3 ',t,soilm3(t) stop endif endif - if(noahmp401_struc(n)%noahmp401(t)%sh2o(4)+delta4.gt.MIN_THRESHOLD .and.& - noahmp401_struc(n)%noahmp401(t)%sh2o(4)+delta4.lt.sm_threshold) then - noahmp401_struc(n)%noahmp401(t)%sh2o(4) = noahmp401_struc(n)%noahmp401(t)%sh2o(4)+& - soilm4(t)-noahmp401_struc(n)%noahmp401(t)%smc(4) - noahmp401_struc(n)%noahmp401(t)%smc(4) = soilm4(t) + if(NoahMPnew_struc(n)%noahmpnew(t)%sh2o(4)+delta4.gt.MIN_THRESHOLD .and.& + NoahMPnew_struc(n)%noahmpnew(t)%sh2o(4)+delta4.lt.sm_threshold) then + NoahMPnew_struc(n)%noahmpnew(t)%sh2o(4) = NoahMPnew_struc(n)%noahmpnew(t)%sh2o(4)+& + soilm4(t)-NoahMPnew_struc(n)%noahmpnew(t)%smc(4) + NoahMPnew_struc(n)%noahmpnew(t)%smc(4) = soilm4(t) if(soilm4(t).lt.0) then print*, 'setsoilm4 ',t,soilm4(t) @@ -337,20 +331,20 @@ subroutine NoahMP401_setsoilm(n, LSM_State) ! use mean value ! Assume sh2o = smc (i.e. ice content=0) smc_tmp = (MaxEnsSM1 - MinEnsSM1)/2 + MinEnsSM1 - noahmp401_struc(n)%noahmp401(t)%sh2o(1) = smc_tmp - noahmp401_struc(n)%noahmp401(t)%smc(1) = smc_tmp + NoahMPnew_struc(n)%noahmpnew(t)%sh2o(1) = smc_tmp + NoahMPnew_struc(n)%noahmpnew(t)%smc(1) = smc_tmp smc_tmp = (MaxEnsSM2 - MinEnsSM2)/2 + MinEnsSM2 - noahmp401_struc(n)%noahmp401(t)%sh2o(2) = smc_tmp - noahmp401_struc(n)%noahmp401(t)%smc(2) = smc_tmp + NoahMPnew_struc(n)%noahmpnew(t)%sh2o(2) = smc_tmp + NoahMPnew_struc(n)%noahmpnew(t)%smc(2) = smc_tmp smc_tmp = (MaxEnsSM3 - MinEnsSM3)/2 + MinEnsSM3 - noahmp401_struc(n)%noahmp401(t)%sh2o(3) = smc_tmp - noahmp401_struc(n)%noahmp401(t)%smc(3) = smc_tmp + NoahMPnew_struc(n)%noahmpnew(t)%sh2o(3) = smc_tmp + NoahMPnew_struc(n)%noahmpnew(t)%smc(3) = smc_tmp smc_tmp = (MaxEnsSM4 - MinEnsSM4)/2 + MinEnsSM4 - noahmp401_struc(n)%noahmp401(t)%sh2o(4) = smc_tmp - noahmp401_struc(n)%noahmp401(t)%smc(4) = smc_tmp + NoahMPnew_struc(n)%noahmpnew(t)%sh2o(4) = smc_tmp + NoahMPnew_struc(n)%noahmpnew(t)%smc(4) = smc_tmp endif ! flag for each tile @@ -380,8 +374,8 @@ subroutine NoahMP401_setsoilm(n, LSM_State) if(m.ne.LIS_rc%nensem(n)) then delta(j) = delta(j) + & - (noahmp401_struc(n)%noahmp401(t)%sh2o(j) - & - noahmp401_struc(n)%noahmp401(t_unpert)%sh2o(j)) + (NoahMPnew_struc(n)%noahmpnew(t)%sh2o(j) - & + NoahMPnew_struc(n)%noahmpnew(t_unpert)%sh2o(j)) endif enddo @@ -392,26 +386,25 @@ subroutine NoahMP401_setsoilm(n, LSM_State) do m=1,LIS_rc%nensem(n)-1 t = i+m-1 !t = (i-1)*LIS_rc%nensem(n)+m - SOILTYP = noahmp401_struc(n)%noahmp401(t)%soiltype - MAX_THRESHOLD = SMCMAX_TABLE(SOILTYP) - sm_threshold = SMCMAX_TABLE(SOILTYP) - 0.02 + SOILTYP = NoahMPnew_struc(n)%noahmpnew(t)%soiltype + MAX_THRESHOLD = NoahMPnew_struc(n)%noahmpnew(t)%param%SMCMAX(1) !SMCMAX_TABLE(SOILTYP) + sm_threshold = NoahMPnew_struc(n)%noahmpnew(t)%param%SMCMAX(1) - 0.02 !SMCMAX_TABLE(SOILTYP) - 0.02 - tmpval = noahmp401_struc(n)%noahmp401(t)%sh2o(j) - & - delta(j) + tmpval = NoahMPnew_struc(n)%noahmpnew(t)%sh2o(j) - delta(j) if(tmpval.le.MIN_THRESHOLD) then - noahmp401_struc(n)%noahmp401(t)%sh2o(j) = & - max(noahmp401_struc(n)%noahmp401(t_unpert)%sh2o(j),& + NoahMPnew_struc(n)%noahmpnew(t)%sh2o(j) = & + max(NoahMPnew_struc(n)%noahmpnew(t_unpert)%sh2o(j),& MIN_THRESHOLD) - noahmp401_struc(n)%noahmp401(t)%smc(j) = & - max(noahmp401_struc(n)%noahmp401(t_unpert)%smc(j),& + NoahMPnew_struc(n)%noahmpnew(t)%smc(j) = & + max(NoahMPnew_struc(n)%noahmpnew(t_unpert)%smc(j),& MIN_THRESHOLD) ens_flag(m) = .false. elseif(tmpval.ge.sm_threshold) then - noahmp401_struc(n)%noahmp401(t)%sh2o(j) = & - min(noahmp401_struc(n)%noahmp401(t_unpert)%sh2o(j),& + NoahMPnew_struc(n)%noahmpnew(t)%sh2o(j) = & + min(NoahMPnew_struc(n)%noahmpnew(t_unpert)%sh2o(j),& sm_threshold) - noahmp401_struc(n)%noahmp401(t)%smc(j) = & - min(noahmp401_struc(n)%noahmp401(t_unpert)%smc(j),& + NoahMPnew_struc(n)%noahmpnew(t)%smc(j) = & + min(NoahMPnew_struc(n)%noahmpnew(t_unpert)%smc(j),& sm_threshold) ens_flag(m) = .false. endif @@ -428,8 +421,8 @@ subroutine NoahMP401_setsoilm(n, LSM_State) !t = (i-1)*LIS_rc%nensem(n)+m if(m.ne.LIS_rc%nensem(n)) then delta(j) = delta(j) + & - (noahmp401_struc(n)%noahmp401(t)%sh2o(j) - & - noahmp401_struc(n)%noahmp401(t_unpert)%sh2o(j)) + (NoahMPnew_struc(n)%noahmpnew(t)%sh2o(j) - & + NoahMPnew_struc(n)%noahmpnew(t_unpert)%sh2o(j)) endif enddo enddo @@ -441,25 +434,25 @@ subroutine NoahMP401_setsoilm(n, LSM_State) !t = (i-1)*LIS_rc%nensem(n)+m if(ens_flag(m)) then - tmpval = noahmp401_struc(n)%noahmp401(t)%sh2o(j) - & + tmpval = NoahMPnew_struc(n)%noahmpnew(t)%sh2o(j) - & delta(j) - SOILTYP = noahmp401_struc(n)%noahmp401(t)%soiltype - MAX_THRESHOLD = SMCMAX_TABLE(SOILTYP) + SOILTYP = NoahMPnew_struc(n)%noahmpnew(t)%soiltype + MAX_THRESHOLD = NoahMPnew_struc(n)%noahmpnew(t)%param%SMCMAX(1) !SMCMAX_TABLE(SOILTYP) if(.not.(tmpval.le.0.0 .or.& tmpval.gt.(MAX_THRESHOLD))) then - noahmp401_struc(n)%noahmp401(t)%smc(j) = & - noahmp401_struc(n)%noahmp401(t)%smc(j) - delta(j) - noahmp401_struc(n)%noahmp401(t)%sh2o(j) = & - noahmp401_struc(n)%noahmp401(t)%sh2o(j) - delta(j) + NoahMPnew_struc(n)%noahmpnew(t)%smc(j) = & + NoahMPnew_struc(n)%noahmpnew(t)%smc(j) - delta(j) + NoahMPnew_struc(n)%noahmpnew(t)%sh2o(j) = & + NoahMPnew_struc(n)%noahmpnew(t)%sh2o(j) - delta(j) bounds_violation = .false. endif endif - tmpval = noahmp401_struc(n)%noahmp401(t)%sh2o(j) - SOILTYP = noahmp401_struc(n)%noahmp401(t)%soiltype - MAX_THRESHOLD = SMCMAX_TABLE(SOILTYP) + tmpval = NoahMPnew_struc(n)%noahmpnew(t)%sh2o(j) + SOILTYP = NoahMPnew_struc(n)%noahmpnew(t)%soiltype + MAX_THRESHOLD = NoahMPnew_struc(n)%noahmpnew(t)%param%SMCMAX(1) !SMCMAX_TABLE(SOILTYP) if(tmpval.le.0.0 .or.& tmpval.gt.(MAX_THRESHOLD)) then @@ -483,24 +476,24 @@ subroutine NoahMP401_setsoilm(n, LSM_State) t = i+m-1 !t = (i-1)*LIS_rc%nensem(n)+m - SOILTYP = noahmp401_struc(n)%noahmp401(t)%soiltype - MAX_THRESHOLD = SMCMAX_TABLE(SOILTYP) + SOILTYP = NoahMPnew_struc(n)%noahmpnew(t)%soiltype + MAX_THRESHOLD = NoahMPnew_struc(n)%noahmpnew(t)%param%SMCMAX(1) !SMCMAX_TABLE(SOILTYP) - if(noahmp401_struc(n)%noahmp401(t)%sh2o(j).gt.MAX_THRESHOLD.or.& - noahmp401_struc(n)%noahmp401(t)%smc(j).gt.MAX_THRESHOLD) then - noahmp401_struc(n)%noahmp401(t)%sh2o(j) = MAX_THRESHOLD - noahmp401_struc(n)%noahmp401(t)%smc(j) = MAX_THRESHOLD + if(NoahMPnew_struc(n)%noahmpnew(t)%sh2o(j).gt.MAX_THRESHOLD.or.& + NoahMPnew_struc(n)%noahmpnew(t)%smc(j).gt.MAX_THRESHOLD) then + NoahMPnew_struc(n)%noahmpnew(t)%sh2o(j) = MAX_THRESHOLD + NoahMPnew_struc(n)%noahmpnew(t)%smc(j) = MAX_THRESHOLD endif - if(noahmp401_struc(n)%noahmp401(t)%sh2o(j).lt.MIN_THRESHOLD.or.& - noahmp401_struc(n)%noahmp401(t)%smc(j).lt.MIN_THRESHOLD) then - noahmp401_struc(n)%noahmp401(t)%sh2o(j) = MIN_THRESHOLD - noahmp401_struc(n)%noahmp401(t)%smc(j) = MIN_THRESHOLD + if(NoahMPnew_struc(n)%noahmpnew(t)%sh2o(j).lt.MIN_THRESHOLD.or.& + NoahMPnew_struc(n)%noahmpnew(t)%smc(j).lt.MIN_THRESHOLD) then + NoahMPnew_struc(n)%noahmpnew(t)%sh2o(j) = MIN_THRESHOLD + NoahMPnew_struc(n)%noahmpnew(t)%smc(j) = MIN_THRESHOLD endif ! print*, i, m -! print*, 'smc',t, noahmp401_struc(n)%noahmp401(t)%smc(:) -! print*, 'sh2o ',t,noahmp401_struc(n)%noahmp401(t)%sh2o(:) -! print*, 'max ',t,MAX_THRESHOLD !noahmp401_struc(n)%noahmp401(t)%smcmax +! print*, 'smc',t, NoahMPnew_struc(n)%noahmpnew(t)%smc(:) +! print*, 'sh2o ',t,NoahMPnew_struc(n)%noahmpnew(t)%sh2o(:) +! print*, 'max ',t,MAX_THRESHOLD !NoahMPnew_struc(n)%noahmpnew(t)%smcmax enddo ! call LIS_endrun() enddo @@ -511,5 +504,5 @@ subroutine NoahMP401_setsoilm(n, LSM_State) enddo -end subroutine NoahMP401_setsoilm +end subroutine NoahMPnew_setsoilm diff --git a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_updatesoilm.F90 b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_updatesoilm.F90 similarity index 75% rename from lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_updatesoilm.F90 rename to lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_updatesoilm.F90 index 7e0b0e198..eaa3904b8 100644 --- a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_updatesoilm.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_updatesoilm.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: NoahMP401_updatesoilm -! \label{NoahMP401_updatesoilm} +! !ROUTINE: NoahMPnew_updatesoilm +! \label{NoahMPnew_updatesoilm} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -17,12 +17,12 @@ ! 15 Dec 2018: Mahdi Navari; Modified for NoahMP401 ! ! !INTERFACE: -subroutine NoahMP401_updatesoilm(n, LSM_State, LSM_Incr_State) +subroutine NoahMPnew_updatesoilm(n, LSM_State, LSM_Incr_State) ! !USES: use ESMF use LIS_coreMod use LIS_logMod - use NoahMP401_lsmMod + use NoahMPnew_lsmMod implicit none ! !ARGUMENTS: @@ -59,55 +59,55 @@ subroutine NoahMP401_updatesoilm(n, LSM_State, LSM_Incr_State) call ESMF_StateGet(LSM_State,"Soil Moisture Layer 1",sm1Field,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 1 failed in NoahMP401_updatesoilm") + "ESMF_StateGet: Soil Moisture Layer 1 failed in NoahMPnew_updatesoilm") call ESMF_StateGet(LSM_State,"Soil Moisture Layer 2",sm2Field,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 2 failed in NoahMP401_updatesoilm") + "ESMF_StateGet: Soil Moisture Layer 2 failed in NoahMPnew_updatesoilm") call ESMF_StateGet(LSM_State,"Soil Moisture Layer 3",sm3Field,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 3 failed in NoahMP401_updatesoilm") + "ESMF_StateGet: Soil Moisture Layer 3 failed in NoahMPnew_updatesoilm") call ESMF_StateGet(LSM_State,"Soil Moisture Layer 4",sm4Field,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 4 failed in NoahMP401_updatesoilm") + "ESMF_StateGet: Soil Moisture Layer 4 failed in NoahMPnew_updatesoilm") call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm1,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 1 failed in NoahMP401_updatesoilm") + "ESMF_FieldGet: Soil Moisture Layer 1 failed in NoahMPnew_updatesoilm") call ESMF_FieldGet(sm2Field,localDE=0,farrayPtr=soilm2,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 2 failed in NoahMP401_updatesoilm") + "ESMF_FieldGet: Soil Moisture Layer 2 failed in NoahMPnew_updatesoilm") call ESMF_FieldGet(sm3Field,localDE=0,farrayPtr=soilm3,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 3 failed in NoahMP401_updatesoilm") + "ESMF_FieldGet: Soil Moisture Layer 3 failed in NoahMPnew_updatesoilm") call ESMF_FieldGet(sm4Field,localDE=0,farrayPtr=soilm4,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 4 failed in NoahMP401_updatesoilm") + "ESMF_FieldGet: Soil Moisture Layer 4 failed in NoahMPnew_updatesoilm") call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 1",sm1IncrField,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 1 failed in NoahMP401_updatesoilm") + "ESMF_StateGet: Soil Moisture Layer 1 failed in NoahMPnew_updatesoilm") call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 2",sm2IncrField,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 2 failed in NoahMP401_updatesoilm") + "ESMF_StateGet: Soil Moisture Layer 2 failed in NoahMPnew_updatesoilm") call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 3",sm3IncrField,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 3 failed in NoahMP401_updatesoilm") + "ESMF_StateGet: Soil Moisture Layer 3 failed in NoahMPnew_updatesoilm") call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 4",sm4IncrField,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 4 failed in NoahMP401_updatesoilm") + "ESMF_StateGet: Soil Moisture Layer 4 failed in NoahMPnew_updatesoilm") call ESMF_FieldGet(sm1IncrField,localDE=0,farrayPtr=soilmIncr1,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 1 failed in NoahMP401_updatesoilm") + "ESMF_FieldGet: Soil Moisture Layer 1 failed in NoahMPnew_updatesoilm") call ESMF_FieldGet(sm2IncrField,localDE=0,farrayPtr=soilmIncr2,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 2 failed in NoahMP401_updatesoilm") + "ESMF_FieldGet: Soil Moisture Layer 2 failed in NoahMPnew_updatesoilm") call ESMF_FieldGet(sm3IncrField,localDE=0,farrayPtr=soilmIncr3,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 3 failed in NoahMP401_updatesoilm") + "ESMF_FieldGet: Soil Moisture Layer 3 failed in NoahMPnew_updatesoilm") call ESMF_FieldGet(sm4IncrField,localDE=0,farrayPtr=soilmIncr4,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 4 failed in NoahMP401_updatesoilm") + "ESMF_FieldGet: Soil Moisture Layer 4 failed in NoahMPnew_updatesoilm") do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) soilm1(t) = soilm1(t) + soilmIncr1(t) @@ -115,5 +115,5 @@ subroutine NoahMP401_updatesoilm(n, LSM_State, LSM_Incr_State) soilm3(t) = soilm3(t) + soilmIncr3(t) soilm4(t) = soilm4(t) + soilmIncr4(t) enddo -end subroutine NoahMP401_updatesoilm +end subroutine NoahMPnew_updatesoilm diff --git a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_write_soilm.F90 b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_write_soilm.F90 similarity index 75% rename from lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_write_soilm.F90 rename to lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_write_soilm.F90 index ecbb563dc..0aab2b25d 100644 --- a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmp401_write_soilm.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_write_soilm.F90 @@ -8,21 +8,22 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: NoahMP401_write_soilm -! \label{NoahMP401_write_soilm} +! !ROUTINE: NoahMPnew_write_soilm +! \label{NoahMPnew_write_soilm} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification ! 25Jun2006: Sujay Kumar: Updated for the ESMF design -! 15 Dec 2018: Mahdi Navari; Modified for NoahMP401 +! 15 Dec 2018: Mahdi Navari; Modified for NoahMP401 +! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine NoahMP401_write_soilm(ftn,n, LSM_State) +subroutine NoahMPnew_write_soilm(ftn,n, LSM_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc - use NoahMP401_lsmMod + use NoahMPnew_lsmMod use LIS_historyMod, only : LIS_writevar_restart implicit none ! !ARGUMENTS: @@ -47,25 +48,25 @@ subroutine NoahMP401_write_soilm(ftn,n, LSM_State) allocate(tmp(LIS_rc%npatch(n,LIS_rc%lsm_index))) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = noahmp401_struc(n)%noahmp401(t)%smc(1) + tmp(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(1) enddo call LIS_writevar_restart(ftn,n,1,tmp) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = noahmp401_struc(n)%noahmp401(t)%smc(2) + tmp(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(2) enddo call LIS_writevar_restart(ftn,n,1,tmp) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = noahmp401_struc(n)%noahmp401(t)%smc(3) + tmp(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(3) enddo call LIS_writevar_restart(ftn,n,1,tmp) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = noahmp401_struc(n)%noahmp401(t)%smc(4) + tmp(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(4) enddo call LIS_writevar_restart(ftn,n,1,tmp) deallocate(tmp) -end subroutine NoahMP401_write_soilm +end subroutine NoahMPnew_write_soilm diff --git a/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_datws_Mod.F90 b/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_datws_Mod.F90 similarity index 74% rename from lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_datws_Mod.F90 rename to lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_datws_Mod.F90 index 960ed91d5..6ec915d62 100755 --- a/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_datws_Mod.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_datws_Mod.F90 @@ -7,19 +7,19 @@ ! Administrator of the National Aeronautics and Space Administration. ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- -!29 May 2020: Bailing Li created for Noah-MP.4.0.1 #include "LIS_misc.h" -module noahmp401_datws_Mod +module noahmpnew_datws_Mod !BOP ! -! !MODULE: noahmp401_datws_Mod +! !MODULE: noahmpnew_datws_Mod ! ! !DESCRIPTION: ! ! !REVISION HISTORY: ! ! 14 Mar 2017: Sujay Kumar; Initial Specification - +! 29 May 2020: Bailing Li created for Noah-MP.4.0.1 +! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! !USES: use ESMF use LIS_coreMod @@ -32,11 +32,11 @@ module noahmp401_datws_Mod !----------------------------------------------------------------------------- ! !PUBLIC MEMBER FUNCTIONS: !----------------------------------------------------------------------------- - public :: noahmp401_datws_init + public :: noahmpnew_datws_init !----------------------------------------------------------------------------- ! !PUBLIC TYPES: !----------------------------------------------------------------------------- - public :: noahmp401_dasm_struc + public :: noahmpnew_dasm_struc !EOP type, public :: dasm_dec @@ -50,16 +50,16 @@ module noahmp401_datws_Mod end type dasm_dec - type(dasm_dec), allocatable :: noahmp401_dasm_struc(:) + type(dasm_dec), allocatable :: noahmpnew_dasm_struc(:) contains !BOP ! -! !ROUTINE: noahmp401_datws_init -! \label{noahmp401_datws_init} +! !ROUTINE: noahmpnew_datws_init +! \label{noahmpnew_datws_init} ! ! !INTERFACE: - subroutine noahmp401_datws_init(k) + subroutine noahmpnew_datws_init(k) ! !USES: ! !DESCRIPTION: ! @@ -73,9 +73,9 @@ subroutine noahmp401_datws_init(k) integer :: status integer :: ngrid - if(.not.allocated(noahmp401_dasm_struc)) then - allocate(noahmp401_dasm_struc(LIS_rc%nnest)) + if(.not.allocated(noahmpnew_dasm_struc)) then + allocate(noahmpnew_dasm_struc(LIS_rc%nnest)) endif - end subroutine noahmp401_datws_init -end module noahmp401_datws_Mod + end subroutine noahmpnew_datws_init +end module noahmpnew_datws_Mod diff --git a/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_descale_tws.F90 b/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_descale_tws.F90 similarity index 79% rename from lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_descale_tws.F90 rename to lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_descale_tws.F90 index 49567ac11..70382aef3 100755 --- a/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_descale_tws.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_descale_tws.F90 @@ -8,22 +8,22 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_descale_tws -! \label{noahmp401_descale_tws} +! !ROUTINE: noahmpnew_descale_tws +! \label{noahmpnew_descale_tws} ! ! !REVISION HISTORY: ! 14 Mar 2017: Sujay Kumar; Initial Specification ! 29 May 2020: Bailing Li; created for Noah-MP4.0.1 +! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmp401_descale_tws(n, LSM_State, LSM_Incr_State) +subroutine noahmpnew_descale_tws(n, LSM_State, LSM_Incr_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_verify - use noahmp401_lsmMod - use module_sf_noahmplsm_401 + use noahmpnew_lsmMod use LIS_constantsMod, only : LIS_CONST_RHOFW ! Natt implicit none @@ -85,45 +85,45 @@ subroutine noahmp401_descale_tws(n, LSM_State, LSM_Incr_State) ! Natt ! Descale TWS states call ESMF_StateGet(LSM_State,"Soil Moisture Layer 1",sm1Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm1 in noahmp401_descale_tws') + call LIS_verify(status,'ESMF_StateGet failed for sm1 in noahmpnew_descale_tws') call ESMF_StateGet(LSM_State,"Soil Moisture Layer 2",sm2Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm2 in noahmp401_descale_tws') + call LIS_verify(status,'ESMF_StateGet failed for sm2 in noahmpnew_descale_tws') call ESMF_StateGet(LSM_State,"Soil Moisture Layer 3",sm3Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm3 in noahmp401_descale_tws') + call LIS_verify(status,'ESMF_StateGet failed for sm3 in noahmpnew_descale_tws') call ESMF_StateGet(LSM_State,"Soil Moisture Layer 4",sm4Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm4 in noahmp401_descale_tws') + call LIS_verify(status,'ESMF_StateGet failed for sm4 in noahmpnew_descale_tws') call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for SWE in noahmp401_descale_tws') + call LIS_verify(status,'ESMF_StateGet failed for SWE in noahmpnew_descale_tws') call ESMF_StateGet(LSM_State,"Snowdepth",snodField,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for Snowdepth in noahmp401_descale_tws') + call LIS_verify(status,'ESMF_StateGet failed for Snowdepth in noahmpnew_descale_tws') call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm1,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm1 in noahmp401_descale_tws') + call LIS_verify(status,'ESMF_FieldGet failed for sm1 in noahmpnew_descale_tws') call ESMF_FieldGet(sm2Field,localDE=0,farrayPtr=soilm2,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm2 in noahmp401_descale_tws') + call LIS_verify(status,'ESMF_FieldGet failed for sm2 in noahmpnew_descale_tws') call ESMF_FieldGet(sm3Field,localDE=0,farrayPtr=soilm3,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm3 in noahmp401_descale_tws') + call LIS_verify(status,'ESMF_FieldGet failed for sm3 in noahmpnew_descale_tws') call ESMF_FieldGet(sm4Field,localDE=0,farrayPtr=soilm4,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm4 in noahmp401_descale_tws') + call LIS_verify(status,'ESMF_FieldGet failed for sm4 in noahmpnew_descale_tws') call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for SWE in noahmp401_descale_tws') + call LIS_verify(status,'ESMF_FieldGet failed for SWE in noahmpnew_descale_tws') call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for Snowdepth in noahmp401_descale_tws') + call LIS_verify(status,'ESMF_FieldGet failed for Snowdepth in noahmpnew_descale_tws') ! Natt ! Descale TWS state increment call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 1",sm1IncrField,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 1 failed in noahmp401_descale_tws") + "ESMF_StateGet: Soil Moisture Layer 1 failed in noahmpnew_descale_tws") call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 2",sm2IncrField,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 2 failed in noahmp401_descale_tws") + "ESMF_StateGet: Soil Moisture Layer 2 failed in noahmpnew_descale_tws") call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 3",sm3IncrField,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 3 failed in noahmp401_descale_tws") + "ESMF_StateGet: Soil Moisture Layer 3 failed in noahmpnew_descale_tws") call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 4",sm4IncrField,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 4 failed in noahmp401_descale_tws") + "ESMF_StateGet: Soil Moisture Layer 4 failed in noahmpnew_descale_tws") call ESMF_StateGet(LSM_Incr_State,"SWE",sweIncrField,rc=status) call LIS_verify(status) call ESMF_StateGet(LSM_Incr_State,"Snowdepth",snodIncrField,rc=status) @@ -131,16 +131,16 @@ subroutine noahmp401_descale_tws(n, LSM_State, LSM_Incr_State) call ESMF_FieldGet(sm1IncrField,localDE=0,farrayPtr=soilmIncr1,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 1 failed in noahmp401_descale_tws") + "ESMF_FieldGet: Soil Moisture Layer 1 failed in noahmpnew_descale_tws") call ESMF_FieldGet(sm2IncrField,localDE=0,farrayPtr=soilmIncr2,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 2 failed in noahmp401_descale_tws") + "ESMF_FieldGet: Soil Moisture Layer 2 failed in noahmpnew_descale_tws") call ESMF_FieldGet(sm3IncrField,localDE=0,farrayPtr=soilmIncr3,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 3 failed in noahmp401_descale_tws") + "ESMF_FieldGet: Soil Moisture Layer 3 failed in noahmpnew_descale_tws") call ESMF_FieldGet(sm4IncrField,localDE=0,farrayPtr=soilmIncr4,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 4 failed in noahmp401_descale_tws") + "ESMF_FieldGet: Soil Moisture Layer 4 failed in noahmpnew_descale_tws") call ESMF_FieldGet(sweIncrField,localDE=0,farrayPtr=sweincr,rc=status) call LIS_verify(status) call ESMF_FieldGet(snodIncrField,localDE=0,farrayPtr=snodincr,rc=status) @@ -148,13 +148,13 @@ subroutine noahmp401_descale_tws(n, LSM_State, LSM_Incr_State) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - !SOILTYP = NOAHMP401_struc(n)%noahmp401(t)%soiltype - !MAX_THRESHOLD = MAXSMC (SOILTYP) - !MIN_THRESHOLD = WLTSMC(SOILTYP) - soilm1(t) = soilm1(t) / (NOAHMP401_struc(n)%sldpth(1)*1000.0) ! mm -> m3m-3 - soilm2(t) = soilm2(t) / (NOAHMP401_struc(n)%sldpth(2)*1000.0) ! mm -> m3m-3 - soilm3(t) = soilm3(t) / (NOAHMP401_struc(n)%sldpth(3)*1000.0) ! mm -> m3m-3 - soilm4(t) = soilm4(t) / (NOAHMP401_struc(n)%sldpth(4)*1000.0) ! mm -> m3m-3 + !SOILTYP = NoahMPnew_struc(n)%noahmpnew(t)%soiltype + !MAX_THRESHOLD = NoahMPnew_struc(n)%noahmpnew(t)%param%SMCMAX(1) + !MIN_THRESHOLD = NoahMPnew_struc(n)%noahmpnew(t)%param%SMCWLT(1) + soilm1(t) = soilm1(t) / (NoahMPnew_struc(n)%sldpth(1)*1000.0) ! mm -> m3m-3 + soilm2(t) = soilm2(t) / (NoahMPnew_struc(n)%sldpth(2)*1000.0) ! mm -> m3m-3 + soilm3(t) = soilm3(t) / (NoahMPnew_struc(n)%sldpth(3)*1000.0) ! mm -> m3m-3 + soilm4(t) = soilm4(t) / (NoahMPnew_struc(n)%sldpth(4)*1000.0) ! mm -> m3m-3 !if (soilm1(t) .lt. MIN_THRESHOLD) soilm1(t) = MIN_THRESHOLD !if (soilm2(t) .lt. MIN_THRESHOLD) soilm2(t) = MIN_THRESHOLD !if (soilm3(t) .lt. MIN_THRESHOLD) soilm3(t) = MIN_THRESHOLD @@ -166,14 +166,14 @@ subroutine noahmp401_descale_tws(n, LSM_State, LSM_Incr_State) swe(t) = swe(t) / 1000.0 ! mm -> m snod(t) = snod(t) / 1000.0 ! mm -> m - soilmIncr1(t) = soilmIncr1(t) / (NOAHMP401_struc(n)%sldpth(1)*1000.0) ! mm -> m3m-3 - soilmIncr2(t) = soilmIncr2(t) / (NOAHMP401_struc(n)%sldpth(2)*1000.0) ! mm -> m3m-3 - soilmIncr3(t) = soilmIncr3(t) / (NOAHMP401_struc(n)%sldpth(3)*1000.0) ! mm -> m3m-3 - soilmIncr4(t) = soilmIncr4(t) / (NOAHMP401_struc(n)%sldpth(4)*1000.0) ! mm -> m3m-3 + soilmIncr1(t) = soilmIncr1(t) / (NoahMPnew_struc(n)%sldpth(1)*1000.0) ! mm -> m3m-3 + soilmIncr2(t) = soilmIncr2(t) / (NoahMPnew_struc(n)%sldpth(2)*1000.0) ! mm -> m3m-3 + soilmIncr3(t) = soilmIncr3(t) / (NoahMPnew_struc(n)%sldpth(3)*1000.0) ! mm -> m3m-3 + soilmIncr4(t) = soilmIncr4(t) / (NoahMPnew_struc(n)%sldpth(4)*1000.0) ! mm -> m3m-3 sweincr(t) = sweincr(t) / 1000.0 ! mm -> m snodincr(t) = snodincr(t) / 1000.0 ! mm -> m enddo #endif -end subroutine noahmp401_descale_tws +end subroutine noahmpnew_descale_tws diff --git a/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_gettws.F90 b/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_gettws.F90 similarity index 79% rename from lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_gettws.F90 rename to lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_gettws.F90 index d78e2f4ae..8ab401640 100755 --- a/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_gettws.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_gettws.F90 @@ -8,22 +8,22 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_gettws -! \label{noahmp401_gettws} +! !ROUTINE: noahmpnew_gettws +! \label{noahmpnew_gettws} ! ! !REVISION HISTORY: ! 14 Mar 2017: Sujay Kumar; Initial Specification ! 18 Aug 2017: Wanshu Nie; Add groundwater component ! 29 May 2020: Bailing Li; created for Noah-MP4.0.1 - +! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! !INTERFACE: -subroutine noahmp401_gettws(n, LSM_State) +subroutine noahmpnew_gettws(n, LSM_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_verify - use noahmp401_lsmMod + use noahmpnew_lsmMod implicit none ! !ARGUMENTS: @@ -60,44 +60,44 @@ subroutine noahmp401_gettws(n, LSM_State) character*100 :: lsm_state_objs(4) call ESMF_StateGet(LSM_State,"Soil Moisture Layer 1",sm1Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm1 in noahmp401_gettws') + call LIS_verify(status,'ESMF_StateGet failed for sm1 in noahmpnew_gettws') call ESMF_StateGet(LSM_State,"Soil Moisture Layer 2",sm2Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm2 in noahmp401_gettws') + call LIS_verify(status,'ESMF_StateGet failed for sm2 in noahmpnew_gettws') call ESMF_StateGet(LSM_State,"Soil Moisture Layer 3",sm3Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm3 in noahmp401_gettws') + call LIS_verify(status,'ESMF_StateGet failed for sm3 in noahmpnew_gettws') call ESMF_StateGet(LSM_State,"Soil Moisture Layer 4",sm4Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm4 in noahmp401_gettws') + call LIS_verify(status,'ESMF_StateGet failed for sm4 in noahmpnew_gettws') call ESMF_StateGet(LSM_State,"Groundwater Storage",gwField,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for gw in noahmp401_gettws') + call LIS_verify(status,'ESMF_StateGet failed for gw in noahmpnew_gettws') call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for SWE in noahmp401_gettws') + call LIS_verify(status,'ESMF_StateGet failed for SWE in noahmpnew_gettws') call ESMF_StateGet(LSM_State,"Snowdepth",snodField,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for Snowdepth in noahmp401_gettws') + call LIS_verify(status,'ESMF_StateGet failed for Snowdepth in noahmpnew_gettws') call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm1,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm1 in noahmp401_gettws') + call LIS_verify(status,'ESMF_FieldGet failed for sm1 in noahmpnew_gettws') call ESMF_FieldGet(sm2Field,localDE=0,farrayPtr=soilm2,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm2 in noahmp401_gettws') + call LIS_verify(status,'ESMF_FieldGet failed for sm2 in noahmpnew_gettws') call ESMF_FieldGet(sm3Field,localDE=0,farrayPtr=soilm3,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm3 in noahmp401_gettws') + call LIS_verify(status,'ESMF_FieldGet failed for sm3 in noahmpnew_gettws') call ESMF_FieldGet(sm4Field,localDE=0,farrayPtr=soilm4,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm4 in noahmp401_gettws') + call LIS_verify(status,'ESMF_FieldGet failed for sm4 in noahmpnew_gettws') call ESMF_FieldGet(gwField,localDE=0,farrayPtr=gws,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for gw in noahmp401_gettws') + call LIS_verify(status,'ESMF_FieldGet failed for gw in noahmpnew_gettws') call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for SWE in noahmp401_gettws') + call LIS_verify(status,'ESMF_FieldGet failed for SWE in noahmpnew_gettws') call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for Snowdepth in noahmp401_gettws') + call LIS_verify(status,'ESMF_FieldGet failed for Snowdepth in noahmpnew_gettws') do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) !to mm - soilm1(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(1) - soilm2(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(2) - soilm3(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(3) - soilm4(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(4) - gws(t) = NOAHMP401_struc(n)%noahmp401(t)%wa - swe(t) = noahmp401_struc(n)%noahmp401(t)%sneqv - snod(t) = noahmp401_struc(n)%noahmp401(t)%snowh + soilm1(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(1) + soilm2(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(2) + soilm3(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(3) + soilm4(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(4) + gws(t) = NoahMPnew_struc(n)%noahmpnew(t)%wa + swe(t) = NoahMPnew_struc(n)%noahmpnew(t)%sneqv + snod(t) = NoahMPnew_struc(n)%noahmpnew(t)%snowh enddo -end subroutine noahmp401_gettws +end subroutine noahmpnew_gettws diff --git a/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_gettwspred.F90 b/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_gettwspred.F90 similarity index 85% rename from lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_gettwspred.F90 rename to lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_gettwspred.F90 index 02a3f19e4..4159b1f85 100755 --- a/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_gettwspred.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_gettwspred.F90 @@ -8,22 +8,23 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_gettwspred -! \label{noahmp401_gettwspred} +! !ROUTINE: noahmpnew_gettwspred +! \label{noahmpnew_gettwspred} ! ! !REVISION HISTORY: ! 14 Mar 2017: Sujay Kumar; Initial Specification ! 29 May 2020: Baiing Li; Created for Noah-MP4.0.1 +! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmp401_gettwspred(n, k,obs_pred) +subroutine noahmpnew_gettwspred(n, k,obs_pred) ! !USES: use ESMF use LIS_coreMod use LIS_logMod use LIS_DAobservationsMod - use noahmp401_tws_DAlogMod - use noahmp401_lsmMod + use noahmpnew_tws_DAlogMod + use noahmpnew_lsmMod !EOP @@ -56,4 +57,4 @@ subroutine noahmp401_gettwspred(n, k,obs_pred) LIS_rc%lsm_index, & tws,& obs_pred) -end subroutine noahmp401_gettwspred +end subroutine noahmpnew_gettwspred diff --git a/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_qc_twsobs.F90 b/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_qc_twsobs.F90 similarity index 86% rename from lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_qc_twsobs.F90 rename to lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_qc_twsobs.F90 index 82dd50ea4..82d445ab0 100755 --- a/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_qc_twsobs.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_qc_twsobs.F90 @@ -8,22 +8,21 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp36_qc_twsobs -! \label{noahmp36_qc_twsobs} +! !ROUTINE: noahmpnew_qc_twsobs +! \label{noahmpnew_qc_twsobs} ! ! !REVISION HISTORY: ! 14 Mar 2017: Sujay Kumar: Initial Specification ! ! !INTERFACE: -subroutine noahmp401_qc_twsobs(n,k,OBS_State) +subroutine noahmpnew_qc_twsobs(n,k,OBS_State) ! !USES: use ESMF use LIS_coreMod use LIS_logMod, only : LIS_verify use LIS_constantsMod, only : LIS_CONST_TKFRZ use LIS_DAobservationsMod - use noahmp401_lsmMod - use module_sf_noahmplsm_401 !, only: MAXSMC !MN + use noahmpnew_lsmMod implicit none @@ -47,4 +46,4 @@ subroutine noahmp401_qc_twsobs(n,k,OBS_State) ! \end{description} ! !EOP -end subroutine noahmp401_qc_twsobs +end subroutine noahmpnew_qc_twsobs diff --git a/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_qctws.F90 b/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_qctws.F90 similarity index 84% rename from lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_qctws.F90 rename to lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_qctws.F90 index ab1d0be44..f0f498883 100755 --- a/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_qctws.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_qctws.F90 @@ -8,23 +8,22 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_qctws -! \label{noahmp401_qctws} +! !ROUTINE: noahmpnew_qctws +! \label{noahmpnew_qctws} ! ! !REVISION HISTORY: ! 14 Mar 2017: Sujay Kumar; Initial Specification ! 29 May 2020: Bailing Li; Created for Noah-MP4.0.1 +! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmp401_qctws(n, LSM_State) +subroutine noahmpnew_qctws(n, LSM_State) ! !USES: use ESMF use LIS_coreMod use LIS_logMod, only : LIS_verify - use noahmp401_lsmMod - !use module_sf_noahmplsm_401 - use NOAHMP_TABLES_401, ONLY : SMCMAX_TABLE,SMCWLT_TABLE + use noahmpnew_lsmMod implicit none ! !ARGUMENTS: @@ -75,50 +74,50 @@ subroutine noahmp401_qctws(n, LSM_State) call ESMF_StateGet(LSM_State,"Soil Moisture Layer 1",sm1Field,rc=status) call LIS_verify(status,& - "ESMF_StateGet for Soil Moisture Layer 1 failed in noahmp401_qctws") + "ESMF_StateGet for Soil Moisture Layer 1 failed in noahmpnew_qctws") call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm1,rc=status) call LIS_verify(status,& - "ESMF_FieldGet for Soil Moisture Layer 1 failed in noahmp401_qctws") + "ESMF_FieldGet for Soil Moisture Layer 1 failed in noahmpnew_qctws") call ESMF_StateGet(LSM_State,"Soil Moisture Layer 2",sm2Field,rc=status) call LIS_verify(status,& - "ESMF_StateGet for Soil Moisture Layer 2 failed in noahmp401_qctws") + "ESMF_StateGet for Soil Moisture Layer 2 failed in noahmpnew_qctws") call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm2,rc=status) call LIS_verify(status,& - "ESMF_FieldGet for Soil Moisture Layer 2 failed in noahmp401_qctws") + "ESMF_FieldGet for Soil Moisture Layer 2 failed in noahmpnew_qctws") call ESMF_StateGet(LSM_State,"Soil Moisture Layer 3",sm3Field,rc=status) call LIS_verify(status,& - "ESMF_StateGet for Soil Moisture Layer 3 failed in noahmp401_qctws") + "ESMF_StateGet for Soil Moisture Layer 3 failed in noahmpnew_qctws") call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm3,rc=status) call LIS_verify(status,& - "ESMF_FieldGet for Soil Moisture Layer 3 failed in noahmp401_qctws") + "ESMF_FieldGet for Soil Moisture Layer 3 failed in noahmpnew_qctws") call ESMF_StateGet(LSM_State,"Soil Moisture Layer 4",sm4Field,rc=status) call LIS_verify(status,& - "ESMF_StateGet for Soil Moisture Layer 4 failed in noahmp401_qctws") + "ESMF_StateGet for Soil Moisture Layer 4 failed in noahmpnew_qctws") call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm4,rc=status) call LIS_verify(status,& - "ESMF_FieldGet for Soil Moisture Layer 4 failed in noahmp401_qctws") + "ESMF_FieldGet for Soil Moisture Layer 4 failed in noahmpnew_qctws") !Wanshu call ESMF_StateGet(LSM_State,"Groundwater Storage",gwField,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for gw in noahmp401_qctws') + call LIS_verify(status,'ESMF_StateGet failed for gw in noahmpnew_qctws') call ESMF_FieldGet(gwField,localDE=0,farrayPtr=gws,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for gw in noahmp401_qctws') + call LIS_verify(status,'ESMF_FieldGet failed for gw in noahmpnew_qctws') call ESMF_AttributeGet(gwField,"Max Value",gwsmax,rc=status) call LIS_verify(status,& - "ESMF_AttributeGet: Max Value failed in noahmp401_qctws") + "ESMF_AttributeGet: Max Value failed in noahmpnew_qctws") call ESMF_AttributeGet(gwField,"Min Value",gwsmin,rc=status) call LIS_verify(status,& - "ESMF_AttributeGet: Min Value failed in noahmp401_qctws") + "ESMF_AttributeGet: Min Value failed in noahmpnew_qctws") call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) call LIS_verify(status) @@ -144,10 +143,10 @@ subroutine noahmp401_qctws(n, LSM_State) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) !Bailing Li: max min soil moisture should be retrieved based on soil type - SOILTYP = NOAHMP401_struc(n)%noahmp401(t)%soiltype - MAX_THRESHOLD = SMCMAX_TABLE(SOILTYP) - MIN_THRESHOLD = SMCWLT_TABLE(SOILTYP) - sm_threshold = MAX_THRESHOLD - 0.02 + SOILTYP = NoahMPnew_struc(n)%noahmpnew(t)%soiltype + MAX_THRESHOLD = NoahMPnew_struc(n)%noahmpnew(t)%param%SMCMAX(1) !SMCMAX_TABLE(SOILTYP) + MIN_THRESHOLD = NoahMPnew_struc(n)%noahmpnew(t)%param%SMCWLT(1) !SMCWLT_TABLE(SOILTYP) + sm_threshold = MAX_THRESHOLD - 0.02 if(soilm1(t).gt.sm_threshold) then @@ -209,8 +208,8 @@ subroutine noahmp401_qctws(n, LSM_State) !Use the model's snow density from the previous timestep sndens = 0.0 - if(noahmp401_struc(n)%noahmp401(t)%snowh.gt.0) then - sndens = noahmp401_struc(n)%noahmp401(t)%sneqv/noahmp401_struc(n)%noahmp401(t)%snowh + if(NoahMPnew_struc(n)%noahmpnew(t)%snowh.gt.0) then + sndens = NoahMPnew_struc(n)%noahmpnew(t)%sneqv/NoahMPnew_struc(n)%noahmpnew(t)%snowh endif !If the update is unphysical, do not update. @@ -218,8 +217,8 @@ subroutine noahmp401_qctws(n, LSM_State) snod(t) = snod(t) swe(t) = snod(t)*sndens else ! do not update - snod(t) = noahmp401_struc(n)%noahmp401(t)%snowh - swe(t) = noahmp401_struc(n)%noahmp401(t)%sneqv + snod(t) = NoahMPnew_struc(n)%noahmpnew(t)%snowh + swe(t) = NoahMPnew_struc(n)%noahmpnew(t)%sneqv end if if(swe(t).gt.swemax) then @@ -231,4 +230,4 @@ subroutine noahmp401_qctws(n, LSM_State) end do -end subroutine noahmp401_qctws +end subroutine noahmpnew_qctws diff --git a/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_scale_tws.F90 b/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_scale_tws.F90 similarity index 83% rename from lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_scale_tws.F90 rename to lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_scale_tws.F90 index 2dfed965a..e4ad6db80 100755 --- a/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_scale_tws.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_scale_tws.F90 @@ -8,21 +8,22 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_scale_tws -! \label{noahmp401_scale_tws} +! !ROUTINE: noahmpnew_scale_tws +! \label{noahmpnew_scale_tws} ! ! !REVISION HISTORY: ! 14 Mar 2017: Sujay Kumar; Initial Specification ! 29 May 2020: Bailing Li; created for Noah-MP4.0.1 +! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmp401_scale_tws(n, LSM_State) +subroutine noahmpnew_scale_tws(n, LSM_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_verify - use noahmp401_lsmMod + use noahmpnew_lsmMod use LIS_constantsMod, only : LIS_CONST_RHOFW ! Natt implicit none @@ -68,39 +69,39 @@ subroutine noahmp401_scale_tws(n, LSM_State) ! Natt ! Scale TWS states to mm (Note, GWS is already in mm) call ESMF_StateGet(LSM_State,"Soil Moisture Layer 1",sm1Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm1 in noahmp401_scale_tws') + call LIS_verify(status,'ESMF_StateGet failed for sm1 in noahmpnew_scale_tws') call ESMF_StateGet(LSM_State,"Soil Moisture Layer 2",sm2Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm2 in noahmp401_scale_tws') + call LIS_verify(status,'ESMF_StateGet failed for sm2 in noahmpnew_scale_tws') call ESMF_StateGet(LSM_State,"Soil Moisture Layer 3",sm3Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm3 in noahmp401_scale_tws') + call LIS_verify(status,'ESMF_StateGet failed for sm3 in noahmpnew_scale_tws') call ESMF_StateGet(LSM_State,"Soil Moisture Layer 4",sm4Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm4 in noahmp401_scale_tws') + call LIS_verify(status,'ESMF_StateGet failed for sm4 in noahmpnew_scale_tws') call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for SWE in noahmp401_scale_tws') + call LIS_verify(status,'ESMF_StateGet failed for SWE in noahmpnew_scale_tws') call ESMF_StateGet(LSM_State,"Snowdepth",snodField,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for Snowdepth in noahmp401_scale_tws') + call LIS_verify(status,'ESMF_StateGet failed for Snowdepth in noahmpnew_scale_tws') call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm1,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm1 in noahmp401_scale_tws') + call LIS_verify(status,'ESMF_FieldGet failed for sm1 in noahmpnew_scale_tws') call ESMF_FieldGet(sm2Field,localDE=0,farrayPtr=soilm2,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm2 in noahmp401_scale_tws') + call LIS_verify(status,'ESMF_FieldGet failed for sm2 in noahmpnew_scale_tws') call ESMF_FieldGet(sm3Field,localDE=0,farrayPtr=soilm3,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm3 in noahmp401_scale_tws') + call LIS_verify(status,'ESMF_FieldGet failed for sm3 in noahmpnew_scale_tws') call ESMF_FieldGet(sm4Field,localDE=0,farrayPtr=soilm4,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm4 in noahmp401_scale_tws') + call LIS_verify(status,'ESMF_FieldGet failed for sm4 in noahmpnew_scale_tws') call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for SWE in noahmp401_scale_tws') + call LIS_verify(status,'ESMF_FieldGet failed for SWE in noahmpnew_scale_tws') call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for Snowdepth in noahmp401_scale_tws') + call LIS_verify(status,'ESMF_FieldGet failed for Snowdepth in noahmpnew_scale_tws') do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - soilm1(t) = soilm1(t) * NOAHMP401_struc(n)%sldpth(1)*1000.0 ! m3m-3 -> mm - soilm2(t) = soilm2(t) * NOAHMP401_struc(n)%sldpth(2)*1000.0 ! m3m-3 -> mm - soilm3(t) = soilm3(t) * NOAHMP401_struc(n)%sldpth(3)*1000.0 ! m3m-3 -> mm - soilm4(t) = soilm4(t) * NOAHMP401_struc(n)%sldpth(4)*1000.0 ! m3m-3 -> mm + soilm1(t) = soilm1(t) * NoahMPnew_struc(n)%sldpth(1)*1000.0 ! m3m-3 -> mm + soilm2(t) = soilm2(t) * NoahMPnew_struc(n)%sldpth(2)*1000.0 ! m3m-3 -> mm + soilm3(t) = soilm3(t) * NoahMPnew_struc(n)%sldpth(3)*1000.0 ! m3m-3 -> mm + soilm4(t) = soilm4(t) * NoahMPnew_struc(n)%sldpth(4)*1000.0 ! m3m-3 -> mm swe(t) = swe(t) * 1000.0 ! m -> mm snod(t) = snod(t) * 1000.0 ! m -> mm enddo #endif -end subroutine noahmp401_scale_tws +end subroutine noahmpnew_scale_tws diff --git a/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_settws.F90 b/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_settws.F90 similarity index 65% rename from lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_settws.F90 rename to lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_settws.F90 index 629cdacd3..fda6b1e64 100755 --- a/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_settws.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_settws.F90 @@ -8,21 +8,21 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_settws -! \label{noahmp401_settws} +! !ROUTINE: noahmpnew_settws +! \label{noahmpnew_settws} ! ! !REVISION HISTORY: ! 14 Mar 2017: Sujay Kumar; Initial Specification ! 29 May 2020: Bailing Li; created for Noah-MP4.0.1 +! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmp401_settws(n, LSM_State) +subroutine noahmpnew_settws(n, LSM_State) ! !USES: use ESMF use LIS_coreMod use LIS_logMod - use noahMP401_lsmMod - use NOAHMP_TABLES_401, ONLY : SMCMAX_TABLE,SMCWLT_TABLE + use NoahMPnew_lsmMod implicit none ! !ARGUMENTS: @@ -75,48 +75,48 @@ subroutine noahmp401_settws(n, LSM_State) call ESMF_StateGet(LSM_State,"Soil Moisture Layer 1",sm1Field,rc=status) call LIS_verify(status,& - "ESMF_StateSet: Soil Moisture Layer 1 failed in noahmp401_settws") + "ESMF_StateSet: Soil Moisture Layer 1 failed in noahmpnew_settws") call ESMF_StateGet(LSM_State,"Soil Moisture Layer 2",sm2Field,rc=status) call LIS_verify(status,& - "ESMF_StateSet: Soil Moisture Layer 2 failed in noahmp401_settws") + "ESMF_StateSet: Soil Moisture Layer 2 failed in noahmpnew_settws") call ESMF_StateGet(LSM_State,"Soil Moisture Layer 3",sm3Field,rc=status) call LIS_verify(status,& - "ESMF_StateSet: Soil Moisture Layer 3 failed in noahmp401_settws") + "ESMF_StateSet: Soil Moisture Layer 3 failed in noahmpnew_settws") call ESMF_StateGet(LSM_State,"Soil Moisture Layer 4",sm4Field,rc=status) call LIS_verify(status,& - "ESMF_StateSet: Soil Moisture Layer 4 failed in noahmp401_settws") + "ESMF_StateSet: Soil Moisture Layer 4 failed in noahmpnew_settws") call ESMF_StateGet(LSM_State,"Groundwater Storage",gwField,rc=status) call LIS_verify(status,& - "ESMF_StateSet: Groundwater Storage failed in noahmp401_settws") + "ESMF_StateSet: Groundwater Storage failed in noahmpnew_settws") call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) call LIS_verify(status,& - "ESMF_StateSet: SWE failed in noahmp401_settws") + "ESMF_StateSet: SWE failed in noahmpnew_settws") call ESMF_StateGet(LSM_State,"Snowdepth",snodField,rc=status) call LIS_verify(status,& - "ESMF_StateSet: Snowdepth failed in noahmp401_settws") + "ESMF_StateSet: Snowdepth failed in noahmpnew_settws") call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm1,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 1 failed in noahmp401_settws") + "ESMF_FieldGet: Soil Moisture Layer 1 failed in noahmpnew_settws") call ESMF_FieldGet(sm2Field,localDE=0,farrayPtr=soilm2,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 2 failed in noahmp401_settws") + "ESMF_FieldGet: Soil Moisture Layer 2 failed in noahmpnew_settws") call ESMF_FieldGet(sm3Field,localDE=0,farrayPtr=soilm3,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 3 failed in noahmp401_settws") + "ESMF_FieldGet: Soil Moisture Layer 3 failed in noahmpnew_settws") call ESMF_FieldGet(sm4Field,localDE=0,farrayPtr=soilm4,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 4 failed in noahmp401_settws") + "ESMF_FieldGet: Soil Moisture Layer 4 failed in noahmpnew_settws") call ESMF_FieldGet(gwField,localDE=0,farrayPtr=gws,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Groundwater Storage failed in noahmp401_settws") + "ESMF_FieldGet: Groundwater Storage failed in noahmpnew_settws") call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: SWE failed in noahmp401_settws") + "ESMF_FieldGet: SWE failed in noahmpnew_settws") call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Snowdepth failed in noahmp401_settws") + "ESMF_FieldGet: Snowdepth failed in noahmpnew_settws") ensCheck = .true. @@ -129,13 +129,13 @@ subroutine noahmp401_settws(n, LSM_State) r = LIS_domain(n)%tile(t)%row i = LIS_domain(n)%gindex(c,r) - SOILTYP = NOAHMP401_struc(n)%noahmp401(t)%soiltype - MAX_THRESHOLD = SMCMAX_TABLE(SOILTYP) + SOILTYP = NoahMPnew_struc(n)%noahmpnew(t)%soiltype + MAX_THRESHOLD = NoahMPnew_struc(n)%noahmpnew(t)%param%SMCMAX(1) !SMCMAX_TABLE(SOILTYP) !locations with large soil moisture values are ice points. !we turn off the increments in such locations. - if(noahmp401_struc(n)%noahmp401(t)%smc(1).gt.MAX_THRESHOLD.or.& - noahmp401_struc(n)%noahmp401(t)%smc(1).gt.0.50) then + if(NoahMPnew_struc(n)%noahmpnew(t)%smc(1).gt.MAX_THRESHOLD.or.& + NoahMPnew_struc(n)%noahmpnew(t)%smc(1).gt.0.50) then largeSM(i) = .true. endif enddo @@ -146,13 +146,13 @@ subroutine noahmp401_settws(n, LSM_State) r = LIS_domain(n)%tile(t)%row i = LIS_domain(n)%gindex(c,r) if(largeSM(i)) then - soilm1(t) = noahmp401_struc(n)%noahmp401(t)%smc(1) - soilm2(t) = noahmp401_struc(n)%noahmp401(t)%smc(2) - soilm3(t) = noahmp401_struc(n)%noahmp401(t)%smc(3) - soilm4(t) = noahmp401_struc(n)%noahmp401(t)%smc(4) - gws(t) = NOAHMP401_struc(n)%noahmp401(t)%wa - snod(t) = noahmp401_struc(n)%noahmp401(t)%snowh - swe(t) = noahmp401_struc(n)%noahmp401(t)%sneqv + soilm1(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(1) + soilm2(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(2) + soilm3(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(3) + soilm4(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(4) + gws(t) = NoahMPnew_struc(n)%noahmpnew(t)%wa + snod(t) = NoahMPnew_struc(n)%noahmpnew(t)%snowh + swe(t) = NoahMPnew_struc(n)%noahmpnew(t)%sneqv endif enddo @@ -163,10 +163,10 @@ subroutine noahmp401_settws(n, LSM_State) r = LIS_domain(n)%tile(t)%row i = LIS_domain(n)%gindex(c,r) - SOILTYP = NOAHMP401_struc(n)%noahmp401(t)%soiltype - MAX_THRESHOLD = SMCMAX_TABLE(SOILTYP) + SOILTYP = NoahMPnew_struc(n)%noahmpnew(t)%soiltype + MAX_THRESHOLD = NoahMPnew_struc(n)%noahmpnew(t)%param%SMCMAX(1) !SMCMAX_TABLE(SOILTYP) MIN_THRESHOLD = 0.02 !SMCWLT_TABLE(SOILTYP) - sm_threshold = MAX_THRESHOLD - 0.02 + sm_threshold = MAX_THRESHOLD - 0.02 if((soilm1(t).lt.MIN_THRESHOLD.or.& soilm1(t).gt.MAX_THRESHOLD).or.& @@ -196,23 +196,23 @@ subroutine noahmp401_settws(n, LSM_State) rc4 = .true. rc5 = .true. if(.not.ensCheck(i).and.diffCheck(i).and.(.not.largeSM(i))) then - call noahmp401_tws_reorderEnsForOutliers(i,& + call noahmpnew_tws_reorderEnsForOutliers(i,& LIS_rc%nensem(n),& soilm1((i-1)*LIS_rc%nensem(n)+1:i*LIS_rc%nensem(n)),& MIN_THRESHOLD, MAX_THRESHOLD,rc1) - call noahmp401_tws_reorderEnsForOutliers(i,& + call noahmpnew_tws_reorderEnsForOutliers(i,& LIS_rc%nensem(n),& soilm2((i-1)*LIS_rc%nensem(n)+1:i*LIS_rc%nensem(n)),& MIN_THRESHOLD, MAX_THRESHOLD,rc2) - call noahmp401_tws_reorderEnsForOutliers(i,& + call noahmpnew_tws_reorderEnsForOutliers(i,& LIS_rc%nensem(n),& soilm3((i-1)*LIS_rc%nensem(n)+1:i*LIS_rc%nensem(n)),& MIN_THRESHOLD, MAX_THRESHOLD,rc3) - call noahmp401_tws_reorderEnsForOutliers(i,& + call noahmpnew_tws_reorderEnsForOutliers(i,& LIS_rc%nensem(n),& soilm4((i-1)*LIS_rc%nensem(n)+1:i*LIS_rc%nensem(n)),& MIN_THRESHOLD, MAX_THRESHOLD,rc4) - call noahmp401_tws_reorderEnsForOutliers(i,& + call noahmpnew_tws_reorderEnsForOutliers(i,& LIS_rc%nensem(n),& gws((i-1)*LIS_rc%nensem(n)+1:i*LIS_rc%nensem(n)),& MIN_GWS_THRESHOLD, MAX_GWS_THRESHOLD,rc5) @@ -225,63 +225,63 @@ subroutine noahmp401_settws(n, LSM_State) do m=1,LIS_rc%nensem(n) t = (i-1)*LIS_rc%nensem(n)+m - soilm1(t) = noahmp401_struc(n)%noahmp401(t)%smc(1) - soilm2(t) = noahmp401_struc(n)%noahmp401(t)%smc(2) - soilm3(t) = noahmp401_struc(n)%noahmp401(t)%smc(3) - soilm4(t) = noahmp401_struc(n)%noahmp401(t)%smc(4) - gws(t) = NOAHMP401_struc(n)%noahmp401(t)%wa - snod(t) = noahmp401_struc(n)%noahmp401(t)%snowh - swe(t) = noahmp401_struc(n)%noahmp401(t)%sneqv + soilm1(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(1) + soilm2(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(2) + soilm3(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(3) + soilm4(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(4) + gws(t) = NoahMPnew_struc(n)%noahmpnew(t)%wa + snod(t) = NoahMPnew_struc(n)%noahmpnew(t)%snowh + swe(t) = NoahMPnew_struc(n)%noahmpnew(t)%sneqv enddo endif enddo do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - delta = soilm1(t) - NOAHMP401_struc(n)%noahmp401(t)%smc(1) - NOAHMP401_struc(n)%noahmp401(t)%smc(1) = soilm1(t) - NOAHMP401_struc(n)%noahmp401(t)%sh2o(1) = & - NOAHMP401_struc(n)%noahmp401(t)%sh2o(1) + delta + delta = soilm1(t) - NoahMPnew_struc(n)%noahmpnew(t)%smc(1) + NoahMPnew_struc(n)%noahmpnew(t)%smc(1) = soilm1(t) + NoahMPnew_struc(n)%noahmpnew(t)%sh2o(1) = & + NoahMPnew_struc(n)%noahmpnew(t)%sh2o(1) + delta - delta = soilm2(t) - NOAHMP401_struc(n)%noahmp401(t)%smc(2) - NOAHMP401_struc(n)%noahmp401(t)%smc(2) = soilm2(t) - NOAHMP401_struc(n)%noahmp401(t)%sh2o(2) = & - NOAHMP401_struc(n)%noahmp401(t)%sh2o(2) + delta + delta = soilm2(t) - NoahMPnew_struc(n)%noahmpnew(t)%smc(2) + NoahMPnew_struc(n)%noahmpnew(t)%smc(2) = soilm2(t) + NoahMPnew_struc(n)%noahmpnew(t)%sh2o(2) = & + NoahMPnew_struc(n)%noahmpnew(t)%sh2o(2) + delta - delta = soilm3(t) - NOAHMP401_struc(n)%noahmp401(t)%smc(3) - NOAHMP401_struc(n)%noahmp401(t)%smc(3) = soilm3(t) - NOAHMP401_struc(n)%noahmp401(t)%sh2o(3) = & - NOAHMP401_struc(n)%noahmp401(t)%sh2o(3) + delta + delta = soilm3(t) - NoahMPnew_struc(n)%noahmpnew(t)%smc(3) + NoahMPnew_struc(n)%noahmpnew(t)%smc(3) = soilm3(t) + NoahMPnew_struc(n)%noahmpnew(t)%sh2o(3) = & + NoahMPnew_struc(n)%noahmpnew(t)%sh2o(3) + delta - delta = soilm4(t) - NOAHMP401_struc(n)%noahmp401(t)%smc(4) - NOAHMP401_struc(n)%noahmp401(t)%smc(4) = soilm4(t) - NOAHMP401_struc(n)%noahmp401(t)%sh2o(4) = & - NOAHMP401_struc(n)%noahmp401(t)%sh2o(4) + delta + delta = soilm4(t) - NoahMPnew_struc(n)%noahmpnew(t)%smc(4) + NoahMPnew_struc(n)%noahmpnew(t)%smc(4) = soilm4(t) + NoahMPnew_struc(n)%noahmpnew(t)%sh2o(4) = & + NoahMPnew_struc(n)%noahmpnew(t)%sh2o(4) + delta - NOAHMP401_struc(n)%noahmp401(t)%wa=gws(t) + NoahMPnew_struc(n)%noahmpnew(t)%wa=gws(t) enddo do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - swe_old = noahmp401_struc(n)%noahmp401(t)%sneqv - snowh_old = noahmp401_struc(n)%noahmp401(t)%snowh + swe_old = NoahMPnew_struc(n)%noahmpnew(t)%sneqv + snowh_old = NoahMPnew_struc(n)%noahmpnew(t)%snowh - dsneqv = swe(t) - noahmp401_struc(n)%noahmp401(t)%sneqv !in mm - dsnowh = snod(t) - noahmp401_struc(n)%noahmp401(t)%snowh !in m + dsneqv = swe(t) - NoahMPnew_struc(n)%noahmpnew(t)%sneqv !in mm + dsnowh = snod(t) - NoahMPnew_struc(n)%noahmpnew(t)%snowh !in m !alternate option - call noahmp401_snow_update(n, t, dsneqv, dsnowh) + call noahmpnew_snow_update(n, t, dsneqv, dsnowh) - if(noahmp401_struc(n)%noahmp401(t)%sneqv.eq.0.or.& - noahmp401_struc(n)%noahmp401(t)%snowh.eq.0) then - noahmp401_struc(n)%noahmp401(t)%sneqv = 0 - noahmp401_struc(n)%noahmp401(t)%snowh = 0 + if(NoahMPnew_struc(n)%noahmpnew(t)%sneqv.eq.0.or.& + NoahMPnew_struc(n)%noahmpnew(t)%snowh.eq.0) then + NoahMPnew_struc(n)%noahmpnew(t)%sneqv = 0 + NoahMPnew_struc(n)%noahmpnew(t)%snowh = 0 endif enddo -end subroutine noahmp401_settws +end subroutine noahmpnew_settws -subroutine noahmp401_tws_reorderEnsForOutliers(i,nensem, statevec, & +subroutine noahmpnew_tws_reorderEnsForOutliers(i,nensem, statevec, & minvalue,maxvalue, status) use LIS_coreMod @@ -343,4 +343,4 @@ subroutine noahmp401_tws_reorderEnsForOutliers(i,nensem, statevec, & enddo endif -end subroutine noahmp401_tws_reorderEnsForOutliers +end subroutine noahmpnew_tws_reorderEnsForOutliers diff --git a/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_tws_DAlogMod.F90 b/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_tws_DAlogMod.F90 similarity index 77% rename from lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_tws_DAlogMod.F90 rename to lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_tws_DAlogMod.F90 index 31d6ebdd5..c3dc97378 100755 --- a/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_tws_DAlogMod.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_tws_DAlogMod.F90 @@ -10,15 +10,16 @@ ! ! 16Feb12 Ben Zaitchik; Initial Specification ! 29 May 2020: Bailing Li; created for Noah-MP4.0.1 +! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! -module noahmp401_tws_DAlogMod +module noahmpnew_tws_DAlogMod use LIS_constantsMod, only : LIS_CONST_RHOFW use ESMF ! !PUBLIC MEMBER FUNCTIONS: !------------------------------------------ - public :: noahmp401_tws_DAlog + public :: noahmpnew_tws_DAlog !----------------------------------------- ! !PUBLIC TYPES: !----------------------------------------- @@ -35,12 +36,12 @@ module noahmp401_tws_DAlogMod contains - subroutine noahmp401_tws_DAlog(n) + subroutine noahmpnew_tws_DAlog(n) ! USES: use LIS_coreMod, only : LIS_rc,LIS_surface use LIS_timeMgrMod - use noahmp401_lsmMod + use noahmpnew_lsmMod use LIS_logMod, only : LIS_logunit, LIS_verify ! use smootherDA_runMod, only : smootherDA_increments_mode @@ -84,18 +85,18 @@ subroutine noahmp401_tws_DAlog(n) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) NOAHMPpred_struc(n)%clmnwater(d,t)= & NOAHMPpred_struc(n)%clmnwater(d,t) + & - NOAHMP401_struc(n)%noahmp401(t)%sneqv + & - (NOAHMP401_struc(n)%noahmp401(t)%canliq + & - NOAHMP401_struc(n)%noahmp401(t)%canice) + & - (NOAHMP401_struc(n)%noahmp401(t)%smc(1) * & - NOAHMP401_struc(n)%sldpth(1)*LIS_CONST_RHOFW) + & - (NOAHMP401_struc(n)%noahmp401(t)%smc(2) * & - NOAHMP401_struc(n)%sldpth(2)*LIS_CONST_RHOFW) + & - (NOAHMP401_struc(n)%noahmp401(t)%smc(3) * & - NOAHMP401_struc(n)%sldpth(3)*LIS_CONST_RHOFW) + & - (NOAHMP401_struc(n)%noahmp401(t)%smc(4) * & - NOAHMP401_struc(n)%sldpth(4)*LIS_CONST_RHOFW) + & - NOAHMP401_struc(n)%noahmp401(t)%wa + NoahMPnew_struc(n)%noahmpnew(t)%sneqv + & + (NoahMPnew_struc(n)%noahmpnew(t)%canliq + & + NoahMPnew_struc(n)%noahmpnew(t)%canice) + & + (NoahMPnew_struc(n)%noahmpnew(t)%smc(1) * & + NoahMPnew_struc(n)%sldpth(1)*LIS_CONST_RHOFW) + & + (NoahMPnew_struc(n)%noahmpnew(t)%smc(2) * & + NoahMPnew_struc(n)%sldpth(2)*LIS_CONST_RHOFW) + & + (NoahMPnew_struc(n)%noahmpnew(t)%smc(3) * & + NoahMPnew_struc(n)%sldpth(3)*LIS_CONST_RHOFW) + & + (NoahMPnew_struc(n)%noahmpnew(t)%smc(4) * & + NoahMPnew_struc(n)%sldpth(4)*LIS_CONST_RHOFW) + & + NoahMPnew_struc(n)%noahmpnew(t)%wa enddo endif @@ -161,18 +162,18 @@ subroutine noahmp401_tws_DAlog(n) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) NOAHMPpred_struc(n)%clmnwater(d,t)= & NOAHMPpred_struc(n)%clmnwater(d,t) + & - NOAHMP401_struc(n)%noahmp401(t)%sneqv + & - (NOAHMP401_struc(n)%noahmp401(t)%canliq + & - NOAHMP401_struc(n)%noahmp401(t)%canice) + & - (NOAHMP401_struc(n)%noahmp401(t)%smc(1) * & - NOAHMP401_struc(n)%sldpth(1)*LIS_CONST_RHOFW) + & - (NOAHMP401_struc(n)%noahmp401(t)%smc(2) * & - NOAHMP401_struc(n)%sldpth(2)*LIS_CONST_RHOFW) + & - (NOAHMP401_struc(n)%noahmp401(t)%smc(3) * & - NOAHMP401_struc(n)%sldpth(3)*LIS_CONST_RHOFW) + & - (NOAHMP401_struc(n)%noahmp401(t)%smc(4) * & - NOAHMP401_struc(n)%sldpth(4)*LIS_CONST_RHOFW) + & - NOAHMP401_struc(n)%noahmp401(t)%wa + NoahMPnew_struc(n)%noahmpnew(t)%sneqv + & + (NoahMPnew_struc(n)%noahmpnew(t)%canliq + & + NoahMPnew_struc(n)%noahmpnew(t)%canice) + & + (NoahMPnew_struc(n)%noahmpnew(t)%smc(1) * & + NoahMPnew_struc(n)%sldpth(1)*LIS_CONST_RHOFW) + & + (NoahMPnew_struc(n)%noahmpnew(t)%smc(2) * & + NoahMPnew_struc(n)%sldpth(2)*LIS_CONST_RHOFW) + & + (NoahMPnew_struc(n)%noahmpnew(t)%smc(3) * & + NoahMPnew_struc(n)%sldpth(3)*LIS_CONST_RHOFW) + & + (NoahMPnew_struc(n)%noahmpnew(t)%smc(4) * & + NoahMPnew_struc(n)%sldpth(4)*LIS_CONST_RHOFW) + & + NoahMPnew_struc(n)%noahmpnew(t)%wa enddo @@ -181,6 +182,6 @@ subroutine noahmp401_tws_DAlog(n) endif endif - end subroutine noahmp401_tws_DAlog + end subroutine noahmpnew_tws_DAlog -end module noahmp401_tws_DAlogMod +end module noahmpnew_tws_DAlogMod diff --git a/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_updatetws.F90 b/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_updatetws.F90 similarity index 81% rename from lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_updatetws.F90 rename to lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_updatetws.F90 index e0c031cc9..3c542c825 100755 --- a/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_updatetws.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_updatetws.F90 @@ -8,20 +8,21 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_updatetws -! \label{noahmp401_updatetws} +! !ROUTINE: noahmpnew_updatetws +! \label{noahmpnew_updatetws} ! ! !REVISION HISTORY: ! 14 Mar 2017: Sujay Kumar; Initial Specification ! 29 May 2020: Bailing Li; created for Noah-MP4.0.1 +! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmp401_updatetws(n, LSM_State, LSM_Incr_State) +subroutine noahmpnew_updatetws(n, LSM_State, LSM_Incr_State) ! !USES: use ESMF use LIS_coreMod use LIS_logMod - use noahmp401_lsmMod + use noahmpnew_lsmMod implicit none ! !ARGUMENTS: @@ -31,7 +32,7 @@ subroutine noahmp401_updatetws(n, LSM_State, LSM_Incr_State) ! ! !DESCRIPTION: ! -! This routine assigns the soil moisture prognostic variables to noah's +! This routine assigns the soil moisture prognostic variables to noahmp's ! model space. ! !EOP @@ -75,20 +76,20 @@ subroutine noahmp401_updatetws(n, LSM_State, LSM_Incr_State) call ESMF_StateGet(LSM_State,"Soil Moisture Layer 1",sm1Field,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 1 failed in noahmp401_updatetws") + "ESMF_StateGet: Soil Moisture Layer 1 failed in noahmpnew_updatetws") call ESMF_StateGet(LSM_State,"Soil Moisture Layer 2",sm2Field,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 2 failed in noahmp401_updatetws") + "ESMF_StateGet: Soil Moisture Layer 2 failed in noahmpnew_updatetws") call ESMF_StateGet(LSM_State,"Soil Moisture Layer 3",sm3Field,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 3 failed in noahmp401_updatetws") + "ESMF_StateGet: Soil Moisture Layer 3 failed in noahmpnew_updatetws") call ESMF_StateGet(LSM_State,"Soil Moisture Layer 4",sm4Field,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 4 failed in noahmp401_updatetws") + "ESMF_StateGet: Soil Moisture Layer 4 failed in noahmpnew_updatetws") call ESMF_StateGet(LSM_State,"Groundwater Storage",gwField,rc=status) call LIS_verify(status,& - "ESMF_StateSet: Groundwater Storage failed in noahmp401_updatetws") + "ESMF_StateSet: Groundwater Storage failed in noahmpnew_updatetws") call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) call LIS_verify(status) @@ -98,20 +99,20 @@ subroutine noahmp401_updatetws(n, LSM_State, LSM_Incr_State) call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 1",sm1IncrField,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 1 failed in noahmp401_updatetws") + "ESMF_StateGet: Soil Moisture Layer 1 failed in noahmpnew_updatetws") call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 2",sm2IncrField,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 2 failed in noahmp401_updatetws") + "ESMF_StateGet: Soil Moisture Layer 2 failed in noahmpnew_updatetws") call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 3",sm3IncrField,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 3 failed in noahmp401_updatetws") + "ESMF_StateGet: Soil Moisture Layer 3 failed in noahmpnew_updatetws") call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 4",sm4IncrField,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 4 failed in noahmp401_updatetws") + "ESMF_StateGet: Soil Moisture Layer 4 failed in noahmpnew_updatetws") call ESMF_StateGet(LSM_Incr_State, "Groundwater Storage",gwIncrField,rc=status) call LIS_verify(status,& - "ESMF_StateSet: Groundwater Storage failed in noahmp401_updatetws") + "ESMF_StateSet: Groundwater Storage failed in noahmpnew_updatetws") call ESMF_StateGet(LSM_Incr_State,"SWE",sweIncrField,rc=status) call LIS_verify(status) call ESMF_StateGet(LSM_Incr_State,"Snowdepth",snodIncrField,rc=status) @@ -121,19 +122,19 @@ subroutine noahmp401_updatetws(n, LSM_State, LSM_Incr_State) !------------------- call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm1,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 1 failed in noahmp401_updatetws") + "ESMF_FieldGet: Soil Moisture Layer 1 failed in noahmpnew_updatetws") call ESMF_FieldGet(sm2Field,localDE=0,farrayPtr=soilm2,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 2 failed in noahmp401_updatetws") + "ESMF_FieldGet: Soil Moisture Layer 2 failed in noahmpnew_updatetws") call ESMF_FieldGet(sm3Field,localDE=0,farrayPtr=soilm3,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 3 failed in noahmp401_updatetws") + "ESMF_FieldGet: Soil Moisture Layer 3 failed in noahmpnew_updatetws") call ESMF_FieldGet(sm4Field,localDE=0,farrayPtr=soilm4,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 4 failed in noahmp401_updatetws") + "ESMF_FieldGet: Soil Moisture Layer 4 failed in noahmpnew_updatetws") call ESMF_FieldGet(gwField,localDE=0,farrayPtr=gws,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Groundwater Storage failed in noahmp401_updatetws") + "ESMF_FieldGet: Groundwater Storage failed in noahmpnew_updatetws") call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) call LIS_verify(status) call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) @@ -142,19 +143,19 @@ subroutine noahmp401_updatetws(n, LSM_State, LSM_Incr_State) call ESMF_FieldGet(sm1IncrField,localDE=0,farrayPtr=soilmIncr1,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 1 failed in noahmp401_updatetws") + "ESMF_FieldGet: Soil Moisture Layer 1 failed in noahmpnew_updatetws") call ESMF_FieldGet(sm2IncrField,localDE=0,farrayPtr=soilmIncr2,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 2 failed in noahmp401_updatetws") + "ESMF_FieldGet: Soil Moisture Layer 2 failed in noahmpnew_updatetws") call ESMF_FieldGet(sm3IncrField,localDE=0,farrayPtr=soilmIncr3,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 3 failed in noahmp401_updatetws") + "ESMF_FieldGet: Soil Moisture Layer 3 failed in noahmpnew_updatetws") call ESMF_FieldGet(sm4IncrField,localDE=0,farrayPtr=soilmIncr4,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 4 failed in noahmp401_updatetws") + "ESMF_FieldGet: Soil Moisture Layer 4 failed in noahmpnew_updatetws") call ESMF_FieldGet(gwIncrField, localDE=0, farrayPtr=gwsIncr,rc=status) call LIS_verify(status,& - "ESMF_StateSet: Groundwater Storage failed in noahmp401_updatetws") + "ESMF_StateSet: Groundwater Storage failed in noahmpnew_updatetws") call ESMF_FieldGet(sweIncrField,localDE=0,farrayPtr=sweincr,rc=status) call LIS_verify(status) call ESMF_FieldGet(snodIncrField,localDE=0,farrayPtr=snodincr,rc=status) @@ -236,8 +237,8 @@ subroutine noahmp401_updatetws(n, LSM_State, LSM_Incr_State) !Use the model's snow density from the previous timestep sndens = 0.0 - if(noahmp401_struc(n)%noahmp401(t)%snowh.gt.0) then - sndens = noahmp401_struc(n)%noahmp401(t)%sneqv/noahmp401_struc(n)%noahmp401(t)%snowh + if(NoahMPnew_struc(n)%noahmpnew(t)%snowh.gt.0) then + sndens = NoahMPnew_struc(n)%noahmpnew(t)%sneqv/NoahMPnew_struc(n)%noahmpnew(t)%snowh endif if(update_flag(gid)) then @@ -252,10 +253,10 @@ subroutine noahmp401_updatetws(n, LSM_State, LSM_Incr_State) swe(t) = swetmp endif else ! do not update - snod(t) = noahmp401_struc(n)%noahmp401(t)%snowh - swe(t) = noahmp401_struc(n)%noahmp401(t)%sneqv + snod(t) = NoahMPnew_struc(n)%noahmpnew(t)%snowh + swe(t) = NoahMPnew_struc(n)%noahmpnew(t)%sneqv end if enddo -end subroutine noahmp401_updatetws +end subroutine noahmpnew_updatetws diff --git a/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_write_tws.F90 b/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_write_tws.F90 similarity index 76% rename from lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_write_tws.F90 rename to lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_write_tws.F90 index 8ae4e18df..406ebd3dd 100755 --- a/lis/surfacemodels/land/noahmp.new/da_tws/noahmp401_write_tws.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_write_tws.F90 @@ -8,19 +8,20 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_write_tws -! \label{noahmp401_write_tws} +! !ROUTINE: noahmpnew_write_tws +! \label{noahmpnew_write_tws} ! ! !REVISION HISTORY: ! 14 Mar 2017: Sujay Kumar; Initial Specification +! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmp401_write_tws(ftn,n, LSM_State) +subroutine noahmpnew_write_tws(ftn,n, LSM_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc - use noahmp401_lsmMod + use noahmpnew_lsmMod use LIS_historyMod, only : LIS_writevar_restart implicit none @@ -46,30 +47,30 @@ subroutine noahmp401_write_tws(ftn,n, LSM_State) allocate(tmp(LIS_rc%npatch(n,LIS_rc%lsm_index))) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(1) + tmp(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(1) enddo call LIS_writevar_restart(ftn,n,1,tmp) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(2) + tmp(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(2) enddo call LIS_writevar_restart(ftn,n,1,tmp) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(3) + tmp(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(3) enddo call LIS_writevar_restart(ftn,n,1,tmp) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(4) + tmp(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(4) enddo call LIS_writevar_restart(ftn,n,1,tmp) !Wanshu do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = NOAHMP401_struc(n)%noahmp401(t)%wa + tmp(t) = NoahMPnew_struc(n)%noahmpnew(t)%wa enddo call LIS_writevar_restart(ftn,n,1,tmp) !--------- deallocate(tmp) -end subroutine noahmp401_write_tws +end subroutine noahmpnew_write_tws diff --git a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_transform_usafsi.F90 b/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_transform_usafsi.F90 index 289526183..fb35931a0 100755 --- a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_transform_usafsi.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_transform_usafsi.F90 @@ -19,7 +19,7 @@ ! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 ! 15 May 2019: Yeosang Yoon; Modified for NoahMP 4.0.1 and LDTSI ! 13 Dec 2019: Eric Kemp; Replaced LDTSI with USAFSI -! May 2023: Cenlin He; update to work with refactored NoahMP (v5.0 and newer) +! May 2023: Cenlin He; update to work with refactored NoahMP (v5.0 and newer) ! ! !INTERFACE: subroutine noahmpnew_transform_usafsi(n,OBS_State) diff --git a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_usafsi_update.F90 b/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_usafsi_update.F90 index 489b50b34..a7fffd994 100755 --- a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_usafsi_update.F90 +++ b/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_usafsi_update.F90 @@ -19,16 +19,11 @@ ! May 2023: Cenlin He; update to work with refactored NoahMP (v5.0 and newer) ! ! !INTERFACE -subroutine noahmpnew_usafsi_update(n, t, dsneqv, dsnowh, NoahmpIO, noahmp) +subroutine noahmpnew_usafsi_update(n, t, dsneqv, dsnowh) use LIS_coreMod use NoahMPnew_lsmMod - use NoahmpIOVarType - use NoahmpVarType - use SnowpackCompactionMod, only : SnowpackCompaction - use SnowLayerCombineMod, only : SnowLayerCombine - use SnowLayerDivideMod, only : SnowLayerDivide - + use NoahMPnew_snowphys_updateMod implicit none ! @@ -44,11 +39,12 @@ subroutine noahmpnew_usafsi_update(n, t, dsneqv, dsnowh, NoahmpIO, noahmp) integer, intent(in) :: t real :: dsneqv !mm real :: dsnowh !m - type(NoahmpIO_type) , intent(in) :: NoahmpIO - type(noahmp_type), intent(inout) :: noahmp !EOP - real, parameter :: tfrz = 273.16 + real, parameter :: tfrz = 273.16 !freezing/melting point (k) + real, parameter :: hfus = 0.3336E06 !latent heat of fusion (j/kg) + real, parameter :: grav = 9.80616 !acceleration due to gravity (m/s2) + real, parameter :: DENH2O = 1000.0 !density of water (kg/m3) real, allocatable, dimension(:) :: zsoil real, allocatable, dimension(:) :: ficeold real, allocatable, dimension(:) :: snice @@ -100,19 +96,19 @@ subroutine noahmpnew_usafsi_update(n, t, dsneqv, dsnowh, NoahmpIO, noahmp) !set empty snow layers to zero do iz = -nsnow+1, isnow - snice(iz) = 0. - snliq(iz) = 0. - stc(iz) = 0. - dzsnso(iz)= 0. - zsnso(iz) = 0. + snice(iz) = 0.0 + snliq(iz) = 0.0 + stc(iz) = 0.0 + dzsnso(iz)= 0.0 + zsnso(iz) = 0.0 enddo ! initialize the variables soiltype = NoahmpNew_struc(n)%noahmpnew(t)%soiltype do isoil = 1, size(soiltype) - BEXP(isoil) = NoahmpIO%BEXP_TABLE (SOILTYPE(isoil)) - PSISAT(isoil) = NoahmpIO%PSISAT_TABLE (SOILTYPE(isoil)) - SMCMAX(isoil) = NoahmpIO%SMCMAX_TABLE (SOILTYPE(isoil)) + BEXP(isoil) = NoahmpNew_struc(n)%noahmpnew(t)%param%BEXP(isoil) + PSISAT(isoil) = NoahmpNew_struc(n)%noahmpnew(t)%param%PSISAT(isoil) + SMCMAX(isoil) = NoahmpNew_struc(n)%noahmpnew(t)%param%SMCMAX(isoil) end do sneqv = NoahmpNew_struc(n)%noahmpnew(t)%sneqv @@ -211,7 +207,7 @@ subroutine noahmpnew_usafsi_update(n, t, dsneqv, dsnowh, NoahmpIO, noahmp) enddo sice(:) = max(0.0, NoahmpNew_struc(n)%noahmpnew(t)%smc(:)& - - NoahmpNew_struc(n)%noahmpnew(t)%sh2o(:)) + - NoahmpNew_struc(n)%noahmpnew(t)%sh2o(:)) !imelt do j = -nsnow+1, nsoil @@ -226,7 +222,7 @@ subroutine noahmpnew_usafsi_update(n, t, dsneqv, dsnowh, NoahmpIO, noahmp) do j = 1, nsoil ! soil mliq(j) = NoahmpNew_struc(n)%noahmpnew(t)%sh2o(j) * dzsnso(j) * 1000. mice(j) = (NoahmpNew_struc(n)%noahmpnew(t)%smc(j) - & - NoahmpNew_struc(n)%noahmpnew(t)%sh2o(j)) * dzsnso(j) * 1000. + NoahmpNew_struc(n)%noahmpnew(t)%sh2o(j)) * dzsnso(j) * 1000. end do do j = isnow+1,nsoil ! all layers @@ -273,34 +269,35 @@ subroutine noahmpnew_usafsi_update(n, t, dsneqv, dsnowh, NoahmpIO, noahmp) ponding1 = 0.0 ponding2 = 0.0 -! TODO: may need a variable mapping from local to noahmp or direct associate noahmp type to local variables -! TODO: or directly copy paste the original compact, combine, divide subroutine to this da folder. - if(isnow < 0) call SnowpackCompaction(noahmp) -! call compact (parameters, nsnow, nsoil, noahmpnew_struc(n)%ts, & !in -! stc, snice, snliq, zsoil, imelt, ficeold, iloc, jloc, & !in -! isnow, dzsnso ,zsnso) !inout - if(isnow < 0) call SnowLayerCombine(noahmp) -! call combine (parameters, nsnow, nsoil ,iloc, jloc, & !in -! isnow, noahmpnew_struc(n)%noahmpnew(t)%sh2o, & !inout -! stc, snice, snliq, dzsnso, sice, snowh, sneqv, & !inout -! ponding1, ponding2) !out - if(isnow < 0) call SnowLayerDivide(noahmp) -! call divide (parameters, nsnow, nsoil, & !in -! isnow, stc, snice, snliq, dzsnso) !inout + ! based on Noah-MP v4.5 physics + if(isnow < 0) & + call compact (NoahmpNew_struc(n)%noahmpnew(t)%param, & + nsnow, nsoil, noahmpnew_struc(n)%ts, & !in + stc, snice, snliq, zsoil, imelt, ficeold, iloc, jloc, & !in + isnow, dzsnso ,zsnso) !inout + if(isnow < 0) & + call combine (NoahmpNew_struc(n)%noahmpnew(t)%param, & + nsnow, nsoil ,iloc, jloc, & !in + isnow, noahmpnew_struc(n)%noahmpnew(t)%sh2o, & !inout + stc, snice, snliq, dzsnso, sice, snowh, sneqv, & !inout + ponding1, ponding2) !out + if(isnow < 0) & + call divide (NoahmpNew_struc(n)%noahmpnew(t)%param, nsnow, nsoil, & !in + isnow, stc, snice, snliq, dzsnso) !inout !set empty snow layers to zero do iz = -nsnow+1, isnow - snice(iz) = 0. - snliq(iz) = 0. - stc(iz) = 0. - dzsnso(iz)= 0. - zsnso(iz) = 0. + snice(iz) = 0.0 + snliq(iz) = 0.0 + stc(iz) = 0.0 + dzsnso(iz)= 0.0 + zsnso(iz) = 0.0 enddo !to obtain equilibrium state of snow in glacier region - IF(SNEQV > 2000.) THEN ! 2000 mm -> maximum water depth + IF(SNEQV > 5000.0) THEN ! 5000 mm -> maximum water depth BDSNOW = SNICE(0) / DZSNSO(0) - SNOFLOW = (SNEQV - 2000.) + SNOFLOW = (SNEQV - 5000.0) SNICE(0) = SNICE(0) - SNOFLOW DZSNSO(0) = DZSNSO(0) - SNOFLOW/BDSNOW !SNOFLOW = SNOFLOW / DT @@ -308,22 +305,12 @@ subroutine noahmpnew_usafsi_update(n, t, dsneqv, dsnowh, NoahmpIO, noahmp) ! sum up snow mass for layered snow IF(ISNOW < 0) THEN ! MB: only do for multi-layer - SNEQV = 0. - SNOWH = 0. ! Yeosang Yoon + SNEQV = 0.0 DO IZ = ISNOW+1,0 SNEQV = SNEQV + SNICE(IZ) + SNLIQ(IZ) - SNOWH = SNOWH + DZSNSO(IZ) ! Yeosang Yoon ENDDO END IF - ! Yeosag Yoon, no snow layer case, limit snow density to 1000 - IF (ISNOW == 0 .AND. SNEQV > 0. .AND. SNOWH > 0.) THEN - BDSNOW = SNEQV/SNOWH - IF (BDSNOW >= DENH2O) THEN - SNOWH = SNOWH*(BDSNOW/1000.) ! change unit, SNEQV=[mm] SNOWH=[m] - END IF - END IF - ! Reset ZSNSO and layer thinkness DZSNSO DO IZ = ISNOW+1, 0 DZSNSO(IZ) = -DZSNSO(IZ) @@ -343,19 +330,31 @@ subroutine noahmpnew_usafsi_update(n, t, dsneqv, dsnowh, NoahmpIO, noahmp) DZSNSO(IZ) = -DZSNSO(IZ) END DO + ! sum up snow thickness for layered snow + IF(ISNOW < 0) THEN ! MB: only do for multi-layer + SNOWH = 0.0 ! Yeosang Yoon + DO IZ = ISNOW+1,0 + SNOWH = SNOWH + DZSNSO(IZ) ! Yeosang Yoon + ENDDO + END IF + + ! Yeosag Yoon, no snow layer case, limit snow density to 1000 + IF (ISNOW == 0 .AND. SNEQV > 0.0 .AND. SNOWH > 0.0) THEN + BDSNOW = SNEQV/SNOWH + IF (BDSNOW >= DENH2O) THEN + SNOWH = SNOWH*(BDSNOW/DENH2O) ! change unit, SNEQV=[mm] SNOWH=[m] + END IF + END IF + ! update state vars NoahmpNew_struc(n)%noahmpnew(t)%isnow = isnow NoahmpNew_struc(n)%noahmpnew(t)%sneqv = sneqv NoahmpNew_struc(n)%noahmpnew(t)%snowh = snowh - - NoahmpNew_struc(n)%noahmpnew(t)%zss(1:nsnow+& - nsoil) = zsnso(-nsnow+1:nsoil) - NoahmpNew_struc(n)%noahmpnew(t)%snowice(1:nsnow) = & - snice(-nsnow+1:0) - NoahmpNew_struc(n)%noahmpnew(t)%snowliq(1:nsnow) = & - snliq(-nsnow+1:0) - NoahmpNew_struc(n)%noahmpnew(t)%tsno(1:nsnow) = stc(-nsnow+1:0) - NoahmpNew_struc(n)%noahmpnew(t)%tslb(1:nsoil) = stc(1:nsoil) + NoahmpNew_struc(n)%noahmpnew(t)%zss(1:nsnow+nsoil) = zsnso(-nsnow+1:nsoil) + NoahmpNew_struc(n)%noahmpnew(t)%snowice(1:nsnow) = snice(-nsnow+1:0) + NoahmpNew_struc(n)%noahmpnew(t)%snowliq(1:nsnow) = snliq(-nsnow+1:0) + NoahmpNew_struc(n)%noahmpnew(t)%tsno(1:nsnow) = stc(-nsnow+1:0) + NoahmpNew_struc(n)%noahmpnew(t)%tslb(1:nsoil) = stc(1:nsoil) deallocate(ficeold) deallocate(snice) @@ -368,5 +367,9 @@ subroutine noahmpnew_usafsi_update(n, t, dsneqv, dsnowh, NoahmpIO, noahmp) deallocate(dzsnso) deallocate(zsnso) deallocate(sice) + deallocate(bexp) + deallocate(psisat) + deallocate(smcmax) end subroutine noahmpnew_usafsi_update + diff --git a/lis/surfacemodels/land/noahmp.new/irrigation/noahmpnew_getirrigationstates.F90 b/lis/surfacemodels/land/noahmp.new/irrigation/noahmpnew_getirrigationstates.F90 index ca3af7682..57fc968fc 100755 --- a/lis/surfacemodels/land/noahmp.new/irrigation/noahmpnew_getirrigationstates.F90 +++ b/lis/surfacemodels/land/noahmp.new/irrigation/noahmpnew_getirrigationstates.F90 @@ -20,9 +20,9 @@ subroutine noahmpnew_getirrigationstates(n,irrigState,NoahmpIO) use ESMF use LIS_coreMod use LIS_logMod - use NoahMP401_lsmMod + use NoahMPnew_lsmMod use LIS_vegDataMod, only: LIS_read_shdmin, LIS_read_shdmax - use NoahmpIOVarType + !use NoahmpIOVarType ! !DESCRIPTION: ! @@ -165,15 +165,15 @@ subroutine noahmpnew_getirrigationstates(n,irrigState,NoahmpIO) !---------------------------------------------------------------------- if(LIS_rc%irrigation_type.eq."Sprinkler") then otimes = otimess - irrhr = irrhrs + irrhr = irrhrs otimee = otimess + irrhrs elseif(LIS_rc%irrigation_type.eq."Drip") then otimes = otimeds - irrhr = irrhrd + irrhr = irrhrd otimee = otimeds + irrhrd elseif(LIS_rc%irrigation_type.eq."Flood") then otimes = otimefs - irrhr = irrhrf + irrhr = irrhrf otimee = otimefs + irrhrf endif @@ -181,41 +181,41 @@ subroutine noahmpnew_getirrigationstates(n,irrigState,NoahmpIO) do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index)/LIS_rc%nensem(n) - sfctemp_avg = 0. - shdfac_avg = 0. - smc_avg = 0. + sfctemp_avg = 0.0 + shdfac_avg = 0.0 + smc_avg = 0.0 do m=1,LIS_rc%nensem(n) t=(i-1)*LIS_rc%nensem(n)+m - sfctemp_avg=sfctemp_avg+NoahmpNew_struc(n)%noahmpnew(t)%sfctmp - shdfac_avg=shdfac_avg+NoahmpNew_struc(n)%noahmpnew(t)%fveg + sfctemp_avg = sfctemp_avg + NoahmpNew_struc(n)%noahmpnew(t)%sfctmp + shdfac_avg = shdfac_avg + NoahmpNew_struc(n)%noahmpnew(t)%fveg do k=1,nsoil - smc_avg(k)=smc_avg(k)+NoahmpNew_struc(n)%noahmpnew(t)%smc(k) + smc_avg(k) = smc_avg(k) + NoahmpNew_struc(n)%noahmpnew(t)%smc(k) end do end do - sfctemp_avg=sfctemp_avg/LIS_rc%nensem(n) - shdfac_avg=shdfac_avg/LIS_rc%nensem(n) + sfctemp_avg = sfctemp_avg/LIS_rc%nensem(n) + shdfac_avg = shdfac_avg/LIS_rc%nensem(n) do k=1,nsoil - smc_avg(k)=smc_avg(k)/LIS_rc%nensem(n) + smc_avg(k) = smc_avg(k)/LIS_rc%nensem(n) end do do m=1,LIS_rc%nensem(n) - t=(i-1)*LIS_rc%nensem(n)+m + t = (i-1)*LIS_rc%nensem(n)+m timestep = NoahmpNew_struc(n)%dt - soiltyp = NoahmpNew_struc(n)%noahmpnew(t)%soiltype + soiltyp = NoahmpNew_struc(n)%noahmpnew(t)%soiltype ! Adjust bounds by timestep to account for the fact that LIS_rc%hr, etc. @@ -246,9 +246,9 @@ subroutine noahmpnew_getirrigationstates(n,irrigState,NoahmpIO) zdpth(3) = sldpth(1) + sldpth(2) + sldpth(3) zdpth(4) = sldpth(1) + sldpth(2) + sldpth(3) + sldpth(4) - smcmax = NoahmpIO%SMCMAX_TABLE(soiltyp) - smcref = NoahmpIO%SMCREF_TABLE(soiltyp) - smcwlt = NoahmpIO%SMCWLT_TABLE(soiltyp) + smcmax = NoahmpNew_struc(n)%noahmpnew(t)%param%SMCMAX(1) !NoahmpIO%SMCMAX_TABLE(soiltyp) + smcref = NoahmpNew_struc(n)%noahmpnew(t)%param%SMCREF(1) !NoahmpIO%SMCREF_TABLE(soiltyp) + smcwlt = NoahmpNew_struc(n)%noahmpnew(t)%param%SMCWLT(1) !NoahmpIO%SMCWLT_TABLE(soiltyp) ! sfctemp = NoahmpNew_struc(n)%noahmpnew(t)%sfctmp tempcheck = 273.16 + 2.5 @@ -313,8 +313,8 @@ subroutine noahmpnew_getirrigationstates(n,irrigState,NoahmpIO) if( IrrigScale(t).gt.0.0 ) then ! irrigated tile ! if(ippix.gt.0.0) then ! irrigated tile - !shdmin = minval(NOAHMP36_struc(n)%noahmp36(t)%shdfac_monthly) - !shdmax = maxval(NOAHMP36_struc(n)%noahmp36(t)%shdfac_monthly) + !shdmin = minval(NoahmpNew_struc(n)%noahmpnew(t)%shdfac_monthly) + !shdmax = maxval(NoahmpNew_struc(n)%noahmpnew(t)%shdfac_monthly) shdmin =placeshdmin(LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col, & LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) shdmax =placeshdmax(LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col, & @@ -455,9 +455,6 @@ subroutine noahmpnew_getirrigationstates(n,irrigState,NoahmpIO) else ! BZ modification 4/2/2015 to saturate entire column and apply ippix twater = twater + (smcmax - NoahmpNew_struc(n)%noahmpnew(t)%smc(l))*sldpth(l)*1000.0 -! twater = twater + (smcmax - noah33_struc(n)%noah(t)%smc(2))*sldpth(2)*1000.0 -! twater = twater + (smcmax - noah33_struc(n)%noah(t)%smc(3))*sldpth(3)*1000.0 -! twater = twater + (smcmax - noah33_struc(n)%noah(t)%smc(4))*sldpth(4)*1000.0 endif end do diff --git a/lis/surfacemodels/land/noahmp.new/noahmp_driver_new.F90 b/lis/surfacemodels/land/noahmp.new/noahmp_driver_new.F90 index e21211f54..80c3c3c6e 100644 --- a/lis/surfacemodels/land/noahmp.new/noahmp_driver_new.F90 +++ b/lis/surfacemodels/land/noahmp.new/noahmp_driver_new.F90 @@ -135,7 +135,7 @@ subroutine noahmp_driver_new(n, NoahmpIO, LISparam) NoahmpIO%HAILNCV(1,1) = 0.0 ! If coupled to WRF, set these variables to realistic values, - ! and then pass back to WRF after the call to noahmplsm_401. + ! and then pass back to WRF after the call to noahmp. NoahmpIO%z0(1,1) = 0.0 NoahmpIO%znt(1,1) = 0.0 ! z0 and znt should be passed to WRF, if coupled. - dmm diff --git a/lis/surfacemodels/land/noahmp.new/pe/NoahMP401_set_pedecvars.F90 b/lis/surfacemodels/land/noahmp.new/pe/NoahMP401_set_pedecvars.F90 deleted file mode 100755 index 86af58f9a..000000000 --- a/lis/surfacemodels/land/noahmp.new/pe/NoahMP401_set_pedecvars.F90 +++ /dev/null @@ -1,523 +0,0 @@ -!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- -! NASA Goddard Space Flight Center -! Land Information System Framework (LISF) -! Version 7.4 -! -! Copyright (c) 2022 United States Government as represented by the -! Administrator of the National Aeronautics and Space Administration. -! All Rights Reserved. -!-------------------------END NOTICE -- DO NOT EDIT----------------------- -!BOP -! !ROUTINE: NoahMP401_set_pedecvars -! \label{NoahMP401_set_pedecvars} -! -! !REVISION HISTORY: -! 02 Feb 2018: Soni Yatheendradas; Initial Specification -! - - -! !INTERFACE: -subroutine NoahMP401_set_pedecvars(DEC_State, Feas_State) -! !USES: - use ESMF - use LIS_coreMod, only : LIS_rc, LIS_surface - use LIS_logMod, only : LIS_logunit,LIS_verify - use NoahMP401_lsmMod, only : NoahMP401_struc - use NoahMP401_peMod, only : NoahMP401_pe_struc - - implicit none -! !ARGUMENTS: - type(ESMF_State) :: DEC_State - type(ESMF_State) :: Feas_State -! -! !DESCRIPTION: -! -! This routine assigns the decision space to NoahMP3.6 model variables. -! -!EOP - integer :: n - real, pointer :: vdata(:) - character*100 :: vname - integer, pointer :: mod_flag_NoahMP401(:) - integer :: i,t - integer :: status - - n = 1 - - allocate(mod_flag_NoahMP401(LIS_rc%npatch(n,LIS_rc%lsm_index))) - - mod_flag_NoahMP401 = 0 - - !set modflag based on bounds - allocate(vdata(LIS_rc%npatch(n,LIS_rc%lsm_index))) - do i=1,NoahMP401_pe_struc(n)%nparams - if(NoahMP401_pe_struc(n)%param_select(i).eq.1) then - vname=trim(NoahMP401_pe_struc(n)%param_name(i)) - call NoahMP401_getvardata(n,DEC_State,vname, vdata, status) - call LIS_verify(status) - call NoahMP401_checkBounds(n,DEC_State,vname, vdata, mod_flag_NoahMP401) - endif - enddo - deallocate(vdata) - - !update modflags based on constraints - call NoahMP401_checkConstraints(n,DEC_State, mod_flag_NoahMP401) - - !set variables given modflag; if flag set will leave values alone - call NoahMP401_setVars(n,DEC_State,mod_flag_NoahMP401) - - !send mod flag to ESMF state (feasibility flag) - call NoahMP401_setModFlag(n,DEC_State,Feas_State,mod_flag_NoahMP401) -end subroutine NoahMP401_set_pedecvars - -!BOP -! -! !ROUTINE: randArray -! \label{randArray} -! -! !INTERFACE: -subroutine NoahMP401_getvardata(n,DEC_State,vname, vdata, statusStateGet) -! !USES: - use ESMF - use LIS_coreMod, only : LIS_rc - use LIS_logMod, only : LIS_logunit,LIS_verify - - implicit none -! !ARGUMENTS: - integer :: n - type(ESMF_State) :: DEC_State - character*100 :: vname - real :: vdata(LIS_rc%npatch(n,LIS_rc%lsm_index)) -! -! !DESCRIPTION: -! -! This routine assigns the decision space to NoahMP3.6 model variables. -! -!EOP - real, pointer :: vardata(:) - type(ESMF_Field) :: varField - integer :: statusStateGet, statusFieldGet,i - - call ESMF_StateGet(DEC_State,vname,varField,rc=statusStateGet) -! call LIS_verify(status) - - if(statusStateGet.eq.0) then - call ESMF_FieldGet(varField,localDE=0,farrayPtr=vardata,& - rc=statusFieldGet) - call LIS_verify(statusFieldGet) - vdata=vardata - endif - -end subroutine NoahMP401_getvardata - -subroutine NoahMP401_checkBounds(n,DEC_State,vname, vardata, mod_flag_NoahMP401) -! !USES: - use ESMF - use LIS_coreMod, only : LIS_rc, LIS_surface - use LIS_logMod, only : LIS_logunit,LIS_verify - - implicit none -! !ARGUMENTS: - integer :: n - type(ESMF_State) :: DEC_State - character*100 :: vname - real :: vardata(LIS_rc%npatch(n,LIS_rc%lsm_index)) - integer :: mod_flag_NoahMP401(LIS_rc%npatch(n,LIS_rc%lsm_index)) -! -! !DESCRIPTION: -! -! This routine assigns the decision space to NoahMP3.6 model variables. -! -!EOP - type(ESMF_Field) :: varField - real :: vardata_min, vardata_max - integer :: status - integer :: t - - call ESMF_StateGet(DEC_State,vname,varField,rc=status) - call LIS_verify(status) - - call ESMF_AttributeGet(varField,'MinRange',vardata_min,rc=status) - call LIS_verify(status) - call ESMF_AttributeGet(varField,'MaxRange',vardata_max,rc=status) - call LIS_verify(status) - - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - if(vardata(t).lt.vardata_min) then - mod_flag_NoahMP401(t) = 1 - endif - if(vardata(t).gt.vardata_max) then - mod_flag_NoahMP401(t) = 1 - endif - enddo -end subroutine NoahMP401_checkBounds - -subroutine NoahMP401_checkConstraints(n,DEC_State,mod_flag_NoahMP401) -! !USES: - use ESMF - use LIS_coreMod, only : LIS_rc, LIS_surface - use NoahMP401_lsmMod, only : NoahMP401_struc - - implicit none -! !ARGUMENTS: - integer :: n - type(ESMF_State) :: DEC_State - integer :: mod_flag_NoahMP401(LIS_rc%npatch(n,LIS_rc%lsm_index)) -! -! !DESCRIPTION: -! -! This routine assigns the decision space to NoahMP3.6 model variables. -! -!EOP - type(ESMF_Field) :: varField - real :: vardata_min, vardata_max - character*100 :: vname - integer :: t - integer :: status1, status2 - real, allocatable :: vardata1(:) - real, allocatable :: vardata2(:) - real, allocatable :: vardata3(:) - - allocate(vardata1(LIS_rc%npatch(n,LIS_rc%lsm_index))) - allocate(vardata2(LIS_rc%npatch(n,LIS_rc%lsm_index))) - allocate(vardata3(LIS_rc%npatch(n,LIS_rc%lsm_index))) - - vname='SMCMAX' - call NoahMP401_getvardata(n,DEC_State,vname,vardata1, status1) - - if(status1.ne.0) vardata1=NoahMP401_struc(n)%noahmp401(:)%param%smcmax(1) - - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - if(vardata1(t).le.NoahMP401_struc(n)%noahmp401(t)%param%smcdry(1)) then - mod_flag_NoahMP401(t) = 1 - endif - enddo - - !SMCREF > SMCWLT - vname='SMCREF' - call NoahMP401_getvardata(n,DEC_State,vname,vardata1, status1) - vname='SMCWLT' - call NoahMP401_getvardata(n,DEC_State,vname,vardata2, status2) - if(status1.ne.0) vardata1=NoahMP401_struc(n)%noahmp401(:)%param%smcref(1) - if(status2.ne.0) vardata2=NoahMP401_struc(n)%noahmp401(:)%param%smcwlt(1) - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - if(vardata1(t).le.vardata2(t)) then - mod_flag_NoahMP401(t) = 1 - endif - enddo - - !SMCMAX > SMCREF - vname='SMCMAX' - call NoahMP401_getvardata(n,DEC_State,vname,vardata1, status1) - vname='SMCREF' - call NoahMP401_getvardata(n,DEC_State,vname,vardata2, status2) - if(status1.ne.0) vardata1=NoahMP401_struc(n)%noahmp401(:)%param%smcmax(1) - if(status2.ne.0) vardata2=NoahMP401_struc(n)%noahmp401(:)%param%smcref(1) - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - if(vardata1(t).le.vardata2(t)) then - mod_flag_NoahMP401(t) = 1 - endif - enddo - - !HVT > HVB - vname='HVT' - call NoahMP401_getvardata(n,DEC_State,vname,vardata1, status1) - vname='HVB' - call NoahMP401_getvardata(n,DEC_State,vname,vardata2, status2) - if(status1.ne.0) vardata1=NoahMP401_struc(n)%noahmp401(:)%param%HVT - if(status2.ne.0) vardata2=NoahMP401_struc(n)%noahmp401(:)%param%HVB - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - if(vardata1(t).lt.vardata2(t)) then ! SY: Note .lt. instead of .le., following some entries with HVT=HVB in MPTABLE_UMD.TBL - mod_flag_NoahMP401(t) = 1 - endif - enddo - - !HVT > Z0MVT - vname='HVT' - call NoahMP401_getvardata(n,DEC_State,vname,vardata1, status1) - vname='Z0MVT' - call NoahMP401_getvardata(n,DEC_State,vname,vardata2, status2) - if(status1.ne.0) vardata1=NoahMP401_struc(n)%noahmp401(:)%param%HVT - if(status2.ne.0) vardata2=NoahMP401_struc(n)%noahmp401(:)%param%Z0MVT - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - if(vardata1(t).le.vardata2(t)) then - mod_flag_NoahMP401(t) = 1 - endif - enddo - - - !HVT > Z0MVT - vname='MNSNALB' - call NoahMP401_getvardata(n,DEC_State,vname,vardata1, status1) - vname='MXSNALB' - call NoahMP401_getvardata(n,DEC_State,vname,vardata2, status2) - if(status1.ne.0) vardata1=NoahMP401_struc(n)%noahmp401(:)%param%MNSNALB - if(status2.ne.0) vardata2=NoahMP401_struc(n)%noahmp401(:)%param%MXSNALB - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - if(vardata1(t).ge.vardata2(t)) then - mod_flag_NoahMP401(t) = 1 - endif - enddo - - !HVT > Z0MVT - vname='T_ULIMIT' - call NoahMP401_getvardata(n,DEC_State,vname,vardata1, status1) - vname='T_MLIMIT' - call NoahMP401_getvardata(n,DEC_State,vname,vardata2, status2) - vname='T_LLIMIT' - call NoahMP401_getvardata(n,DEC_State,vname,vardata3, status2) - if(status1.ne.0) vardata1=NoahMP401_struc(n)%noahmp401(:)%param%T_ULIMIT - if(status2.ne.0) vardata2=NoahMP401_struc(n)%noahmp401(:)%param%T_MLIMIT - if(status2.ne.0) vardata3=NoahMP401_struc(n)%noahmp401(:)%param%T_LLIMIT - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - if((vardata3(t).gt.vardata2(t)).or.& - (vardata2(t).gt.vardata1(t)).or.& - (vardata3(t).gt.vardata1(t))) then - mod_flag_NoahMP401(t) = 1 - endif - enddo - - deallocate(vardata1) - deallocate(vardata2) - deallocate(vardata3) - -end subroutine NoahMP401_checkConstraints - -subroutine NoahMP401_setVars(n,DEC_State,mod_flag_NoahMP401) -! !USES: - use ESMF - use LIS_coreMod, only : LIS_rc, LIS_surface - use LIS_logMod, only : LIS_logunit,LIS_verify - use NoahMP401_lsmMod, only : NoahMP401_struc - use NoahMP401_peMod, only : NoahMP401_pe_struc - - implicit none -! !ARGUMENTS: - integer :: n - integer :: mod_flag_NoahMP401(LIS_rc%npatch(n,LIS_rc%lsm_index)) - type(ESMF_State) :: DEC_State -! -! !DESCRIPTION: -! -! This routine assigns the decision space to NoahMP3.6 model variables. -! Only does so if the proposed parameter set is feasible (meets bounds and constraints) -! -!EOP - real :: vardata(LIS_rc%npatch(n,LIS_rc%lsm_index)) - character*100 :: vname - integer :: i,t, status - - do i=1,NoahMP401_pe_struc(n)%nparams - if(NoahMP401_pe_struc(n)%param_select(i).eq.1) then - vname=trim(NoahMP401_pe_struc(n)%param_name(i)) - call NoahMP401_getvardata(n,DEC_State,vname,vardata, status) - call LIS_verify(status) - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - if(mod_flag_NoahMP401(t).eq.0) then - if(vname.eq."TOPT") & - NoahMP401_struc(n)%noahmp401(t)%param%topt = vardata(t) - if(vname.eq."RGL") & - NoahMP401_struc(n)%noahmp401(t)%param%rgl = vardata(t) - if(vname.eq."RSMAX") & - NoahMP401_struc(n)%noahmp401(t)%param%rsmax = vardata(t) - if(vname.eq."RSMIN") & - NoahMP401_struc(n)%noahmp401(t)%param%rsmin = vardata(t) - if(vname.eq."HS") & - NoahMP401_struc(n)%noahmp401(t)%param%hs = vardata(t) - if(vname.eq."NROOT") & - NoahMP401_struc(n)%noahmp401(t)%param%nroot = vardata(t) - if(vname.eq."CSOIL") & - NoahMP401_struc(n)%noahmp401(t)%param%csoil = vardata(t) - if(vname.eq."BEXP") & - NoahMP401_struc(n)%noahmp401(t)%param%bexp = vardata(t) - if(vname.eq."DKSAT") & - NoahMP401_struc(n)%noahmp401(t)%param%dksat = vardata(t) - if(vname.eq."DWSAT") & - NoahMP401_struc(n)%noahmp401(t)%param%dwsat = vardata(t) - if(vname.eq."PSISAT") & - NoahMP401_struc(n)%noahmp401(t)%param%psisat = vardata(t) - if(vname.eq."QUARTZ") & - NoahMP401_struc(n)%noahmp401(t)%param%quartz = vardata(t) - if(vname.eq."SMCMAX") & - NoahMP401_struc(n)%noahmp401(t)%param%smcmax = vardata(t) - if(vname.eq."SMCREF") & - NoahMP401_struc(n)%noahmp401(t)%param%smcref = vardata(t) - if(vname.eq."SMCWLT") & - NoahMP401_struc(n)%noahmp401(t)%param%smcwlt = vardata(t) - if(vname.eq."CZIL") & - NoahMP401_struc(n)%noahmp401(t)%param%czil = vardata(t) - if(vname.eq."SLOPE") & - NoahMP401_struc(n)%noahmp401(t)%param%slope = vardata(t) - if(vname.eq."CH2OP") & - NoahMP401_struc(n)%noahmp401(t)%param%CH2OP = vardata(t) - if(vname.eq."DLEAF") & - NoahMP401_struc(n)%noahmp401(t)%param%DLEAF = vardata(t) - if(vname.eq."Z0MVT") & - NoahMP401_struc(n)%noahmp401(t)%param%Z0MVT = vardata(t) - if(vname.eq."HVT") & - NoahMP401_struc(n)%noahmp401(t)%param%HVT = vardata(t) - if(vname.eq."HVB") & - NoahMP401_struc(n)%noahmp401(t)%param%HVB = vardata(t) - if(vname.eq."RC") & - NoahMP401_struc(n)%noahmp401(t)%param%RC = vardata(t) - if(vname.eq."MFSNO") & - NoahMP401_struc(n)%noahmp401(t)%param%MFSNO = vardata(t) - if(vname.eq."ALBSAT1") & - NoahMP401_struc(n)%noahmp401(t)%param%ALBSAT(1) = vardata(t) - if(vname.eq."ALBSAT2") & - NoahMP401_struc(n)%noahmp401(t)%param%ALBSAT(2) = vardata(t) - if(vname.eq."ALBDRY1") & - NoahMP401_struc(n)%noahmp401(t)%param%ALBDRY(1) = vardata(t) - if(vname.eq."ALBDRY2") & - NoahMP401_struc(n)%noahmp401(t)%param%ALBDRY(2) = vardata(t) - if(vname.eq."ALBICE1") & - NoahMP401_struc(n)%noahmp401(t)%param%ALBICE(1) = vardata(t) - if(vname.eq."ALBICE2") & - NoahMP401_struc(n)%noahmp401(t)%param%ALBICE(2) = vardata(t) - if(vname.eq."OMEGAS1") & - NoahMP401_struc(n)%noahmp401(t)%param%OMEGAS(1) = vardata(t) - if(vname.eq."OMEGAS2") & - NoahMP401_struc(n)%noahmp401(t)%param%OMEGAS(2) = vardata(t) - if(vname.eq."BETADS") & - NoahMP401_struc(n)%noahmp401(t)%param%BETADS = vardata(t) - if(vname.eq."BETAIS") & - NoahMP401_struc(n)%noahmp401(t)%param%BETAIS = vardata(t) - if(vname.eq."EG1") & - NoahMP401_struc(n)%noahmp401(t)%param%EG(1) = vardata(t) - if(vname.eq."EG2") & - NoahMP401_struc(n)%noahmp401(t)%param%EG(2) = vardata(t) - if(vname.eq."Z0SNO") & - NoahMP401_struc(n)%noahmp401(t)%param%Z0SNO = vardata(t) - if(vname.eq."SSI") & - NoahMP401_struc(n)%noahmp401(t)%param%SSI = vardata(t) - if(vname.eq."SWEMX") & - NoahMP401_struc(n)%noahmp401(t)%param%SWEMX = vardata(t) - if(vname.eq."RSURF_SNOW") & - NoahMP401_struc(n)%noahmp401(t)%param%RSURF_SNOW = vardata(t) - if(vname.eq."MNSNALB") & - NoahMP401_struc(n)%noahmp401(t)%param%MNSNALB = vardata(t) - if(vname.eq."MXSNALB") & - NoahMP401_struc(n)%noahmp401(t)%param%MXSNALB= vardata(t) - if(vname.eq."SNDECAYEXP") & - NoahMP401_struc(n)%noahmp401(t)%param%SNDECAYEXP = vardata(t) - if(vname.eq."T_ULIMIT") & - NoahMP401_struc(n)%noahmp401(t)%param%T_ULIMIT = vardata(t) - if(vname.eq."T_MLIMIT") & - NoahMP401_struc(n)%noahmp401(t)%param%T_MLIMIT = vardata(t) - if(vname.eq."T_LLIMIT") & - NoahMP401_struc(n)%noahmp401(t)%param%T_LLIMIT = vardata(t) - if(vname.eq."SNOWF_SCALEF") & - NoahMP401_struc(n)%noahmp401(t)%param%snowf_scalef = vardata(t) - if(vname.eq."RHOL1") & - NoahMP401_struc(n)%noahmp401(t)%param%RHOL(1) = vardata(t) - if(vname.eq."RHOL2") & - NoahMP401_struc(n)%noahmp401(t)%param%RHOL(2) = vardata(t) - if(vname.eq."RHOS1") & - NoahMP401_struc(n)%noahmp401(t)%param%RHOS(1) = vardata(t) - if(vname.eq."RHOS2") & - NoahMP401_struc(n)%noahmp401(t)%param%RHOS(2) = vardata(t) - if(vname.eq."TAUL1") & - NoahMP401_struc(n)%noahmp401(t)%param%TAUL(1) = vardata(t) - if(vname.eq."TAUL2") & - NoahMP401_struc(n)%noahmp401(t)%param%TAUL(2) = vardata(t) - if(vname.eq."TAUS1") & - NoahMP401_struc(n)%noahmp401(t)%param%TAUS(1) = vardata(t) - if(vname.eq."TAUS2") & - NoahMP401_struc(n)%noahmp401(t)%param%TAUS(2) = vardata(t) - if(vname.eq."XL") & - NoahMP401_struc(n)%noahmp401(t)%param%XL = vardata(t) - if(vname.eq."CWPVT") & - NoahMP401_struc(n)%noahmp401(t)%param%CWPVT = vardata(t) - if(vname.eq."C3PSN") & - NoahMP401_struc(n)%noahmp401(t)%param%C3PSN = vardata(t) - if(vname.eq."KC25") & - NoahMP401_struc(n)%noahmp401(t)%param%KC25 = vardata(t) - if(vname.eq."AKC") & - NoahMP401_struc(n)%noahmp401(t)%param%AKC = vardata(t) - if(vname.eq."KO25") & - NoahMP401_struc(n)%noahmp401(t)%param%KO25 = vardata(t) - if(vname.eq."AKO") & - NoahMP401_struc(n)%noahmp401(t)%param%AKO = vardata(t) - if(vname.eq."AVCMX") & - NoahMP401_struc(n)%noahmp401(t)%param%AVCMX = vardata(t) - if(vname.eq."AQE") & - NoahMP401_struc(n)%noahmp401(t)%param%AQE = vardata(t) - if(vname.eq."LTOVRC") & - NoahMP401_struc(n)%noahmp401(t)%param%LTOVRC = vardata(t) - if(vname.eq."DILEFC") & - NoahMP401_struc(n)%noahmp401(t)%param%DILEFC = vardata(t) - if(vname.eq."DILEFW") & - NoahMP401_struc(n)%noahmp401(t)%param%DILEFW = vardata(t) - if(vname.eq."RMF25") & - NoahMP401_struc(n)%noahmp401(t)%param%RMF25 = vardata(t) - if(vname.eq."SLA") & - NoahMP401_struc(n)%noahmp401(t)%param%SLA = vardata(t) - if(vname.eq."FRAGR") & - NoahMP401_struc(n)%noahmp401(t)%param%FRAGR = vardata(t) - if(vname.eq."TMIN") & - NoahMP401_struc(n)%noahmp401(t)%param%TMIN = vardata(t) - if(vname.eq."VCMX25") & - NoahMP401_struc(n)%noahmp401(t)%param%VCMX25 = vardata(t) - if(vname.eq."TDLEF") & - NoahMP401_struc(n)%noahmp401(t)%param%TDLEF = vardata(t) - if(vname.eq."BP") & - NoahMP401_struc(n)%noahmp401(t)%param%BP = vardata(t) - if(vname.eq."MP") & - NoahMP401_struc(n)%noahmp401(t)%param%MP = vardata(t) - if(vname.eq."QE25") & - NoahMP401_struc(n)%noahmp401(t)%param%QE25 = vardata(t) - if(vname.eq."RMS25") & - NoahMP401_struc(n)%noahmp401(t)%param%RMS25 = vardata(t) - if(vname.eq."RMR25") & - NoahMP401_struc(n)%noahmp401(t)%param%RMR25 = vardata(t) - if(vname.eq."ARM") & - NoahMP401_struc(n)%noahmp401(t)%param%ARM = vardata(t) - if(vname.eq."FOLNMX") & - NoahMP401_struc(n)%noahmp401(t)%param%FOLNMX = vardata(t) - if(vname.eq."WDPOOL") & - NoahMP401_struc(n)%noahmp401(t)%param%WDPOOL = vardata(t) - if(vname.eq."WRRAT") & - NoahMP401_struc(n)%noahmp401(t)%param%WRRAT = vardata(t) - if(vname.eq."MRP") & - NoahMP401_struc(n)%noahmp401(t)%param%MRP = vardata(t) - endif - enddo - endif - enddo -end subroutine NoahMP401_setVars - -subroutine NoahMP401_setModFlag(n,DEC_State,Feas_State,mod_flag_NoahMP401) -! !USES: - use ESMF - use LIS_coreMod, only : LIS_rc, LIS_surface - use LIS_logMod, only : LIS_logunit,LIS_verify - - implicit none -! !ARGUMENTS: - integer :: n - integer :: mod_flag_NoahMP401(LIS_rc%npatch(n,LIS_rc%lsm_index)) - type(ESMF_State) :: DEC_State - type(ESMF_State) :: Feas_State -! -! !DESCRIPTION: -! -! This routine sets the feasibility flag -! -!EOP - type(ESMF_Field) :: feasField - integer :: t - integer :: status - integer, pointer :: modflag(:) - - call ESMF_StateGet(Feas_State, "Feasibility Flag", feasField, rc=status) - call LIS_verify(status) - call ESMF_FieldGet(feasField,localDE=0,farrayPtr=modflag,rc=status) - call LIS_verify(status) - - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - if(mod_flag_NoahMP401(t).eq.1) then - modflag(t)=1 - endif - enddo - -end subroutine NoahMP401_setModFlag diff --git a/lis/surfacemodels/land/noahmp.new/pe/NoahMP401_peMod.F90 b/lis/surfacemodels/land/noahmp.new/pe/NoahMPnew_peMod.F90 similarity index 66% rename from lis/surfacemodels/land/noahmp.new/pe/NoahMP401_peMod.F90 rename to lis/surfacemodels/land/noahmp.new/pe/NoahMPnew_peMod.F90 index c70c9d026..2fbf46a03 100755 --- a/lis/surfacemodels/land/noahmp.new/pe/NoahMP401_peMod.F90 +++ b/lis/surfacemodels/land/noahmp.new/pe/NoahMPnew_peMod.F90 @@ -7,10 +7,10 @@ ! Administrator of the National Aeronautics and Space Administration. ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- -module NoahMP401_peMod +module NoahMPnew_peMod !BOP ! -! !MODULE: NoahMP401_peMod +! !MODULE: NoahMPnew_peMod ! ! !DESCRIPTION: ! This module contains the definitions of the NoahMP.4.0.1 model parameters @@ -19,6 +19,7 @@ module NoahMP401_peMod ! ! !REVISION HISTORY: ! 27 Apr 2020; Sujay Kumar, Initial Code +! May 2023: Cenlin He, modified for refactored NoahMP v5 and later ! !USES: use ESMF use LIS_numerRecipesMod, only : LIS_rand_func @@ -30,39 +31,40 @@ module NoahMP401_peMod !----------------------------------------------------------------------------- ! !PUBLIC MEMBER FUNCTIONS: !----------------------------------------------------------------------------- - public :: NoahMP401_setup_pedecvars + public :: NoahMPnew_setup_pedecvars !----------------------------------------------------------------------------- ! !PUBLIC TYPES: !----------------------------------------------------------------------------- - public :: NoahMP401_pe_struc + public :: NoahMPnew_pe_struc !EOP - type, public :: NoahMP401_pe_dec - integer :: nparams + type, public :: NoahMPnew_pe_dec + integer :: nparams character*40, allocatable :: param_name(:) integer , allocatable :: param_select(:) real , allocatable :: param_min(:) real , allocatable :: param_max(:) - end type NoahMP401_pe_dec + end type NoahMPnew_pe_dec - type(NoahMP401_pe_dec), allocatable :: NoahMP401_pe_struc(:) + type(NoahMPnew_pe_dec), allocatable :: NoahMPnew_pe_struc(:) SAVE contains !BOP -! !ROUTINE: NoahMP401_setup_pedecvars -! \label{NoahMP401_setup_pedecvars} +! !ROUTINE: NoahMPnew_setup_pedecvars +! \label{NoahMPnew_setup_pedecvars} ! ! !REVISION HISTORY: ! 02 Feb 2018: Soni Yatheendradas; Initial Specification +! May 2023: Cenlin He, modified for refactored NoahMP v5 and later ! ! !INTERFACE: - subroutine NoahMP401_setup_pedecvars(DEC_State, Feas_State) + subroutine NoahMPnew_setup_pedecvars(DEC_State, Feas_State) ! !USES: use LIS_coreMod use LIS_logMod - use NoahMP401_lsmMod, only : NoahMP401_struc + use NoahMPnew_lsmMod, only : NoahMPnew_struc implicit none ! !ARGUMENTS: @@ -103,48 +105,48 @@ subroutine NoahMP401_setup_pedecvars(DEC_State, Feas_State) label="LSM Decision space attributes file:",rc=status) call LIS_verify(status, "LSM Decision space attributes file: not defined") - allocate(NoahMP401_pe_struc(LIS_rc%nnest)) + allocate(NoahMPnew_pe_struc(LIS_rc%nnest)) n = 1 - NoahMP401_pe_struc(n)%nparams = 76 + NoahMPnew_pe_struc(n)%nparams = 76 - allocate(NoahMP401_pe_struc(n)%param_name(NoahMP401_pe_struc(n)%nparams)) - allocate(NoahMP401_pe_struc(n)%param_select(NoahMP401_pe_struc(n)%nparams)) - allocate(NoahMP401_pe_struc(n)%param_min(NoahMP401_pe_struc(n)%nparams)) - allocate(NoahMP401_pe_struc(n)%param_max(NoahMP401_pe_struc(n)%nparams)) + allocate(NoahMPnew_pe_struc(n)%param_name(NoahMPnew_pe_struc(n)%nparams)) + allocate(NoahMPnew_pe_struc(n)%param_select(NoahMPnew_pe_struc(n)%nparams)) + allocate(NoahMPnew_pe_struc(n)%param_min(NoahMPnew_pe_struc(n)%nparams)) + allocate(NoahMPnew_pe_struc(n)%param_max(NoahMPnew_pe_struc(n)%nparams)) ! read the attributes file. call LIS_readPEDecSpaceAttributes(decSpaceAttribsFile, & - NoahMP401_pe_struc(n)%nparams, & - NoahMP401_pe_struc(n)%param_name, & - NoahMP401_pe_struc(n)%param_select, & - NoahMP401_pe_struc(n)%param_min, & - NoahMP401_pe_struc(n)%param_max) + NoahMPnew_pe_struc(n)%nparams, & + NoahMPnew_pe_struc(n)%param_name, & + NoahMPnew_pe_struc(n)%param_select, & + NoahMPnew_pe_struc(n)%param_min, & + NoahMPnew_pe_struc(n)%param_max) call ESMF_ArraySpecSet(arrspec1,rank=1,typekind=ESMF_TYPEKIND_R4,& rc=status) call LIS_verify(status) - do i=1,NoahMP401_pe_struc(n)%nparams - if(NoahMP401_pe_struc(n)%param_select(i).eq.1) then - vname=trim(NoahMP401_pe_struc(n)%param_name(i)) + do i=1,NoahMPnew_pe_struc(n)%nparams + if(NoahMPnew_pe_struc(n)%param_select(i).eq.1) then + vname=trim(NoahMPnew_pe_struc(n)%param_name(i)) varField = ESMF_FieldCreate(arrayspec=arrspec1, & grid=LIS_vecPatch(n,LIS_rc%lsm_index),& name=vname,& rc=status) call LIS_verify(status, & - 'problem with fieldcreate in NoahMP401_setup_pedecvars') + 'problem with fieldcreate in NoahMPnew_setup_pedecvars') call ESMF_AttributeSet(varField,'MinRange',& - NoahMP401_pe_struc(n)%param_min(i),rc=status) + NoahMPnew_pe_struc(n)%param_min(i),rc=status) call LIS_verify(status, & - 'setting minrange to decspace obj in NoahMP401_setup_devars') + 'setting minrange to decspace obj in NoahMPnew_setup_devars') call ESMF_AttributeSet(varField,'MaxRange',& - NoahMP401_pe_struc(n)%param_max(i),rc=status) + NoahMPnew_pe_struc(n)%param_max(i),rc=status) call LIS_verify(status, & - 'setting maxrange to decspace obj in NoahMP401_setup_devars') + 'setting maxrange to decspace obj in NoahMPnew_setup_devars') call ESMF_StateAdd(DEC_State,(/varField/),rc=status) call LIS_verify(status,& - 'stateadd in NoahMP401_setup_pedecvars') + 'stateadd in NoahMPnew_setup_pedecvars') call ESMF_StateGet(DEC_State,vname,varField,rc=status) call LIS_verify(status) @@ -157,479 +159,479 @@ subroutine NoahMP401_setup_pedecvars(DEC_State, Feas_State) NT=LIS_rc%npatch(n,LIS_rc%lsm_index) if(vname.eq."TOPT") then - do t=1,NT; vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%topt + do t=1,NT; vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%topt enddo endif if(vname.eq."RGL") then - do t=1,NT; vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%rgl + do t=1,NT; vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%rgl enddo endif if(vname.eq."RSMAX") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%rsmax + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%rsmax enddo endif if(vname.eq."RSMIN") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%rsmin + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%rsmin enddo endif if(vname.eq."HS") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%hs + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%hs enddo endif if(vname.eq."NROOT") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%nroot + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%nroot enddo endif if(vname.eq."CSOIL") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%csoil + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%csoil enddo endif if(vname.eq."BEXP") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%bexp(1) + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%bexp(1) enddo endif if(vname.eq."DKSAT") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%dksat(1) + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%dksat(1) enddo endif if(vname.eq."DWSAT") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%dwsat(1) + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%dwsat(1) enddo endif if(vname.eq."PSISAT") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%psisat(1) + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%psisat(1) enddo endif if(vname.eq."QUARTZ") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%quartz(1) + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%quartz(1) enddo endif if(vname.eq."SMCMAX") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%smcmax(1) + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%smcmax(1) enddo endif if(vname.eq."SMCREF") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%smcref(1) + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%smcref(1) enddo endif if(vname.eq."SMCWLT") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%smcwlt(1) + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%smcwlt(1) enddo endif if(vname.eq."CZIL") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%czil + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%czil enddo endif if(vname.eq."SLOPE") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%slope + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%slope enddo endif if(vname.eq."CH2OP") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%CH2OP + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%CH2OP enddo endif if(vname.eq."DLEAF") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%DLEAF + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%DLEAF enddo endif if(vname.eq."Z0MVT") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%Z0MVT + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%Z0MVT enddo endif if(vname.eq."HVT") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%HVT + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%HVT enddo endif if(vname.eq."HVB") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%HVB + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%HVB enddo endif if(vname.eq."RC") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%RC + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%RC enddo endif if(vname.eq."MFSNO") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%mfsno + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%mfsno enddo endif if(vname.eq."ALBSAT1") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%albsat(1) + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%albsat(1) enddo endif if(vname.eq."ALBSAT2") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%albsat(2) + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%albsat(2) enddo endif if(vname.eq."ALBDRY1") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%albdry(1) + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%albdry(1) enddo endif if(vname.eq."ALBDRY2") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%albdry(2) + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%albdry(2) enddo endif if(vname.eq."ALBICE1") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%albice(1) + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%albice(1) enddo endif if(vname.eq."ALBICE2") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%albice(2) + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%albice(2) enddo endif if(vname.eq."OMEGAS1") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%omegas(1) + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%omegas(1) enddo endif if(vname.eq."OMEGAS2") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%omegas(2) + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%omegas(2) enddo endif if(vname.eq."BETADS") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%betads + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%betads enddo endif if(vname.eq."BETAIS") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%betais + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%betais enddo endif if(vname.eq."EG1") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%eg(1) + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%eg(1) enddo endif if(vname.eq."EG2") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%eg(2) + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%eg(2) enddo endif if(vname.eq."EG2") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%eg(2) + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%eg(2) enddo endif if(vname.eq."Z0SNO") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%z0sno + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%z0sno enddo endif if(vname.eq."SSI") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%ssi + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%ssi enddo endif if(vname.eq."SWEMX") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%swemx + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%swemx enddo endif if(vname.eq."RSURF_SNOW") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%rsurf_snow + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%rsurf_snow enddo endif if(vname.eq."MNSNALB") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%mnsnalb + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%mnsnalb enddo endif if(vname.eq."MXSNALB") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%mxsnalb + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%mxsnalb enddo endif if(vname.eq."SNDECAYEXP") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%sndecayexp + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%sndecayexp enddo endif if(vname.eq."T_ULIMIT") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%t_ulimit + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%t_ulimit enddo endif if(vname.eq."T_LLIMIT") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%t_llimit + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%t_llimit enddo endif if(vname.eq."T_MLIMIT") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%t_mlimit + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%t_mlimit enddo endif if(vname.eq."SNOWF_SCALEF") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%snowf_scalef + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%snowf_scalef enddo endif if(vname.eq."RHOL1") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%RHOL(1) + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%RHOL(1) enddo endif if(vname.eq."RHOL2") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%RHOL(2) + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%RHOL(2) enddo endif if(vname.eq."RHOS1") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%RHOS(1) + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%RHOS(1) enddo endif if(vname.eq."RHOS2") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%RHOS(2) + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%RHOS(2) enddo endif if(vname.eq."TAUL1") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%TAUL(1) + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%TAUL(1) enddo endif if(vname.eq."TAUL2") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%TAUL(2) + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%TAUL(2) enddo endif if(vname.eq."TAUS1") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%TAUS(1) + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%TAUS(1) enddo endif if(vname.eq."TAUS2") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%TAUS(2) + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%TAUS(2) enddo endif if(vname.eq."XL") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%XL + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%XL enddo endif if(vname.eq."CWPVT") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%CWPVT + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%CWPVT enddo endif if(vname.eq."C3PSN") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%C3PSN + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%C3PSN enddo endif if(vname.eq."KC25") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%KC25 + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%KC25 enddo endif if(vname.eq."AKC") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%AKC + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%AKC enddo endif if(vname.eq."KO25") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%KO25 + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%KO25 enddo endif if(vname.eq."AKO") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%AKO + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%AKO enddo endif if(vname.eq."AVCMX") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%AVCMX + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%AVCMX enddo endif if(vname.eq."AQE") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%AQE + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%AQE enddo endif if(vname.eq."LTOVRC") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%LTOVRC + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%LTOVRC enddo endif if(vname.eq."DILEFC") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%DILEFC + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%DILEFC enddo endif if(vname.eq."DILEFW") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%DILEFW + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%DILEFW enddo endif if(vname.eq."RMF25") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%RMF25 + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%RMF25 enddo endif if(vname.eq."SLA") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%SLA + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%SLA enddo endif if(vname.eq."FRAGR") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%FRAGR + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%FRAGR enddo endif if(vname.eq."TMIN") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%TMIN + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%TMIN enddo endif if(vname.eq."VCMX25") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%VCMX25 + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%VCMX25 enddo endif if(vname.eq."TDLEF") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%TDLEF + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%TDLEF enddo endif if(vname.eq."BP") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%BP + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%BP enddo endif if(vname.eq."MP") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%MP + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%MP enddo endif if(vname.eq."QE25") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%QE25 + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%QE25 enddo endif if(vname.eq."RMS25") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%RMS25 + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%RMS25 enddo endif if(vname.eq."RMR25") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%RMR25 + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%RMR25 enddo endif if(vname.eq."ARM") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%ARM + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%ARM enddo endif if(vname.eq."FOLNMX") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%FOLNMX + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%FOLNMX enddo endif if(vname.eq."WDPOOL") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%WDPOOL + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%WDPOOL enddo endif if(vname.eq."WRRAT") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%WRRAT + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%WRRAT enddo endif if(vname.eq."MRP") then do t=1,NT - vardata(t) = NoahMP401_struc(n)%noahmp401(t)%param%MRP + vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%MRP enddo endif @@ -642,9 +644,9 @@ subroutine NoahMP401_setup_pedecvars(DEC_State, Feas_State) .and. & (count.eq.0) & .and. & - ((vardata(gid) .lt. NoahMP401_pe_struc(n)%param_min(i)) & + ((vardata(gid) .lt. NoahMPnew_pe_struc(n)%param_min(i)) & .or. & - (vardata(gid) .gt. NoahMP401_pe_struc(n)%param_max(i))) ) then + (vardata(gid) .gt. NoahMPnew_pe_struc(n)%param_max(i))) ) then count=count+1 write(LIS_logunit,*) '*****************************************************************', ' ', & 'WARNING: noah default value is out of LIS-OPT/UE bounds ' , ' ', & @@ -652,27 +654,27 @@ subroutine NoahMP401_setup_pedecvars(DEC_State, Feas_State) 'at ' , ' ', & 'col: ', LIS_surface(n,LIS_rc%lsm_index)%tile(gid)%col , ' ', & 'row: ', LIS_surface(n,LIS_rc%lsm_index)%tile(gid)%row , ' ', & - 'vegt class: ', NoahMP401_struc(n)%noahmp401(gid)%vegetype , ' ', & - 'soiltype: ', NoahMP401_struc(n)%noahmp401(gid)%soiltype , ' ', & + 'vegt class: ', NoahMPnew_struc(n)%noahmpnew(gid)%vegetype , ' ', & + 'soiltype: ', NoahMPnew_struc(n)%noahmpnew(gid)%soiltype , ' ', & 'default value: ', vardata(gid) , ' ', & - 'parameter min: ', NoahMP401_pe_struc(n)%param_min(i) , ' ', & - 'parameter max: ', NoahMP401_pe_struc(n)%param_max(i) , ' ', & + 'parameter min: ', NoahMPnew_pe_struc(n)%param_min(i) , ' ', & + 'parameter max: ', NoahMPnew_pe_struc(n)%param_max(i) , ' ', & '*****************************************************************' endif enddo enddo - endif ! if(NoahMP401_pe_struc(n)%param_select(i).eq.1) then - enddo ! do i=1,NoahMP401_pe_struc(n)%nparams + endif ! if(NoahMPnew_pe_struc(n)%param_select(i).eq.1) then + enddo ! do i=1,NoahMPnew_pe_struc(n)%nparams !random initialization if(LIS_rc%decSpaceInitMode.eq.1) then !random initialization seed=seed_base-LIS_localPet !seed must be negative number call LIS_rand_func(seed,rand) !initialize random seed with negative number - do i=1,NoahMP401_pe_struc(n)%nparams - if(NoahMP401_pe_struc(n)%param_select(i).eq.1) then - vname=trim(NoahMP401_pe_struc(n)%param_name(i)) + do i=1,NoahMPnew_pe_struc(n)%nparams + if(NoahMPnew_pe_struc(n)%param_select(i).eq.1) then + vname=trim(NoahMPnew_pe_struc(n)%param_name(i)) call ESMF_StateGet(DEC_State,vname,varField,rc=status) call LIS_verify(status) @@ -688,8 +690,8 @@ subroutine NoahMP401_setup_pedecvars(DEC_State, Feas_State) else call LIS_rand_func(1,rand) vardata((t-1)*LIS_rc%nensem(n)+m) = & - NoahMP401_pe_struc(n)%param_min(i) & - + rand * ( NoahMP401_pe_struc(n)%param_max(i) - NoahMP401_pe_struc(n)%param_min(i) ) + NoahMPnew_pe_struc(n)%param_min(i) & + + rand * ( NoahMPnew_pe_struc(n)%param_max(i) - NoahMPnew_pe_struc(n)%param_min(i) ) endif enddo enddo @@ -707,7 +709,7 @@ subroutine NoahMP401_setup_pedecvars(DEC_State, Feas_State) enddo endif - write(LIS_logunit,*) '[INFO] Finished setting up NoahMP 3.6 decision space ' - end subroutine NoahMP401_setup_pedecvars + write(LIS_logunit,*) '[INFO] Finished setting up NoahMPnew decision space ' + end subroutine NoahMPnew_setup_pedecvars -end module NoahMP401_peMod +end module NoahMPnew_peMod diff --git a/lis/surfacemodels/land/noahmp.new/pe/NoahMPnew_set_pedecvars.F90 b/lis/surfacemodels/land/noahmp.new/pe/NoahMPnew_set_pedecvars.F90 new file mode 100755 index 000000000..96ec023b1 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.new/pe/NoahMPnew_set_pedecvars.F90 @@ -0,0 +1,524 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: NoahMPnew_set_pedecvars +! \label{NoahMPnew_set_pedecvars} +! +! !REVISION HISTORY: +! 02 Feb 2018: Soni Yatheendradas; Initial Specification +! May 2023: Cenlin He; modified for refactored NoahMP v5 and later +! + + +! !INTERFACE: +subroutine NoahMPnew_set_pedecvars(DEC_State, Feas_State) +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc, LIS_surface + use LIS_logMod, only : LIS_logunit,LIS_verify + use NoahMPnew_lsmMod, only : NoahMPnew_struc + use NoahMPnew_peMod, only : NoahMPnew_pe_struc + + implicit none +! !ARGUMENTS: + type(ESMF_State) :: DEC_State + type(ESMF_State) :: Feas_State +! +! !DESCRIPTION: +! +! This routine assigns the decision space to NoahMP model variables. +! +!EOP + integer :: n + real, pointer :: vdata(:) + character*100 :: vname + integer, pointer :: mod_flag_NoahMPnew(:) + integer :: i,t + integer :: status + + n = 1 + + allocate(mod_flag_NoahMPnew(LIS_rc%npatch(n,LIS_rc%lsm_index))) + + mod_flag_NoahMPnew = 0 + + !set modflag based on bounds + allocate(vdata(LIS_rc%npatch(n,LIS_rc%lsm_index))) + do i=1,NoahMPnew_pe_struc(n)%nparams + if(NoahMPnew_pe_struc(n)%param_select(i).eq.1) then + vname=trim(NoahMPnew_pe_struc(n)%param_name(i)) + call NoahMPnew_getvardata(n,DEC_State,vname, vdata, status) + call LIS_verify(status) + call NoahMPnew_checkBounds(n,DEC_State,vname, vdata, mod_flag_NoahMPnew) + endif + enddo + deallocate(vdata) + + !update modflags based on constraints + call NoahMPnew_checkConstraints(n,DEC_State, mod_flag_NoahMPnew) + + !set variables given modflag; if flag set will leave values alone + call NoahMPnew_setVars(n,DEC_State,mod_flag_NoahMPnew) + + !send mod flag to ESMF state (feasibility flag) + call NoahMPnew_setModFlag(n,DEC_State,Feas_State,mod_flag_NoahMPnew) +end subroutine NoahMPnew_set_pedecvars + +!BOP +! +! !ROUTINE: randArray +! \label{randArray} +! +! !INTERFACE: +subroutine NoahMPnew_getvardata(n,DEC_State,vname, vdata, statusStateGet) +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc + use LIS_logMod, only : LIS_logunit,LIS_verify + + implicit none +! !ARGUMENTS: + integer :: n + type(ESMF_State) :: DEC_State + character*100 :: vname + real :: vdata(LIS_rc%npatch(n,LIS_rc%lsm_index)) +! +! !DESCRIPTION: +! +! This routine assigns the decision space to NoahMP model variables. +! +!EOP + real, pointer :: vardata(:) + type(ESMF_Field) :: varField + integer :: statusStateGet, statusFieldGet,i + + call ESMF_StateGet(DEC_State,vname,varField,rc=statusStateGet) +! call LIS_verify(status) + + if(statusStateGet.eq.0) then + call ESMF_FieldGet(varField,localDE=0,farrayPtr=vardata,& + rc=statusFieldGet) + call LIS_verify(statusFieldGet) + vdata=vardata + endif + +end subroutine NoahMPnew_getvardata + +subroutine NoahMPnew_checkBounds(n,DEC_State,vname, vardata, mod_flag_NoahMPnew) +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc, LIS_surface + use LIS_logMod, only : LIS_logunit,LIS_verify + + implicit none +! !ARGUMENTS: + integer :: n + type(ESMF_State) :: DEC_State + character*100 :: vname + real :: vardata(LIS_rc%npatch(n,LIS_rc%lsm_index)) + integer :: mod_flag_NoahMPnew(LIS_rc%npatch(n,LIS_rc%lsm_index)) +! +! !DESCRIPTION: +! +! This routine assigns the decision space to NoahMP model variables. +! +!EOP + type(ESMF_Field) :: varField + real :: vardata_min, vardata_max + integer :: status + integer :: t + + call ESMF_StateGet(DEC_State,vname,varField,rc=status) + call LIS_verify(status) + + call ESMF_AttributeGet(varField,'MinRange',vardata_min,rc=status) + call LIS_verify(status) + call ESMF_AttributeGet(varField,'MaxRange',vardata_max,rc=status) + call LIS_verify(status) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + if(vardata(t).lt.vardata_min) then + mod_flag_NoahMPnew(t) = 1 + endif + if(vardata(t).gt.vardata_max) then + mod_flag_NoahMPnew(t) = 1 + endif + enddo +end subroutine NoahMPnew_checkBounds + +subroutine NoahMPnew_checkConstraints(n,DEC_State,mod_flag_NoahMPnew) +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc, LIS_surface + use NoahMPnew_lsmMod, only : NoahMPnew_struc + + implicit none +! !ARGUMENTS: + integer :: n + type(ESMF_State) :: DEC_State + integer :: mod_flag_NoahMPnew(LIS_rc%npatch(n,LIS_rc%lsm_index)) +! +! !DESCRIPTION: +! +! This routine assigns the decision space to NoahMP model variables. +! +!EOP + type(ESMF_Field) :: varField + real :: vardata_min, vardata_max + character*100 :: vname + integer :: t + integer :: status1, status2 + real, allocatable :: vardata1(:) + real, allocatable :: vardata2(:) + real, allocatable :: vardata3(:) + + allocate(vardata1(LIS_rc%npatch(n,LIS_rc%lsm_index))) + allocate(vardata2(LIS_rc%npatch(n,LIS_rc%lsm_index))) + allocate(vardata3(LIS_rc%npatch(n,LIS_rc%lsm_index))) + + vname='SMCMAX' + call NoahMPnew_getvardata(n,DEC_State,vname,vardata1, status1) + + if(status1.ne.0) vardata1=NoahMPnew_struc(n)%noahmpnew(:)%param%smcmax(1) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + if(vardata1(t).le.NoahMPnew_struc(n)%noahmpnew(t)%param%smcdry(1)) then + mod_flag_NoahMPnew(t) = 1 + endif + enddo + + !SMCREF > SMCWLT + vname='SMCREF' + call NoahMPnew_getvardata(n,DEC_State,vname,vardata1, status1) + vname='SMCWLT' + call NoahMPnew_getvardata(n,DEC_State,vname,vardata2, status2) + if(status1.ne.0) vardata1=NoahMPnew_struc(n)%noahmpnew(:)%param%smcref(1) + if(status2.ne.0) vardata2=NoahMPnew_struc(n)%noahmpnew(:)%param%smcwlt(1) + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + if(vardata1(t).le.vardata2(t)) then + mod_flag_NoahMPnew(t) = 1 + endif + enddo + + !SMCMAX > SMCREF + vname='SMCMAX' + call NoahMPnew_getvardata(n,DEC_State,vname,vardata1, status1) + vname='SMCREF' + call NoahMPnew_getvardata(n,DEC_State,vname,vardata2, status2) + if(status1.ne.0) vardata1=NoahMPnew_struc(n)%noahmpnew(:)%param%smcmax(1) + if(status2.ne.0) vardata2=NoahMPnew_struc(n)%noahmpnew(:)%param%smcref(1) + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + if(vardata1(t).le.vardata2(t)) then + mod_flag_NoahMPnew(t) = 1 + endif + enddo + + !HVT > HVB + vname='HVT' + call NoahMPnew_getvardata(n,DEC_State,vname,vardata1, status1) + vname='HVB' + call NoahMPnew_getvardata(n,DEC_State,vname,vardata2, status2) + if(status1.ne.0) vardata1=NoahMPnew_struc(n)%noahmpnew(:)%param%HVT + if(status2.ne.0) vardata2=NoahMPnew_struc(n)%noahmpnew(:)%param%HVB + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + if(vardata1(t).lt.vardata2(t)) then ! SY: Note .lt. instead of .le., following some entries with HVT=HVB in MPTABLE_UMD.TBL + mod_flag_NoahMPnew(t) = 1 + endif + enddo + + !HVT > Z0MVT + vname='HVT' + call NoahMPnew_getvardata(n,DEC_State,vname,vardata1, status1) + vname='Z0MVT' + call NoahMPnew_getvardata(n,DEC_State,vname,vardata2, status2) + if(status1.ne.0) vardata1=NoahMPnew_struc(n)%noahmpnew(:)%param%HVT + if(status2.ne.0) vardata2=NoahMPnew_struc(n)%noahmpnew(:)%param%Z0MVT + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + if(vardata1(t).le.vardata2(t)) then + mod_flag_NoahMPnew(t) = 1 + endif + enddo + + + !HVT > Z0MVT + vname='MNSNALB' + call NoahMPnew_getvardata(n,DEC_State,vname,vardata1, status1) + vname='MXSNALB' + call NoahMPnew_getvardata(n,DEC_State,vname,vardata2, status2) + if(status1.ne.0) vardata1=NoahMPnew_struc(n)%noahmpnew(:)%param%MNSNALB + if(status2.ne.0) vardata2=NoahMPnew_struc(n)%noahmpnew(:)%param%MXSNALB + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + if(vardata1(t).ge.vardata2(t)) then + mod_flag_NoahMPnew(t) = 1 + endif + enddo + + !HVT > Z0MVT + vname='T_ULIMIT' + call NoahMPnew_getvardata(n,DEC_State,vname,vardata1, status1) + vname='T_MLIMIT' + call NoahMPnew_getvardata(n,DEC_State,vname,vardata2, status2) + vname='T_LLIMIT' + call NoahMPnew_getvardata(n,DEC_State,vname,vardata3, status2) + if(status1.ne.0) vardata1=NoahMPnew_struc(n)%noahmpnew(:)%param%T_ULIMIT + if(status2.ne.0) vardata2=NoahMPnew_struc(n)%noahmpnew(:)%param%T_MLIMIT + if(status2.ne.0) vardata3=NoahMPnew_struc(n)%noahmpnew(:)%param%T_LLIMIT + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + if((vardata3(t).gt.vardata2(t)).or.& + (vardata2(t).gt.vardata1(t)).or.& + (vardata3(t).gt.vardata1(t))) then + mod_flag_NoahMPnew(t) = 1 + endif + enddo + + deallocate(vardata1) + deallocate(vardata2) + deallocate(vardata3) + +end subroutine NoahMPnew_checkConstraints + +subroutine NoahMPnew_setVars(n,DEC_State,mod_flag_NoahMPnew) +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc, LIS_surface + use LIS_logMod, only : LIS_logunit,LIS_verify + use NoahMPnew_lsmMod, only : NoahMPnew_struc + use NoahMPnew_peMod, only : NoahMPnew_pe_struc + + implicit none +! !ARGUMENTS: + integer :: n + integer :: mod_flag_NoahMPnew(LIS_rc%npatch(n,LIS_rc%lsm_index)) + type(ESMF_State) :: DEC_State +! +! !DESCRIPTION: +! +! This routine assigns the decision space to NoahMP model variables. +! Only does so if the proposed parameter set is feasible (meets bounds and constraints) +! +!EOP + real :: vardata(LIS_rc%npatch(n,LIS_rc%lsm_index)) + character*100 :: vname + integer :: i,t, status + + do i=1,NoahMPnew_pe_struc(n)%nparams + if(NoahMPnew_pe_struc(n)%param_select(i).eq.1) then + vname=trim(NoahMPnew_pe_struc(n)%param_name(i)) + call NoahMPnew_getvardata(n,DEC_State,vname,vardata, status) + call LIS_verify(status) + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + if(mod_flag_NoahMPnew(t).eq.0) then + if(vname.eq."TOPT") & + NoahMPnew_struc(n)%noahmpnew(t)%param%topt = vardata(t) + if(vname.eq."RGL") & + NoahMPnew_struc(n)%noahmpnew(t)%param%rgl = vardata(t) + if(vname.eq."RSMAX") & + NoahMPnew_struc(n)%noahmpnew(t)%param%rsmax = vardata(t) + if(vname.eq."RSMIN") & + NoahMPnew_struc(n)%noahmpnew(t)%param%rsmin = vardata(t) + if(vname.eq."HS") & + NoahMPnew_struc(n)%noahmpnew(t)%param%hs = vardata(t) + if(vname.eq."NROOT") & + NoahMPnew_struc(n)%noahmpnew(t)%param%nroot = vardata(t) + if(vname.eq."CSOIL") & + NoahMPnew_struc(n)%noahmpnew(t)%param%csoil = vardata(t) + if(vname.eq."BEXP") & + NoahMPnew_struc(n)%noahmpnew(t)%param%bexp = vardata(t) + if(vname.eq."DKSAT") & + NoahMPnew_struc(n)%noahmpnew(t)%param%dksat = vardata(t) + if(vname.eq."DWSAT") & + NoahMPnew_struc(n)%noahmpnew(t)%param%dwsat = vardata(t) + if(vname.eq."PSISAT") & + NoahMPnew_struc(n)%noahmpnew(t)%param%psisat = vardata(t) + if(vname.eq."QUARTZ") & + NoahMPnew_struc(n)%noahmpnew(t)%param%quartz = vardata(t) + if(vname.eq."SMCMAX") & + NoahMPnew_struc(n)%noahmpnew(t)%param%smcmax = vardata(t) + if(vname.eq."SMCREF") & + NoahMPnew_struc(n)%noahmpnew(t)%param%smcref = vardata(t) + if(vname.eq."SMCWLT") & + NoahMPnew_struc(n)%noahmpnew(t)%param%smcwlt = vardata(t) + if(vname.eq."CZIL") & + NoahMPnew_struc(n)%noahmpnew(t)%param%czil = vardata(t) + if(vname.eq."SLOPE") & + NoahMPnew_struc(n)%noahmpnew(t)%param%slope = vardata(t) + if(vname.eq."CH2OP") & + NoahMPnew_struc(n)%noahmpnew(t)%param%CH2OP = vardata(t) + if(vname.eq."DLEAF") & + NoahMPnew_struc(n)%noahmpnew(t)%param%DLEAF = vardata(t) + if(vname.eq."Z0MVT") & + NoahMPnew_struc(n)%noahmpnew(t)%param%Z0MVT = vardata(t) + if(vname.eq."HVT") & + NoahMPnew_struc(n)%noahmpnew(t)%param%HVT = vardata(t) + if(vname.eq."HVB") & + NoahMPnew_struc(n)%noahmpnew(t)%param%HVB = vardata(t) + if(vname.eq."RC") & + NoahMPnew_struc(n)%noahmpnew(t)%param%RC = vardata(t) + if(vname.eq."MFSNO") & + NoahMPnew_struc(n)%noahmpnew(t)%param%MFSNO = vardata(t) + if(vname.eq."ALBSAT1") & + NoahMPnew_struc(n)%noahmpnew(t)%param%ALBSAT(1) = vardata(t) + if(vname.eq."ALBSAT2") & + NoahMPnew_struc(n)%noahmpnew(t)%param%ALBSAT(2) = vardata(t) + if(vname.eq."ALBDRY1") & + NoahMPnew_struc(n)%noahmpnew(t)%param%ALBDRY(1) = vardata(t) + if(vname.eq."ALBDRY2") & + NoahMPnew_struc(n)%noahmpnew(t)%param%ALBDRY(2) = vardata(t) + if(vname.eq."ALBICE1") & + NoahMPnew_struc(n)%noahmpnew(t)%param%ALBICE(1) = vardata(t) + if(vname.eq."ALBICE2") & + NoahMPnew_struc(n)%noahmpnew(t)%param%ALBICE(2) = vardata(t) + if(vname.eq."OMEGAS1") & + NoahMPnew_struc(n)%noahmpnew(t)%param%OMEGAS(1) = vardata(t) + if(vname.eq."OMEGAS2") & + NoahMPnew_struc(n)%noahmpnew(t)%param%OMEGAS(2) = vardata(t) + if(vname.eq."BETADS") & + NoahMPnew_struc(n)%noahmpnew(t)%param%BETADS = vardata(t) + if(vname.eq."BETAIS") & + NoahMPnew_struc(n)%noahmpnew(t)%param%BETAIS = vardata(t) + if(vname.eq."EG1") & + NoahMPnew_struc(n)%noahmpnew(t)%param%EG(1) = vardata(t) + if(vname.eq."EG2") & + NoahMPnew_struc(n)%noahmpnew(t)%param%EG(2) = vardata(t) + if(vname.eq."Z0SNO") & + NoahMPnew_struc(n)%noahmpnew(t)%param%Z0SNO = vardata(t) + if(vname.eq."SSI") & + NoahMPnew_struc(n)%noahmpnew(t)%param%SSI = vardata(t) + if(vname.eq."SWEMX") & + NoahMPnew_struc(n)%noahmpnew(t)%param%SWEMX = vardata(t) + if(vname.eq."RSURF_SNOW") & + NoahMPnew_struc(n)%noahmpnew(t)%param%RSURF_SNOW = vardata(t) + if(vname.eq."MNSNALB") & + NoahMPnew_struc(n)%noahmpnew(t)%param%MNSNALB = vardata(t) + if(vname.eq."MXSNALB") & + NoahMPnew_struc(n)%noahmpnew(t)%param%MXSNALB = vardata(t) + if(vname.eq."SNDECAYEXP") & + NoahMPnew_struc(n)%noahmpnew(t)%param%SNDECAYEXP = vardata(t) + if(vname.eq."T_ULIMIT") & + NoahMPnew_struc(n)%noahmpnew(t)%param%T_ULIMIT = vardata(t) + if(vname.eq."T_MLIMIT") & + NoahMPnew_struc(n)%noahmpnew(t)%param%T_MLIMIT = vardata(t) + if(vname.eq."T_LLIMIT") & + NoahMPnew_struc(n)%noahmpnew(t)%param%T_LLIMIT = vardata(t) + if(vname.eq."SNOWF_SCALEF") & + NoahMPnew_struc(n)%noahmpnew(t)%param%snowf_scalef = vardata(t) + if(vname.eq."RHOL1") & + NoahMPnew_struc(n)%noahmpnew(t)%param%RHOL(1) = vardata(t) + if(vname.eq."RHOL2") & + NoahMPnew_struc(n)%noahmpnew(t)%param%RHOL(2) = vardata(t) + if(vname.eq."RHOS1") & + NoahMPnew_struc(n)%noahmpnew(t)%param%RHOS(1) = vardata(t) + if(vname.eq."RHOS2") & + NoahMPnew_struc(n)%noahmpnew(t)%param%RHOS(2) = vardata(t) + if(vname.eq."TAUL1") & + NoahMPnew_struc(n)%noahmpnew(t)%param%TAUL(1) = vardata(t) + if(vname.eq."TAUL2") & + NoahMPnew_struc(n)%noahmpnew(t)%param%TAUL(2) = vardata(t) + if(vname.eq."TAUS1") & + NoahMPnew_struc(n)%noahmpnew(t)%param%TAUS(1) = vardata(t) + if(vname.eq."TAUS2") & + NoahMPnew_struc(n)%noahmpnew(t)%param%TAUS(2) = vardata(t) + if(vname.eq."XL") & + NoahMPnew_struc(n)%noahmpnew(t)%param%XL = vardata(t) + if(vname.eq."CWPVT") & + NoahMPnew_struc(n)%noahmpnew(t)%param%CWPVT = vardata(t) + if(vname.eq."C3PSN") & + NoahMPnew_struc(n)%noahmpnew(t)%param%C3PSN = vardata(t) + if(vname.eq."KC25") & + NoahMPnew_struc(n)%noahmpnew(t)%param%KC25 = vardata(t) + if(vname.eq."AKC") & + NoahMPnew_struc(n)%noahmpnew(t)%param%AKC = vardata(t) + if(vname.eq."KO25") & + NoahMPnew_struc(n)%noahmpnew(t)%param%KO25 = vardata(t) + if(vname.eq."AKO") & + NoahMPnew_struc(n)%noahmpnew(t)%param%AKO = vardata(t) + if(vname.eq."AVCMX") & + NoahMPnew_struc(n)%noahmpnew(t)%param%AVCMX = vardata(t) + if(vname.eq."AQE") & + NoahMPnew_struc(n)%noahmpnew(t)%param%AQE = vardata(t) + if(vname.eq."LTOVRC") & + NoahMPnew_struc(n)%noahmpnew(t)%param%LTOVRC = vardata(t) + if(vname.eq."DILEFC") & + NoahMPnew_struc(n)%noahmpnew(t)%param%DILEFC = vardata(t) + if(vname.eq."DILEFW") & + NoahMPnew_struc(n)%noahmpnew(t)%param%DILEFW = vardata(t) + if(vname.eq."RMF25") & + NoahMPnew_struc(n)%noahmpnew(t)%param%RMF25 = vardata(t) + if(vname.eq."SLA") & + NoahMPnew_struc(n)%noahmpnew(t)%param%SLA = vardata(t) + if(vname.eq."FRAGR") & + NoahMPnew_struc(n)%noahmpnew(t)%param%FRAGR = vardata(t) + if(vname.eq."TMIN") & + NoahMPnew_struc(n)%noahmpnew(t)%param%TMIN = vardata(t) + if(vname.eq."VCMX25") & + NoahMPnew_struc(n)%noahmpnew(t)%param%VCMX25 = vardata(t) + if(vname.eq."TDLEF") & + NoahMPnew_struc(n)%noahmpnew(t)%param%TDLEF = vardata(t) + if(vname.eq."BP") & + NoahMPnew_struc(n)%noahmpnew(t)%param%BP = vardata(t) + if(vname.eq."MP") & + NoahMPnew_struc(n)%noahmpnew(t)%param%MP = vardata(t) + if(vname.eq."QE25") & + NoahMPnew_struc(n)%noahmpnew(t)%param%QE25 = vardata(t) + if(vname.eq."RMS25") & + NoahMPnew_struc(n)%noahmpnew(t)%param%RMS25 = vardata(t) + if(vname.eq."RMR25") & + NoahMPnew_struc(n)%noahmpnew(t)%param%RMR25 = vardata(t) + if(vname.eq."ARM") & + NoahMPnew_struc(n)%noahmpnew(t)%param%ARM = vardata(t) + if(vname.eq."FOLNMX") & + NoahMPnew_struc(n)%noahmpnew(t)%param%FOLNMX = vardata(t) + if(vname.eq."WDPOOL") & + NoahMPnew_struc(n)%noahmpnew(t)%param%WDPOOL = vardata(t) + if(vname.eq."WRRAT") & + NoahMPnew_struc(n)%noahmpnew(t)%param%WRRAT = vardata(t) + if(vname.eq."MRP") & + NoahMPnew_struc(n)%noahmpnew(t)%param%MRP = vardata(t) + endif + enddo + endif + enddo +end subroutine NoahMPnew_setVars + +subroutine NoahMPnew_setModFlag(n,DEC_State,Feas_State,mod_flag_NoahMPnew) +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc, LIS_surface + use LIS_logMod, only : LIS_logunit,LIS_verify + + implicit none +! !ARGUMENTS: + integer :: n + integer :: mod_flag_NoahMPnew(LIS_rc%npatch(n,LIS_rc%lsm_index)) + type(ESMF_State) :: DEC_State + type(ESMF_State) :: Feas_State +! +! !DESCRIPTION: +! +! This routine sets the feasibility flag +! +!EOP + type(ESMF_Field) :: feasField + integer :: t + integer :: status + integer, pointer :: modflag(:) + + call ESMF_StateGet(Feas_State, "Feasibility Flag", feasField, rc=status) + call LIS_verify(status) + call ESMF_FieldGet(feasField,localDE=0,farrayPtr=modflag,rc=status) + call LIS_verify(status) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + if(mod_flag_NoahMPnew(t).eq.1) then + modflag(t)=1 + endif + enddo + +end subroutine NoahMPnew_setModFlag diff --git a/lis/surfacemodels/land/noahmp.new/pe/obspred/UAsnow/NoahMP401_getpeobspred_UAsnowobs.F90 b/lis/surfacemodels/land/noahmp.new/pe/obspred/UAsnow/NoahMPnew_getpeobspred_UAsnowobs.F90 similarity index 81% rename from lis/surfacemodels/land/noahmp.new/pe/obspred/UAsnow/NoahMP401_getpeobspred_UAsnowobs.F90 rename to lis/surfacemodels/land/noahmp.new/pe/obspred/UAsnow/NoahMPnew_getpeobspred_UAsnowobs.F90 index d0669daad..6f25251fe 100644 --- a/lis/surfacemodels/land/noahmp.new/pe/obspred/UAsnow/NoahMP401_getpeobspred_UAsnowobs.F90 +++ b/lis/surfacemodels/land/noahmp.new/pe/obspred/UAsnow/NoahMPnew_getpeobspred_UAsnowobs.F90 @@ -8,19 +8,19 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: NoahMP401_getpeobspred_UAsnowobs -! \label{NoahMP401_getpeobspred_UAsnowobs} +! !ROUTINE: NoahMPnew_getpeobspred_UAsnowobs +! \label{NoahMPnew_getpeobspred_UAsnowobs} ! ! !REVISION HISTORY: ! 02 May 2020: Sujay Kumar; Initial Specification ! ! !INTERFACE: -subroutine NoahMP401_getpeobspred_UAsnowobs(Obj_Func) +subroutine NoahMPnew_getpeobspred_UAsnowobs(Obj_Func) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc use LIS_soilsMod, only : LIS_soils - use NoahMP401_lsmMod, only : NoahMP401_struc + use NoahMPnew_lsmMod, only : NoahMPnew_struc use LIS_logMod, only : LIS_verify, LIS_logunit implicit none @@ -58,12 +58,12 @@ subroutine NoahMP401_getpeobspred_UAsnowobs(Obj_Func) call LIS_verify(status) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - snod(t) = NoahMP401_struc(n)%noahmp401(t)%snowh*1000.0 !mm - swe(t) = NoahMP401_struc(n)%noahmp401(t)%sneqv + snod(t) = NoahMPnew_struc(n)%noahmpnew(t)%snowh*1000.0 !mm + swe(t) = NoahMPnew_struc(n)%noahmpnew(t)%sneqv enddo -end subroutine NoahMP401_getpeobspred_UAsnowobs +end subroutine NoahMPnew_getpeobspred_UAsnowobs diff --git a/lis/surfacemodels/land/noahmp.new/pe/obspred/UAsnow/NoahMP401_setupobspred_UAsnowobs.F90 b/lis/surfacemodels/land/noahmp.new/pe/obspred/UAsnow/NoahMPnew_setupobspred_UAsnowobs.F90 similarity index 86% rename from lis/surfacemodels/land/noahmp.new/pe/obspred/UAsnow/NoahMP401_setupobspred_UAsnowobs.F90 rename to lis/surfacemodels/land/noahmp.new/pe/obspred/UAsnow/NoahMPnew_setupobspred_UAsnowobs.F90 index 5fda39680..314018538 100644 --- a/lis/surfacemodels/land/noahmp.new/pe/obspred/UAsnow/NoahMP401_setupobspred_UAsnowobs.F90 +++ b/lis/surfacemodels/land/noahmp.new/pe/obspred/UAsnow/NoahMPnew_setupobspred_UAsnowobs.F90 @@ -8,14 +8,14 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: NoahMP401_setupobspred_UAsnowobs -! \label{NoahMP401_setupobspred_UAsnowobs} +! !ROUTINE: NoahMPnew_setupobspred_UAsnowobs +! \label{NoahMPnew_setupobspred_UAsnowobs} ! ! !REVISION HISTORY: ! 2 May 2020: Sujay Kumar; Initial Specification ! ! !INTERFACE: -subroutine NoahMP401_setupobspred_UAsnowobs(OBSPred) +subroutine NoahMPnew_setupobspred_UAsnowobs(OBSPred) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc, LIS_vecPatch @@ -28,7 +28,7 @@ subroutine NoahMP401_setupobspred_UAsnowobs(OBSPred) ! !DESCRIPTION: ! ! This routine creates an entry in the Obs pred object from -! NoahMP4.0.1 used for parameter estimation +! NoahMP used for parameter estimation ! !EOP integer :: n @@ -58,5 +58,5 @@ subroutine NoahMP401_setupobspred_UAsnowobs(OBSPred) call ESMF_StateAdd(OBSPred,(/sweField/),rc=status) call LIS_verify(status) -end subroutine NoahMP401_setupobspred_UAsnowobs +end subroutine NoahMPnew_setupobspred_UAsnowobs diff --git a/lis/surfacemodels/land/noahmp.new/routing/noahmp401_getrunoffs.F90 b/lis/surfacemodels/land/noahmp.new/routing/noahmpnew_getrunoffs.F90 similarity index 82% rename from lis/surfacemodels/land/noahmp.new/routing/noahmp401_getrunoffs.F90 rename to lis/surfacemodels/land/noahmp.new/routing/noahmpnew_getrunoffs.F90 index 6678496d0..2986b2152 100644 --- a/lis/surfacemodels/land/noahmp.new/routing/noahmp401_getrunoffs.F90 +++ b/lis/surfacemodels/land/noahmp.new/routing/noahmpnew_getrunoffs.F90 @@ -8,15 +8,16 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_getrunoffs -! \label{noahmp401_getrunoffs} +! !ROUTINE: noahmpnew_getrunoffs +! \label{noahmpnew_getrunoffs} ! ! !REVISION HISTORY: ! 6 May 2011: Sujay Kumar; Initial Specification ! 26 Feb 2019: David Mocko, added Noah-MP-4.0.1 routing into LIS-7 +! May 2023: Cenlin He, modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmp401_getrunoffs(n) +subroutine noahmpnew_getrunoffs(n) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc, LIS_masterproc @@ -24,7 +25,7 @@ subroutine noahmp401_getrunoffs(n) use LIS_logMod, only : LIS_verify use LIS_constantsMod use LIS_historyMod - use noahmp401_lsmMod, only : noahmp401_struc + use NoahMPnew_lsmMod, only : NoahMPnew_struc implicit none ! !ARGUMENTS: @@ -39,12 +40,12 @@ subroutine noahmp401_getrunoffs(n) type(ESMF_Field) :: baseflow_field real, pointer :: sfrunoff(:) real, pointer :: baseflow(:) - real, allocatable :: gvar1(:) - real, allocatable :: gvar2(:) - real, allocatable :: runoff1(:) - real, allocatable :: runoff2(:) - real, allocatable :: runoff1_t(:) - real, allocatable :: runoff2_t(:) + real, allocatable :: gvar1(:) + real, allocatable :: gvar2(:) + real, allocatable :: runoff1(:) + real, allocatable :: runoff2(:) + real, allocatable :: runoff1_t(:) + real, allocatable :: runoff2_t(:) integer :: t integer :: c,r integer :: status @@ -87,8 +88,8 @@ subroutine noahmp401_getrunoffs(n) endif do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) - runoff1(t) = NOAHMP401_struc(n)%noahmp401(t)%runsf/LIS_CONST_RHOFW - runoff2(t) = NOAHMP401_struc(n)%noahmp401(t)%runsb/LIS_CONST_RHOFW + runoff1(t) = NoahMPnew_struc(n)%noahmpnew(t)%runsf/LIS_CONST_RHOFW + runoff2(t) = NoahMPnew_struc(n)%noahmpnew(t)%runsb/LIS_CONST_RHOFW enddo call LIS_patch2tile(n,1,runoff1_t, runoff1) @@ -122,15 +123,15 @@ subroutine noahmp401_getrunoffs(n) if(LIS_masterproc) then call ESMF_StateGet(LIS_runoff_state(n),"Total Evapotranspiration",evapotranspiration_Field, rc=status) - call LIS_verify(status, "noahmp401_getrunoffs: ESMF_StateGet failed for Total Evapotranspiration") + call LIS_verify(status, "noahmpnew_getrunoffs: ESMF_StateGet failed for Total Evapotranspiration") call ESMF_FieldGet(evapotranspiration_Field,localDE=0,farrayPtr=evapotranspiration,rc=status) - call LIS_verify(status, "noahmp401_getrunoffs: ESMF_FieldGet failed for Total Evapotranspiration") + call LIS_verify(status, "noahmpnew_getrunoffs: ESMF_FieldGet failed for Total Evapotranspiration") endif do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) - evapotranspiration1(t) = NOAHMP401_struc(n)%noahmp401(t)%ecan + NOAHMP401_struc(n)%noahmp401(t)%etran + NOAHMP401_struc(n)%noahmp401(t)%edir + evapotranspiration1(t) = NoahMPnew_struc(n)%noahmpnew(t)%ecan + NoahMPnew_struc(n)%noahmpnew(t)%etran + NoahMPnew_struc(n)%noahmpnew(t)%edir enddo call LIS_patch2tile(n,1,evapotranspiration1_t, evapotranspiration1) @@ -146,4 +147,4 @@ subroutine noahmp401_getrunoffs(n) deallocate(evapotranspiration1_t) endif -end subroutine noahmp401_getrunoffs +end subroutine noahmpnew_getrunoffs diff --git a/lis/surfacemodels/land/noahmp.new/routing/noahmp401_getrunoffs_hymap2.F90 b/lis/surfacemodels/land/noahmp.new/routing/noahmpnew_getrunoffs_hymap2.F90 similarity index 81% rename from lis/surfacemodels/land/noahmp.new/routing/noahmp401_getrunoffs_hymap2.F90 rename to lis/surfacemodels/land/noahmp.new/routing/noahmpnew_getrunoffs_hymap2.F90 index 50ba761c4..f9344f790 100644 --- a/lis/surfacemodels/land/noahmp.new/routing/noahmp401_getrunoffs_hymap2.F90 +++ b/lis/surfacemodels/land/noahmp.new/routing/noahmpnew_getrunoffs_hymap2.F90 @@ -8,21 +8,22 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_getrunoffs_hymap2 -! \label{noahmp401_getrunoffs_hymap2} +! !ROUTINE: noahmpnew_getrunoffs_hymap2 +! \label{noahmpnew_getrunoffs_hymap2} ! ! !REVISION HISTORY: ! 6 May 2011: Sujay Kumar; Initial Specification +! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmp401_getrunoffs_hymap2(n) +subroutine noahmpnew_getrunoffs_hymap2(n) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc, LIS_masterproc use LIS_routingMod, only : LIS_runoff_state use LIS_logMod use LIS_historyMod - use noahmp401_lsmMod, only : noahmp401_struc + use NoahMPnew_lsmMod, only : NoahMPnew_struc implicit none ! !ARGUMENTS: @@ -40,10 +41,10 @@ subroutine noahmp401_getrunoffs_hymap2(n) integer :: t integer :: c,r integer :: status - real, allocatable :: runoff1(:) - real, allocatable :: runoff2(:) - real, allocatable :: runoff1_t(:) - real, allocatable :: runoff2_t(:) + real, allocatable :: runoff1(:) + real, allocatable :: runoff2(:) + real, allocatable :: runoff1_t(:) + real, allocatable :: runoff2_t(:) !ag (25Apr2017) type(ESMF_Field) :: evapotranspiration_Field @@ -82,8 +83,8 @@ subroutine noahmp401_getrunoffs_hymap2(n) call LIS_verify(status,'ESMF_FieldGet failed for Subsurface Runoff') do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) !units? - runoff1(t) = NOAHMP401_struc(n)%noahmp401(t)%runsf - runoff2(t) = NOAHMP401_struc(n)%noahmp401(t)%runsb + runoff1(t) = NoahMPnew_struc(n)%noahmpnew(t)%runsf + runoff2(t) = NoahMPnew_struc(n)%noahmpnew(t)%runsb enddo runoff1_t = LIS_rc%udef @@ -108,17 +109,17 @@ subroutine noahmp401_getrunoffs_hymap2(n) call ESMF_StateGet(LIS_runoff_state(n),"Total Evapotranspiration",& evapotranspiration_Field, rc=status) - call LIS_verify(status, "noahmp401_getrunoffs_hymap2: ESMF_StateGet failed for Total Evapotranspiration") + call LIS_verify(status, "noahmpnew_getrunoffs_hymap2: ESMF_StateGet failed for Total Evapotranspiration") call ESMF_FieldGet(evapotranspiration_Field,localDE=0,& farrayPtr=evapotranspiration,rc=status) - call LIS_verify(status, "noahmp401_getrunoffs_hymap2: ESMF_FieldGet failed for Total Evapotranspiration") + call LIS_verify(status, "noahmpnew_getrunoffs_hymap2: ESMF_FieldGet failed for Total Evapotranspiration") do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) evapotranspiration1(t) = & - NOAHMP401_struc(n)%noahmp401(t)%ecan + & - NOAHMP401_struc(n)%noahmp401(t)%etran + & - NOAHMP401_struc(n)%noahmp401(t)%edir + NoahMPnew_struc(n)%noahmpnew(t)%ecan + & + NoahMPnew_struc(n)%noahmpnew(t)%etran + & + NoahMPnew_struc(n)%noahmpnew(t)%edir enddo call LIS_patch2tile(n,1,evapotranspiration1_t, evapotranspiration1) @@ -129,4 +130,4 @@ subroutine noahmp401_getrunoffs_hymap2(n) deallocate(evapotranspiration1_t) endif -end subroutine noahmp401_getrunoffs_hymap2 +end subroutine noahmpnew_getrunoffs_hymap2 diff --git a/lis/surfacemodels/land/noahmp.new/routing/noahmp401_getrunoffs_mm.F90 b/lis/surfacemodels/land/noahmp.new/routing/noahmpnew_getrunoffs_mm.F90 similarity index 82% rename from lis/surfacemodels/land/noahmp.new/routing/noahmp401_getrunoffs_mm.F90 rename to lis/surfacemodels/land/noahmp.new/routing/noahmpnew_getrunoffs_mm.F90 index 56e68d3d4..333b43521 100644 --- a/lis/surfacemodels/land/noahmp.new/routing/noahmp401_getrunoffs_mm.F90 +++ b/lis/surfacemodels/land/noahmp.new/routing/noahmpnew_getrunoffs_mm.F90 @@ -8,22 +8,23 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_getrunoffs_mm -! \label{noahmp401_getrunoffs_mm} +! !ROUTINE: noahmpnew_getrunoffs_mm +! \label{noahmpnew_getrunoffs_mm} ! ! !REVISION HISTORY: ! 6 May 2011: Sujay Kumar; Initial Specification ! 26 Feb 2019: David Mocko, added Noah-MP-4.0.1 routing into LIS-7 +! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmp401_getrunoffs_mm(n) +subroutine noahmpnew_getrunoffs_mm(n) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc, LIS_masterproc use LIS_routingMod, only : LIS_runoff_state use LIS_logMod, only : LIS_verify use LIS_historyMod - use noahmp401_lsmMod, only : noahmp401_struc + use noahmpnew_lsmMod, only : noahmpnew_struc implicit none ! !ARGUMENTS: @@ -38,12 +39,12 @@ subroutine noahmp401_getrunoffs_mm(n) type(ESMF_Field) :: baseflow_field real, pointer :: sfrunoff(:) real, pointer :: baseflow(:) - real, allocatable :: gvar1(:) - real, allocatable :: gvar2(:) - real, allocatable :: runoff1(:) - real, allocatable :: runoff2(:) - real, allocatable :: runoff1_t(:) - real, allocatable :: runoff2_t(:) + real, allocatable :: gvar1(:) + real, allocatable :: gvar2(:) + real, allocatable :: runoff1(:) + real, allocatable :: runoff2(:) + real, allocatable :: runoff1_t(:) + real, allocatable :: runoff2_t(:) integer :: t integer :: c,r integer :: status @@ -89,8 +90,8 @@ subroutine noahmp401_getrunoffs_mm(n) endif do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) - runoff1(t) = NOAHMP401_struc(n)%noahmp401(t)%runsf - runoff2(t) = NOAHMP401_struc(n)%noahmp401(t)%runsb + runoff1(t) = NoahMPnew_struc(n)%noahmpnew(t)%runsf + runoff2(t) = NoahMPnew_struc(n)%noahmpnew(t)%runsb enddo call LIS_patch2tile(n,1,runoff1_t, runoff1) @@ -124,15 +125,15 @@ subroutine noahmp401_getrunoffs_mm(n) if(LIS_masterproc) then call ESMF_StateGet(LIS_runoff_state(n),"Total Evapotranspiration",evapotranspiration_Field, rc=status) - call LIS_verify(status, "noahmp401_getrunoffs_mm: ESMF_StateGet failed for Total Evapotranspiration") + call LIS_verify(status, "noahmpnew_getrunoffs_mm: ESMF_StateGet failed for Total Evapotranspiration") call ESMF_FieldGet(evapotranspiration_Field,localDE=0,farrayPtr=evapotranspiration,rc=status) - call LIS_verify(status, "noahmp401_getrunoffs_mm: ESMF_FieldGet failed for Total Evapotranspiration") + call LIS_verify(status, "noahmpnew_getrunoffs_mm: ESMF_FieldGet failed for Total Evapotranspiration") endif do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) - evapotranspiration1(t) = NOAHMP401_struc(n)%noahmp401(t)%ecan + NOAHMP401_struc(n)%noahmp401(t)%etran + NOAHMP401_struc(n)%noahmp401(t)%edir + evapotranspiration1(t) = NoahMPnew_struc(n)%noahmpnew(t)%ecan + NoahMPnew_struc(n)%noahmpnew(t)%etran + NoahMPnew_struc(n)%noahmpnew(t)%edir enddo call LIS_patch2tile(n,1,evapotranspiration1_t, evapotranspiration1) @@ -148,4 +149,4 @@ subroutine noahmp401_getrunoffs_mm(n) deallocate(evapotranspiration1_t) endif -end subroutine noahmp401_getrunoffs_mm +end subroutine noahmpnew_getrunoffs_mm diff --git a/lis/surfacemodels/land/noahmp.new/routing/noahmp401_getrunoffs_rapid.F90 b/lis/surfacemodels/land/noahmp.new/routing/noahmpnew_getrunoffs_rapid.F90 similarity index 80% rename from lis/surfacemodels/land/noahmp.new/routing/noahmp401_getrunoffs_rapid.F90 rename to lis/surfacemodels/land/noahmp.new/routing/noahmpnew_getrunoffs_rapid.F90 index 01d8769aa..d304e4544 100644 --- a/lis/surfacemodels/land/noahmp.new/routing/noahmp401_getrunoffs_rapid.F90 +++ b/lis/surfacemodels/land/noahmp.new/routing/noahmpnew_getrunoffs_rapid.F90 @@ -8,21 +8,22 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_getrunoffs_rapid -! \label{noahmp401_getrunoffs_rapid} +! !ROUTINE: noahmpnew_getrunoffs_rapid +! \label{noahmpnew_getrunoffs_rapid} ! ! !REVISION HISTORY: ! 17 Mar 2021: Yeosang Yoon; Initial Specification +! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmp401_getrunoffs_rapid(n) +subroutine noahmpnew_getrunoffs_rapid(n) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc, LIS_masterproc use LIS_routingMod, only : LIS_runoff_state use LIS_logMod use LIS_historyMod - use noahmp401_lsmMod, only : noahmp401_struc + use noahmpnew_lsmMod, only : noahmpnew_struc implicit none ! !ARGUMENTS: @@ -40,10 +41,10 @@ subroutine noahmp401_getrunoffs_rapid(n) integer :: t integer :: c,r integer :: status - real, allocatable :: runoff1(:) - real, allocatable :: runoff2(:) - real, allocatable :: runoff1_t(:) - real, allocatable :: runoff2_t(:) + real, allocatable :: runoff1(:) + real, allocatable :: runoff2(:) + real, allocatable :: runoff1_t(:) + real, allocatable :: runoff2_t(:) allocate(runoff1(LIS_rc%npatch(n,LIS_rc%lsm_index))) allocate(runoff2(LIS_rc%npatch(n,LIS_rc%lsm_index))) @@ -68,8 +69,8 @@ subroutine noahmp401_getrunoffs_rapid(n) call LIS_verify(status,'ESMF_FieldGet failed for Subsurface Runoff') do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) !units? - runoff1(t) = NOAHMP401_struc(n)%noahmp401(t)%runsf - runoff2(t) = NOAHMP401_struc(n)%noahmp401(t)%runsb + runoff1(t) = NoahMPnew_struc(n)%noahmpnew(t)%runsf + runoff2(t) = NoahMPnew_struc(n)%noahmpnew(t)%runsb enddo runoff1_t = LIS_rc%udef @@ -86,4 +87,4 @@ subroutine noahmp401_getrunoffs_rapid(n) deallocate(runoff1_t) deallocate(runoff2_t) -end subroutine noahmp401_getrunoffs_rapid +end subroutine noahmpnew_getrunoffs_rapid diff --git a/lis/surfacemodels/land/noahmp.new/routing/noahmp401_getsws_hymap2.F90 b/lis/surfacemodels/land/noahmp.new/routing/noahmpnew_getsws_hymap2.F90 similarity index 83% rename from lis/surfacemodels/land/noahmp.new/routing/noahmp401_getsws_hymap2.F90 rename to lis/surfacemodels/land/noahmp.new/routing/noahmpnew_getsws_hymap2.F90 index 1c04b9186..882274cdd 100644 --- a/lis/surfacemodels/land/noahmp.new/routing/noahmp401_getsws_hymap2.F90 +++ b/lis/surfacemodels/land/noahmp.new/routing/noahmpnew_getsws_hymap2.F90 @@ -8,21 +8,22 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmp401_getsws_hymap2 -! \label{noahmp401_getsws_hymap2} +! !ROUTINE: noahmpnew_getsws_hymap2 +! \label{noahmpnew_getsws_hymap2} ! ! !REVISION HISTORY: ! 12 Sep 2019: Augusto Getirana; implementation of two-way coupling +! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmp401_getsws_hymap2(n) +subroutine noahmpnew_getsws_hymap2(n) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc, LIS_masterproc use LIS_routingMod, only : LIS_runoff_state use LIS_logMod use LIS_historyMod - use noahmp401_lsmMod, only : noahmp401_struc + use noahmpnew_lsmMod, only : noahmpnew_struc implicit none ! !ARGUMENTS: @@ -56,7 +57,7 @@ subroutine noahmp401_getsws_hymap2(n) call ESMF_FieldGet(rivsto_field,localDE=0,farrayPtr=rivstotmp,rc=status) call LIS_verify(status,'ESMF_FieldGet failed for River Storage') where(rivstotmp/=LIS_rc%udef) & - NOAHMP401_struc(n)%noahmp401(:)%rivsto=rivstotmp/NOAHMP401_struc(n)%ts + NoahMPnew_struc(n)%noahmpnew(:)%rivsto=rivstotmp/NoahMPnew_struc(n)%ts ! Flood Storage call ESMF_StateGet(LIS_runoff_state(n),"Flood Storage",fldsto_field,rc=status) @@ -65,7 +66,7 @@ subroutine noahmp401_getsws_hymap2(n) call ESMF_FieldGet(fldsto_field,localDE=0,farrayPtr=fldstotmp,rc=status) call LIS_verify(status,'ESMF_FieldGet failed for Flood Storage') where(fldstotmp/=LIS_rc%udef)& - NOAHMP401_struc(n)%noahmp401(:)%fldsto=fldstotmp/NOAHMP401_struc(n)%ts + NoahMPnew_struc(n)%noahmpnew(:)%fldsto=fldstotmp/NoahMPnew_struc(n)%ts ! Flooded Fraction Flag call ESMF_StateGet(LIS_runoff_state(n),"Flooded Fraction",fldfrc_field,rc=status) @@ -73,6 +74,6 @@ subroutine noahmp401_getsws_hymap2(n) call ESMF_FieldGet(fldfrc_field,localDE=0,farrayPtr=fldfrctmp,rc=status) call LIS_verify(status,'ESMF_FieldGet failed for Flooded Fraction') - NOAHMP401_struc(n)%noahmp401(:)%fldfrc=fldfrctmp + NoahMPnew_struc(n)%noahmpnew(:)%fldfrc=fldfrctmp endif -end subroutine noahmp401_getsws_hymap2 +end subroutine noahmpnew_getsws_hymap2 From 686e8d24c53c1ce8ae319b02712d1aac0277a6f0 Mon Sep 17 00:00:00 2001 From: cenlinhe Date: Tue, 25 Jul 2023 13:33:24 -0600 Subject: [PATCH 08/27] formating change --- lis/surfacemodels/land/noahmp.new/NoahMPnew_setup.F90 | 6 +++--- lis/surfacemodels/land/noahmp.new/phys/noahmp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_setup.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_setup.F90 index f577bb871..62727192e 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_setup.F90 +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_setup.F90 @@ -357,10 +357,10 @@ subroutine NoahMPnew_setup() VEGTYP = NoahMPnew_struc(n)%noahmpnew(t)%vegetype SLOPETYP = 1 ! set underground runoff slope term SOILCOLOR = 4 ! soil color: assuming a middle color category ????????? - ! if (NoahMPnew_struc(n)%crop_opt > 0 .and. VEGTYP == NoahmpIO%ISCROP_TABLE) & - ! CROPTYPE = NoahmpIO%DEFAULT_CROP_TABLE CROPTYPE = 0 - CALL TRANSFER_MP_PARAMETERS(VEGTYP,SOILTYP,SLOPETYP,SOILCOLOR,CROPTYPE,NoahmpIO,& + if (NoahMPnew_struc(n)%crop_opt > 0 .and. VEGTYP == NoahmpIO%ISCROP_TABLE) & + CROPTYPE = NoahmpIO%DEFAULT_CROP_TABLE + call TRANSFER_MP_PARAMETERS(VEGTYP,SOILTYP,SLOPETYP,SOILCOLOR,CROPTYPE,NoahmpIO,& NoahMPnew_struc(n)%noahmpnew(t)%param) enddo diff --git a/lis/surfacemodels/land/noahmp.new/phys/noahmp b/lis/surfacemodels/land/noahmp.new/phys/noahmp index 186c61ee6..9a6d21b5b 160000 --- a/lis/surfacemodels/land/noahmp.new/phys/noahmp +++ b/lis/surfacemodels/land/noahmp.new/phys/noahmp @@ -1 +1 @@ -Subproject commit 186c61ee62cb0e7a929c3bf9d36f562c5bce3c0c +Subproject commit 9a6d21b5bf2991bcd6cbc389c6f77075a3051d41 From 3f660174afbfecdf40b60e9c32695f02393d5b04 Mon Sep 17 00:00:00 2001 From: cenlinhe Date: Tue, 25 Jul 2023 23:25:14 -0600 Subject: [PATCH 09/27] bug fix for compilation error --- .../land/noahmp.new/NoahMPnew_main.F90 | 26 +++++++++--------- .../land/noahmp.new/NoahMPnew_setup.F90 | 27 +++++++++---------- .../NoahMPnew_snowphys_updateMod.F90 | 1 + .../land/noahmp.new/NoahMPnew_writerst.F90 | 6 ++--- .../noahmpnew_getirrigationstates.F90 | 15 +++++------ .../land/noahmp.new/noahmp_driver_new.F90 | 3 +-- lis/surfacemodels/land/noahmp.new/phys/noahmp | 2 +- 7 files changed, 39 insertions(+), 41 deletions(-) diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_main.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_main.F90 index 347729159..24cc2c31e 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_main.F90 +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_main.F90 @@ -205,8 +205,8 @@ subroutine NoahMPnew_main(n) endif ! get parameters - NoahmpIO%latitude = lat - NoahmpIO%longitude = lon + NoahmpIO%xlat(1,1) = lat + NoahmpIO%xlon(1,1) = lon NoahmpIO%year = LIS_rc%yr NoahmpIO%month = LIS_rc%mo NoahmpIO%day = LIS_rc%da @@ -304,9 +304,9 @@ subroutine NoahMPnew_main(n) ! for tile drainage if (NoahmpIO%IOPT_TDRN > 0) then - NoahmpIO%tdfract(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%tdfract + NoahmpIO%TD_FRACTION(1,1)= NoahMPnew_struc(n)%noahmpnew(t)%tdfract NoahmpIO%qtdrain(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%qtdrain - NoahmpIO%qtdrainflx(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%qtdrainflx + NoahmpIO%qtiledrain(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%qtdrainflx endif ! for MMF groundwater @@ -434,7 +434,7 @@ subroutine NoahMPnew_main(n) startgw = NoahmpIO%waxy(1,1) ! call model physics - call noahmp_driver_new(n, NoahmpIO, NoahMPnew_struc(n)%noahmpnew(t)%param) + call noahmp_driver_new(n, NoahMPnew_struc(n)%noahmpnew(t)%param) ! save state variables from NoahmpIO 1-D variables to global variables NoahMPnew_struc(n)%noahmpnew(t)%sfcrunoff = NoahmpIO%sfcrunoff(1,1) @@ -576,7 +576,7 @@ subroutine NoahMPnew_main(n) ! for tile drainage if (NoahmpIO%IOPT_TDRN > 0) then NoahMPnew_struc(n)%noahmpnew(t)%qtdrain = NoahmpIO%qtdrain(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%qtdrainflx = NoahmpIO%qtdrainflx(1,1) + NoahMPnew_struc(n)%noahmpnew(t)%qtdrainflx = NoahmpIO%qtiledrain(1,1) endif ! for MMF groundwater @@ -902,12 +902,12 @@ subroutine NoahMPnew_main(n) vlevel=1, unit="umol m-2 s-1", direction="IN", surface_type = LIS_rc%lsm_index) ![ 62] output variable: sav (unit=W/m2 ). *** solar radiation absorbed by vegetation - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SAV, value = NoahMPnew_struc(n)%noahmpnew(t)%sav, & - vlevel=1, unit="W/m2 ", direction="IN", surface_type = LIS_rc%lsm_index) + !call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SAV, value = NoahMPnew_struc(n)%noahmpnew(t)%sav, & + ! vlevel=1, unit="W/m2 ", direction="IN", surface_type = LIS_rc%lsm_index) ![ 63] output variable: sag (unit=W/m2 ). *** solar radiation absorbed by ground - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SAQ, value = NoahMPnew_struc(n)%noahmpnew(t)%sag, & - vlevel=1, unit="W/m2 ", direction="IN", surface_type = LIS_rc%lsm_index) + !call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SAQ, value = NoahMPnew_struc(n)%noahmpnew(t)%sag, & + ! vlevel=1, unit="W/m2 ", direction="IN", surface_type = LIS_rc%lsm_index) ![ 64] output variable: rssun (unit=s/m). *** sunlit leaf stomatal resistance call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RSSUN, value = NoahMPnew_struc(n)%noahmpnew(t)%rssun, & @@ -986,8 +986,8 @@ subroutine NoahMPnew_main(n) vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) ![ 83] output variable: evc (unit=W/m2 ). *** canopy evaporation heat [to atm] - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_EVC, value = NoahMPnew_struc(n)%noahmpnew(t)%evc, & - vlevel=1, unit="W/m2 ", direction="UP", surface_type = LIS_rc%lsm_index) + !call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_EVC, value = NoahMPnew_struc(n)%noahmpnew(t)%evc, & + ! vlevel=1, unit="W/m2 ", direction="UP", surface_type = LIS_rc%lsm_index) ![ 84] output variable: chleaf (unit=m/s). *** leaf exchange coefficient call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CHLEAF, value = NoahMPnew_struc(n)%noahmpnew(t)%chleaf, & @@ -1110,7 +1110,7 @@ subroutine NoahMPnew_main(n) ! J.Case (9/11/2014) -- Set relative soil moisture to missing (LIS_rc%udef) ! if the vegetation type is urban class. - if (NoahmpIO%ivgtyp .eq. NoahmpIO%urban_vegtype) then + if (NoahmpIO%ivgtyp(1,1) .eq. NoahmpIO%urban_vegtype(1,1)) then NoahmpIO%relsmc(1,i,1) = LIS_rc%udef endif call LIS_diagnoseSurfaceOutputVar(n,t,LIS_MOC_RELSMC,vlevel=i, & diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_setup.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_setup.F90 index 62727192e..263db2632 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_setup.F90 +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_setup.F90 @@ -360,7 +360,7 @@ subroutine NoahMPnew_setup() CROPTYPE = 0 if (NoahMPnew_struc(n)%crop_opt > 0 .and. VEGTYP == NoahmpIO%ISCROP_TABLE) & CROPTYPE = NoahmpIO%DEFAULT_CROP_TABLE - call TRANSFER_MP_PARAMETERS(VEGTYP,SOILTYP,SLOPETYP,SOILCOLOR,CROPTYPE,NoahmpIO,& + call TRANSFER_MP_PARAMETERS(VEGTYP,SOILTYP,SLOPETYP,SOILCOLOR,CROPTYPE,& NoahMPnew_struc(n)%noahmpnew(t)%param) enddo @@ -515,9 +515,10 @@ subroutine NOAHMPnew_read_MULTILEVEL_param(n, ncvar_name, level, placeholder) end subroutine NOAHMPnew_read_MULTILEVEL_param -SUBROUTINE TRANSFER_MP_PARAMETERS(VEGTYPE,SOILTYPE,SLOPETYPE,SOILCOLOR,CROPTYPE,NoahmpIO,parameters) +SUBROUTINE TRANSFER_MP_PARAMETERS(VEGTYPE,SOILTYPE,SLOPETYPE,SOILCOLOR,CROPTYPE,parameters) use NoahmpIOVarType + use LisNoahmpParamType implicit none @@ -527,10 +528,8 @@ SUBROUTINE TRANSFER_MP_PARAMETERS(VEGTYPE,SOILTYPE,SLOPETYPE,SOILCOLOR,CROPTYPE, INTEGER, INTENT(IN) :: SOILCOLOR INTEGER, INTENT(IN) :: CROPTYPE - type(NoahmpIO_type), intent(in) :: NoahmpIO type(LisNoahmpParam_type), intent(inout) :: parameters - REAL :: FRZK REAL :: FRZFACT INTEGER :: ISOIL @@ -709,7 +708,7 @@ SUBROUTINE TRANSFER_MP_PARAMETERS(VEGTYPE,SOILTYPE,SLOPETYPE,SOILCOLOR,CROPTYPE, parameters%C5_SNOWCOMPACT = NoahmpIO%C5_SNOWCOMPACT_TABLE parameters%DM_SNOWCOMPACT = NoahmpIO%DM_SNOWCOMPACT_TABLE parameters%ETA0_SNOWCOMPACT = NoahmpIO%ETA0_SNOWCOMPACT_TABLE - parameters%NLIQMAXFRAC = NoahmpIO%SNLIQMAXFRAC_TABLE + parameters%SNLIQMAXFRAC = NoahmpIO%SNLIQMAXFRAC_TABLE parameters%SWEMAXGLA = NoahmpIO%SWEMAXGLA_TABLE parameters%WSLMAX = NoahmpIO%WSLMAX_TABLE parameters%ROUS = NoahmpIO%ROUS_TABLE @@ -766,13 +765,13 @@ SUBROUTINE TRANSFER_MP_PARAMETERS(VEGTYPE,SOILTYPE,SLOPETYPE,SOILCOLOR,CROPTYPE, parameters%SMCWLT(isoil) = NoahmpIO%SMCWLT_TABLE (SOILTYPE(isoil)) end do - parameters%BVIC = BVIC_TABLE(SOILTYPE(1)) - parameters%AXAJ = AXAJ_TABLE(SOILTYPE(1)) - parameters%BXAJ = BXAJ_TABLE(SOILTYPE(1)) - parameters%XXAJ = XXAJ_TABLE(SOILTYPE(1)) - parameters%BDVIC = BDVIC_TABLE(SOILTYPE(1)) - parameters%GDVIC = GDVIC_TABLE(SOILTYPE(1)) - parameters%BBVIC = BBVIC_TABLE(SOILTYPE(1)) + parameters%BVIC = NoahmpIO%BVIC_TABLE(SOILTYPE(1)) + parameters%AXAJ = NoahmpIO%AXAJ_TABLE(SOILTYPE(1)) + parameters%BXAJ = NoahmpIO%BXAJ_TABLE(SOILTYPE(1)) + parameters%XXAJ = NoahmpIO%XXAJ_TABLE(SOILTYPE(1)) + parameters%BDVIC = NoahmpIO%BDVIC_TABLE(SOILTYPE(1)) + parameters%GDVIC = NoahmpIO%GDVIC_TABLE(SOILTYPE(1)) + parameters%BBVIC = NoahmpIO%BBVIC_TABLE(SOILTYPE(1)) ! ---------------------------------------------------------------------- ! Transfer GENPARM parameters @@ -782,7 +781,7 @@ SUBROUTINE TRANSFER_MP_PARAMETERS(VEGTYPE,SOILTYPE,SLOPETYPE,SOILCOLOR,CROPTYPE, parameters%CZIL = NoahmpIO%CZIL_TABLE parameters%REFDK = NoahmpIO%REFDK_TABLE parameters%REFKDT = NoahmpIO%REFKDT_TABLE - FRZK = NoahmpIO%FRZK_TABLE + parameters%FRZK = NoahmpIO%FRZK_TABLE parameters%KDT = parameters%REFKDT * parameters%DKSAT(1) / parameters%REFDK parameters%SLOPE = NoahmpIO%SLOPE_TABLE(SLOPETYPE) @@ -797,7 +796,7 @@ SUBROUTINE TRANSFER_MP_PARAMETERS(VEGTYPE,SOILTYPE,SLOPETYPE,SOILCOLOR,CROPTYPE, ! adjust FRZK parameter to actual soil type: FRZK * FRZFACT IF(SOILTYPE(1) /= 14) then FRZFACT = (parameters%SMCMAX(1) / parameters%SMCREF(1)) * (0.412 / 0.468) - parameters%FRZX = FRZK * FRZFACT + parameters%FRZX = parameters%FRZK * FRZFACT END IF parameters%mxsnalb = 0.84 diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_snowphys_updateMod.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_snowphys_updateMod.F90 index e52b3d08e..acbc4d939 100755 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_snowphys_updateMod.F90 +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_snowphys_updateMod.F90 @@ -339,6 +339,7 @@ subroutine Divide (parameters,NSNOW ,NSOIL , & !in INTEGER :: J !indices INTEGER :: MSNO !number of layer (top) to MSNO (bot) REAL :: DRR !thickness of the combined [m] + real, parameter :: TFRZ = 273.16 !freezing/melting point (k) REAL, DIMENSION( 1:NSNOW) :: DZ !snow layer thickness [m] REAL, DIMENSION( 1:NSNOW) :: SWICE !partial volume of ice [m3/m3] REAL, DIMENSION( 1:NSNOW) :: SWLIQ !partial volume of liquid water [m3/m3] diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_writerst.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_writerst.F90 index 9127318fa..deffc6075 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_writerst.F90 +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_writerst.F90 @@ -619,17 +619,17 @@ subroutine NoahMPnew_dump_restart(n, ftn, wformat) !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max call LIS_writeHeader_restart(ftn, n, dimID, irnumsi_ID, "IRNUMSI", & "sprinkler irrigation count", & - "-", vlevels=1, valid_min=-99999, valid_max=99999) + "-", vlevels=1, valid_min=-99999.0, valid_max=99999.0) ! write the header for state variable irnummi !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max call LIS_writeHeader_restart(ftn, n, dimID, irnummi_ID, "IRNUMMI", & "micro irrigation count", & - "-", vlevels=1, valid_min=-99999, valid_max=99999) + "-", vlevels=1, valid_min=-99999.0, valid_max=99999.0) ! write the header for state variable irnumfi !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max call LIS_writeHeader_restart(ftn, n, dimID, irnumfi_ID, "IRNUMFI", & "flood irrigation count", & - "-", vlevels=1, valid_min=-99999, valid_max=99999) + "-", vlevels=1, valid_min=-99999.0, valid_max=99999.0) ! write the header for state variable irwatsi !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max call LIS_writeHeader_restart(ftn, n, dimID, irwatsi_ID, "IRWATSI", & diff --git a/lis/surfacemodels/land/noahmp.new/irrigation/noahmpnew_getirrigationstates.F90 b/lis/surfacemodels/land/noahmp.new/irrigation/noahmpnew_getirrigationstates.F90 index 57fc968fc..7891dfc28 100755 --- a/lis/surfacemodels/land/noahmp.new/irrigation/noahmpnew_getirrigationstates.F90 +++ b/lis/surfacemodels/land/noahmp.new/irrigation/noahmpnew_getirrigationstates.F90 @@ -15,14 +15,13 @@ ! \label{noahmpnew_getirrigationstates} ! ! !INTERFACE: -subroutine noahmpnew_getirrigationstates(n,irrigState,NoahmpIO) +subroutine noahmpnew_getirrigationstates(n,irrigState) ! !USES: use ESMF use LIS_coreMod use LIS_logMod use NoahMPnew_lsmMod use LIS_vegDataMod, only: LIS_read_shdmin, LIS_read_shdmax - !use NoahmpIOVarType ! !DESCRIPTION: ! @@ -87,8 +86,6 @@ subroutine noahmpnew_getirrigationstates(n,irrigState,NoahmpIO) type(ESMF_State) :: irrigState type(ESMF_Field) :: irrigRateField,irrigFracField type(ESMF_Field) :: irrigRootDepthField,irrigScaleField - type(NoahmpIO_type) , intent(in) :: NoahmpIO - real, pointer :: irrigRate(:), irrigFrac(:) real, pointer :: irrigRootDepth(:), irrigScale(:) @@ -246,9 +243,9 @@ subroutine noahmpnew_getirrigationstates(n,irrigState,NoahmpIO) zdpth(3) = sldpth(1) + sldpth(2) + sldpth(3) zdpth(4) = sldpth(1) + sldpth(2) + sldpth(3) + sldpth(4) - smcmax = NoahmpNew_struc(n)%noahmpnew(t)%param%SMCMAX(1) !NoahmpIO%SMCMAX_TABLE(soiltyp) - smcref = NoahmpNew_struc(n)%noahmpnew(t)%param%SMCREF(1) !NoahmpIO%SMCREF_TABLE(soiltyp) - smcwlt = NoahmpNew_struc(n)%noahmpnew(t)%param%SMCWLT(1) !NoahmpIO%SMCWLT_TABLE(soiltyp) + smcmax = NoahmpNew_struc(n)%noahmpnew(t)%param%SMCMAX(1) !SMCMAX_TABLE(soiltyp) + smcref = NoahmpNew_struc(n)%noahmpnew(t)%param%SMCREF(1) !SMCREF_TABLE(soiltyp) + smcwlt = NoahmpNew_struc(n)%noahmpnew(t)%param%SMCWLT(1) !SMCWLT_TABLE(soiltyp) ! sfctemp = NoahmpNew_struc(n)%noahmpnew(t)%sfctmp tempcheck = 273.16 + 2.5 @@ -264,7 +261,9 @@ subroutine noahmpnew_getirrigationstates(n,irrigState,NoahmpIO) ltime = real(lhr)+real(LIS_rc%mn)/60.0+real(LIS_rc%ss)/3600.0 - if((DVEG == 2 .OR. DVEG == 5 .OR. DVEG == 6) .AND. LIS_rc%irrigation_dveg == 1) then + if((NoahmpNew_struc(n)%dveg_opt == 2 .OR. & + NoahmpNew_struc(n)%dveg_opt == 5 .OR. & + NoahmpNew_struc(n)%dveg_opt == 6) .AND. LIS_rc%irrigation_dveg == 1) then shdfac = shdfac_avg else diff --git a/lis/surfacemodels/land/noahmp.new/noahmp_driver_new.F90 b/lis/surfacemodels/land/noahmp.new/noahmp_driver_new.F90 index 80c3c3c6e..3026b03df 100644 --- a/lis/surfacemodels/land/noahmp.new/noahmp_driver_new.F90 +++ b/lis/surfacemodels/land/noahmp.new/noahmp_driver_new.F90 @@ -13,7 +13,7 @@ #undef LIS_NoahMP_TEST ! !INTERFACE -subroutine noahmp_driver_new(n, NoahmpIO, LISparam) +subroutine noahmp_driver_new(n, LISparam) use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_logunit, LIS_endrun @@ -24,7 +24,6 @@ subroutine noahmp_driver_new(n, NoahmpIO, LISparam) implicit none integer, intent(in) :: n ! nest id - type(NoahmpIO_type), intent(inout) :: NoahmpIO ! noahmp IO data type type(LisNoahmpParam_type), intent(in) :: LISparam ! lis/noahmp parameter !-------------------------------------------------------------------------------- diff --git a/lis/surfacemodels/land/noahmp.new/phys/noahmp b/lis/surfacemodels/land/noahmp.new/phys/noahmp index 9a6d21b5b..8e88d302e 160000 --- a/lis/surfacemodels/land/noahmp.new/phys/noahmp +++ b/lis/surfacemodels/land/noahmp.new/phys/noahmp @@ -1 +1 @@ -Subproject commit 9a6d21b5bf2991bcd6cbc389c6f77075a3051d41 +Subproject commit 8e88d302ecbcc1c0f3a44a5da51776e2f9c52bd9 From 9a10d759a0e443b2234328e0ae3767fc3fd2054c Mon Sep 17 00:00:00 2001 From: cenlinhe Date: Wed, 26 Jul 2023 22:19:47 -0600 Subject: [PATCH 10/27] bug fix --- lis/surfacemodels/land/noahmp.new/NoahMPnew_main.F90 | 9 +++++---- lis/surfacemodels/land/noahmp.new/NoahMPnew_writerst.F90 | 5 +++-- lis/surfacemodels/land/noahmp.new/phys/noahmp | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_main.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_main.F90 index 24cc2c31e..a858a7dc9 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_main.F90 +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_main.F90 @@ -634,10 +634,11 @@ subroutine NoahMPnew_main(n) call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_ALBEDO, value = NoahMPnew_struc(n)%noahmpnew(t)%albedo, & vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) - if (NoahmpIO%albedo(1,1) .ne. LIS_rc%udef) NoahmpIO%albedo(1,1) = NoahmpIO%albedo(1,1) * 100.0 + !if (NoahMPnew_struc(n)%noahmpnew(t)%albedo .ne. LIS_rc%udef) & + ! NoahMPnew_struc(n)%noahmpnew(t)%albedo = NoahMPnew_struc(n)%noahmpnew(t)%albedo * 100.0 - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_ALBEDO, value = NoahmpIO%albedo(1,1), & - vlevel=1, unit="%", direction="-", surface_type = LIS_rc%lsm_index) + !call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_ALBEDO, value = NoahMPnew_struc(n)%noahmpnew(t)%albedo, & + ! vlevel=1, unit="%", direction="-", surface_type = LIS_rc%lsm_index) ![ 6] output variable: snowc (unit=-). *** snow cover fraction call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWCOVER, value = NoahMPnew_struc(n)%noahmpnew(t)%snowc, & @@ -906,7 +907,7 @@ subroutine NoahMPnew_main(n) ! vlevel=1, unit="W/m2 ", direction="IN", surface_type = LIS_rc%lsm_index) ![ 63] output variable: sag (unit=W/m2 ). *** solar radiation absorbed by ground - !call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SAQ, value = NoahMPnew_struc(n)%noahmpnew(t)%sag, & + !call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SAG, value = NoahMPnew_struc(n)%noahmpnew(t)%sag, & ! vlevel=1, unit="W/m2 ", direction="IN", surface_type = LIS_rc%lsm_index) ![ 64] output variable: rssun (unit=s/m). *** sunlit leaf stomatal resistance diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_writerst.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_writerst.F90 index deffc6075..f21f8654a 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_writerst.F90 +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_writerst.F90 @@ -943,6 +943,9 @@ subroutine NoahMPnew_dump_restart(n, ftn, wformat) call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%tauss, & varid=tauss_ID, dim=1, wformat=wformat) + ! for MMF groundwater + if (NoahMPnew_struc(n)%runsub_opt == 5) then + ! equilibrium volumetric soil moisture content do l=1, NoahMPnew_struc(n)%nsoil ! TODO: check loop tmptilen = 0 @@ -953,8 +956,6 @@ subroutine NoahMPnew_dump_restart(n, ftn, wformat) varid=smoiseq_ID, dim=l, wformat=wformat) enddo - ! for MMF groundwater - if (NoahMPnew_struc(n)%runsub_opt == 5) then ! soil moisture content in the layer to the water table when deep call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%smcwtd, & varid=smcwtd_ID, dim=1, wformat=wformat) diff --git a/lis/surfacemodels/land/noahmp.new/phys/noahmp b/lis/surfacemodels/land/noahmp.new/phys/noahmp index 8e88d302e..34d936894 160000 --- a/lis/surfacemodels/land/noahmp.new/phys/noahmp +++ b/lis/surfacemodels/land/noahmp.new/phys/noahmp @@ -1 +1 @@ -Subproject commit 8e88d302ecbcc1c0f3a44a5da51776e2f9c52bd9 +Subproject commit 34d93689479fbbdb54cea8eaed01bd0a7f528732 From 48697eb2e99457719612e901c09dea522cb39a86 Mon Sep 17 00:00:00 2001 From: cenlinhe Date: Wed, 26 Jul 2023 22:54:21 -0600 Subject: [PATCH 11/27] add lis.config example for NoahMP v5 --- lis/configs/lis.config_noahmp5_NLDAS | 216 +++++++++++++++++++++++++++ 1 file changed, 216 insertions(+) create mode 100644 lis/configs/lis.config_noahmp5_NLDAS diff --git a/lis/configs/lis.config_noahmp5_NLDAS b/lis/configs/lis.config_noahmp5_NLDAS new file mode 100644 index 000000000..69b1fd680 --- /dev/null +++ b/lis/configs/lis.config_noahmp5_NLDAS @@ -0,0 +1,216 @@ +#Overall driver options +Running mode: retrospective +Map projection of the LIS domain: latlon +Number of nests: 1 +Number of surface model types: 1 +Surface model types: LSM +Surface model output interval: 1hr +Land surface model: "Noah-MP.New" +Number of met forcing sources: 1 +Blending method for forcings: overlay +Met forcing sources: "NLDAS2" +Topographic correction method (met forcing): "none" +Enable spatial downscaling of precipitation: 0 +Spatial upscaling method (met forcing): "average" +Spatial interpolation method (met forcing): "neighbor" +Temporal interpolation method (met forcing): "linear" + +#Runtime options +Forcing variables list file: ./input/forcing_variables.txt +Output forcing: 0 #1-yes +Output parameters: 0 #0- no +Output methodology: "2d gridspace" +Output model restart files: 1 +Output data format: "netcdf" +Output naming style: "3 level hierarchy" +Start mode: coldstart +Starting year: 2010 +Starting month: 1 +Starting day: 1 # 30 +Starting hour: 0 +Starting minute: 0 +Starting second: 0 +Ending year: 2010 +Ending month: 1 +Ending day: 5 +Ending hour: 0 +Ending minute: 0 +Ending second: 0 +Undefined value: -9999 +Output directory: './OUTPUT' +Diagnostic output file: './logfiles/lislog' +Number of ensembles per tile: 1 + +#The following options are used for subgrid tiling based on vegetation +Maximum number of surface type tiles per grid: 1 +Minimum cutoff percentage (surface type tiles): 0.05 +Maximum number of soil texture tiles per grid: 1 +Minimum cutoff percentage (soil texture tiles): 0.05 +Maximum number of soil fraction tiles per grid: 1 +Minimum cutoff percentage (soil fraction tiles): 0.05 +Maximum number of elevation bands per grid: 1 +Minimum cutoff percentage (elevation bands): 0.05 +Maximum number of slope bands per grid: 1 +Minimum cutoff percentage (slope bands): 0.05 +Maximum number of aspect bands per grid: 1 +Minimum cutoff percentage (aspect bands): 0.05 + +#Processor Layout +#Should match the total number of processors used + +Number of processors along x: 18 +Number of processors along y: 16 +Decompose by processes: .true. +Halo size along x: 0 +Halo size along y: 0 + +#------------------------ ROUTING ------------------------------------- + +Routing model: "none" + +#------------------------RADIATIVE TRANSFER MODELS-------------------------- + +Radiative transfer model: none + +#------------------------APPLICATION MODELS--------------------------------- + +Number of application models: 0 + +#---------------------DATA ASSIMILATION ---------------------------------- +#Data Assimilation Options + +Number of data assimilation instances: 0 +Data assimilation algorithm: "none" +Data assimilation set: "none" +# Number of state variables: 2 +Data assimilation exclude analysis increments: 0 +Data assimilation output interval for diagnostics: "1da" +Data assimilation number of observation types: 0 +Data assimilation output ensemble members: 0 +Data assimilation output processed observations: 0 +Data assimilation output innovations: 0 + +#Bias estimation options +Bias estimation algorithm: none +Bias estimation attributes file: none +Bias estimation restart output frequency: 1da +Bias estimation start mode: none +Bias estimation restart file: none + +#Perturbation options +Perturbations start mode: coldstart +Perturbations restart output interval: 1da +Perturbations restart filename: none +Forcing perturbation algorithm: none +Forcing perturbation frequency: 1hr +Forcing attributes file: none +Forcing perturbation attributes file: none +State perturbation algorithm: none +State perturbation frequency: 1hr +State attributes file: none +State perturbation attributes file: none +Observation perturbation algorithm: none +Observation perturbation frequency: 1hr +Observation attributes file: none +Observation perturbation attributes file: none + + +#------------------------DOMAIN SPECIFICATION-------------------------- +#Definition of Running Domain +#Specify the domain extremes in latitude and longitude +#Run domain lower left lat: 25.0625 +#Run domain lower left lon: -124.9375 +#Run domain upper right lat: 52.9375 +#Run domain upper right lon: -67.0625 +#Run domain resolution (dx): 0.125 +#Run domain resolution (dy): 0.125 + +#The following options list the choice of parameter maps to be +#used + +LIS domain and parameter data file: ./input/lis_input.d01.nc +Landmask data source: "LDT" +Landcover data source: "LDT" +Soil texture data source: "LDT" +Soil fraction data source: "none" +Soil color data source: "none" +Elevation data source: "LDT" +Slope data source: "none" +Aspect data source: "none" +Curvature data source: "none" +LAI data source: "none" +SAI data source: "none" +Albedo data source: "LDT" +Max snow albedo data source: "LDT" +Greenness data source: "LDT" +Roughness data source: "none" +Porosity data source: "none" +Ksat data source: "none" +B parameter data source: "none" +Quartz data source: "none" +Emissivity data source: "none" +TBOT lag skin temperature update option: 0 +TBOT skin temperature lag days: 0 + +#--------------------------------FORCINGS---------------------------------- +NLDAS2 forcing directory: ../testLIS_default/input/forc/ +NLDAS2 data center source: "GES-DISC" +NLDAS2 domain x-dimension size: 464 +NLDAS2 domain y-dimension size: 224 +NLDAS2 use model level data: 0 +NLDAS2 use model based swdown: 0 +NLDAS2 use model based precip: 0 +NLDAS2 use model based pressure: 0 + +#-----------------------LAND SURFACE MODELS-------------------------- +Noah-MP.New model timestep: 30mn +Noah-MP.New soil timestep: 30mn +Noah-MP.New restart output interval: 6hr +Noah-MP.New restart file: none +Noah-MP.New restart file format: netcdf +Noah-MP.New parameter table: ./input/NoahmpTable.TBL +Noah-MP.New number of soil layers: 4 +Noah-MP.New thickness of soil layers: 0.1 0.3 0.6 1.0 +Noah-MP.New dynamic vegetation option: 4 # Up to 9 different options +Noah-MP.New canopy stomatal resistance option: 1 # 1=Ball-Berry; 2=Jarvis +Noah-MP.New soil moisture factor for stomatal resistance: 1 # 1=Noah; 2=CLM; 3=SSiB +Noah-MP.New surface runoff option: 3 # 1=SIMGM; 2=SIMTOP; 3=Schaake96; 4=BATS; 5=Miguez-Macho&Fan; 6=VIC; 7=XinAnJiang; 8=Dynamic VIC +Noah-MP.New subsurface runoff and groundwater option: 3 # 1=SIMGM; 2=SIMTOP; 3=Schaake96; 4=BATS; 5=Miguez-Macho&Fan; 6=VIC; 7=XinAnJiang; 8=Dynamic VIC +Noah-MP.New dynamic VIC infiltration option: 1 # 1=Philip; 2=Green-Ampt; 3=Smith-Parlange (only works with surface runoff=8) +Noah-MP.New surface layer drag coefficient option: 1 # 1=M-O; 2=Chen97 +Noah-MP.New supercooled liquid water option: 1 # 1=NY06; 2=Koren99 +Noah-MP.New frozen soil permeability option: 1 # 1=NY06; 2=Koren99 +Noah-MP.New canopy radiative transfer option: 3 # 1=gap=F(3D;cosz); 2=gap=0; 3=gap=1-Fveg +Noah-MP.New snow surface albedo option: 2 # 1=BATS; 2=CLASS +Noah-MP.New rain-snow partition option: 1 # 1=Jordan91; 2=BATS; 3=Noah; 4=WRF couple; 5=Wet-Bulb +Noah-MP.New snow thermal conductivity option: 1 # 1=Yen1965; 2=Anderson1976; 3=constant; 4=Verseghy1991; 5=Yen1981 +Noah-MP.New lower boundary of soil temperature option: 1 # 1=zero-flux; 2=Noah +Noah-MP.New snow&soil temperature time scheme option: 1 # 1=semi-implicit; 2=fully implicit; 3=FSNO for TS +Noah-MP.New glacier ice option: 1 # 1=include phase change; 2=slab ice (Noah) +Noah-MP.New surface resistance option: 1 # 1=Sakaguchi and Zeng 2009; 2=Sellers (1992); 3=adjusted Sellers; 4=option1 for non-snow and rsurf_snow for snow +Noah-MP.New soil configuration option: 1 # 1=input dominant soil texture; 2=input soil texture varies that varies with depth; 3=soil composition and pedotransfer; 4=input soil properties +Noah-MP.New soil pedotransfer function option: 1 # 1=Saxton and Rawls (2006) (used when soil_opt=3) +Noah-MP.New crop model option: 0 # 0=No crop model; 1=Liu et al. 2016; +Noah-MP.New irrigation trigger option: 0 # 0=No irrigation; 1=Irrigation ON; 2=Trigger by plant/harvest date; 3=Trigger by LAI +Noah-MP.New irrigation method option: 0 # 0=method based on input map; 1=sprinkler; 2=micro/drip; 3=flooding +Noah-MP.New tile drainage option: 0 # 0=No tile drainage; 1=Simple drainage; 2=Hooghoudt's scheme +Noah-MP.New urban physics option: 0 # 0=No; 1=Single-layer; 2=Multi-layer BEP scheme; 3=Multi-layer BEM scheme +Noah-MP.New reference height of temperature and humidity: 10.0 +Noah-MP.New initial surface skin temperature: 273.7 +Noah-MP.New initial snow water equivalent: 0.0 +Noah-MP.New initial snow depth: 0.0 +Noah-MP.New initial total canopy surface water: 0.0 +Noah-MP.New initial soil temperatures: 290.0 290.0 290.0 290.0 +#Noah-MP.New initial soil temperatures: 274.0 274.0 274.0 274.0 #TML: start with low soil temp to permit snow DA +Noah-MP.New initial total soil moistures: 0.20 0.20 0.20 0.20 +Noah-MP.New initial leaf area index: 0.5 +Noah-MP.New initial water table depth: 2.5 +Noah-MP.New initial water in the aquifer: 6900.0 +Noah-MP.New initial water in aquifer and saturated soil: 6900.0 + + +#---------------------------MODEL OUTPUT CONFIGURATION----------------------- +#Specify the list of ALMA variables that need to be featured in the +#LSM model output + +Model output attributes file: './MODEL_OUTPUT_LIST_noahmp5_NLDAS.TBL' From bab3bfb1be42be4eaaf76a0358d875aa140cb59e Mon Sep 17 00:00:00 2001 From: cenlinhe Date: Fri, 28 Jul 2023 11:07:33 -0600 Subject: [PATCH 12/27] bug fix --- lis/surfacemodels/land/noahmp.new/NoahMPnew_setup.F90 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_setup.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_setup.F90 index 263db2632..9182a9e70 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_setup.F90 +++ b/lis/surfacemodels/land/noahmp.new/NoahMPnew_setup.F90 @@ -360,7 +360,7 @@ subroutine NoahMPnew_setup() CROPTYPE = 0 if (NoahMPnew_struc(n)%crop_opt > 0 .and. VEGTYP == NoahmpIO%ISCROP_TABLE) & CROPTYPE = NoahmpIO%DEFAULT_CROP_TABLE - call TRANSFER_MP_PARAMETERS(VEGTYP,SOILTYP,SLOPETYP,SOILCOLOR,CROPTYPE,& + call TRANSFER_MP_PARAMETERS_NEW(VEGTYP,SOILTYP,SLOPETYP,SOILCOLOR,CROPTYPE,& NoahMPnew_struc(n)%noahmpnew(t)%param) enddo @@ -515,7 +515,7 @@ subroutine NOAHMPnew_read_MULTILEVEL_param(n, ncvar_name, level, placeholder) end subroutine NOAHMPnew_read_MULTILEVEL_param -SUBROUTINE TRANSFER_MP_PARAMETERS(VEGTYPE,SOILTYPE,SLOPETYPE,SOILCOLOR,CROPTYPE,parameters) +SUBROUTINE TRANSFER_MP_PARAMETERS_NEW(VEGTYPE,SOILTYPE,SLOPETYPE,SOILCOLOR,CROPTYPE,parameters) use NoahmpIOVarType use LisNoahmpParamType @@ -807,4 +807,4 @@ SUBROUTINE TRANSFER_MP_PARAMETERS(VEGTYPE,SOILTYPE,SLOPETYPE,SOILCOLOR,CROPTYPE, parameters%t_llimit = 0.5 parameters%snowf_scalef = 1.0 - END SUBROUTINE TRANSFER_MP_PARAMETERS + END SUBROUTINE TRANSFER_MP_PARAMETERS_NEW From c79e5c9fa406a15eb31cc11f6947dcc70e1379bd Mon Sep 17 00:00:00 2001 From: cenlinhe Date: Wed, 15 Nov 2023 14:01:06 -0700 Subject: [PATCH 13/27] sync with latest NoahMP v5 code --- lis/surfacemodels/land/noahmp.new/phys/noahmp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lis/surfacemodels/land/noahmp.new/phys/noahmp b/lis/surfacemodels/land/noahmp.new/phys/noahmp index 34d936894..743dba804 160000 --- a/lis/surfacemodels/land/noahmp.new/phys/noahmp +++ b/lis/surfacemodels/land/noahmp.new/phys/noahmp @@ -1 +1 @@ -Subproject commit 34d93689479fbbdb54cea8eaed01bd0a7f528732 +Subproject commit 743dba80467766b1ac531016de9de9f386bae078 From 1f4801f29db0778cfa19639f0200bb55212d7256 Mon Sep 17 00:00:00 2001 From: cenlinhe Date: Fri, 17 Nov 2023 14:30:29 -0700 Subject: [PATCH 14/27] rename NoahMPnew to NoahMP50 --- .gitmodules | 4 +- lis/make/default.cfg | 38 +- lis/plugins/LIS_lsm_pluginMod.F90 | 52 +- lis/plugins/LIS_lsmcpl_pluginMod.F90 | 18 +- lis/plugins/LIS_lsmda_pluginMod.F90 | 944 +++++++++--------- lis/plugins/LIS_lsmirrigation_pluginMod.F90 | 22 +- lis/plugins/LIS_lsmoptue_pluginMod.F90 | 36 +- lis/plugins/LIS_lsmrouting_pluginMod.F90 | 40 +- lis/plugins/LIS_pluginIndices.F90 | 2 +- lis/plugins/LIS_sublsm_pluginMod.F90 | 36 +- .../nuopc_cpl_mode/LIS_NUOPC_DataCopy.F90 | 156 +-- .../NoahMP50_coldstart.F90} | 182 ++-- .../NoahMP50_dynsetup.F90} | 14 +- .../NoahMP50_f2t.F90} | 66 +- .../NoahMP50_finalize.F90} | 46 +- .../NoahMP50_lsmMod.F90} | 210 ++-- .../NoahMP50_main.F90} | 900 ++++++++--------- .../NoahMP50_module.F90} | 10 +- .../NoahMP50_read_OPT_parameters.F90} | 124 +-- .../land/noahmp.5.0/NoahMP50_readcrd.F90 | 621 ++++++++++++ .../NoahMP50_readrst.F90} | 242 ++--- .../NoahMP50_reset.F90} | 28 +- .../NoahMP50_setup.F90} | 158 +-- .../NoahMP50_snowphys_updateMod.F90} | 8 +- .../NoahMP50_writerst.F90} | 254 ++--- .../cpl_wrf_noesmf/noahMP50_setwrfexport.F90} | 42 +- .../cplsubLSM/noahmp50_getCROCUSexport.F90} | 18 +- .../noahmp50_getSnowModelexport.F90} | 18 +- .../cplsubLSM/noahmp50_setCROCUSimport.F90} | 16 +- .../noahmp50_setSnowModelimport.F90} | 28 +- .../da_LAI/noahmp50_daveg_Mod.F90} | 16 +- .../da_LAI/noahmp50_descale_veg.F90} | 10 +- .../da_LAI/noahmp50_getLAIpred.F90} | 14 +- .../da_LAI/noahmp50_getvegvars.F90} | 12 +- .../da_LAI/noahmp50_qc_LAIobs.F90} | 10 +- .../da_LAI/noahmp50_qcveg.F90} | 10 +- .../da_LAI/noahmp50_scale_veg.F90} | 10 +- .../da_LAI/noahmp50_setvegvars.F90} | 18 +- .../da_LAI/noahmp50_updatevegvars.F90} | 10 +- .../da_LAI/noahmp50_veg_DAlog.F90} | 4 +- .../da_LAI/noahmp50_write_veg.F90} | 18 +- .../da_snodep/noahmp50_dasnodep_Mod.F90} | 16 +- .../da_snodep/noahmp50_descale_snodep.F90} | 10 +- .../da_snodep/noahmp50_getsnodeppred.F90} | 14 +- .../da_snodep/noahmp50_getsnodepvars.F90} | 14 +- .../da_snodep/noahmp50_map_snodep.F90} | 34 +- .../da_snodep/noahmp50_qc_snodepobs.F90} | 22 +- .../da_snodep/noahmp50_qcsnodep.F90} | 18 +- .../da_snodep/noahmp50_scale_snodep.F90} | 10 +- .../da_snodep/noahmp50_setsnodepvars.F90} | 20 +- .../da_snodep/noahmp50_snodep_update.F90} | 88 +- .../da_snodep/noahmp50_transform_snodep.F90} | 16 +- .../da_snodep/noahmp50_updatesnodepvars.F90} | 18 +- .../da_snow/noahmp50_dasnow_Mod.F90} | 16 +- .../da_snow/noahmp50_descale_snow.F90} | 10 +- .../da_snow/noahmp50_getsnowpred.F90} | 12 +- .../da_snow/noahmp50_getsnowvars.F90} | 14 +- .../da_snow/noahmp50_getswepred.F90} | 12 +- .../da_snow/noahmp50_qc_snowobs.F90} | 22 +- .../da_snow/noahmp50_qcsnow.F90} | 18 +- .../da_snow/noahmp50_scale_snow.F90} | 10 +- .../da_snow/noahmp50_setsnowvars.F90} | 16 +- .../da_snow/noahmp50_snow_update.F90} | 82 +- .../da_snow/noahmp50_updatesnowvars.F90} | 18 +- .../da_soilm/noahmp50_dasoilm_Mod.F90} | 48 +- .../da_soilm/noahmp50_descale_soilm.F90} | 12 +- .../da_soilm/noahmp50_getsmpred.F90} | 38 +- .../da_soilm/noahmp50_getsoilm.F90} | 36 +- .../da_soilm/noahmp50_qc_soilmobs.F90} | 74 +- .../da_soilm/noahmp50_qcsoilm.F90} | 20 +- .../da_soilm/noahmp50_scale_soilm.F90} | 12 +- .../da_soilm/noahmp50_setsoilm.F90} | 196 ++-- .../da_soilm/noahmp50_updatesoilm.F90} | 42 +- .../da_soilm/noahmp50_write_soilm.F90} | 18 +- .../da_tws/noahmp50_datws_Mod.F90} | 24 +- .../da_tws/noahmp50_descale_tws.F90} | 72 +- .../da_tws/noahmp50_gettws.F90} | 52 +- .../da_tws/noahmp50_gettwspred.F90} | 12 +- .../da_tws/noahmp50_qc_twsobs.F90} | 10 +- .../da_tws/noahmp50_qctws.F90} | 48 +- .../da_tws/noahmp50_scale_tws.F90} | 42 +- .../da_tws/noahmp50_settws.F90} | 144 +-- .../da_tws/noahmp50_tws_DAlogMod.F90} | 60 +- .../da_tws/noahmp50_updatetws.F90} | 58 +- .../da_tws/noahmp50_write_tws.F90} | 20 +- .../da_usafsi/noahmp50_dausafsi_Mod.F90} | 16 +- .../da_usafsi/noahmp50_descale_usafsi.F90} | 10 +- .../da_usafsi/noahmp50_getusafsipred.F90} | 12 +- .../da_usafsi/noahmp50_getusafsivars.F90} | 14 +- .../da_usafsi/noahmp50_map_usafsi.F90} | 34 +- .../da_usafsi/noahmp50_qc_usafsiobs.F90} | 22 +- .../da_usafsi/noahmp50_qcusafsi.F90} | 18 +- .../da_usafsi/noahmp50_scale_usafsi.F90} | 10 +- .../da_usafsi/noahmp50_setusafsivars.F90} | 20 +- .../da_usafsi/noahmp50_transform_usafsi.F90} | 10 +- .../da_usafsi/noahmp50_updateusafsivars.F90} | 18 +- .../da_usafsi/noahmp50_usafsi_update.F90} | 88 +- .../noahmp50_getirrigationstates.F90} | 62 +- .../kwm_date_utilities_50.F90} | 4 +- .../noahmp_driver_50.F90} | 8 +- .../pe/NoahMP50_peMod.F90} | 262 ++--- .../noahmp.5.0/pe/NoahMP50_set_pedecvars.F90 | 524 ++++++++++ .../NoahMP50_getpeobspred_UAsnowobs.F90} | 14 +- .../NoahMP50_setupobspred_UAsnowobs.F90} | 8 +- .../{noahmp.new => noahmp.5.0}/phys/noahmp | 0 .../routing/noahmp50_getrunoffs.F90} | 20 +- .../routing/noahmp50_getrunoffs_hymap2.F90} | 24 +- .../routing/noahmp50_getrunoffs_mm.F90} | 20 +- .../routing/noahmp50_getrunoffs_rapid.F90} | 14 +- .../routing/noahmp50_getsws_hymap2.F90} | 16 +- .../{noahmp.new => noahmp.5.0}/wrf_debug.F90 | 0 .../land/noahmp.new/NoahMPnew_readcrd.F90 | 621 ------------ .../noahmp.new/pe/NoahMPnew_set_pedecvars.F90 | 524 ---------- 113 files changed, 4203 insertions(+), 4203 deletions(-) rename lis/surfacemodels/land/{noahmp.new/NoahMPnew_coldstart.F90 => noahmp.5.0/NoahMP50_coldstart.F90} (51%) rename lis/surfacemodels/land/{noahmp.new/NoahMPnew_dynsetup.F90 => noahmp.5.0/NoahMP50_dynsetup.F90} (90%) rename lis/surfacemodels/land/{noahmp.new/NoahMPnew_f2t.F90 => noahmp.5.0/NoahMP50_f2t.F90} (68%) rename lis/surfacemodels/land/{noahmp.new/NoahMPnew_finalize.F90 => noahmp.5.0/NoahMP50_finalize.F90} (53%) rename lis/surfacemodels/land/{noahmp.new/NoahMPnew_lsmMod.F90 => noahmp.5.0/NoahMP50_lsmMod.F90} (66%) rename lis/surfacemodels/land/{noahmp.new/NoahMPnew_main.F90 => noahmp.5.0/NoahMP50_main.F90} (58%) rename lis/surfacemodels/land/{noahmp.new/NoahMPnew_module.F90 => noahmp.5.0/NoahMP50_module.F90} (99%) rename lis/surfacemodels/land/{noahmp.new/NoahMPnew_read_OPT_parameters.F90 => noahmp.5.0/NoahMP50_read_OPT_parameters.F90} (74%) create mode 100644 lis/surfacemodels/land/noahmp.5.0/NoahMP50_readcrd.F90 rename lis/surfacemodels/land/{noahmp.new/NoahMPnew_readrst.F90 => noahmp.5.0/NoahMP50_readrst.F90} (80%) rename lis/surfacemodels/land/{noahmp.new/NoahMPnew_reset.F90 => noahmp.5.0/NoahMP50_reset.F90} (66%) rename lis/surfacemodels/land/{noahmp.new/NoahMPnew_setup.F90 => noahmp.5.0/NoahMP50_setup.F90} (86%) rename lis/surfacemodels/land/{noahmp.new/NoahMPnew_snowphys_updateMod.F90 => noahmp.5.0/NoahMP50_snowphys_updateMod.F90} (99%) rename lis/surfacemodels/land/{noahmp.new/NoahMPnew_writerst.F90 => noahmp.5.0/NoahMP50_writerst.F90} (82%) rename lis/surfacemodels/land/{noahmp.new/cpl_wrf_noesmf/noahMPnew_setwrfexport.F90 => noahmp.5.0/cpl_wrf_noesmf/noahMP50_setwrfexport.F90} (77%) rename lis/surfacemodels/land/{noahmp.new/cplsubLSM/noahmpnew_getCROCUSexport.F90 => noahmp.5.0/cplsubLSM/noahmp50_getCROCUSexport.F90} (77%) rename lis/surfacemodels/land/{noahmp.new/cplsubLSM/noahmpnew_getSnowModelexport.F90 => noahmp.5.0/cplsubLSM/noahmp50_getSnowModelexport.F90} (78%) rename lis/surfacemodels/land/{noahmp.new/cplsubLSM/noahmpnew_setCROCUSimport.F90 => noahmp.5.0/cplsubLSM/noahmp50_setCROCUSimport.F90} (78%) rename lis/surfacemodels/land/{noahmp.new/cplsubLSM/noahmpnew_setSnowModelimport.F90 => noahmp.5.0/cplsubLSM/noahmp50_setSnowModelimport.F90} (61%) rename lis/surfacemodels/land/{noahmp.new/da_LAI/noahmpnew_daveg_Mod.F90 => noahmp.5.0/da_LAI/noahmp50_daveg_Mod.F90} (78%) rename lis/surfacemodels/land/{noahmp.new/da_LAI/noahmpnew_descale_veg.F90 => noahmp.5.0/da_LAI/noahmp50_descale_veg.F90} (84%) rename lis/surfacemodels/land/{noahmp.new/da_LAI/noahmpnew_getLAIpred.F90 => noahmp.5.0/da_LAI/noahmp50_getLAIpred.F90} (85%) rename lis/surfacemodels/land/{noahmp.new/da_LAI/noahmpnew_getvegvars.F90 => noahmp.5.0/da_LAI/noahmp50_getvegvars.F90} (87%) rename lis/surfacemodels/land/{noahmp.new/da_LAI/noahmpnew_qc_LAIobs.F90 => noahmp.5.0/da_LAI/noahmp50_qc_LAIobs.F90} (89%) rename lis/surfacemodels/land/{noahmp.new/da_LAI/noahmpnew_qcveg.F90 => noahmp.5.0/da_LAI/noahmp50_qcveg.F90} (96%) rename lis/surfacemodels/land/{noahmp.new/da_LAI/noahmpnew_scale_veg.F90 => noahmp.5.0/da_LAI/noahmp50_scale_veg.F90} (85%) rename lis/surfacemodels/land/{noahmp.new/da_LAI/noahmpnew_setvegvars.F90 => noahmp.5.0/da_LAI/noahmp50_setvegvars.F90} (86%) rename lis/surfacemodels/land/{noahmp.new/da_LAI/noahmpnew_updatevegvars.F90 => noahmp.5.0/da_LAI/noahmp50_updatevegvars.F90} (95%) rename lis/surfacemodels/land/{noahmp.new/da_LAI/noahmpnew_veg_DAlog.F90 => noahmp.5.0/da_LAI/noahmp50_veg_DAlog.F90} (89%) rename lis/surfacemodels/land/{noahmp.new/da_LAI/noahmpnew_write_veg.F90 => noahmp.5.0/da_LAI/noahmp50_write_veg.F90} (80%) rename lis/surfacemodels/land/{noahmp.new/da_snodep/noahmpnew_dasnodep_Mod.F90 => noahmp.5.0/da_snodep/noahmp50_dasnodep_Mod.F90} (77%) rename lis/surfacemodels/land/{noahmp.new/da_snodep/noahmpnew_descale_snodep.F90 => noahmp.5.0/da_snodep/noahmp50_descale_snodep.F90} (90%) rename lis/surfacemodels/land/{noahmp.new/da_snodep/noahmpnew_getsnodeppred.F90 => noahmp.5.0/da_snodep/noahmp50_getsnodeppred.F90} (83%) rename lis/surfacemodels/land/{noahmp.new/da_snodep/noahmpnew_getsnodepvars.F90 => noahmp.5.0/da_snodep/noahmp50_getsnodepvars.F90} (86%) rename lis/surfacemodels/land/{noahmp.new/da_snodep/noahmpnew_map_snodep.F90 => noahmp.5.0/da_snodep/noahmp50_map_snodep.F90} (82%) rename lis/surfacemodels/land/{noahmp.new/da_snodep/noahmpnew_qc_snodepobs.F90 => noahmp.5.0/da_snodep/noahmp50_qc_snodepobs.F90} (84%) rename lis/surfacemodels/land/{noahmp.new/da_snodep/noahmpnew_qcsnodep.F90 => noahmp.5.0/da_snodep/noahmp50_qcsnodep.F90} (89%) rename lis/surfacemodels/land/{noahmp.new/da_snodep/noahmpnew_scale_snodep.F90 => noahmp.5.0/da_snodep/noahmp50_scale_snodep.F90} (91%) rename lis/surfacemodels/land/{noahmp.new/da_snodep/noahmpnew_setsnodepvars.F90 => noahmp.5.0/da_snodep/noahmp50_setsnodepvars.F90} (87%) rename lis/surfacemodels/land/{noahmp.new/da_snodep/noahmpnew_snodep_update.F90 => noahmp.5.0/da_snodep/noahmp50_snodep_update.F90} (77%) rename lis/surfacemodels/land/{noahmp.new/da_snodep/noahmpnew_transform_snodep.F90 => noahmp.5.0/da_snodep/noahmp50_transform_snodep.F90} (84%) rename lis/surfacemodels/land/{noahmp.new/da_snodep/noahmpnew_updatesnodepvars.F90 => noahmp.5.0/da_snodep/noahmp50_updatesnodepvars.F90} (91%) rename lis/surfacemodels/land/{noahmp.new/da_snow/noahmpnew_dasnow_Mod.F90 => noahmp.5.0/da_snow/noahmp50_dasnow_Mod.F90} (78%) rename lis/surfacemodels/land/{noahmp.new/da_snow/noahmpnew_descale_snow.F90 => noahmp.5.0/da_snow/noahmp50_descale_snow.F90} (88%) rename lis/surfacemodels/land/{noahmp.new/da_snow/noahmpnew_getsnowpred.F90 => noahmp.5.0/da_snow/noahmp50_getsnowpred.F90} (87%) rename lis/surfacemodels/land/{noahmp.new/da_snow/noahmpnew_getsnowvars.F90 => noahmp.5.0/da_snow/noahmp50_getsnowvars.F90} (87%) rename lis/surfacemodels/land/{noahmp.new/da_snow/noahmpnew_getswepred.F90 => noahmp.5.0/da_snow/noahmp50_getswepred.F90} (83%) rename lis/surfacemodels/land/{noahmp.new/da_snow/noahmpnew_qc_snowobs.F90 => noahmp.5.0/da_snow/noahmp50_qc_snowobs.F90} (85%) rename lis/surfacemodels/land/{noahmp.new/da_snow/noahmpnew_qcsnow.F90 => noahmp.5.0/da_snow/noahmp50_qcsnow.F90} (89%) rename lis/surfacemodels/land/{noahmp.new/da_snow/noahmpnew_scale_snow.F90 => noahmp.5.0/da_snow/noahmp50_scale_snow.F90} (89%) rename lis/surfacemodels/land/{noahmp.new/da_snow/noahmpnew_setsnowvars.F90 => noahmp.5.0/da_snow/noahmp50_setsnowvars.F90} (86%) rename lis/surfacemodels/land/{noahmp.new/da_snow/noahmpnew_snow_update.F90 => noahmp.5.0/da_snow/noahmp50_snow_update.F90} (79%) rename lis/surfacemodels/land/{noahmp.new/da_snow/noahmpnew_updatesnowvars.F90 => noahmp.5.0/da_snow/noahmp50_updatesnowvars.F90} (91%) rename lis/surfacemodels/land/{noahmp.new/da_soilm/noahmpnew_dasoilm_Mod.F90 => noahmp.5.0/da_soilm/noahmp50_dasoilm_Mod.F90} (68%) rename lis/surfacemodels/land/{noahmp.new/da_soilm/noahmpnew_descale_soilm.F90 => noahmp.5.0/da_soilm/noahmp50_descale_soilm.F90} (81%) rename lis/surfacemodels/land/{noahmp.new/da_soilm/noahmpnew_getsmpred.F90 => noahmp.5.0/da_soilm/noahmp50_getsmpred.F90} (68%) rename lis/surfacemodels/land/{noahmp.new/da_soilm/noahmpnew_getsoilm.F90 => noahmp.5.0/da_soilm/noahmp50_getsoilm.F90} (82%) rename lis/surfacemodels/land/{noahmp.new/da_soilm/noahmpnew_qc_soilmobs.F90 => noahmp.5.0/da_soilm/noahmp50_qc_soilmobs.F90} (80%) rename lis/surfacemodels/land/{noahmp.new/da_soilm/noahmpnew_qcsoilm.F90 => noahmp.5.0/da_soilm/noahmp50_qcsoilm.F90} (85%) rename lis/surfacemodels/land/{noahmp.new/da_soilm/noahmpnew_scale_soilm.F90 => noahmp.5.0/da_soilm/noahmp50_scale_soilm.F90} (82%) rename lis/surfacemodels/land/{noahmp.new/da_soilm/noahmpnew_setsoilm.F90 => noahmp.5.0/da_soilm/noahmp50_setsoilm.F90} (67%) rename lis/surfacemodels/land/{noahmp.new/da_soilm/noahmpnew_updatesoilm.F90 => noahmp.5.0/da_soilm/noahmp50_updatesoilm.F90} (70%) rename lis/surfacemodels/land/{noahmp.new/da_soilm/noahmpnew_write_soilm.F90 => noahmp.5.0/da_soilm/noahmp50_write_soilm.F90} (81%) rename lis/surfacemodels/land/{noahmp.new/da_tws/noahmpnew_datws_Mod.F90 => noahmp.5.0/da_tws/noahmp50_datws_Mod.F90} (80%) rename lis/surfacemodels/land/{noahmp.new/da_tws/noahmpnew_descale_tws.F90 => noahmp.5.0/da_tws/noahmp50_descale_tws.F90} (76%) rename lis/surfacemodels/land/{noahmp.new/da_tws/noahmpnew_gettws.F90 => noahmp.5.0/da_tws/noahmp50_gettws.F90} (80%) rename lis/surfacemodels/land/{noahmp.new/da_tws/noahmpnew_gettwspred.F90 => noahmp.5.0/da_tws/noahmp50_gettwspred.F90} (88%) rename lis/surfacemodels/land/{noahmp.new/da_tws/noahmpnew_qc_twsobs.F90 => noahmp.5.0/da_tws/noahmp50_qc_twsobs.F90} (88%) rename lis/surfacemodels/land/{noahmp.new/da_tws/noahmpnew_qctws.F90 => noahmp.5.0/da_tws/noahmp50_qctws.F90} (86%) rename lis/surfacemodels/land/{noahmp.new/da_tws/noahmpnew_scale_tws.F90 => noahmp.5.0/da_tws/noahmp50_scale_tws.F90} (83%) rename lis/surfacemodels/land/{noahmp.new/da_tws/noahmpnew_settws.F90 => noahmp.5.0/da_tws/noahmp50_settws.F90} (65%) rename lis/surfacemodels/land/{noahmp.new/da_tws/noahmpnew_tws_DAlogMod.F90 => noahmp.5.0/da_tws/noahmp50_tws_DAlogMod.F90} (73%) rename lis/surfacemodels/land/{noahmp.new/da_tws/noahmpnew_updatetws.F90 => noahmp.5.0/da_tws/noahmp50_updatetws.F90} (79%) rename lis/surfacemodels/land/{noahmp.new/da_tws/noahmpnew_write_tws.F90 => noahmp.5.0/da_tws/noahmp50_write_tws.F90} (79%) rename lis/surfacemodels/land/{noahmp.new/da_usafsi/noahmpnew_dausafsi_Mod.F90 => noahmp.5.0/da_usafsi/noahmp50_dausafsi_Mod.F90} (78%) rename lis/surfacemodels/land/{noahmp.new/da_usafsi/noahmpnew_descale_usafsi.F90 => noahmp.5.0/da_usafsi/noahmp50_descale_usafsi.F90} (91%) rename lis/surfacemodels/land/{noahmp.new/da_usafsi/noahmpnew_getusafsipred.F90 => noahmp.5.0/da_usafsi/noahmp50_getusafsipred.F90} (87%) rename lis/surfacemodels/land/{noahmp.new/da_usafsi/noahmpnew_getusafsivars.F90 => noahmp.5.0/da_usafsi/noahmp50_getusafsivars.F90} (87%) rename lis/surfacemodels/land/{noahmp.new/da_usafsi/noahmpnew_map_usafsi.F90 => noahmp.5.0/da_usafsi/noahmp50_map_usafsi.F90} (82%) rename lis/surfacemodels/land/{noahmp.new/da_usafsi/noahmpnew_qc_usafsiobs.F90 => noahmp.5.0/da_usafsi/noahmp50_qc_usafsiobs.F90} (86%) rename lis/surfacemodels/land/{noahmp.new/da_usafsi/noahmpnew_qcusafsi.F90 => noahmp.5.0/da_usafsi/noahmp50_qcusafsi.F90} (89%) rename lis/surfacemodels/land/{noahmp.new/da_usafsi/noahmpnew_scale_usafsi.F90 => noahmp.5.0/da_usafsi/noahmp50_scale_usafsi.F90} (92%) rename lis/surfacemodels/land/{noahmp.new/da_usafsi/noahmpnew_setusafsivars.F90 => noahmp.5.0/da_usafsi/noahmp50_setusafsivars.F90} (87%) rename lis/surfacemodels/land/{noahmp.new/da_usafsi/noahmpnew_transform_usafsi.F90 => noahmp.5.0/da_usafsi/noahmp50_transform_usafsi.F90} (88%) rename lis/surfacemodels/land/{noahmp.new/da_usafsi/noahmpnew_updateusafsivars.F90 => noahmp.5.0/da_usafsi/noahmp50_updateusafsivars.F90} (91%) rename lis/surfacemodels/land/{noahmp.new/da_usafsi/noahmpnew_usafsi_update.F90 => noahmp.5.0/da_usafsi/noahmp50_usafsi_update.F90} (78%) rename lis/surfacemodels/land/{noahmp.new/irrigation/noahmpnew_getirrigationstates.F90 => noahmp.5.0/irrigation/noahmp50_getirrigationstates.F90} (91%) rename lis/surfacemodels/land/{noahmp.new/kwm_date_utilities_new.F90 => noahmp.5.0/kwm_date_utilities_50.F90} (99%) rename lis/surfacemodels/land/{noahmp.new/noahmp_driver_new.F90 => noahmp.5.0/noahmp_driver_50.F90} (98%) rename lis/surfacemodels/land/{noahmp.new/pe/NoahMPnew_peMod.F90 => noahmp.5.0/pe/NoahMP50_peMod.F90} (62%) create mode 100755 lis/surfacemodels/land/noahmp.5.0/pe/NoahMP50_set_pedecvars.F90 rename lis/surfacemodels/land/{noahmp.new/pe/obspred/UAsnow/NoahMPnew_getpeobspred_UAsnowobs.F90 => noahmp.5.0/pe/obspred/UAsnow/NoahMP50_getpeobspred_UAsnowobs.F90} (81%) rename lis/surfacemodels/land/{noahmp.new/pe/obspred/UAsnow/NoahMPnew_setupobspred_UAsnowobs.F90 => noahmp.5.0/pe/obspred/UAsnow/NoahMP50_setupobspred_UAsnowobs.F90} (89%) rename lis/surfacemodels/land/{noahmp.new => noahmp.5.0}/phys/noahmp (100%) rename lis/surfacemodels/land/{noahmp.new/routing/noahmpnew_getrunoffs.F90 => noahmp.5.0/routing/noahmp50_getrunoffs.F90} (86%) rename lis/surfacemodels/land/{noahmp.new/routing/noahmpnew_getrunoffs_hymap2.F90 => noahmp.5.0/routing/noahmp50_getrunoffs_hymap2.F90} (84%) rename lis/surfacemodels/land/{noahmp.new/routing/noahmpnew_getrunoffs_mm.F90 => noahmp.5.0/routing/noahmp50_getrunoffs_mm.F90} (86%) rename lis/surfacemodels/land/{noahmp.new/routing/noahmpnew_getrunoffs_rapid.F90 => noahmp.5.0/routing/noahmp50_getrunoffs_rapid.F90} (88%) rename lis/surfacemodels/land/{noahmp.new/routing/noahmpnew_getsws_hymap2.F90 => noahmp.5.0/routing/noahmp50_getsws_hymap2.F90} (86%) rename lis/surfacemodels/land/{noahmp.new => noahmp.5.0}/wrf_debug.F90 (100%) delete mode 100644 lis/surfacemodels/land/noahmp.new/NoahMPnew_readcrd.F90 delete mode 100755 lis/surfacemodels/land/noahmp.new/pe/NoahMPnew_set_pedecvars.F90 diff --git a/.gitmodules b/.gitmodules index 925a7c91b..fca30a023 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ -[submodule "lis/surfacemodels/land/noahmp.new/phys/noahmp"] - path = lis/surfacemodels/land/noahmp.new/phys/noahmp +[submodule "lis/surfacemodels/land/noahmp.5.0/phys/noahmp"] + path = lis/surfacemodels/land/noahmp.5.0/phys/noahmp url = https://github.com/cenlinhe/noahmp branch = release-v5.0-LIS diff --git a/lis/make/default.cfg b/lis/make/default.cfg index ad4b71b99..7fa96fad2 100644 --- a/lis/make/default.cfg +++ b/lis/make/default.cfg @@ -1184,30 +1184,30 @@ virtual_optue path: surfacemodels/land/noahmp.4.0.1/pe, virtual_routing path: surfacemodels/land/noahmp.4.0.1/routing virtual_irrigation path: surfacemodels/land/noahmp.4.0.1/irrigation -[NoahMP.New] -enabled: True -macro: SM_NOAHMP_NEW -path: surfacemodels/land/noahmp.new, - surfacemodels/land/noahmp.new/phys/noahmp/drivers/lis, - surfacemodels/land/noahmp.new/phys/noahmp/src, - surfacemodels/land/noahmp.new/phys/noahmp/utility, - surfacemodels/land/noahmp.new/cplsubLSM +[NoahMP.5.0] +enabled: True +macro: SM_NOAHMP_5_0 +path: surfacemodels/land/noahmp.5.0, + surfacemodels/land/noahmp.5.0/phys/noahmp/drivers/lis, + surfacemodels/land/noahmp.5.0/phys/noahmp/src, + surfacemodels/land/noahmp.5.0/phys/noahmp/utility, + surfacemodels/land/noahmp.5.0/cplsubLSM dependent_comps: WRF coupling, virtual_da, virtual_optue, virtual_routing, virtual_irrigation -WRF coupling path: surfacemodels/land/noahmp.new/cpl_wrf_noesmf -virtual_da path: surfacemodels/land/noahmp.new/da_soilm, - surfacemodels/land/noahmp.new/da_snow, - surfacemodels/land/noahmp.new/da_LAI, - surfacemodels/land/noahmp.new/da_tws, - surfacemodels/land/noahmp.new/da_snodep, - surfacemodels/land/noahmp.new/da_usafsi -virtual_optue path: surfacemodels/land/noahmp.new/pe, - surfacemodels/land/noahmp.new/pe/obspred/UAsnow -virtual_routing path: surfacemodels/land/noahmp.new/routing -virtual_irrigation path: surfacemodels/land/noahmp.new/irrigation +WRF coupling path: surfacemodels/land/noahmp.5.0/cpl_wrf_noesmf +virtual_da path: surfacemodels/land/noahmp.5.0/da_soilm, + surfacemodels/land/noahmp.5.0/da_snow, + surfacemodels/land/noahmp.5.0/da_LAI, + surfacemodels/land/noahmp.5.0/da_tws, + surfacemodels/land/noahmp.5.0/da_snodep, + surfacemodels/land/noahmp.5.0/da_usafsi +virtual_optue path: surfacemodels/land/noahmp.5.0/pe, + surfacemodels/land/noahmp.5.0/pe/obspred/UAsnow +virtual_routing path: surfacemodels/land/noahmp.5.0/routing +virtual_irrigation path: surfacemodels/land/noahmp.5.0/irrigation [RUC.3.7] enabled: True diff --git a/lis/plugins/LIS_lsm_pluginMod.F90 b/lis/plugins/LIS_lsm_pluginMod.F90 index cb43447da..2cba96a85 100644 --- a/lis/plugins/LIS_lsm_pluginMod.F90 +++ b/lis/plugins/LIS_lsm_pluginMod.F90 @@ -151,8 +151,8 @@ subroutine LIS_lsm_plugin use NoahMP401_lsmMod, only : noahmp401_ini #endif -#if ( defined SM_NOAHMP_NEW ) - use NoahMPnew_lsmMod, only : noahmpnew_ini +#if ( defined SM_NOAHMP_5_0 ) + use NoahMP50_lsmMod, only : noahmp50_ini #endif #if ( defined SM_RUC_3_7 ) @@ -385,15 +385,15 @@ subroutine LIS_lsm_plugin external noahmp401_reset #endif -#if ( defined SM_NOAHMP_NEW ) - external noahmpnew_main - external noahmpnew_setup - external noahmpnew_readrst - external noahmpnew_dynsetup - external noahmpnew_f2t - external noahmpnew_writerst - external noahmpnew_finalize - external noahmpnew_reset +#if ( defined SM_NOAHMP_5_0 ) + external noahmp50_main + external noahmp50_setup + external noahmp50_readrst + external noahmp50_dynsetup + external noahmp50_f2t + external noahmp50_writerst + external noahmp50_finalize + external noahmp50_reset #endif #if ( defined SM_RUC_3_7 ) @@ -729,21 +729,21 @@ subroutine LIS_lsm_plugin call registerlsmreset(trim(LIS_noahmp401Id)//char(0),noahmp401_reset) #endif -#if ( defined SM_NOAHMP_NEW ) - call registerlsminit(trim(LIS_noahmpnewId)//char(0),noahmpnew_ini) - call registerlsmsetup(trim(LIS_noahmpnewId)//char(0),noahmpnew_setup) - call registerlsmf2t(trim(LIS_noahmpnewId)//"+"& - //trim(LIS_retroId)//char(0),noahmpnew_f2t) - call registerlsmf2t(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_agrmetrunId)//char(0),noahmpnew_f2t) - call registerlsmf2t(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_smootherDAId)//char(0),noahmpnew_f2t) - call registerlsmrun(trim(LIS_noahmpnewId)//char(0),noahmpnew_main) - call registerlsmrestart(trim(LIS_noahmpnewId)//char(0),noahmpnew_readrst) - call registerlsmdynsetup(trim(LIS_noahmpnewId)//char(0),noahmpnew_dynsetup) - call registerlsmwrst(trim(LIS_noahmpnewId)//char(0),noahmpnew_writerst) - call registerlsmfinalize(trim(LIS_noahmpnewId)//char(0),noahmpnew_finalize) - call registerlsmreset(trim(LIS_noahmpnewId)//char(0),noahmpnew_reset) +#if ( defined SM_NOAHMP_5_0 ) + call registerlsminit(trim(LIS_noahmp50Id)//char(0),noahmp50_ini) + call registerlsmsetup(trim(LIS_noahmp50Id)//char(0),noahmp50_setup) + call registerlsmf2t(trim(LIS_noahmp50Id)//"+"& + //trim(LIS_retroId)//char(0),noahmp50_f2t) + call registerlsmf2t(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_agrmetrunId)//char(0),noahmp50_f2t) + call registerlsmf2t(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_smootherDAId)//char(0),noahmp50_f2t) + call registerlsmrun(trim(LIS_noahmp50Id)//char(0),noahmp50_main) + call registerlsmrestart(trim(LIS_noahmp50Id)//char(0),noahmp50_readrst) + call registerlsmdynsetup(trim(LIS_noahmp50Id)//char(0),noahmp50_dynsetup) + call registerlsmwrst(trim(LIS_noahmp50Id)//char(0),noahmp50_writerst) + call registerlsmfinalize(trim(LIS_noahmp50Id)//char(0),noahmp50_finalize) + call registerlsmreset(trim(LIS_noahmp50Id)//char(0),noahmp50_reset) #endif #if ( defined SM_RUC_3_7 ) diff --git a/lis/plugins/LIS_lsmcpl_pluginMod.F90 b/lis/plugins/LIS_lsmcpl_pluginMod.F90 index f3cf366d0..93d5ad659 100644 --- a/lis/plugins/LIS_lsmcpl_pluginMod.F90 +++ b/lis/plugins/LIS_lsmcpl_pluginMod.F90 @@ -109,8 +109,8 @@ subroutine LIS_lsmcpl_plugin external noahMP401_setwrfexport #endif -#if ( defined SM_NOAHMP_NEW ) - external noahmpnew_setwrfexport +#if ( defined SM_NOAHMP_5_0 ) + external noahmp50_setwrfexport #endif #if 0 @@ -246,16 +246,16 @@ subroutine LIS_lsmcpl_plugin noahMP401_setwrfexport) #endif -#if ( defined SM_NOAHMP_NEW ) - call registerlsmcplsetexport(trim(LIS_noahmpnewId)//"+"//& +#if ( defined SM_NOAHMP_5_0 ) + call registerlsmcplsetexport(trim(LIS_noahmp50Id)//"+"//& trim(LIS_wrfcplId)//char(0), & - noahmpnew_setwrfexport) - call registerlsmcplsetexport(trim(LIS_noahmpnewId)//"+"//& + noahmp50_setwrfexport) + call registerlsmcplsetexport(trim(LIS_noahmp50Id)//"+"//& trim(LIS_nuopccplId)//char(0), & - noahmpnew_setwrfexport) - call registerlsmcplsetexport(trim(LIS_noahmpnewId)//"+"//& + noahmp50_setwrfexport) + call registerlsmcplsetexport(trim(LIS_noahmp50Id)//"+"//& trim(LIS_retroId)//char(0), & - noahmpnew_setwrfexport) + noahmp50_setwrfexport) #endif #if ( defined SM_NOAH_3_6 ) diff --git a/lis/plugins/LIS_lsmda_pluginMod.F90 b/lis/plugins/LIS_lsmda_pluginMod.F90 index 2649987f3..9e8e82445 100644 --- a/lis/plugins/LIS_lsmda_pluginMod.F90 +++ b/lis/plugins/LIS_lsmda_pluginMod.F90 @@ -207,14 +207,14 @@ subroutine LIS_lsmda_plugin use noahmp401_daveg_Mod #endif -#if ( defined SM_NOAHMP_NEW ) - use noahmpnew_dasoilm_Mod - use noahmpnew_dasnow_Mod - use noahmpnew_dasnodep_Mod - use noahmpnew_dausafsi_Mod - use noahmpnew_tws_DAlogMod, only : noahmpnew_tws_DAlog - use noahmpnew_datws_Mod - use noahmpnew_daveg_Mod +#if ( defined SM_NOAHMP_5_0 ) + use noahmp50_dasoilm_Mod + use noahmp50_dasnow_Mod + use noahmp50_dasnodep_Mod + use noahmp50_dausafsi_Mod + use noahmp50_tws_DAlogMod, only : noahmp50_tws_DAlog + use noahmp50_datws_Mod + use noahmp50_daveg_Mod #endif #if ( defined SM_CLSM_F2_5 ) @@ -546,72 +546,72 @@ subroutine LIS_lsmda_plugin #endif -#if ( defined SM_NOAHMP_NEW ) -! MN NoahMP.New Soil moisture DA - external NoahMPnew_getsoilm - external NoahMPnew_setsoilm - external NoahMPnew_getsmpred - external NoahMPnew_qcsoilm - external NoahMPnew_qc_soilmobs - external NoahMPnew_scale_soilm - external NoahMPnew_descale_soilm - external NoahMPnew_updatesoilm - - external NoahMPnew_getsnowvars - external NoahMPnew_setsnowvars - external NoahMPnew_getsnowpred - external NoahMPnew_getswepred - external NoahMPnew_qcsnow - external NoahMPnew_qc_snowobs - external NoahMPnew_scale_snow - external NoahMPnew_descale_snow - external NoahMPnew_updatesnowvars - - external noahmpnew_getvegvars - external noahmpnew_setvegvars - external noahmpnew_updatevegvars - external noahmpnew_qcveg - external noahmpnew_getLAIpred - external noahmpnew_qc_LAIobs - external noahmpnew_scale_veg - external noahmpnew_descale_veg - external noahmpnew_veg_DAlog - -!BL:NOAHMP.NEW TWS - external noahmpnew_gettws - external noahmpnew_settws - external noahmpnew_qctws - external noahmpnew_gettwspred - external noahmpnew_scale_tws - external noahmpnew_descale_tws - external noahmpnew_updatetws +#if ( defined SM_NOAHMP_5_0 ) +! MN NoahMP.5 Soil moisture DA + external NoahMP50_getsoilm + external NoahMP50_setsoilm + external NoahMP50_getsmpred + external NoahMP50_qcsoilm + external NoahMP50_qc_soilmobs + external NoahMP50_scale_soilm + external NoahMP50_descale_soilm + external NoahMP50_updatesoilm + + external NoahMP50_getsnowvars + external NoahMP50_setsnowvars + external NoahMP50_getsnowpred + external NoahMP50_getswepred + external NoahMP50_qcsnow + external NoahMP50_qc_snowobs + external NoahMP50_scale_snow + external NoahMP50_descale_snow + external NoahMP50_updatesnowvars + + external noahmp50_getvegvars + external noahmp50_setvegvars + external noahmp50_updatevegvars + external noahmp50_qcveg + external noahmp50_getLAIpred + external noahmp50_qc_LAIobs + external noahmp50_scale_veg + external noahmp50_descale_veg + external noahmp50_veg_DAlog + +! NoahMP.5 TWS + external noahmp50_gettws + external noahmp50_settws + external noahmp50_qctws + external noahmp50_gettwspred + external noahmp50_scale_tws + external noahmp50_descale_tws + external noahmp50_updatetws #if ( defined DA_OBS_SNODEP ) -! NoahMP-New SNODEP - external noahmpnew_getsnodepvars - external noahmpnew_transform_snodep - external noahmpnew_map_snodep - external noahmpnew_updatesnodepvars - external noahmpnew_qcsnodep - external noahmpnew_setsnodepvars - external noahmpnew_getsnodeppred - external noahmpnew_scale_snodep - external noahmpnew_descale_snodep - external noahmpnew_qc_snodepobs +! NoahMP.5 SNODEP + external noahmp50_getsnodepvars + external noahmp50_transform_snodep + external noahmp50_map_snodep + external noahmp50_updatesnodepvars + external noahmp50_qcsnodep + external noahmp50_setsnodepvars + external noahmp50_getsnodeppred + external noahmp50_scale_snodep + external noahmp50_descale_snodep + external noahmp50_qc_snodepobs #endif #if ( defined DA_OBS_USAFSI ) -! NoahMP-New_USAFSI - external noahmpnew_getusafsivars - external noahmpnew_transform_usafsi - external noahmpnew_map_usafsi - external noahmpnew_updateusafsivars - external noahmpnew_qcusafsi - external noahmpnew_setusafsivars - external noahmpnew_getusafsipred - external noahmpnew_scale_usafsi - external noahmpnew_descale_usafsi - external noahmpnew_qc_usafsiobs +! NoahMP.5_USAFSI + external noahmp50_getusafsivars + external noahmp50_transform_usafsi + external noahmp50_map_usafsi + external noahmp50_updateusafsivars + external noahmp50_qcusafsi + external noahmp50_setusafsivars + external noahmp50_getusafsipred + external noahmp50_scale_usafsi + external noahmp50_descale_usafsi + external noahmp50_qc_usafsiobs #endif #endif @@ -3151,447 +3151,447 @@ subroutine LIS_lsmda_plugin ! end NoahMP.4.0.1 #endif -#if ( defined SM_NOAHMP_NEW ) +#if ( defined SM_NOAHMP_5_0 ) ! MN -! Noah-MP.New RT SMOPS ASCAT soil moisture - call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SMOPS_ASCATsmobsId)//char(0),NoahMPnew_dasoilm_init) - call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SMOPS_ASCATsmobsId)//char(0),NoahMPnew_getsoilm) - call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SMOPS_ASCATsmobsId)//char(0),NoahMPnew_setsoilm) - call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SMOPS_ASCATsmobsId)//char(0),NoahMPnew_getsmpred) - call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SMOPS_ASCATsmobsId)//char(0),NoahMPnew_qcsoilm) - call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SMOPS_ASCATsmobsId)//char(0),NoahMPnew_qc_soilmobs) - call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SMOPS_ASCATsmobsId)//char(0),NoahMPnew_scale_soilm) - call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SMOPS_ASCATsmobsId)//char(0),NoahMPnew_descale_soilm) - call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SMOPS_ASCATsmobsId)//char(0),NoahMPnew_updatesoilm) - -! Noah-MP.New SMAP(NRT) soil moisture - call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SMAPNRTsmobsId)//char(0),NoahMPnew_dasoilm_init) - call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SMAPNRTsmobsId)//char(0),NoahMPnew_getsoilm) - call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SMAPNRTsmobsId)//char(0),NoahMPnew_setsoilm) - call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SMAPNRTsmobsId)//char(0),NoahMPnew_getsmpred) - call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SMAPNRTsmobsId)//char(0),NoahMPnew_qcsoilm) - call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SMAPNRTsmobsId)//char(0),NoahMPnew_qc_soilmobs) - call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SMAPNRTsmobsId)//char(0),NoahMPnew_scale_soilm) - call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SMAPNRTsmobsId)//char(0),NoahMPnew_descale_soilm) - call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SMAPNRTsmobsId)//char(0),NoahMPnew_updatesoilm) +! NoahMP.5 RT SMOPS ASCAT soil moisture + call registerlsmdainit(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SMOPS_ASCATsmobsId)//char(0),NoahMP50_dasoilm_init) + call registerlsmdagetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SMOPS_ASCATsmobsId)//char(0),NoahMP50_getsoilm) + call registerlsmdasetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SMOPS_ASCATsmobsId)//char(0),NoahMP50_setsoilm) + call registerlsmdagetobspred(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SMOPS_ASCATsmobsId)//char(0),NoahMP50_getsmpred) + call registerlsmdaqcstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SMOPS_ASCATsmobsId)//char(0),NoahMP50_qcsoilm) + call registerlsmdaqcobsstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SMOPS_ASCATsmobsId)//char(0),NoahMP50_qc_soilmobs) + call registerlsmdascalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SMOPS_ASCATsmobsId)//char(0),NoahMP50_scale_soilm) + call registerlsmdadescalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SMOPS_ASCATsmobsId)//char(0),NoahMP50_descale_soilm) + call registerlsmdaupdatestate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SMOPS_ASCATsmobsId)//char(0),NoahMP50_updatesoilm) + +! NoahMP.5 SMAP(NRT) soil moisture + call registerlsmdainit(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SMAPNRTsmobsId)//char(0),NoahMP50_dasoilm_init) + call registerlsmdagetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SMAPNRTsmobsId)//char(0),NoahMP50_getsoilm) + call registerlsmdasetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SMAPNRTsmobsId)//char(0),NoahMP50_setsoilm) + call registerlsmdagetobspred(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SMAPNRTsmobsId)//char(0),NoahMP50_getsmpred) + call registerlsmdaqcstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SMAPNRTsmobsId)//char(0),NoahMP50_qcsoilm) + call registerlsmdaqcobsstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SMAPNRTsmobsId)//char(0),NoahMP50_qc_soilmobs) + call registerlsmdascalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SMAPNRTsmobsId)//char(0),NoahMP50_scale_soilm) + call registerlsmdadescalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SMAPNRTsmobsId)//char(0),NoahMP50_descale_soilm) + call registerlsmdaupdatestate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SMAPNRTsmobsId)//char(0),NoahMP50_updatesoilm) !MN -! Noah-MP.New SMAP(NASA) soil moisture - call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_NASASMAPsmobsId )//char(0),NoahMPnew_dasoilm_init) - call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_NASASMAPsmobsId )//char(0),NoahMPnew_getsoilm) - call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_NASASMAPsmobsId )//char(0),NoahMPnew_setsoilm) - call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_NASASMAPsmobsId )//char(0),NoahMPnew_getsmpred) - call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_NASASMAPsmobsId )//char(0),NoahMPnew_qcsoilm) - call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_NASASMAPsmobsId )//char(0),NoahMPnew_qc_soilmobs) - call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_NASASMAPsmobsId )//char(0),NoahMPnew_scale_soilm) - call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_NASASMAPsmobsId )//char(0),NoahMPnew_descale_soilm) - call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_NASASMAPsmobsId )//char(0),NoahMPnew_updatesoilm) +! NoahMP.5 SMAP(NASA) soil moisture + call registerlsmdainit(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_NASASMAPsmobsId )//char(0),NoahMP50_dasoilm_init) + call registerlsmdagetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_NASASMAPsmobsId )//char(0),NoahMP50_getsoilm) + call registerlsmdasetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_NASASMAPsmobsId )//char(0),NoahMP50_setsoilm) + call registerlsmdagetobspred(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_NASASMAPsmobsId )//char(0),NoahMP50_getsmpred) + call registerlsmdaqcstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_NASASMAPsmobsId )//char(0),NoahMP50_qcsoilm) + call registerlsmdaqcobsstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_NASASMAPsmobsId )//char(0),NoahMP50_qc_soilmobs) + call registerlsmdascalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_NASASMAPsmobsId )//char(0),NoahMP50_scale_soilm) + call registerlsmdadescalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_NASASMAPsmobsId )//char(0),NoahMP50_descale_soilm) + call registerlsmdaupdatestate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_NASASMAPsmobsId )//char(0),NoahMP50_updatesoilm) !YK -! Noah-MP.New SMOS NRT NN soil moisture - call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SMOSNRTNNL2smobsId )//char(0),NoahMPnew_dasoilm_init) - call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SMOSNRTNNL2smobsId )//char(0),NoahMPnew_getsoilm) - call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SMOSNRTNNL2smobsId )//char(0),NoahMPnew_setsoilm) - call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SMOSNRTNNL2smobsId )//char(0),NoahMPnew_getsmpred) - call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SMOSNRTNNL2smobsId )//char(0),NoahMPnew_qcsoilm) - call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SMOSNRTNNL2smobsId )//char(0),NoahMPnew_qc_soilmobs) - call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SMOSNRTNNL2smobsId )//char(0),NoahMPnew_scale_soilm) - call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SMOSNRTNNL2smobsId )//char(0),NoahMPnew_descale_soilm) - call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SMOSNRTNNL2smobsId )//char(0),NoahMPnew_updatesoilm) +! NoahMP.5 SMOS NRT NN soil moisture + call registerlsmdainit(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SMOSNRTNNL2smobsId )//char(0),NoahMP50_dasoilm_init) + call registerlsmdagetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SMOSNRTNNL2smobsId )//char(0),NoahMP50_getsoilm) + call registerlsmdasetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SMOSNRTNNL2smobsId )//char(0),NoahMP50_setsoilm) + call registerlsmdagetobspred(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SMOSNRTNNL2smobsId )//char(0),NoahMP50_getsmpred) + call registerlsmdaqcstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SMOSNRTNNL2smobsId )//char(0),NoahMP50_qcsoilm) + call registerlsmdaqcobsstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SMOSNRTNNL2smobsId )//char(0),NoahMP50_qc_soilmobs) + call registerlsmdascalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SMOSNRTNNL2smobsId )//char(0),NoahMP50_scale_soilm) + call registerlsmdadescalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SMOSNRTNNL2smobsId )//char(0),NoahMP50_descale_soilm) + call registerlsmdaupdatestate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SMOSNRTNNL2smobsId )//char(0),NoahMP50_updatesoilm) !YK -! Noah-MP.New SMAP E OPL soil moisture - call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SMAPEOPLsmobsId )//char(0),NoahMPnew_dasoilm_init) - call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SMAPEOPLsmobsId )//char(0),NoahMPnew_getsoilm) - call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SMAPEOPLsmobsId )//char(0),NoahMPnew_setsoilm) - call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SMAPEOPLsmobsId )//char(0),NoahMPnew_getsmpred) - call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SMAPEOPLsmobsId )//char(0),NoahMPnew_qcsoilm) - call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SMAPEOPLsmobsId )//char(0),NoahMPnew_qc_soilmobs) - call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SMAPEOPLsmobsId )//char(0),NoahMPnew_scale_soilm) - call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SMAPEOPLsmobsId )//char(0),NoahMPnew_descale_soilm) - call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SMAPEOPLsmobsId )//char(0),NoahMPnew_updatesoilm) - - call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_THySMId)//char(0),NoahMPnew_dasoilm_init) - call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_THySMId)//char(0),NoahMPnew_getsoilm) - call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_THySMId)//char(0),NoahMPnew_setsoilm) - call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_THySMId)//char(0),NoahMPnew_getsmpred) - call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_THySMId)//char(0),NoahMPnew_qcsoilm) - call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_THySMId)//char(0),NoahMPnew_qc_soilmobs) - call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_THySMId)//char(0),NoahMPnew_scale_soilm) - call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_THySMId)//char(0),NoahMPnew_descale_soilm) - call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_THySMId)//char(0),NoahMPnew_updatesoilm) - call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_synsndId)//char(0),noahmpnew_dasnow_init) - call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_synsndId)//char(0),noahmpnew_getsnowvars) - call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_synsndId)//char(0),noahmpnew_setsnowvars) - call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_synsndId)//char(0),noahmpnew_getsnowpred) - call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_synsndId)//char(0),noahmpnew_qcsnow) - call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_synsndId)//char(0),noahmpnew_qc_snowobs) - call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_synsndId)//char(0),noahmpnew_scale_snow) - call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_synsndId)//char(0),noahmpnew_descale_snow) - call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_synsndId)//char(0),noahmpnew_updatesnowvars) - call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_synsndId)//char(0),noahmpnew_qc_snowobs) - -! NoahMP-New ESACCI soil moisture !2022.06.29 Pang - call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_ESACCIsmobsId)//char(0),noahmpnew_dasoilm_init) - call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_ESACCIsmobsId)//char(0),noahmpnew_getsoilm) - call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_ESACCIsmobsId)//char(0),noahmpnew_setsoilm) - call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_ESACCIsmobsId)//char(0),noahmpnew_getsmpred) - call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_ESACCIsmobsId)//char(0),noahmpnew_qcsoilm) - call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_ESACCIsmobsId)//char(0),noahmpnew_qc_soilmobs) - call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_ESACCIsmobsId)//char(0),noahmpnew_scale_soilm) - call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_ESACCIsmobsId)//char(0),noahmpnew_descale_soilm) - call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_ESACCIsmobsId)//char(0),noahmpnew_updatesoilm) - - call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_wusUCLAobsId)//char(0),noahmpnew_dasnow_init) - call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_wusUCLAobsId)//char(0),noahmpnew_getsnowvars) - call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_wusUCLAobsId)//char(0),noahmpnew_setsnowvars) - call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_wusUCLAobsId)//char(0),noahmpnew_getsnowpred) - call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_wusUCLAobsId)//char(0),noahmpnew_qcsnow) - call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_wusUCLAobsId)//char(0),noahmpnew_qc_snowobs) - call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_wusUCLAobsId)//char(0),noahmpnew_scale_snow) - call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_wusUCLAobsId)//char(0),noahmpnew_descale_snow) - call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_wusUCLAobsId)//char(0),noahmpnew_updatesnowvars) - call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_wusUCLAobsId)//char(0),noahmpnew_qc_snowobs) - -!BL:Noahmp.New TWS - call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_GRACEtwsobsId)//char(0),noahmpnew_datws_init) - call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_GRACEtwsobsId)//char(0),noahmpnew_gettws) - call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_GRACEtwsobsId)//char(0),noahmpnew_settws) - call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_GRACEtwsobsId)//char(0),noahmpnew_gettwspred) - call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_GRACEtwsobsId)//char(0),noahmpnew_qctws) - call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_GRACEtwsobsId)//char(0),noahmpnew_scale_tws) - call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_GRACEtwsobsId)//char(0),noahmpnew_descale_tws) - call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_GRACEtwsobsId)//char(0), noahmpnew_updatetws) - call registerlsmdadiagnosevars(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_GRACEtwsobsId)//char(0),noahmpnew_tws_DAlog) +! NoahMP.5 SMAP E OPL soil moisture + call registerlsmdainit(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SMAPEOPLsmobsId )//char(0),NoahMP50_dasoilm_init) + call registerlsmdagetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SMAPEOPLsmobsId )//char(0),NoahMP50_getsoilm) + call registerlsmdasetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SMAPEOPLsmobsId )//char(0),NoahMP50_setsoilm) + call registerlsmdagetobspred(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SMAPEOPLsmobsId )//char(0),NoahMP50_getsmpred) + call registerlsmdaqcstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SMAPEOPLsmobsId )//char(0),NoahMP50_qcsoilm) + call registerlsmdaqcobsstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SMAPEOPLsmobsId )//char(0),NoahMP50_qc_soilmobs) + call registerlsmdascalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SMAPEOPLsmobsId )//char(0),NoahMP50_scale_soilm) + call registerlsmdadescalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SMAPEOPLsmobsId )//char(0),NoahMP50_descale_soilm) + call registerlsmdaupdatestate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SMAPEOPLsmobsId )//char(0),NoahMP50_updatesoilm) + + call registerlsmdainit(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_THySMId)//char(0),NoahMP50_dasoilm_init) + call registerlsmdagetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_THySMId)//char(0),NoahMP50_getsoilm) + call registerlsmdasetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_THySMId)//char(0),NoahMP50_setsoilm) + call registerlsmdagetobspred(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_THySMId)//char(0),NoahMP50_getsmpred) + call registerlsmdaqcstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_THySMId)//char(0),NoahMP50_qcsoilm) + call registerlsmdaqcobsstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_THySMId)//char(0),NoahMP50_qc_soilmobs) + call registerlsmdascalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_THySMId)//char(0),NoahMP50_scale_soilm) + call registerlsmdadescalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_THySMId)//char(0),NoahMP50_descale_soilm) + call registerlsmdaupdatestate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_THySMId)//char(0),NoahMP50_updatesoilm) + call registerlsmdainit(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_synsndId)//char(0),noahmp50_dasnow_init) + call registerlsmdagetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_synsndId)//char(0),noahmp50_getsnowvars) + call registerlsmdasetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_synsndId)//char(0),noahmp50_setsnowvars) + call registerlsmdagetobspred(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_synsndId)//char(0),noahmp50_getsnowpred) + call registerlsmdaqcstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_synsndId)//char(0),noahmp50_qcsnow) + call registerlsmdaqcobsstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_synsndId)//char(0),noahmp50_qc_snowobs) + call registerlsmdascalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_synsndId)//char(0),noahmp50_scale_snow) + call registerlsmdadescalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_synsndId)//char(0),noahmp50_descale_snow) + call registerlsmdaupdatestate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_synsndId)//char(0),noahmp50_updatesnowvars) + call registerlsmdaqcobsstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_synsndId)//char(0),noahmp50_qc_snowobs) + +! NoahMP.5 ESACCI soil moisture !2022.06.29 Pang + call registerlsmdainit(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_ESACCIsmobsId)//char(0),noahmp50_dasoilm_init) + call registerlsmdagetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_ESACCIsmobsId)//char(0),noahmp50_getsoilm) + call registerlsmdasetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_ESACCIsmobsId)//char(0),noahmp50_setsoilm) + call registerlsmdagetobspred(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_ESACCIsmobsId)//char(0),noahmp50_getsmpred) + call registerlsmdaqcstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_ESACCIsmobsId)//char(0),noahmp50_qcsoilm) + call registerlsmdaqcobsstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_ESACCIsmobsId)//char(0),noahmp50_qc_soilmobs) + call registerlsmdascalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_ESACCIsmobsId)//char(0),noahmp50_scale_soilm) + call registerlsmdadescalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_ESACCIsmobsId)//char(0),noahmp50_descale_soilm) + call registerlsmdaupdatestate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_ESACCIsmobsId)//char(0),noahmp50_updatesoilm) + + call registerlsmdainit(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_wusUCLAobsId)//char(0),noahmp50_dasnow_init) + call registerlsmdagetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_wusUCLAobsId)//char(0),noahmp50_getsnowvars) + call registerlsmdasetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_wusUCLAobsId)//char(0),noahmp50_setsnowvars) + call registerlsmdagetobspred(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_wusUCLAobsId)//char(0),noahmp50_getsnowpred) + call registerlsmdaqcstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_wusUCLAobsId)//char(0),noahmp50_qcsnow) + call registerlsmdaqcobsstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_wusUCLAobsId)//char(0),noahmp50_qc_snowobs) + call registerlsmdascalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_wusUCLAobsId)//char(0),noahmp50_scale_snow) + call registerlsmdadescalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_wusUCLAobsId)//char(0),noahmp50_descale_snow) + call registerlsmdaupdatestate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_wusUCLAobsId)//char(0),noahmp50_updatesnowvars) + call registerlsmdaqcobsstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_wusUCLAobsId)//char(0),noahmp50_qc_snowobs) + +! Noahmp.5 TWS + call registerlsmdainit(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_GRACEtwsobsId)//char(0),noahmp50_datws_init) + call registerlsmdagetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_GRACEtwsobsId)//char(0),noahmp50_gettws) + call registerlsmdasetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_GRACEtwsobsId)//char(0),noahmp50_settws) + call registerlsmdagetobspred(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_GRACEtwsobsId)//char(0),noahmp50_gettwspred) + call registerlsmdaqcstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_GRACEtwsobsId)//char(0),noahmp50_qctws) + call registerlsmdascalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_GRACEtwsobsId)//char(0),noahmp50_scale_tws) + call registerlsmdadescalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_GRACEtwsobsId)//char(0),noahmp50_descale_tws) + call registerlsmdaupdatestate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_GRACEtwsobsId)//char(0), noahmp50_updatetws) + call registerlsmdadiagnosevars(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_GRACEtwsobsId)//char(0),noahmp50_tws_DAlog) ! Wanshu Nie, LAI DA - call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_GLASSlaiobsId)//char(0),noahmpnew_daveg_init) - call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_GLASSlaiobsId)//char(0),noahmpnew_getvegvars) - call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_GLASSlaiobsId)//char(0),noahmpnew_setvegvars) - call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_GLASSlaiobsId)//char(0),noahmpnew_updatevegvars) - call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_GLASSlaiobsId)//char(0),noahmpnew_qcveg) - - call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_GLASSlaiobsId)//char(0),noahmpnew_getLAIpred) - call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_GLASSlaiobsId)//char(0),noahmpnew_qc_LAIobs) - call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_GLASSlaiobsId)//char(0),noahmpnew_scale_veg) - call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_GLASSlaiobsId)//char(0),noahmpnew_descale_veg) - - call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_MCD15A2HlaiobsId)//char(0),noahmpnew_daveg_init) - call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_MCD15A2HlaiobsId)//char(0),noahmpnew_getvegvars) - call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_MCD15A2HlaiobsId)//char(0),noahmpnew_setvegvars) - call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_MCD15A2HlaiobsId)//char(0),noahmpnew_updatevegvars) - call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_MCD15A2HlaiobsId)//char(0),noahmpnew_qcveg) - - call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_MCD15A2HlaiobsId)//char(0),noahmpnew_getLAIpred) - call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_MCD15A2HlaiobsId)//char(0),noahmpnew_qc_LAIobs) - call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_MCD15A2HlaiobsId)//char(0),noahmpnew_scale_veg) - call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_MCD15A2HlaiobsId)//char(0),noahmpnew_descale_veg) - call registerlsmdadiagnosevars(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_MCD15A2HlaiobsId)//char(0),noahmpnew_veg_DAlog) + call registerlsmdainit(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_GLASSlaiobsId)//char(0),noahmp50_daveg_init) + call registerlsmdagetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_GLASSlaiobsId)//char(0),noahmp50_getvegvars) + call registerlsmdasetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_GLASSlaiobsId)//char(0),noahmp50_setvegvars) + call registerlsmdaupdatestate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_GLASSlaiobsId)//char(0),noahmp50_updatevegvars) + call registerlsmdaqcstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_GLASSlaiobsId)//char(0),noahmp50_qcveg) + + call registerlsmdagetobspred(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_GLASSlaiobsId)//char(0),noahmp50_getLAIpred) + call registerlsmdaqcobsstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_GLASSlaiobsId)//char(0),noahmp50_qc_LAIobs) + call registerlsmdascalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_GLASSlaiobsId)//char(0),noahmp50_scale_veg) + call registerlsmdadescalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_GLASSlaiobsId)//char(0),noahmp50_descale_veg) + + call registerlsmdainit(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_MCD15A2HlaiobsId)//char(0),noahmp50_daveg_init) + call registerlsmdagetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_MCD15A2HlaiobsId)//char(0),noahmp50_getvegvars) + call registerlsmdasetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_MCD15A2HlaiobsId)//char(0),noahmp50_setvegvars) + call registerlsmdaupdatestate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_MCD15A2HlaiobsId)//char(0),noahmp50_updatevegvars) + call registerlsmdaqcstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_MCD15A2HlaiobsId)//char(0),noahmp50_qcveg) + + call registerlsmdagetobspred(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_MCD15A2HlaiobsId)//char(0),noahmp50_getLAIpred) + call registerlsmdaqcobsstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_MCD15A2HlaiobsId)//char(0),noahmp50_qc_LAIobs) + call registerlsmdascalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_MCD15A2HlaiobsId)//char(0),noahmp50_scale_veg) + call registerlsmdadescalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_MCD15A2HlaiobsId)//char(0),noahmp50_descale_veg) + call registerlsmdadiagnosevars(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_MCD15A2HlaiobsId)//char(0),noahmp50_veg_DAlog) !Y.Kwon - call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_VIIRSgvfobsId)//char(0),noahmpnew_daveg_init) - call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_VIIRSgvfobsId)//char(0),noahmpnew_getvegvars) - call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_VIIRSgvfobsId)//char(0),noahmpnew_setvegvars) - call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_VIIRSgvfobsId)//char(0),noahmpnew_updatevegvars) - call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_VIIRSgvfobsId)//char(0),noahmpnew_qcveg) - - call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_VIIRSgvfobsId)//char(0),noahmpnew_getLAIpred) - call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_VIIRSgvfobsId)//char(0),noahmpnew_qc_LAIobs) - call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_VIIRSgvfobsId)//char(0),noahmpnew_scale_veg) - call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_VIIRSgvfobsId)//char(0),noahmpnew_descale_veg) - call registerlsmdadiagnosevars(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_VIIRSgvfobsId)//char(0),noahmpnew_veg_DAlog) + call registerlsmdainit(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_VIIRSgvfobsId)//char(0),noahmp50_daveg_init) + call registerlsmdagetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_VIIRSgvfobsId)//char(0),noahmp50_getvegvars) + call registerlsmdasetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_VIIRSgvfobsId)//char(0),noahmp50_setvegvars) + call registerlsmdaupdatestate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_VIIRSgvfobsId)//char(0),noahmp50_updatevegvars) + call registerlsmdaqcstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_VIIRSgvfobsId)//char(0),noahmp50_qcveg) + + call registerlsmdagetobspred(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_VIIRSgvfobsId)//char(0),noahmp50_getLAIpred) + call registerlsmdaqcobsstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_VIIRSgvfobsId)//char(0),noahmp50_qc_LAIobs) + call registerlsmdascalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_VIIRSgvfobsId)//char(0),noahmp50_scale_veg) + call registerlsmdadescalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_VIIRSgvfobsId)//char(0),noahmp50_descale_veg) + call registerlsmdadiagnosevars(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_VIIRSgvfobsId)//char(0),noahmp50_veg_DAlog) !Y.Kwon - call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_CDFSgvfobsId)//char(0),noahmpnew_daveg_init) - call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_CDFSgvfobsId)//char(0),noahmpnew_getvegvars) - call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_CDFSgvfobsId)//char(0),noahmpnew_setvegvars) - call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_CDFSgvfobsId)//char(0),noahmpnew_updatevegvars) - call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_CDFSgvfobsId)//char(0),noahmpnew_qcveg) - - call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_CDFSgvfobsId)//char(0),noahmpnew_getLAIpred) - call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_CDFSgvfobsId)//char(0),noahmpnew_qc_LAIobs) - call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_CDFSgvfobsId)//char(0),noahmpnew_scale_veg) - call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_CDFSgvfobsId)//char(0),noahmpnew_descale_veg) - call registerlsmdadiagnosevars(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_CDFSgvfobsId)//char(0),noahmpnew_veg_DAlog) + call registerlsmdainit(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_CDFSgvfobsId)//char(0),noahmp50_daveg_init) + call registerlsmdagetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_CDFSgvfobsId)//char(0),noahmp50_getvegvars) + call registerlsmdasetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_CDFSgvfobsId)//char(0),noahmp50_setvegvars) + call registerlsmdaupdatestate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_CDFSgvfobsId)//char(0),noahmp50_updatevegvars) + call registerlsmdaqcstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_CDFSgvfobsId)//char(0),noahmp50_qcveg) + + call registerlsmdagetobspred(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_CDFSgvfobsId)//char(0),noahmp50_getLAIpred) + call registerlsmdaqcobsstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_CDFSgvfobsId)//char(0),noahmp50_qc_LAIobs) + call registerlsmdascalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_CDFSgvfobsId)//char(0),noahmp50_scale_veg) + call registerlsmdadescalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_CDFSgvfobsId)//char(0),noahmp50_descale_veg) + call registerlsmdadiagnosevars(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_CDFSgvfobsId)//char(0),noahmp50_veg_DAlog) #if ( defined DA_OBS_GCOMW_AMSR2L3SND ) - call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_GCOMW_AMSR2L3sndobsId)//char(0),noahmpnew_dasnow_init) - call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_GCOMW_AMSR2L3sndobsId)//char(0),NoahMPnew_getsnowvars) - call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_GCOMW_AMSR2L3sndobsId)//char(0),NoahMPnew_setsnowvars) - call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_GCOMW_AMSR2L3sndobsId)//char(0),NoahMPnew_getsnowpred) - call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_GCOMW_AMSR2L3sndobsId)//char(0),NoahMPnew_qcsnow) - call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_GCOMW_AMSR2L3sndobsId)//char(0),NoahMPnew_qc_snowobs) - call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_GCOMW_AMSR2L3sndobsId)//char(0),NoahMPnew_scale_snow) - call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_GCOMW_AMSR2L3sndobsId)//char(0),NoahMPnew_descale_snow) - call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_GCOMW_AMSR2L3sndobsId)//char(0),NoahMPnew_updatesnowvars) - call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_GCOMW_AMSR2L3sndobsId)//char(0),NoahMPnew_qc_snowobs) + call registerlsmdainit(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_GCOMW_AMSR2L3sndobsId)//char(0),noahmp50_dasnow_init) + call registerlsmdagetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_GCOMW_AMSR2L3sndobsId)//char(0),NoahMP50_getsnowvars) + call registerlsmdasetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_GCOMW_AMSR2L3sndobsId)//char(0),NoahMP50_setsnowvars) + call registerlsmdagetobspred(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_GCOMW_AMSR2L3sndobsId)//char(0),NoahMP50_getsnowpred) + call registerlsmdaqcstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_GCOMW_AMSR2L3sndobsId)//char(0),NoahMP50_qcsnow) + call registerlsmdaqcobsstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_GCOMW_AMSR2L3sndobsId)//char(0),NoahMP50_qc_snowobs) + call registerlsmdascalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_GCOMW_AMSR2L3sndobsId)//char(0),NoahMP50_scale_snow) + call registerlsmdadescalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_GCOMW_AMSR2L3sndobsId)//char(0),NoahMP50_descale_snow) + call registerlsmdaupdatestate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_GCOMW_AMSR2L3sndobsId)//char(0),NoahMP50_updatesnowvars) + call registerlsmdaqcobsstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_GCOMW_AMSR2L3sndobsId)//char(0),NoahMP50_qc_snowobs) #endif ! Yeosang Yoon, SNODEP DA #if ( defined DA_OBS_SNODEP ) ! DA + snodep wirings - call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_snodepobsId)//char(0),noahmpnew_dasnodep_init) - call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_snodepobsId)//char(0),noahmpnew_getsnodepvars) - call registerlsmdaobstransform(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_snodepobsId)//char(0),noahmpnew_transform_snodep) - call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_snodepobsId)//char(0),noahmpnew_updatesnodepvars) - call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_snodepobsId)//char(0),noahmpnew_setsnodepvars) - call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_snodepobsId)//char(0),noahmpnew_getsnodeppred) - call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_snodepobsId)//char(0),noahmpnew_qcsnodep) - call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_snodepobsId)//char(0),noahmpnew_qc_snodepobs) - call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_snodepobsId)//char(0),noahmpnew_scale_snodep) - call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_snodepobsId)//char(0),noahmpnew_descale_snodep) + call registerlsmdainit(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_snodepobsId)//char(0),noahmp50_dasnodep_init) + call registerlsmdagetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_snodepobsId)//char(0),noahmp50_getsnodepvars) + call registerlsmdaobstransform(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_snodepobsId)//char(0),noahmp50_transform_snodep) + call registerlsmdaupdatestate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_snodepobsId)//char(0),noahmp50_updatesnodepvars) + call registerlsmdasetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_snodepobsId)//char(0),noahmp50_setsnodepvars) + call registerlsmdagetobspred(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_snodepobsId)//char(0),noahmp50_getsnodeppred) + call registerlsmdaqcstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_snodepobsId)//char(0),noahmp50_qcsnodep) + call registerlsmdaqcobsstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_snodepobsId)//char(0),noahmp50_qc_snodepobs) + call registerlsmdascalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_snodepobsId)//char(0),noahmp50_scale_snodep) + call registerlsmdadescalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_snodepobsId)//char(0),noahmp50_descale_snodep) #endif ! Yeosang Yoon, USAFSI DA #if ( defined DA_OBS_USAFSI ) ! DA + usafsi wirings - call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_usafsiobsId)//char(0),noahmpnew_dausafsi_init) - call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_usafsiobsId)//char(0),noahmpnew_getusafsivars) - call registerlsmdaobstransform(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_usafsiobsId)//char(0),noahmpnew_transform_usafsi) - call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_usafsiobsId)//char(0),noahmpnew_updateusafsivars) - call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_usafsiobsId)//char(0),noahmpnew_setusafsivars) - call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_usafsiobsId)//char(0),noahmpnew_getusafsipred) - call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_usafsiobsId)//char(0),noahmpnew_qcusafsi) - call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_usafsiobsId)//char(0),noahmpnew_qc_usafsiobs) - call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_usafsiobsId)//char(0),noahmpnew_scale_usafsi) - call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_usafsiobsId)//char(0),noahmpnew_descale_usafsi) + call registerlsmdainit(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_usafsiobsId)//char(0),noahmp50_dausafsi_init) + call registerlsmdagetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_usafsiobsId)//char(0),noahmp50_getusafsivars) + call registerlsmdaobstransform(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_usafsiobsId)//char(0),noahmp50_transform_usafsi) + call registerlsmdaupdatestate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_usafsiobsId)//char(0),noahmp50_updateusafsivars) + call registerlsmdasetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_usafsiobsId)//char(0),noahmp50_setusafsivars) + call registerlsmdagetobspred(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_usafsiobsId)//char(0),noahmp50_getusafsipred) + call registerlsmdaqcstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_usafsiobsId)//char(0),noahmp50_qcusafsi) + call registerlsmdaqcobsstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_usafsiobsId)//char(0),noahmp50_qc_usafsiobs) + call registerlsmdascalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_usafsiobsId)//char(0),noahmp50_scale_usafsi) + call registerlsmdadescalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_usafsiobsId)//char(0),noahmp50_descale_usafsi) #endif #if ( defined DA_OBS_ASO_SWE) - call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_ASOsweobsId)//char(0),noahmpnew_dasnow_init) - call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_ASOsweobsId)//char(0),noahmpnew_getsnowvars) - call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_ASOsweobsId)//char(0),noahmpnew_setsnowvars) - call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_ASOsweobsId)//char(0),noahmpnew_getswepred) - call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_ASOsweobsId)//char(0),noahmpnew_qcsnow) - call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_ASOsweobsId)//char(0),noahmpnew_qc_snowobs) - call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_ASOsweobsId)//char(0),noahmpnew_scale_snow) - call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_ASOsweobsId)//char(0),noahmpnew_descale_snow) - call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_ASOsweobsId)//char(0),noahmpnew_updatesnowvars) - call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_ASOsweobsId)//char(0),noahmpnew_qc_snowobs) + call registerlsmdainit(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_ASOsweobsId)//char(0),noahmp50_dasnow_init) + call registerlsmdagetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_ASOsweobsId)//char(0),noahmp50_getsnowvars) + call registerlsmdasetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_ASOsweobsId)//char(0),noahmp50_setsnowvars) + call registerlsmdagetobspred(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_ASOsweobsId)//char(0),noahmp50_getswepred) + call registerlsmdaqcstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_ASOsweobsId)//char(0),noahmp50_qcsnow) + call registerlsmdaqcobsstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_ASOsweobsId)//char(0),noahmp50_qc_snowobs) + call registerlsmdascalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_ASOsweobsId)//char(0),noahmp50_scale_snow) + call registerlsmdadescalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_ASOsweobsId)//char(0),noahmp50_descale_snow) + call registerlsmdaupdatestate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_ASOsweobsId)//char(0),noahmp50_updatesnowvars) + call registerlsmdaqcobsstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_ASOsweobsId)//char(0),noahmp50_qc_snowobs) #endif ! Melissa Wrzesien (MLW) -! NoahMP.New SNODAS snow depth +! NoahMP.5 SNODAS snow depth #if ( defined DA_OBS_SNODAS) - call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SNODASobsId)//char(0),noahmpnew_dasnow_init) - call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SNODASobsId)//char(0),NoahMPnew_getsnowvars) - call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SNODASobsId)//char(0),NoahMPnew_setsnowvars) - call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SNODASobsId)//char(0),NoahMPnew_getsnowpred) - call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SNODASobsId)//char(0),NoahMPnew_qcsnow) - call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SNODASobsId)//char(0),NoahMPnew_qc_snowobs) - call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SNODASobsId)//char(0),NoahMPnew_scale_snow) - call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SNODASobsId)//char(0),NoahMPnew_descale_snow) - call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SNODASobsId)//char(0),NoahMPnew_updatesnowvars) - call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_SNODASobsId)//char(0),NoahMPnew_qc_snowobs) + call registerlsmdainit(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SNODASobsId)//char(0),noahmp50_dasnow_init) + call registerlsmdagetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SNODASobsId)//char(0),NoahMP50_getsnowvars) + call registerlsmdasetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SNODASobsId)//char(0),NoahMP50_setsnowvars) + call registerlsmdagetobspred(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SNODASobsId)//char(0),NoahMP50_getsnowpred) + call registerlsmdaqcstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SNODASobsId)//char(0),NoahMP50_qcsnow) + call registerlsmdaqcobsstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SNODASobsId)//char(0),NoahMP50_qc_snowobs) + call registerlsmdascalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SNODASobsId)//char(0),NoahMP50_scale_snow) + call registerlsmdadescalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SNODASobsId)//char(0),NoahMP50_descale_snow) + call registerlsmdaupdatestate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SNODASobsId)//char(0),NoahMP50_updatesnowvars) + call registerlsmdaqcobsstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_SNODASobsId)//char(0),NoahMP50_qc_snowobs) #endif ! Melissa Wrzesien (MLW) -! NoahMP.New ANSA snow depth +! NoahMP.5 ANSA snow depth #if ( defined DA_OBS_ANSA_SNWD) - call registerlsmdainit(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_ANSASNWDsnowobsId)//char(0),noahmpnew_dasnow_init) - call registerlsmdagetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_ANSASNWDsnowobsId)//char(0),noahmpnew_getsnowvars) - call registerlsmdasetstatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_ANSASNWDsnowobsId)//char(0),noahmpnew_setsnowvars) - call registerlsmdagetobspred(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_ANSASNWDsnowobsId)//char(0),noahmpnew_getsnowpred) - call registerlsmdaqcstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_ANSASNWDsnowobsId)//char(0),noahmpnew_qcsnow) - call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_ANSASNWDsnowobsId)//char(0),noahmpnew_qc_snowobs) - call registerlsmdascalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_ANSASNWDsnowobsId)//char(0),noahmpnew_scale_snow) - call registerlsmdadescalestatevar(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_ANSASNWDsnowobsId)//char(0),noahmpnew_descale_snow) - call registerlsmdaupdatestate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_ANSASNWDsnowobsId)//char(0),noahmpnew_updatesnowvars) - call registerlsmdaqcobsstate(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_ANSASNWDsnowobsId)//char(0),noahmpnew_qc_snowobs) + call registerlsmdainit(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_ANSASNWDsnowobsId)//char(0),noahmp50_dasnow_init) + call registerlsmdagetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_ANSASNWDsnowobsId)//char(0),noahmp50_getsnowvars) + call registerlsmdasetstatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_ANSASNWDsnowobsId)//char(0),noahmp50_setsnowvars) + call registerlsmdagetobspred(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_ANSASNWDsnowobsId)//char(0),noahmp50_getsnowpred) + call registerlsmdaqcstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_ANSASNWDsnowobsId)//char(0),noahmp50_qcsnow) + call registerlsmdaqcobsstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_ANSASNWDsnowobsId)//char(0),noahmp50_qc_snowobs) + call registerlsmdascalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_ANSASNWDsnowobsId)//char(0),noahmp50_scale_snow) + call registerlsmdadescalestatevar(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_ANSASNWDsnowobsId)//char(0),noahmp50_descale_snow) + call registerlsmdaupdatestate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_ANSASNWDsnowobsId)//char(0),noahmp50_updatesnowvars) + call registerlsmdaqcobsstate(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_ANSASNWDsnowobsId)//char(0),noahmp50_qc_snowobs) #endif -! end NoahMP.New +! end NoahMP.5 #endif #if ( defined SM_CLSM_F2_5 ) diff --git a/lis/plugins/LIS_lsmirrigation_pluginMod.F90 b/lis/plugins/LIS_lsmirrigation_pluginMod.F90 index 95fb7103e..39c26e75b 100644 --- a/lis/plugins/LIS_lsmirrigation_pluginMod.F90 +++ b/lis/plugins/LIS_lsmirrigation_pluginMod.F90 @@ -60,8 +60,8 @@ subroutine LIS_lsmirrigation_plugin external noahmp401_getirrigationstates #endif -#if ( defined SM_NOAHMP_NEW ) - external noahmpnew_getirrigationstates +#if ( defined SM_NOAHMP_5_0 ) + external noahmp50_getirrigationstates #endif #if ( defined IRR_SPRINKLER ) @@ -90,9 +90,9 @@ subroutine LIS_lsmirrigation_plugin trim(LIS_sprinklerIrrigationId)//char(0),NoahMP401_getirrigationstates) #endif -#if ( defined SM_NOAHMP_NEW ) - call registerlsmirrigationgetstates(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_sprinklerIrrigationId)//char(0),NoahMPnew_getirrigationstates) +#if ( defined SM_NOAHMP_5_0 ) + call registerlsmirrigationgetstates(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_sprinklerIrrigationId)//char(0),NoahMP50_getirrigationstates) #endif #endif @@ -122,9 +122,9 @@ subroutine LIS_lsmirrigation_plugin trim(LIS_floodIrrigationId)//char(0),NoahMP401_getirrigationstates) #endif -#if ( defined SM_NOAHMP_NEW ) - call registerlsmirrigationgetstates(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_floodIrrigationId)//char(0),NoahMPnew_getirrigationstates) +#if ( defined SM_NOAHMP_5_0 ) + call registerlsmirrigationgetstates(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_floodIrrigationId)//char(0),NoahMP50_getirrigationstates) #endif #endif @@ -159,9 +159,9 @@ subroutine LIS_lsmirrigation_plugin trim(LIS_dripIrrigationId)//char(0),NoahMP401_getirrigationstates) #endif -#if ( defined SM_NOAHMP_NEW ) - call registerlsmirrigationgetstates(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_dripIrrigationId)//char(0),NoahMPnew_getirrigationstates) +#if ( defined SM_NOAHMP_5_0 ) + call registerlsmirrigationgetstates(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_dripIrrigationId)//char(0),NoahMP50_getirrigationstates) #endif #endif diff --git a/lis/plugins/LIS_lsmoptue_pluginMod.F90 b/lis/plugins/LIS_lsmoptue_pluginMod.F90 index e35bb7553..e857ac8d5 100644 --- a/lis/plugins/LIS_lsmoptue_pluginMod.F90 +++ b/lis/plugins/LIS_lsmoptue_pluginMod.F90 @@ -76,8 +76,8 @@ subroutine LIS_lsmoptue_plugin #if ( defined SM_NOAHMP_4_0_1 ) use NoahMP401_peMod, only : NoahMP401_setup_pedecvars #endif -#if ( defined SM_NOAHMP_NEW ) - use NoahMPnew_peMod, only : NoahMPnew_setup_pedecvars +#if ( defined SM_NOAHMP_5_0 ) + use NoahMP50_peMod, only : NoahMP50_setup_pedecvars #endif ! external noah271_f2t @@ -143,13 +143,13 @@ subroutine LIS_lsmoptue_plugin #endif -#if ( defined SM_NOAHMP_NEW) +#if ( defined SM_NOAHMP_5_0) - external NoahMPnew_f2t - external NoahMPnew_set_pedecvars + external NoahMP50_f2t + external NoahMP50_set_pedecvars - external NoahMPnew_getpeobspred_UAsnowobs - external NoahMPnew_setupobspred_UAsnowobs + external NoahMP50_getpeobspred_UAsnowobs + external NoahMP50_setupobspred_UAsnowobs #endif @@ -325,20 +325,20 @@ subroutine LIS_lsmoptue_plugin NoahMP401_getpeobspred_UAsnowobs) #endif -#if ( defined SM_NOAHMP_NEW ) - call registerlsmf2t(trim(LIS_noahmpnewId)//"+"// & - trim(LIS_paramEstimRunId)//char(0),NoahMPnew_f2t) - call registerlsmpesetupdecisionspace(trim(LIS_noahmpnewId)//char(0), & - NoahMPnew_setup_pedecvars) - call registerlsmpesetdecisionspace(trim(LIS_noahmpnewId)//char(0), & - NoahMPnew_set_pedecvars) +#if ( defined SM_NOAHMP_5_0 ) + call registerlsmf2t(trim(LIS_noahmp50Id)//"+"// & + trim(LIS_paramEstimRunId)//char(0),NoahMP50_f2t) + call registerlsmpesetupdecisionspace(trim(LIS_noahmp50Id)//char(0), & + NoahMP50_setup_pedecvars) + call registerlsmpesetdecisionspace(trim(LIS_noahmp50Id)//char(0), & + NoahMP50_set_pedecvars) - call registerlsmpesetupobspred(trim(LIS_noahmpnewId)//"+"// & + call registerlsmpesetupobspred(trim(LIS_noahmp50Id)//"+"// & trim(LIS_UAsnowobsId)//char(0), & - NoahMPnew_setupobspred_UAsnowobs) - call registerlsmpegetobspred(trim(LIS_noahmpnewId)//"+"// & + NoahMP50_setupobspred_UAsnowobs) + call registerlsmpegetobspred(trim(LIS_noahmp50Id)//"+"// & trim(LIS_UAsnowobsId)//char(0), & - NoahMPnew_getpeobspred_UAsnowobs) + NoahMP50_getpeobspred_UAsnowobs) #endif #endif diff --git a/lis/plugins/LIS_lsmrouting_pluginMod.F90 b/lis/plugins/LIS_lsmrouting_pluginMod.F90 index d8bd3c1db..d932d1a07 100644 --- a/lis/plugins/LIS_lsmrouting_pluginMod.F90 +++ b/lis/plugins/LIS_lsmrouting_pluginMod.F90 @@ -98,12 +98,12 @@ subroutine LIS_lsmrouting_plugin external noahmp401_getrunoffs_rapid #endif -#if ( defined SM_NOAHMP_NEW ) - external noahmpnew_getrunoffs - external noahmpnew_getrunoffs_mm - external noahmpnew_getrunoffs_hymap2 - external noahmpnew_getsws_hymap2 - external noahmpnew_getrunoffs_rapid +#if ( defined SM_NOAHMP_5_0 ) + external noahmp50_getrunoffs + external noahmp50_getrunoffs_mm + external noahmp50_getrunoffs_hymap2 + external noahmp50_getsws_hymap2 + external noahmp50_getrunoffs_rapid #endif #if ( defined SM_RUC_3_7 ) @@ -198,10 +198,10 @@ subroutine LIS_lsmrouting_plugin noahmp401_getrunoffs_mm) #endif -#if ( defined SM_NOAHMP_NEW ) - call registerlsmroutinggetrunoff(trim(LIS_noahmpnewId)//"+"//& +#if ( defined SM_NOAHMP_5_0 ) + call registerlsmroutinggetrunoff(trim(LIS_noahmp50Id)//"+"//& trim(LIS_HYMAProuterId)//char(0), & - noahmpnew_getrunoffs_mm) + noahmp50_getrunoffs_mm) #endif #if ( defined SM_RUC_3_7 ) @@ -303,13 +303,13 @@ subroutine LIS_lsmrouting_plugin noahmp401_getsws_hymap2) #endif -#if ( defined SM_NOAHMP_NEW ) - call registerlsmroutinggetrunoff(trim(LIS_noahmpnewId)//"+"//& +#if ( defined SM_NOAHMP_5_0 ) + call registerlsmroutinggetrunoff(trim(LIS_noahmp50Id)//"+"//& trim(LIS_HYMAP2routerId)//char(0), & - noahmpnew_getrunoffs_hymap2) - call registerlsmroutinggetsws(trim(LIS_noahmpnewId)//"+"//& + noahmp50_getrunoffs_hymap2) + call registerlsmroutinggetsws(trim(LIS_noahmp50Id)//"+"//& trim(LIS_HYMAP2routerId)//char(0), & - noahmpnew_getsws_hymap2) + noahmp50_getsws_hymap2) #endif #if ( defined SM_RUC_3_7 ) @@ -386,10 +386,10 @@ subroutine LIS_lsmrouting_plugin noahmp401_getrunoffs) #endif -#if ( defined SM_NOAHMP_NEW ) - call registerlsmroutinggetrunoff(trim(LIS_noahmpnewId)//"+"//& +#if ( defined SM_NOAHMP_5_0 ) + call registerlsmroutinggetrunoff(trim(LIS_noahmp50Id)//"+"//& trim(LIS_NLDASrouterId)//char(0), & - noahmpnew_getrunoffs) + noahmp50_getrunoffs) #endif #if ( defined SM_RUC_3_7 ) @@ -430,10 +430,10 @@ subroutine LIS_lsmrouting_plugin noahmp401_getrunoffs_rapid) #endif -#if ( defined SM_NOAHMP_NEW ) - call registerlsmroutinggetrunoff(trim(LIS_noahmpnewId)//"+"//& +#if ( defined SM_NOAHMP_5_0 ) + call registerlsmroutinggetrunoff(trim(LIS_noahmp50Id)//"+"//& trim(LIS_RAPIDrouterId)//char(0), & - noahmpnew_getrunoffs_rapid) + noahmp50_getrunoffs_rapid) #endif #if ( defined SM_JULES_5_0 ) diff --git a/lis/plugins/LIS_pluginIndices.F90 b/lis/plugins/LIS_pluginIndices.F90 index fde8c928d..8e88429e7 100644 --- a/lis/plugins/LIS_pluginIndices.F90 +++ b/lis/plugins/LIS_pluginIndices.F90 @@ -70,7 +70,7 @@ module LIS_pluginIndices character*50, public, parameter :: LIS_noah39Id = "Noah.3.9" character*50, public, parameter :: LIS_noahmp36Id = "NoahMP.3.6" character*50, public, parameter :: LIS_noahmp401Id = "Noah-MP.4.0.1" - character*50, public, parameter :: LIS_noahmpnewId = "Noah-MP.New" + character*50, public, parameter :: LIS_noahmp50Id = "Noah-MP.5.0" character*50, public, parameter :: LIS_ruc37Id = "RUC.3.7" character*50, public, parameter :: LIS_clm2Id = "CLM.2" character*50, public, parameter :: LIS_vic411Id = "VIC.4.1.1" diff --git a/lis/plugins/LIS_sublsm_pluginMod.F90 b/lis/plugins/LIS_sublsm_pluginMod.F90 index f22cf3b35..7fc900169 100644 --- a/lis/plugins/LIS_sublsm_pluginMod.F90 +++ b/lis/plugins/LIS_sublsm_pluginMod.F90 @@ -154,9 +154,9 @@ subroutine LIS_sublsm_plugin external NoahMP401_setCROCUSimport #endif -#if ( defined SM_NOAHMP_NEW ) - external NoahMPnew_getCROCUSexport - external NoahMPnew_setCROCUSimport +#if ( defined SM_NOAHMP_5_0 ) + external NoahMP50_getCROCUSexport + external NoahMP50_setCROCUSimport #endif #if ( defined SM_NOAH_3_9 ) @@ -184,9 +184,9 @@ subroutine LIS_sublsm_plugin external NoahMP401_setSnowModelimport #endif -#if ( defined SM_NOAHMP_NEW ) - external NoahMPnew_getSnowModelexport - external NoahMPnew_setSnowModelimport +#if ( defined SM_NOAHMP_5_0 ) + external NoahMP50_getSnowModelexport + external NoahMP50_setSnowModelimport #endif #endif @@ -217,12 +217,12 @@ subroutine LIS_sublsm_plugin trim(LIS_Crocus81Id)//char(0),Crocus81_getLSMexport) #endif -#if ( defined SM_NOAHMP_NEW ) - call registerlsm2sublsmgetexport(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_Crocus81Id)//char(0),NoahMPnew_getCROCUSexport) - call registerlsmsetsublsmimport(trim(LIS_noahmpnewId)//char(0),& - NoahMPnew_setCROCUSimport) - call registersublsm2lsmgetexport(trim(LIS_noahmpnewId)//"+"//& +#if ( defined SM_NOAHMP_5_0 ) + call registerlsm2sublsmgetexport(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_Crocus81Id)//char(0),NoahMP50_getCROCUSexport) + call registerlsmsetsublsmimport(trim(LIS_noahmp50Id)//char(0),& + NoahMP50_setCROCUSimport) + call registersublsm2lsmgetexport(trim(LIS_noahmp50Id)//"+"//& trim(LIS_Crocus81Id)//char(0),Crocus81_getLSMexport) #endif @@ -265,12 +265,12 @@ subroutine LIS_sublsm_plugin trim(LIS_snowmodelId)//char(0),SnowModel_getLSMexport) #endif -#if ( defined SM_NOAHMP_NEW ) - call registerlsm2sublsmgetexport(trim(LIS_noahmpnewId)//"+"//& - trim(LIS_snowmodelId)//char(0),NoahMPnew_getSnowModelexport) - call registerlsmsetsublsmimport(trim(LIS_noahmpnewId)//char(0),& - NoahMPnew_setSnowModelimport) - call registersublsm2lsmgetexport(trim(LIS_noahmpnewId)//"+"//& +#if ( defined SM_NOAHMP_5_0 ) + call registerlsm2sublsmgetexport(trim(LIS_noahmp50Id)//"+"//& + trim(LIS_snowmodelId)//char(0),NoahMP50_getSnowModelexport) + call registerlsmsetsublsmimport(trim(LIS_noahmp50Id)//char(0),& + NoahMP50_setSnowModelimport) + call registersublsm2lsmgetexport(trim(LIS_noahmp50Id)//"+"//& trim(LIS_snowmodelId)//char(0),SnowModel_getLSMexport) #endif #endif diff --git a/lis/runmodes/nuopc_cpl_mode/LIS_NUOPC_DataCopy.F90 b/lis/runmodes/nuopc_cpl_mode/LIS_NUOPC_DataCopy.F90 index 77f131184..170a1943d 100644 --- a/lis/runmodes/nuopc_cpl_mode/LIS_NUOPC_DataCopy.F90 +++ b/lis/runmodes/nuopc_cpl_mode/LIS_NUOPC_DataCopy.F90 @@ -31,7 +31,7 @@ module LIS_NUOPC_DataCopy use noah33_lsmMod use NoahMP36_lsmMod use NoahMP401_lsmMod - use NoahMPnew_lsmMod + use NoahMP50_lsmMod IMPLICIT NONE @@ -43,7 +43,7 @@ module LIS_NUOPC_DataCopy public :: LIS_CopyToNoah_3_3 public :: LIS_CopyToNoahMP_3_6 public :: LIS_CopyToNoahMP_4_0_1 - public :: LIS_CopyToNoahMP_New + public :: LIS_CopyToNoahMP_5_0 public :: LIS_CopyFromLIS !----------------------------------------------------------------------------- @@ -94,13 +94,13 @@ module LIS_NUOPC_DataCopy module procedure LIS_EnsFarrayR8CopyToNoahMP_4_0_1 end interface - interface LIS_CopyToNoahMP_New - module procedure LIS_FieldCopyToNoahMP_New - module procedure LIS_ArrayCopyToNoahMP_New - module procedure LIS_FarrayR8CopyToNoahMP_New - module procedure LIS_FarrayR4CopyToNoahMP_New - module procedure LIS_EnsFarrayR4CopyToNoahMP_New - module procedure LIS_EnsFarrayR8CopyToNoahMP_New + interface LIS_CopyToNoahMP_5_0 + module procedure LIS_FieldCopyToNoahMP_5_0 + module procedure LIS_ArrayCopyToNoahMP_5_0 + module procedure LIS_FarrayR8CopyToNoahMP_5_0 + module procedure LIS_FarrayR4CopyToNoahMP_5_0 + module procedure LIS_EnsFarrayR4CopyToNoahMP_5_0 + module procedure LIS_EnsFarrayR8CopyToNoahMP_5_0 end interface interface LIS_CopyFromLIS @@ -243,9 +243,9 @@ subroutine LIS_FieldCopyToNoahMP_4_0_1(field,stdName,nest,rc) !----------------------------------------------------------------------------- #undef METHOD -#define METHOD "LIS_FieldCopyToNoahMP_New" +#define METHOD "LIS_FieldCopyToNoahMP_5_0" - subroutine LIS_FieldCopyToNoahMP_New(field,stdName,nest,rc) + subroutine LIS_FieldCopyToNoahMP_5_0(field,stdName,nest,rc) ! !ARGUMENTS: type(ESMF_Field),intent(in) :: field character(*),intent(in) :: stdName @@ -258,7 +258,7 @@ subroutine LIS_FieldCopyToNoahMP_New(field,stdName,nest,rc) call ESMF_FieldGet(field=field,array=array,rc=rc) if(ESMF_STDERRORCHECK(rc)) return ! bail out - call LIS_CopyToNoahMP_New(array=array,stdName=stdName,nest=nest,rc=rc) + call LIS_CopyToNoahMP_5_0(array=array,stdName=stdName,nest=nest,rc=rc) if(ESMF_STDERRORCHECK(rc)) return ! bail out end subroutine @@ -680,9 +680,9 @@ subroutine LIS_ArrayCopyToNoahMP_4_0_1(array,stdName,nest,rc) !----------------------------------------------------------------------------- #undef METHOD -#define METHOD "LIS_ArrayCopyToNoahMP_New" +#define METHOD "LIS_ArrayCopyToNoahMP_5_0" - subroutine LIS_ArrayCopyToNoahMP_New(array,stdName,nest,rc) + subroutine LIS_ArrayCopyToNoahMP_5_0(array,stdName,nest,rc) ! !ARGUMENTS: type(ESMF_Array),intent(in) :: array character(*),intent(in) :: stdName @@ -724,12 +724,12 @@ subroutine LIS_ArrayCopyToNoahMP_New(array,stdName,nest,rc) if(typekind==ESMF_TYPEKIND_R4) then call ESMF_ArrayGet(array,farrayPtr=farray_R4,rc=rc) if(ESMF_STDERRORCHECK(rc)) return ! bail out - call LIS_CopyToNoahMP_New(farray=farray_R4,stdName=stdName,nest=nest,rc=rc) + call LIS_CopyToNoahMP_5_0(farray=farray_R4,stdName=stdName,nest=nest,rc=rc) if(ESMF_STDERRORCHECK(rc)) return ! bail out elseif(typekind==ESMF_TYPEKIND_R8) then call ESMF_ArrayGet(array,farrayPtr=farray_R8,rc=rc) if(ESMF_STDERRORCHECK(rc)) return ! bail out - call LIS_CopyToNoahMP_New(farray=farray_R8,stdName=stdName,nest=nest,rc=rc) + call LIS_CopyToNoahMP_5_0(farray=farray_R8,stdName=stdName,nest=nest,rc=rc) if(ESMF_STDERRORCHECK(rc)) return ! bail out else call ESMF_LogSetError(ESMF_RC_NOT_IMPL, & @@ -740,12 +740,12 @@ subroutine LIS_ArrayCopyToNoahMP_New(array,stdName,nest,rc) if(typekind==ESMF_TYPEKIND_R4) then call ESMF_ArrayGet(array,farrayPtr=farray3D_R4,rc=rc) if(ESMF_STDERRORCHECK(rc)) return ! bail out - call LIS_CopyToNoahMP_New(farray=farray3D_R4,stdName=stdName,nest=nest,rc=rc) + call LIS_CopyToNoahMP_5_0(farray=farray3D_R4,stdName=stdName,nest=nest,rc=rc) if(ESMF_STDERRORCHECK(rc)) return ! bail out elseif(typekind==ESMF_TYPEKIND_R8) then call ESMF_ArrayGet(array,farrayPtr=farray3D_R8,rc=rc) if(ESMF_STDERRORCHECK(rc)) return ! bail out - call LIS_CopyToNoahMP_New(farray=farray3D_R8,stdName=stdName,nest=nest,rc=rc) + call LIS_CopyToNoahMP_5_0(farray=farray3D_R8,stdName=stdName,nest=nest,rc=rc) if(ESMF_STDERRORCHECK(rc)) return ! bail out else call ESMF_LogSetError(ESMF_RC_NOT_IMPL, & @@ -1511,9 +1511,9 @@ subroutine LIS_FarrayR4CopyToNoahMP_4_0_1(farray,stdName,nest,rc) !----------------------------------------------------------------------------- #undef METHOD -#define METHOD "LIS_FarrayR4CopyToNoahMP_New" +#define METHOD "LIS_FarrayR4CopyToNoahMP_5_0" - subroutine LIS_FarrayR4CopyToNoahMP_New(farray,stdName,nest,rc) + subroutine LIS_FarrayR4CopyToNoahMP_5_0(farray,stdName,nest,rc) ! !ARGUMENTS: real(ESMF_KIND_R4),intent(in),pointer :: farray(:,:) character(*),intent(in) :: stdName @@ -1530,80 +1530,80 @@ subroutine LIS_FarrayR4CopyToNoahMP_New(farray,stdName,nest,rc) do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row - NoahmpNew_struc(nest)%noahmpnew(tile)%sh2o(1) = farray(col,row) + Noahmp50_struc(nest)%noahmp50(tile)%sh2o(1) = farray(col,row) enddo case ('liquid_fraction_of_soil_moisture_layer_2') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row - NoahmpNew_struc(nest)%noahmpnew(tile)%sh2o(2) = farray(col,row) + Noahmp50_struc(nest)%noahmp50(tile)%sh2o(2) = farray(col,row) enddo case ('liquid_fraction_of_soil_moisture_layer_3') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row - NoahmpNew_struc(nest)%noahmpnew(tile)%sh2o(3) = farray(col,row) + Noahmp50_struc(nest)%noahmp50(tile)%sh2o(3) = farray(col,row) enddo case ('liquid_fraction_of_soil_moisture_layer_4') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row - NoahmpNew_struc(nest)%noahmpnew(tile)%sh2o(4) = farray(col,row) + Noahmp50_struc(nest)%noahmp50(tile)%sh2o(4) = farray(col,row) enddo case ('soil_moisture_fraction_layer_1') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row - NoahmpNew_struc(nest)%noahmpnew(tile)%smc(1) = farray(col,row) + Noahmp50_struc(nest)%noahmp50(tile)%smc(1) = farray(col,row) enddo case ('soil_moisture_fraction_layer_2') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row - NoahmpNew_struc(nest)%noahmpnew(tile)%smc(2) = farray(col,row) + Noahmp50_struc(nest)%noahmp50(tile)%smc(2) = farray(col,row) enddo case ('soil_moisture_fraction_layer_3') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row - NoahmpNew_struc(nest)%noahmpnew(tile)%smc(3) = farray(col,row) + Noahmp50_struc(nest)%noahmp50(tile)%smc(3) = farray(col,row) enddo case ('soil_moisture_fraction_layer_4') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row - NoahmpNew_struc(nest)%noahmpnew(tile)%smc(4) = farray(col,row) + Noahmp50_struc(nest)%noahmp50(tile)%smc(4) = farray(col,row) enddo case ('soil_temperature_layer_1') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row - NoahmpNew_struc(nest)%noahmpnew(tile)%tslb(1) = farray(col,row) + Noahmp50_struc(nest)%noahmp50(tile)%tslb(1) = farray(col,row) enddo case ('soil_temperature_layer_2') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row - NoahmpNew_struc(nest)%noahmpnew(tile)%tslb(2) = farray(col,row) + Noahmp50_struc(nest)%noahmp50(tile)%tslb(2) = farray(col,row) enddo case ('soil_temperature_layer_3') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row - NoahmpNew_struc(nest)%noahmpnew(tile)%tslb(3) = farray(col,row) + Noahmp50_struc(nest)%noahmp50(tile)%tslb(3) = farray(col,row) enddo case ('soil_temperature_layer_4') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row - NoahmpNew_struc(nest)%noahmpnew(tile)%tslb(4) = farray(col,row) + Noahmp50_struc(nest)%noahmp50(tile)%tslb(4) = farray(col,row) enddo #ifdef WRF_HYDRO case ('surface_water_depth') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row - NoahmpNew_struc(nest)%noahmpnew(tile)%sfcheadrt = farray(col,row) + Noahmp50_struc(nest)%noahmp50(tile)%sfcheadrt = farray(col,row) enddo #endif case default @@ -1938,9 +1938,9 @@ subroutine LIS_FarrayR8CopyToNoahMP_4_0_1(farray,stdName,nest,rc) !----------------------------------------------------------------------------- #undef METHOD -#define METHOD "LIS_FarrayR8CopyToNoahMP_New" +#define METHOD "LIS_FarrayR8CopyToNoahMP_5_0" - subroutine LIS_FarrayR8CopyToNoahMP_New(farray,stdName,nest,rc) + subroutine LIS_FarrayR8CopyToNoahMP_5_0(farray,stdName,nest,rc) ! !ARGUMENTS: real(ESMF_KIND_R8),intent(in),pointer :: farray(:,:) character(*),intent(in) :: stdName @@ -1957,80 +1957,80 @@ subroutine LIS_FarrayR8CopyToNoahMP_New(farray,stdName,nest,rc) do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row - NoahmpNew_struc(nest)%noahmpnew(tile)%sh2o(1) = farray(col,row) + Noahmp50_struc(nest)%noahmp50(tile)%sh2o(1) = farray(col,row) enddo case ('liquid_fraction_of_soil_moisture_layer_2') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row - NoahmpNew_struc(nest)%noahmpnew(tile)%sh2o(2) = farray(col,row) + Noahmp50_struc(nest)%noahmp50(tile)%sh2o(2) = farray(col,row) enddo case ('liquid_fraction_of_soil_moisture_layer_3') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row - NoahmpNew_struc(nest)%noahmpnew(tile)%sh2o(3) = farray(col,row) + Noahmp50_struc(nest)%noahmp50(tile)%sh2o(3) = farray(col,row) enddo case ('liquid_fraction_of_soil_moisture_layer_4') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row - NoahmpNew_struc(nest)%noahmpnew(tile)%sh2o(4) = farray(col,row) + Noahmp50_struc(nest)%noahmp50(tile)%sh2o(4) = farray(col,row) enddo case ('soil_moisture_fraction_layer_1') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row - NoahmpNew_struc(nest)%noahmpnew(tile)%smc(1) = farray(col,row) + Noahmp50_struc(nest)%noahmp50(tile)%smc(1) = farray(col,row) enddo case ('soil_moisture_fraction_layer_2') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row - NoahmpNew_struc(nest)%noahmpnew(tile)%smc(2) = farray(col,row) + Noahmp50_struc(nest)%noahmp50(tile)%smc(2) = farray(col,row) enddo case ('soil_moisture_fraction_layer_3') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row - NoahmpNew_struc(nest)%noahmpnew(tile)%smc(3) = farray(col,row) + Noahmp50_struc(nest)%noahmp50(tile)%smc(3) = farray(col,row) enddo case ('soil_moisture_fraction_layer_4') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row - NoahmpNew_struc(nest)%noahmpnew(tile)%smc(4) = farray(col,row) + Noahmp50_struc(nest)%noahmp50(tile)%smc(4) = farray(col,row) enddo case ('soil_temperature_layer_1') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row - NoahmpNew_struc(nest)%noahmpnew(tile)%tslb(1) = farray(col,row) + Noahmp50_struc(nest)%noahmp50(tile)%tslb(1) = farray(col,row) enddo case ('soil_temperature_layer_2') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row - NoahmpNew_struc(nest)%noahmpnew(tile)%tslb(2) = farray(col,row) + Noahmp50_struc(nest)%noahmp50(tile)%tslb(2) = farray(col,row) enddo case ('soil_temperature_layer_3') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row - NoahmpNew_struc(nest)%noahmpnew(tile)%tslb(3) = farray(col,row) + Noahmp50_struc(nest)%noahmp50(tile)%tslb(3) = farray(col,row) enddo case ('soil_temperature_layer_4') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row - NoahmpNew_struc(nest)%noahmpnew(tile)%tslb(4) = farray(col,row) + Noahmp50_struc(nest)%noahmp50(tile)%tslb(4) = farray(col,row) enddo #ifdef WRF_HYDRO case ('surface_water_depth') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row - NoahmpNew_struc(nest)%noahmpnew(tile)%sfcheadrt = farray(col,row) + Noahmp50_struc(nest)%noahmp50(tile)%sfcheadrt = farray(col,row) enddo #endif case default @@ -2767,9 +2767,9 @@ subroutine LIS_EnsFarrayR4CopyToNoahMP_4_0_1(farray,stdName,nest,rc) !----------------------------------------------------------------------------- #undef METHOD -#define METHOD "LIS_EnsFarrayR4CopyToNoahMP_New" +#define METHOD "LIS_EnsFarrayR4CopyToNoahMP_5_0" - subroutine LIS_EnsFarrayR4CopyToNoahMP_New(farray,stdName,nest,rc) + subroutine LIS_EnsFarrayR4CopyToNoahMP_5_0(farray,stdName,nest,rc) ! !ARGUMENTS: real(ESMF_KIND_R4),intent(in),pointer :: farray(:,:,:) character(*),intent(in) :: stdName @@ -2787,84 +2787,84 @@ subroutine LIS_EnsFarrayR4CopyToNoahMP_New(farray,stdName,nest,rc) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row ens = LIS_domain(nest)%tile(tile)%ensem - NoahmpNew_struc(nest)%noahmpnew(tile)%sh2o(1) = farray(col,row,ens) + Noahmp50_struc(nest)%noahmp50(tile)%sh2o(1) = farray(col,row,ens) enddo case ('liquid_fraction_of_soil_moisture_layer_2') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row ens = LIS_domain(nest)%tile(tile)%ensem - NoahmpNew_struc(nest)%noahmpnew(tile)%sh2o(2) = farray(col,row,ens) + Noahmp50_struc(nest)%noahmp50(tile)%sh2o(2) = farray(col,row,ens) enddo case ('liquid_fraction_of_soil_moisture_layer_3') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row ens = LIS_domain(nest)%tile(tile)%ensem - NoahmpNew_struc(nest)%noahmpnew(tile)%sh2o(3) = farray(col,row,ens) + Noahmp50_struc(nest)%noahmp50(tile)%sh2o(3) = farray(col,row,ens) enddo case ('liquid_fraction_of_soil_moisture_layer_4') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row ens = LIS_domain(nest)%tile(tile)%ensem - NoahmpNew_struc(nest)%noahmpnew(tile)%sh2o(4) = farray(col,row,ens) + Noahmp50_struc(nest)%noahmp50(tile)%sh2o(4) = farray(col,row,ens) enddo case ('soil_moisture_fraction_layer_1') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row ens = LIS_domain(nest)%tile(tile)%ensem - NoahmpNew_struc(nest)%noahmpnew(tile)%smc(1) = farray(col,row,ens) + Noahmp50_struc(nest)%noahmp50(tile)%smc(1) = farray(col,row,ens) enddo case ('soil_moisture_fraction_layer_2') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row ens = LIS_domain(nest)%tile(tile)%ensem - NoahmpNew_struc(nest)%noahmpnew(tile)%smc(2) = farray(col,row,ens) + Noahmp50_struc(nest)%noahmp50(tile)%smc(2) = farray(col,row,ens) enddo case ('soil_moisture_fraction_layer_3') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row ens = LIS_domain(nest)%tile(tile)%ensem - NoahmpNew_struc(nest)%noahmpnew(tile)%smc(3) = farray(col,row,ens) + Noahmp50_struc(nest)%noahmp50(tile)%smc(3) = farray(col,row,ens) enddo case ('soil_moisture_fraction_layer_4') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row ens = LIS_domain(nest)%tile(tile)%ensem - NoahmpNew_struc(nest)%noahmpnew(tile)%smc(4) = farray(col,row,ens) + Noahmp50_struc(nest)%noahmp50(tile)%smc(4) = farray(col,row,ens) enddo case ('soil_temperature_layer_1') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row ens = LIS_domain(nest)%tile(tile)%ensem - NoahmpNew_struc(nest)%noahmpnew(tile)%tslb(1) = farray(col,row,ens) + Noahmp50_struc(nest)%noahmp50(tile)%tslb(1) = farray(col,row,ens) enddo case ('soil_temperature_layer_2') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row ens = LIS_domain(nest)%tile(tile)%ensem - NoahmpNew_struc(nest)%noahmpnew(tile)%tslb(2) = farray(col,row,ens) + Noahmp50_struc(nest)%noahmp50(tile)%tslb(2) = farray(col,row,ens) enddo case ('soil_temperature_layer_3') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row ens = LIS_domain(nest)%tile(tile)%ensem - NoahmpNew_struc(nest)%noahmpnew(tile)%tslb(3) = farray(col,row,ens) + Noahmp50_struc(nest)%noahmp50(tile)%tslb(3) = farray(col,row,ens) enddo case ('soil_temperature_layer_4') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row ens = LIS_domain(nest)%tile(tile)%ensem - NoahmpNew_struc(nest)%noahmpnew(tile)%tslb(4) = farray(col,row,ens) + Noahmp50_struc(nest)%noahmp50(tile)%tslb(4) = farray(col,row,ens) enddo #ifdef WRF_HYDRO case ('surface_water_depth') @@ -2872,7 +2872,7 @@ subroutine LIS_EnsFarrayR4CopyToNoahMP_New(farray,stdName,nest,rc) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row ens = LIS_domain(nest)%tile(tile)%ensem - NoahmpNew_struc(nest)%noahmpnew(tile)%sfcheadrt = farray(col,row,ens) + Noahmp50_struc(nest)%noahmp50(tile)%sfcheadrt = farray(col,row,ens) enddo #endif case default @@ -3246,9 +3246,9 @@ subroutine LIS_EnsFarrayR8CopyToNoahMP_4_0_1(farray,stdName,nest,rc) !----------------------------------------------------------------------------- #undef METHOD -#define METHOD "LIS_EnsFarrayR8CopyToNoahMP_New" +#define METHOD "LIS_EnsFarrayR8CopyToNoahMP_5_0" - subroutine LIS_EnsFarrayR8CopyToNoahMP_New(farray,stdName,nest,rc) + subroutine LIS_EnsFarrayR8CopyToNoahMP_5_0(farray,stdName,nest,rc) ! !ARGUMENTS: real(ESMF_KIND_R8),intent(in),pointer :: farray(:,:,:) character(*),intent(in) :: stdName @@ -3266,84 +3266,84 @@ subroutine LIS_EnsFarrayR8CopyToNoahMP_New(farray,stdName,nest,rc) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row ens = LIS_domain(nest)%tile(tile)%ensem - NoahmpNew_struc(nest)%noahmpnew(tile)%sh2o(1) = farray(col,row,ens) + Noahmp50_struc(nest)%noahmp50(tile)%sh2o(1) = farray(col,row,ens) enddo case ('liquid_fraction_of_soil_moisture_layer_2') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row ens = LIS_domain(nest)%tile(tile)%ensem - NoahmpNew_struc(nest)%noahmpnew(tile)%sh2o(2) = farray(col,row,ens) + Noahmp50_struc(nest)%noahmp50(tile)%sh2o(2) = farray(col,row,ens) enddo case ('liquid_fraction_of_soil_moisture_layer_3') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row ens = LIS_domain(nest)%tile(tile)%ensem - NoahmpNew_struc(nest)%noahmpnew(tile)%sh2o(3) = farray(col,row,ens) + Noahmp50_struc(nest)%noahmp50(tile)%sh2o(3) = farray(col,row,ens) enddo case ('liquid_fraction_of_soil_moisture_layer_4') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row ens = LIS_domain(nest)%tile(tile)%ensem - NoahmpNew_struc(nest)%noahmpnew(tile)%sh2o(4) = farray(col,row,ens) + Noahmp50_struc(nest)%noahmp50(tile)%sh2o(4) = farray(col,row,ens) enddo case ('soil_moisture_fraction_layer_1') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row ens = LIS_domain(nest)%tile(tile)%ensem - NoahmpNew_struc(nest)%noahmpnew(tile)%smc(1) = farray(col,row,ens) + Noahmp50_struc(nest)%noahmp50(tile)%smc(1) = farray(col,row,ens) enddo case ('soil_moisture_fraction_layer_2') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row ens = LIS_domain(nest)%tile(tile)%ensem - NoahmpNew_struc(nest)%noahmpnew(tile)%smc(2) = farray(col,row,ens) + Noahmp50_struc(nest)%noahmp50(tile)%smc(2) = farray(col,row,ens) enddo case ('soil_moisture_fraction_layer_3') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row ens = LIS_domain(nest)%tile(tile)%ensem - NoahmpNew_struc(nest)%noahmpnew(tile)%smc(3) = farray(col,row,ens) + Noahmp50_struc(nest)%noahmp50(tile)%smc(3) = farray(col,row,ens) enddo case ('soil_moisture_fraction_layer_4') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row ens = LIS_domain(nest)%tile(tile)%ensem - NoahmpNew_struc(nest)%noahmpnew(tile)%smc(4) = farray(col,row,ens) + Noahmp50_struc(nest)%noahmp50(tile)%smc(4) = farray(col,row,ens) enddo case ('soil_temperature_layer_1') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row ens = LIS_domain(nest)%tile(tile)%ensem - NoahmpNew_struc(nest)%noahmpnew(tile)%tslb(1) = farray(col,row,ens) + Noahmp50_struc(nest)%noahmp50(tile)%tslb(1) = farray(col,row,ens) enddo case ('soil_temperature_layer_2') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row ens = LIS_domain(nest)%tile(tile)%ensem - NoahmpNew_struc(nest)%noahmpnew(tile)%tslb(2) = farray(col,row,ens) + Noahmp50_struc(nest)%noahmp50(tile)%tslb(2) = farray(col,row,ens) enddo case ('soil_temperature_layer_3') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row ens = LIS_domain(nest)%tile(tile)%ensem - NoahmpNew_struc(nest)%noahmpnew(tile)%tslb(3) = farray(col,row,ens) + Noahmp50_struc(nest)%noahmp50(tile)%tslb(3) = farray(col,row,ens) enddo case ('soil_temperature_layer_4') do tile=1,LIS_rc%ntiles(nest) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row ens = LIS_domain(nest)%tile(tile)%ensem - NoahmpNew_struc(nest)%noahmpnew(tile)%tslb(4) = farray(col,row,ens) + Noahmp50_struc(nest)%noahmp50(tile)%tslb(4) = farray(col,row,ens) enddo #ifdef WRF_HYDRO case ('surface_water_depth') @@ -3351,7 +3351,7 @@ subroutine LIS_EnsFarrayR8CopyToNoahMP_New(farray,stdName,nest,rc) col = LIS_domain(nest)%tile(tile)%col row = LIS_domain(nest)%tile(tile)%row ens = LIS_domain(nest)%tile(tile)%ensem - NoahmpNew_struc(nest)%noahmpnew(tile)%sfcheadrt = farray(col,row,ens) + Noahmp50_struc(nest)%noahmp50(tile)%sfcheadrt = farray(col,row,ens) enddo #endif case default diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_coldstart.F90 b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_coldstart.F90 similarity index 51% rename from lis/surfacemodels/land/noahmp.new/NoahMPnew_coldstart.F90 rename to lis/surfacemodels/land/noahmp.5.0/NoahMP50_coldstart.F90 index efa1835f6..b112c234a 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_coldstart.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_coldstart.F90 @@ -11,8 +11,8 @@ #include "LIS_misc.h" !BOP ! -! !ROUTINE: NoahMPnew_coldstart -! \label{NoahMPnew_coldstart} +! !ROUTINE: NoahMP50_coldstart +! \label{NoahMP50_coldstart} ! ! !REVISION HISTORY: ! This subroutine is generated with the Model Implementation Toolkit developed @@ -23,7 +23,7 @@ ! ! !INTERFACE: -subroutine NoahMPnew_coldstart(mtype) +subroutine NoahMP50_coldstart(mtype) ! !USES: ! use LIS_coreMod, only: LIS_rc ! use LIS_logMod, only: LIS_logunit @@ -34,7 +34,7 @@ subroutine NoahMPnew_coldstart(mtype) use LIS_histDataMod use LIS_timeMgrMod, only: LIS_date2time - use NoahMPnew_lsmMod + use NoahMP50_lsmMod use NoahmpIOVarType use NoahmpInitMainMod, only : NoahmpInitMain ! @@ -78,32 +78,32 @@ subroutine NoahMPnew_coldstart(mtype) NoahmpIO%kms = 1 NoahmpIO%kme = 2 - ! start initialization of NoahmpIO and NoahmpNew_struc + ! start initialization of NoahmpIO and Noahmp50_struc do n=1, LIS_rc%nnest ! initialize NoahmpIO variables - NoahmpIO%nsoil = NoahMPnew_struc(n)%nsoil - NoahmpIO%nsnow = NoahMPnew_struc(n)%nsnow + NoahmpIO%nsoil = NoahMP50_struc(n)%nsoil + NoahmpIO%nsnow = NoahMP50_struc(n)%nsnow NoahmpIO%restart_flag = .false. NoahmpIO%FNDSNOWH = .true. if (trim(LIS_rc%startcode) .eq. "coldstart") then write(LIS_logunit,*) & - "[INFO] NoahMPnew_coldstart -- cold-starting Noah-MP.New" + "[INFO] NoahMP50_coldstart -- cold-starting Noah-MP.New" do t=1, LIS_rc%npatch(n,mtype) - NoahmpIO%ISNOWXY(1,1) = -NoahmpNew_struc(n)%nsnow - NoahmpIO%ZSOIL(1) = -NoahmpNew_struc(n)%sldpth(1) - do l=2, NoahmpNew_struc(n)%nsoil - NoahmpIO%ZSOIL(l) = NoahmpIO%ZSOIL(l-1) - NoahmpNew_struc(n)%sldpth(l) + NoahmpIO%ISNOWXY(1,1) = -Noahmp50_struc(n)%nsnow + NoahmpIO%ZSOIL(1) = -Noahmp50_struc(n)%sldpth(1) + do l=2, Noahmp50_struc(n)%nsoil + NoahmpIO%ZSOIL(l) = NoahmpIO%ZSOIL(l-1) - Noahmp50_struc(n)%sldpth(l) enddo - do l=1, NoahmpNew_struc(n)%nsoil - NoahmpIO%TSLB(1,l,1) = NoahmpNew_struc(n)%init_tslb(l) - NoahmpIO%SMOIS(1,l,1) = NoahmpNew_struc(n)%init_smc(l) + do l=1, Noahmp50_struc(n)%nsoil + NoahmpIO%TSLB(1,l,1) = Noahmp50_struc(n)%init_tslb(l) + NoahmpIO%SMOIS(1,l,1) = Noahmp50_struc(n)%init_smc(l) NoahmpIO%SH2O(1,l,1) = 0.0 - NoahmpIO%DZS(l) = NoahmpNew_struc(n)%sldpth(l) + NoahmpIO%DZS(l) = Noahmp50_struc(n)%sldpth(l) enddo NoahmpIO%croptype(1,:,1) = 0.0 @@ -112,15 +112,15 @@ subroutine NoahMPnew_coldstart(mtype) NoahmpIO%XLAT(1,1) = LIS_domain(n)%grid(LIS_domain(n)%gindex(col,row))%lat NoahmpIO%CROPCAT(1,1) = LIS_rc%cropclass - NoahmpIO%CANWAT(1,1) = NoahmpNew_struc(n)%init_canwat - NoahmpIO%IVGTYP(1,1) = NoahmpNew_struc(n)%noahmpnew(t)%vegetype - NoahmpIO%ISLTYP(1,1) = NoahmpNew_struc(n)%noahmpnew(t)%soiltype - NoahmpIO%TSK(1,1) = NoahmpNew_struc(n)%init_tskin - NoahmpIO%tvxy(1,1) = NoahmpNew_struc(n)%init_tskin - NoahmpIO%tgxy(1,1) = NoahmpNew_struc(n)%init_tskin + NoahmpIO%CANWAT(1,1) = Noahmp50_struc(n)%init_canwat + NoahmpIO%IVGTYP(1,1) = Noahmp50_struc(n)%noahmp50(t)%vegetype + NoahmpIO%ISLTYP(1,1) = Noahmp50_struc(n)%noahmp50(t)%soiltype + NoahmpIO%TSK(1,1) = Noahmp50_struc(n)%init_tskin + NoahmpIO%tvxy(1,1) = Noahmp50_struc(n)%init_tskin + NoahmpIO%tgxy(1,1) = Noahmp50_struc(n)%init_tskin NoahmpIO%canicexy(1,1) = 0.0 NoahmpIO%canliqxy(1,1) = 0.0 - NoahmpIO%TMN(1,1) = NoahmpNew_struc(n)%noahmpnew(t)%tbot + NoahmpIO%TMN(1,1) = Noahmp50_struc(n)%noahmp50(t)%tbot NoahmpIO%XICE(1,1) = 0.0 NoahmpIO%eahxy(1,1) = 0.0 NoahmpIO%tahxy(1,1) = 0.0 @@ -131,9 +131,9 @@ subroutine NoahMPnew_coldstart(mtype) NoahmpIO%alboldxy(1,1) = 0.0 NoahmpIO%qsnowxy(1,1) = 0.0 NoahmpIO%wslakexy(1,1) = 0.0 - NoahmpIO%zwtxy(1,1) = NoahmpNew_struc(n)%init_zwt - NoahmpIO%waxy(1,1) = NoahmpNew_struc(n)%init_wa - NoahmpIO%wtxy(1,1) = NoahmpNew_struc(n)%init_wt + NoahmpIO%zwtxy(1,1) = Noahmp50_struc(n)%init_zwt + NoahmpIO%waxy(1,1) = Noahmp50_struc(n)%init_wa + NoahmpIO%wtxy(1,1) = Noahmp50_struc(n)%init_wt NoahmpIO%lfmassxy(1,1) = 0.0 NoahmpIO%rtmassxy(1,1) = 0.0 NoahmpIO%stmassxy(1,1) = 0.0 @@ -141,21 +141,21 @@ subroutine NoahMPnew_coldstart(mtype) NoahmpIO%stblcpxy(1,1) = 0.0 NoahmpIO%fastcpxy(1,1) = 0.0 NoahmpIO%xsaixy(1,1) = 0.0 - NoahmpIO%lai(1,1) = NoahmpNew_struc(n)%init_lai + NoahmpIO%lai(1,1) = Noahmp50_struc(n)%init_lai NoahmpIO%grainxy(1,1) = 0.0 NoahmpIO%gddxy(1,1) = 0.0 NoahmpIO%cropcat(1,1) = 0.0 NoahmpIO%t2mvxy(1,1) = 0.0 NoahmpIO%t2mbxy(1,1) = 0.0 - NoahmpIO%IOPT_RUNSUB = NoahmpNew_struc(n)%runsub_opt - NoahmpIO%IOPT_CROP = NoahmpNew_struc(n)%crop_opt - NoahmpIO%sf_urban_physics = NoahmpNew_struc(n)%urban_opt - NoahmpIO%IOPT_IRR = NoahmpNew_struc(n)%irr_opt - NoahmpIO%IOPT_IRRM = NoahmpNew_struc(n)%irrm_opt + NoahmpIO%IOPT_RUNSUB = Noahmp50_struc(n)%runsub_opt + NoahmpIO%IOPT_CROP = Noahmp50_struc(n)%crop_opt + NoahmpIO%sf_urban_physics = Noahmp50_struc(n)%urban_opt + NoahmpIO%IOPT_IRR = Noahmp50_struc(n)%irr_opt + NoahmpIO%IOPT_IRRM = Noahmp50_struc(n)%irrm_opt ! The following variables are optional for groundwater dynamics iopt_run=5, ! so some random values are set temporarily. - do l=1, NoahmpNew_struc(n)%nsoil + do l=1, Noahmp50_struc(n)%nsoil NoahmpIO%smoiseq(1,l,1) = 0.0 end do NoahmpIO%smcwtdxy(1,1) = 0.0 @@ -168,7 +168,7 @@ subroutine NoahMPnew_coldstart(mtype) NoahmpIO%msfty(1,1) = 0.0 NoahmpIO%wtddt = 30.0 NoahmpIO%stepwtd = 0 - NoahmpIO%dtbl = NoahMPnew_struc(n)%ts + NoahmpIO%dtbl = NoahMP50_struc(n)%ts NoahmpIO%qrfsxy(1,1) = 0.0 NoahmpIO%qslatxy(1,1) = 0.0 NoahmpIO%fdepthxy(1,1) = 0.0 @@ -184,8 +184,8 @@ subroutine NoahMPnew_coldstart(mtype) NoahmpIO%taussxy(1,1) = 0.0 NoahmpIO%pgsxy(1,1) = 0 NoahmpIO%zsnsoxy(1,:,1) = 0.0 - NoahmpIO%SNOW(1,1) = NoahMPnew_struc(n)%init_sneqv - NoahmpIO%SNOWH(1,1) = NoahMPnew_struc(n)%init_snowh + NoahmpIO%SNOW(1,1) = NoahMP50_struc(n)%init_sneqv + NoahmpIO%SNOWH(1,1) = NoahMP50_struc(n)%init_snowh NoahmpIO%snicexy(1,:,1) = 0.0 NoahmpIO%snliqxy(1,:,1) = 0.0 NoahmpIO%tsnoxy(1,:,1) = 0.0 @@ -193,63 +193,63 @@ subroutine NoahMPnew_coldstart(mtype) ! main Noah-MP initialization module call NoahmpInitMain(NoahmpIO) - ! update NoahmpNew_struc initial values - NoahmpNew_struc(n)%noahmpnew(t)%sfcrunoff = NoahmpIO%sfcrunoff(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%udrrunoff = NoahmpIO%udrunoff(1,1) - do l=1, NoahmpNew_struc(n)%nsoil - NoahmpNew_struc(n)%noahmpnew(t)%smc(l) = NoahmpIO%SMOIS(1,l,1) + ! update Noahmp50_struc initial values + Noahmp50_struc(n)%noahmp50(t)%sfcrunoff = NoahmpIO%sfcrunoff(1,1) + Noahmp50_struc(n)%noahmp50(t)%udrrunoff = NoahmpIO%udrunoff(1,1) + do l=1, Noahmp50_struc(n)%nsoil + Noahmp50_struc(n)%noahmp50(t)%smc(l) = NoahmpIO%SMOIS(1,l,1) enddo - do l=1, NoahmpNew_struc(n)%nsoil - NoahmpNew_struc(n)%noahmpnew(t)%sh2o(l) = NoahmpIO%SH2O(1,l,1) + do l=1, Noahmp50_struc(n)%nsoil + Noahmp50_struc(n)%noahmp50(t)%sh2o(l) = NoahmpIO%SH2O(1,l,1) enddo - do l=1, NoahmpNew_struc(n)%nsoil - NoahmpNew_struc(n)%noahmpnew(t)%tslb(l) = NoahmpIO%TSLB(1,l,1) + do l=1, Noahmp50_struc(n)%nsoil + Noahmp50_struc(n)%noahmp50(t)%tslb(l) = NoahmpIO%TSLB(1,l,1) enddo - NoahmpNew_struc(n)%noahmpnew(t)%sneqv = NoahmpIO%SNOW(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%snowh = NoahmpIO%SNOWH(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%canwat = NoahmpIO%canwat(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%acsnom = NoahmpIO%acsnom(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%acsnow = NoahmpIO%acsnow(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%isnow = NoahmpIO%isnowxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%tv = NoahmpIO%tvxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%tg = NoahmpIO%tgxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%canice = NoahmpIO%canicexy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%canliq = NoahmpIO%canliqxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%fwet = NoahmpIO%fwetxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%sneqvo = NoahmpIO%sneqvoxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%albold = NoahmpIO%alboldxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%qsnow = NoahmpIO%qsnowxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%wslake = NoahmpIO%wslakexy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%zwt = NoahmpIO%zwtxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%wa = NoahmpIO%waxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%wt = NoahmpIO%wtxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%lfmass = NoahmpIO%lfmassxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%rtmass = NoahmpIO%rtmassxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%stmass = NoahmpIO%stmassxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%wood = NoahmpIO%woodxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%stblcp = NoahmpIO%stblcpxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%fastcp = NoahmpIO%fastcpxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%lai = NoahmpIO%lai(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%sai = NoahmpIO%xsaixy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%tauss = NoahmpIO%taussxy(1,1) - do l=1, NoahmpNew_struc(n)%nsoil - NoahmpNew_struc(n)%noahmpnew(t)%smoiseq(l) = NoahmpIO%smoiseq(1,l,1) + Noahmp50_struc(n)%noahmp50(t)%sneqv = NoahmpIO%SNOW(1,1) + Noahmp50_struc(n)%noahmp50(t)%snowh = NoahmpIO%SNOWH(1,1) + Noahmp50_struc(n)%noahmp50(t)%canwat = NoahmpIO%canwat(1,1) + Noahmp50_struc(n)%noahmp50(t)%acsnom = NoahmpIO%acsnom(1,1) + Noahmp50_struc(n)%noahmp50(t)%acsnow = NoahmpIO%acsnow(1,1) + Noahmp50_struc(n)%noahmp50(t)%isnow = NoahmpIO%isnowxy(1,1) + Noahmp50_struc(n)%noahmp50(t)%tv = NoahmpIO%tvxy(1,1) + Noahmp50_struc(n)%noahmp50(t)%tg = NoahmpIO%tgxy(1,1) + Noahmp50_struc(n)%noahmp50(t)%canice = NoahmpIO%canicexy(1,1) + Noahmp50_struc(n)%noahmp50(t)%canliq = NoahmpIO%canliqxy(1,1) + Noahmp50_struc(n)%noahmp50(t)%fwet = NoahmpIO%fwetxy(1,1) + Noahmp50_struc(n)%noahmp50(t)%sneqvo = NoahmpIO%sneqvoxy(1,1) + Noahmp50_struc(n)%noahmp50(t)%albold = NoahmpIO%alboldxy(1,1) + Noahmp50_struc(n)%noahmp50(t)%qsnow = NoahmpIO%qsnowxy(1,1) + Noahmp50_struc(n)%noahmp50(t)%wslake = NoahmpIO%wslakexy(1,1) + Noahmp50_struc(n)%noahmp50(t)%zwt = NoahmpIO%zwtxy(1,1) + Noahmp50_struc(n)%noahmp50(t)%wa = NoahmpIO%waxy(1,1) + Noahmp50_struc(n)%noahmp50(t)%wt = NoahmpIO%wtxy(1,1) + Noahmp50_struc(n)%noahmp50(t)%lfmass = NoahmpIO%lfmassxy(1,1) + Noahmp50_struc(n)%noahmp50(t)%rtmass = NoahmpIO%rtmassxy(1,1) + Noahmp50_struc(n)%noahmp50(t)%stmass = NoahmpIO%stmassxy(1,1) + Noahmp50_struc(n)%noahmp50(t)%wood = NoahmpIO%woodxy(1,1) + Noahmp50_struc(n)%noahmp50(t)%stblcp = NoahmpIO%stblcpxy(1,1) + Noahmp50_struc(n)%noahmp50(t)%fastcp = NoahmpIO%fastcpxy(1,1) + Noahmp50_struc(n)%noahmp50(t)%lai = NoahmpIO%lai(1,1) + Noahmp50_struc(n)%noahmp50(t)%sai = NoahmpIO%xsaixy(1,1) + Noahmp50_struc(n)%noahmp50(t)%tauss = NoahmpIO%taussxy(1,1) + do l=1, Noahmp50_struc(n)%nsoil + Noahmp50_struc(n)%noahmp50(t)%smoiseq(l) = NoahmpIO%smoiseq(1,l,1) enddo - NoahmpNew_struc(n)%noahmpnew(t)%smcwtd = NoahmpIO%smcwtdxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%deeprech = NoahmpIO%deeprechxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%rech = NoahmpIO%rechxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%grain = NoahmpIO%grainxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%gdd = NoahmpIO%gddxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%pgs = NoahmpIO%pgsxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%snowice(1:NoahmpNew_struc(n)%nsnow) = & - NoahmpIO%snicexy(1,-NoahmpNew_struc(n)%nsnow+1:0,1) - NoahmpNew_struc(n)%noahmpnew(t)%snowliq(1:NoahmpNew_struc(n)%nsnow) = & - NoahmpIO%snliqxy(1,-NoahmpNew_struc(n)%nsnow+1:0,1) - NoahmpNew_struc(n)%noahmpnew(t)%zss(1:NoahmpNew_struc(n)%nsnow+NoahmpNew_struc(n)%nsoil) = & - NoahmpIO%zsnsoxy(1,-NoahmpNew_struc(n)%nsnow+1:NoahmpNew_struc(n)%nsoil,1) - NoahmpNew_struc(n)%noahmpnew(t)%isnow = NoahmpIO%isnowxy(1,1) - NoahmpNew_struc(n)%noahmpnew(t)%tsno(1:NoahmpNew_struc(n)%nsnow) = & - NoahmpIO%tsnoxy(1,-NoahmpNew_struc(n)%nsnow+1:0,1) + Noahmp50_struc(n)%noahmp50(t)%smcwtd = NoahmpIO%smcwtdxy(1,1) + Noahmp50_struc(n)%noahmp50(t)%deeprech = NoahmpIO%deeprechxy(1,1) + Noahmp50_struc(n)%noahmp50(t)%rech = NoahmpIO%rechxy(1,1) + Noahmp50_struc(n)%noahmp50(t)%grain = NoahmpIO%grainxy(1,1) + Noahmp50_struc(n)%noahmp50(t)%gdd = NoahmpIO%gddxy(1,1) + Noahmp50_struc(n)%noahmp50(t)%pgs = NoahmpIO%pgsxy(1,1) + Noahmp50_struc(n)%noahmp50(t)%snowice(1:Noahmp50_struc(n)%nsnow) = & + NoahmpIO%snicexy(1,-Noahmp50_struc(n)%nsnow+1:0,1) + Noahmp50_struc(n)%noahmp50(t)%snowliq(1:Noahmp50_struc(n)%nsnow) = & + NoahmpIO%snliqxy(1,-Noahmp50_struc(n)%nsnow+1:0,1) + Noahmp50_struc(n)%noahmp50(t)%zss(1:Noahmp50_struc(n)%nsnow+Noahmp50_struc(n)%nsoil) = & + NoahmpIO%zsnsoxy(1,-Noahmp50_struc(n)%nsnow+1:Noahmp50_struc(n)%nsoil,1) + Noahmp50_struc(n)%noahmp50(t)%isnow = NoahmpIO%isnowxy(1,1) + Noahmp50_struc(n)%noahmp50(t)%tsno(1:Noahmp50_struc(n)%nsnow) = & + NoahmpIO%tsnoxy(1,-Noahmp50_struc(n)%nsnow+1:0,1) !----------------------------------------------------------------------- enddo ! t=1,1 endif ! coldstart @@ -263,8 +263,8 @@ subroutine NoahMPnew_coldstart(mtype) call LIS_date2time(LIS_rc%time, LIS_rc%doy, LIS_rc%gmt, LIS_rc%yr, & LIS_rc%mo, LIS_rc%da, LIS_rc%hr, LIS_rc%mn, LIS_rc%ss) - write(LIS_logunit,*) "[INFO] NoahMPnew_coldstart -- ", & + write(LIS_logunit,*) "[INFO] NoahMP50_coldstart -- ", & "Using the specified start time ", LIS_rc%time enddo ! nnest -end subroutine NoahMPnew_coldstart +end subroutine NoahMP50_coldstart diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_dynsetup.F90 b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_dynsetup.F90 similarity index 90% rename from lis/surfacemodels/land/noahmp.new/NoahMPnew_dynsetup.F90 rename to lis/surfacemodels/land/noahmp.5.0/NoahMP50_dynsetup.F90 index ab83837d2..306401e1c 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_dynsetup.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_dynsetup.F90 @@ -10,8 +10,8 @@ !BOP ! -! !ROUTINE: NoahMPnew_dynsetup -! \label{NoahMPnew_dynsetup} +! !ROUTINE: NoahMP50_dynsetup +! \label{NoahMP50_dynsetup} ! ! !REVISION HISTORY: ! This subroutine is generated with the Model Implementation Toolkit developed @@ -22,14 +22,14 @@ ! May 2023: Cenlin He, modified for refactored noahmp v5 and later ! !INTERFACE: -subroutine NoahMPnew_dynsetup(n) +subroutine NoahMP50_dynsetup(n) ! !USES: use LIS_coreMod, only : LIS_rc, LIS_domain, LIS_surface use LIS_fileIOMod, only : LIS_read_param use LIS_logMod, only : LIS_logunit use LIS_snowMod, only : LIS_snow_struc use LIS_timeMgrMod, only : LIS_date2time, LIS_tick - use NoahMPnew_lsmMod, only : NOAHMPnew_struc + use NoahMP50_lsmMod, only : NoahMP50_struc ! ! !DESCRIPTION: @@ -57,7 +57,7 @@ subroutine NoahMPnew_dynsetup(n) do t = 1, LIS_rc%npatch(n, LIS_rc%lsm_index) tid = LIS_surface(n, LIS_rc%lsm_index)%tile(t)%tile_id LIS_snow_struc(n)%sneqv(tid) = LIS_snow_struc(n)%sneqv(tid) + & - NoahMPnew_struc(n)%noahmpnew(t)%sneqv + NoahMP50_struc(n)%noahmp50(t)%sneqv end do ! Collect mean snow depth at grid points @@ -65,7 +65,7 @@ subroutine NoahMPnew_dynsetup(n) gid = LIS_surface(n,LIS_rc%lsm_index)%tile(t)%index LIS_snow_struc(n)%snowdepth(gid) = & LIS_snow_struc(n)%snowdepth(gid) + & - NoahMPnew_struc(n)%noahmpnew(t)%snowh + NoahMP50_struc(n)%noahmp50(t)%snowh ncount(gid) = ncount(gid) + 1 end do do t = 1, LIS_rc%ngrid(n) @@ -79,6 +79,6 @@ subroutine NoahMPnew_dynsetup(n) end if !TODO: add code here if needed. -end subroutine NoahMPnew_dynsetup +end subroutine NoahMP50_dynsetup ! generate date/time string for reading time-dependent variables diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_f2t.F90 b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_f2t.F90 similarity index 68% rename from lis/surfacemodels/land/noahmp.new/NoahMPnew_f2t.F90 rename to lis/surfacemodels/land/noahmp.5.0/NoahMP50_f2t.F90 index 8a75b4adc..7230cff84 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_f2t.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_f2t.F90 @@ -9,8 +9,8 @@ !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: NoahMPnew_f2t -! \label{NoahMPnew_f2t} +! !ROUTINE: NoahMP50_f2t +! \label{NoahMP50_f2t} ! ! !REVISION HISTORY: ! This subroutine is generated with the Model Implementation Toolkit developed @@ -21,14 +21,14 @@ ! May 2023: Cenlin He; updated for Noah-MP v5 (refactored) and later ! !INTERFACE: -subroutine NoahMPnew_f2t(n) +subroutine NoahMP50_f2t(n) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc , LIS_surface use LIS_metforcingMod, only : LIS_FORC_State use LIS_logMod, only : LIS_verify use LIS_FORC_AttributesMod - use NoahMPnew_lsmMod + use NoahMP50_lsmMod implicit none ! !ARGUMENTS: @@ -90,109 +90,109 @@ subroutine NoahMPnew_f2t(n) !!! GET FORCING FIELDS FROM LIS ! get near surface air temperature call ESMF_StateGet(LIS_FORC_State(n), trim(LIS_FORC_Tair%varname(1)), tmpField, rc=status) - call LIS_verify(status, "NoahMPnew_f2t: error getting Tair") + call LIS_verify(status, "NoahMP50_f2t: error getting Tair") call ESMF_FieldGet(tmpField, localDE = 0, farrayPtr = tmp, rc = status) - call LIS_verify(status, "NoahMPnew_f2t: error retrieving Tair") + call LIS_verify(status, "NoahMP50_f2t: error retrieving Tair") ! get near surface specific humidity call ESMF_StateGet(LIS_FORC_State(n), trim(LIS_FORC_Qair%varname(1)), q2Field, rc=status) - call LIS_verify(status, "NoahMPnew_f2t: error getting Qair") + call LIS_verify(status, "NoahMP50_f2t: error getting Qair") call ESMF_FieldGet(q2Field, localDE = 0, farrayPtr = q2, rc = status) - call LIS_verify(status, "NoahMPnew_f2t: error retrieving Qair") + call LIS_verify(status, "NoahMP50_f2t: error retrieving Qair") ! get incident shortwave radiation call ESMF_StateGet(LIS_FORC_State(n), trim(LIS_FORC_SWdown%varname(1)), swdField, rc=status) - call LIS_verify(status, "NoahMPnew_f2t: error getting Swdown") + call LIS_verify(status, "NoahMP50_f2t: error getting Swdown") call ESMF_FieldGet(swdField, localDE = 0, farrayPtr = swd, rc = status) - call LIS_verify(status, "NoahMPnew_f2t: error retrieving Swdown") + call LIS_verify(status, "NoahMP50_f2t: error retrieving Swdown") ! get incident longwave radiation call ESMF_StateGet(LIS_FORC_State(n), trim(LIS_FORC_LWdown%varname(1)), lwdField, rc=status) - call LIS_verify(status, "NoahMPnew_f2t: error getting Lwdown") + call LIS_verify(status, "NoahMP50_f2t: error getting Lwdown") call ESMF_FieldGet(lwdField, localDE = 0, farrayPtr = lwd, rc = status) - call LIS_verify(status, "NoahMPnew_f2t: error retrieving Lwdown") + call LIS_verify(status, "NoahMP50_f2t: error retrieving Lwdown") ! get eastward wind call ESMF_StateGet(LIS_FORC_State(n), trim(LIS_FORC_Wind_E%varname(1)), uField, rc=status) - call LIS_verify(status, "NoahMPnew_f2t: error getting Wind_E") + call LIS_verify(status, "NoahMP50_f2t: error getting Wind_E") call ESMF_FieldGet(uField, localDE = 0, farrayPtr = uwind, rc = status) - call LIS_verify(status, "NoahMPnew_f2t: error retrieving Wind_E") + call LIS_verify(status, "NoahMP50_f2t: error retrieving Wind_E") ! get northward wind call ESMF_StateGet(LIS_FORC_State(n), trim(LIS_FORC_Wind_N%varname(1)), vField, rc=status) - call LIS_verify(status, "NoahMPnew_f2t: error getting Wind_N") + call LIS_verify(status, "NoahMP50_f2t: error getting Wind_N") call ESMF_FieldGet(vField, localDE = 0, farrayPtr = vwind, rc = status) - call LIS_verify(status, "NoahMPnew_f2t: error retrieving Wind_N") + call LIS_verify(status, "NoahMP50_f2t: error retrieving Wind_N") ! get surface pressure call ESMF_StateGet(LIS_FORC_State(n), trim(LIS_FORC_Psurf%varname(1)), psurfField, rc=status) - call LIS_verify(status, "NoahMPnew_f2t: error getting Psurf") + call LIS_verify(status, "NoahMP50_f2t: error getting Psurf") call ESMF_FieldGet(psurfField, localDE = 0, farrayPtr = psurf, rc = status) - call LIS_verify(status, "NoahMPnew_f2t: error retrieving Psurf") + call LIS_verify(status, "NoahMP50_f2t: error retrieving Psurf") ! get rainfall rate call ESMF_StateGet(LIS_FORC_State(n), trim(LIS_FORC_Rainf%varname(1)), pcpField, rc=status) - call LIS_verify(status, "NoahMPnew_f2t: error getting Rainf") + call LIS_verify(status, "NoahMP50_f2t: error getting Rainf") call ESMF_FieldGet(pcpField, localDE = 0, farrayPtr = pcp, rc = status) - call LIS_verify(status, "NoahMPnew_f2t: error retrieving Rainf") + call LIS_verify(status, "NoahMP50_f2t: error retrieving Rainf") ! get snowfall rate if(LIS_Forc_Snowf%selectOpt .eq. 1) then call ESMF_StateGet(LIS_FORC_State(n), trim(LIS_FORC_Snowf%varname(1)), snowField, rc=status) - call LIS_verify(status, "NoahMPnew_f2t: error getting Snowf") + call LIS_verify(status, "NoahMP50_f2t: error getting Snowf") call ESMF_FieldGet(snowField, localDE = 0, farrayPtr = snowf, rc = status) - call LIS_verify(status, "NoahMPnew_f2t: error retrieving Snowf") + call LIS_verify(status, "NoahMP50_f2t: error retrieving Snowf") endif !!! set the forcing counter - NOAHMPnew_struc(n)%forc_count = NOAHMPnew_struc(n)%forc_count + 1 + NoahMP50_struc(n)%forc_count = NoahMP50_struc(n)%forc_count + 1 !!! pass forcing data to tiles do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) tid = LIS_surface(n, LIS_rc%lsm_index)%tile(t)%tile_id ! TAIR - NoahMPnew_struc(n)%noahmpnew(t)%tair = NoahMPnew_struc(n)%noahmpnew(t)%tair + tmp(tid) + NoahMP50_struc(n)%noahmp50(t)%tair = NoahMP50_struc(n)%noahmp50(t)%tair + tmp(tid) ! QAIR - NoahMPnew_struc(n)%noahmpnew(t)%qair = NoahMPnew_struc(n)%noahmpnew(t)%qair + q2(tid) + NoahMP50_struc(n)%noahmp50(t)%qair = NoahMP50_struc(n)%noahmp50(t)%qair + q2(tid) ! SWDOWN - NoahMPnew_struc(n)%noahmpnew(t)%swdown = NoahMPnew_struc(n)%noahmpnew(t)%swdown + swd(tid) + NoahMP50_struc(n)%noahmp50(t)%swdown = NoahMP50_struc(n)%noahmp50(t)%swdown + swd(tid) ! LWDOWN - NoahMPnew_struc(n)%noahmpnew(t)%lwdown = NoahMPnew_struc(n)%noahmpnew(t)%lwdown + lwd(tid) + NoahMP50_struc(n)%noahmp50(t)%lwdown = NoahMP50_struc(n)%noahmp50(t)%lwdown + lwd(tid) ! WIND_E - NoahMPnew_struc(n)%noahmpnew(t)%wind_e = NoahMPnew_struc(n)%noahmpnew(t)%wind_e + uwind(tid) + NoahMP50_struc(n)%noahmp50(t)%wind_e = NoahMP50_struc(n)%noahmp50(t)%wind_e + uwind(tid) ! WIND_N - NoahMPnew_struc(n)%noahmpnew(t)%wind_n = NoahMPnew_struc(n)%noahmpnew(t)%wind_n + vwind(tid) + NoahMP50_struc(n)%noahmp50(t)%wind_n = NoahMP50_struc(n)%noahmp50(t)%wind_n + vwind(tid) ! PSURF - NoahMPnew_struc(n)%noahmpnew(t)%psurf = NoahMPnew_struc(n)%noahmpnew(t)%psurf + psurf(tid) + NoahMP50_struc(n)%noahmp50(t)%psurf = NoahMP50_struc(n)%noahmp50(t)%psurf + psurf(tid) ! RAINF - NoahMPnew_struc(n)%noahmpnew(t)%prcp = NoahMPnew_struc(n)%noahmpnew(t)%prcp + pcp(tid) + NoahMP50_struc(n)%noahmp50(t)%prcp = NoahMP50_struc(n)%noahmp50(t)%prcp + pcp(tid) ! SNOWF ! If there is snowf add it to precipitation. Noah-MP does not use ! separate rainf and snowf. It determines what to do with precipitation. if (LIS_Forc_Snowf%selectOpt.eq.1) then if (snowf(tid) .ne. LIS_rc%udef) then - NoahMPnew_struc(n)%noahmpnew(t)%prcp = NoahMPnew_struc(n)%noahmpnew(t)%prcp + snowf(tid) + NoahMP50_struc(n)%noahmp50(t)%prcp = NoahMP50_struc(n)%noahmp50(t)%prcp + snowf(tid) endif endif enddo -end subroutine NoahMPnew_f2t +end subroutine NoahMP50_f2t diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_finalize.F90 b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_finalize.F90 similarity index 53% rename from lis/surfacemodels/land/noahmp.new/NoahMPnew_finalize.F90 rename to lis/surfacemodels/land/noahmp.5.0/NoahMP50_finalize.F90 index fb206ade2..d584154c6 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_finalize.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_finalize.F90 @@ -10,8 +10,8 @@ !BOP ! -! !ROUTINE: NoahMPnew_finalize -! \label{NoahMPnew_finalize} +! !ROUTINE: NoahMP50_finalize +! \label{NoahMP50_finalize} ! ! !REVISION HISTORY: ! This subroutine is generated with the Model Implementation Toolkit developed @@ -22,14 +22,14 @@ ! May 2023: Cenlin He, modified for refactored NoahMP v5 and later ! !INTERFACE: -subroutine NoahMPnew_finalize() +subroutine NoahMP50_finalize() ! !USES: use LIS_coreMod, only : LIS_rc - use NoahMPnew_lsmMod + use NoahMP50_lsmMod ! ! !DESCRIPTION: ! -! This routine cleans up the allocated memory structures in NoahMPnew +! This routine cleans up the allocated memory structures in NoahMP50 ! !EOP implicit none @@ -39,32 +39,32 @@ subroutine NoahMPnew_finalize() do n=1, LIS_rc%nnest ! free memory allocated for each tile do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - deallocate(NoahMPnew_struc(n)%noahmpnew(t)%shdfac_monthly) - deallocate(NoahMPnew_struc(n)%noahmpnew(t)%soilcomp) - deallocate(NoahMPnew_struc(n)%noahmpnew(t)%smc) - deallocate(NoahMPnew_struc(n)%noahmpnew(t)%sh2o) - deallocate(NoahMPnew_struc(n)%noahmpnew(t)%tslb) - deallocate(NoahMPnew_struc(n)%noahmpnew(t)%tsno) - deallocate(NoahMPnew_struc(n)%noahmpnew(t)%zss) - deallocate(NoahMPnew_struc(n)%noahmpnew(t)%snowice) - deallocate(NoahMPnew_struc(n)%noahmpnew(t)%snowliq) - deallocate(NoahMPnew_struc(n)%noahmpnew(t)%smoiseq) - deallocate(NoahMPnew_struc(n)%noahmpnew(t)%accetrani) + deallocate(NoahMP50_struc(n)%noahmp50(t)%shdfac_monthly) + deallocate(NoahMP50_struc(n)%noahmp50(t)%soilcomp) + deallocate(NoahMP50_struc(n)%noahmp50(t)%smc) + deallocate(NoahMP50_struc(n)%noahmp50(t)%sh2o) + deallocate(NoahMP50_struc(n)%noahmp50(t)%tslb) + deallocate(NoahMP50_struc(n)%noahmp50(t)%tsno) + deallocate(NoahMP50_struc(n)%noahmp50(t)%zss) + deallocate(NoahMP50_struc(n)%noahmp50(t)%snowice) + deallocate(NoahMP50_struc(n)%noahmp50(t)%snowliq) + deallocate(NoahMP50_struc(n)%noahmp50(t)%smoiseq) + deallocate(NoahMP50_struc(n)%noahmp50(t)%accetrani) end do ! tile loop - ! free memory for noahmpnew, the data at tile level - deallocate(NoahMPnew_struc(n)%noahmpnew) + ! free memory for noahmp50, the data at tile level + deallocate(NoahMP50_struc(n)%noahmp50) ! free momory for constant parameter - deallocate(NoahMPnew_struc(n)%sldpth) + deallocate(NoahMP50_struc(n)%sldpth) ! free momory for initial state variable - deallocate(NoahMPnew_struc(n)%init_smc) - deallocate(NoahMPnew_struc(n)%init_tslb) + deallocate(NoahMP50_struc(n)%init_smc) + deallocate(NoahMP50_struc(n)%init_tslb) end do ! nest loop - deallocate(NoahMPnew_struc) + deallocate(NoahMP50_struc) -end subroutine NoahMPnew_finalize +end subroutine NoahMP50_finalize diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_lsmMod.F90 b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_lsmMod.F90 similarity index 66% rename from lis/surfacemodels/land/noahmp.new/NoahMPnew_lsmMod.F90 rename to lis/surfacemodels/land/noahmp.5.0/NoahMP50_lsmMod.F90 index ab2b6995e..bdfe5fdb8 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_lsmMod.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_lsmMod.F90 @@ -9,24 +9,24 @@ !-------------------------END NOTICE -- DO NOT EDIT----------------------- !#include "LIS_misc.h" -module NoahMPnew_lsmMod +module NoahMP50_lsmMod !BOP ! -! !MODULE: NoahMPnew_lsmMod +! !MODULE: NoahMP50_lsmMod ! ! !DESCRIPTION: ! ! This module provides the definition of derived data type used to -! control the operation of NoahMPnew model. It also provides the entry method -! for the initialization of NoahMPnew-specific variables. The derived -! data type {\tt NoahmpNew\_struc} includes the variables that specify +! control the operation of NoahMP50 model. It also provides the entry method +! for the initialization of NoahMP50-specific variables. The derived +! data type {\tt Noahmp50\_struc} includes the variables that specify ! the runtime options and other control variables as described below: ! ! \begin{description} ! \item[rfile] -! name of the NoahMPnew restart file +! name of the NoahMP50 restart file ! \item[rformat] -! format of restart file (binary or netcdf) for NoahMPnew +! format of restart file (binary or netcdf) for NoahMP50 ! \item[LDT\_ncvar\_vegetype] ! LDT NetCDF variable name for vegetation type ! \item[LDT\_ncvar\_soiltype] @@ -58,17 +58,17 @@ module NoahMPnew_lsmMod ! \item[LDT\_ncvar\_tdfract] ! LDT NetCDF variable name for tile drainage fraction ! \item[ts] -! NoahMPnew model time step in second +! NoahMP50 model time step in second ! \item[ts\_soil] -! NoahMPnew model soil time step in second +! NoahMP50 model soil time step in second ! \item[count] ! variable to keep track of the number of timesteps before an output ! \item[rstInterval] ! restart writing interval ! \item[outInterval] ! output writing interval -! \item[noahmpnew] -! NoahMPnew model specific variables +! \item[noahmp50] +! NoahMP50 model specific variables ! \item[forc\_count] ! counter of forcing data ! \item[dz8w] @@ -143,7 +143,7 @@ module NoahMPnew_lsmMod ! 05/01/23: Cenlin He, update to work with refactored Noah-MP (v5.0 and later) ! !USES: - use NoahMPnew_module + use NoahMP50_module use LIS_constantsMod, only : LIS_CONST_PATH_LEN implicit none @@ -152,13 +152,13 @@ module NoahMPnew_lsmMod !------------------------------------------------------------------------- ! PUBLIC MEMBER FUNCTIONS !------------------------------------------------------------------------- - public :: NoahMPnew_ini + public :: NoahMP50_ini !------------------------------------------------------------------------- ! PUBLIC TYPES !------------------------------------------------------------------------- - public :: NoahmpNew_struc + public :: Noahmp50_struc !EOP - type, public :: NoahMPnew_type_dec + type, public :: NoahMP50_type_dec character(len=LIS_CONST_PATH_LEN) :: rfile character*256 :: rformat !------------------------------------------------------------------------- @@ -244,20 +244,20 @@ module NoahMPnew_lsmMod integer :: tdrn_opt integer :: infdv_opt integer :: urban_opt - type(NoahMPnewdec), pointer :: noahmpnew(:) - end type NoahMPnew_type_dec + type(NoahMP50dec), pointer :: noahmp50(:) + end type NoahMP50_type_dec - type(NoahMPnew_type_dec), pointer :: NoahmpNew_struc(:) + type(NoahMP50_type_dec), pointer :: Noahmp50_struc(:) contains !BOP ! -! !ROUTINE: NoahMPnew_ini -! \label{NoahMPnew_ini} +! !ROUTINE: NoahMP50_ini +! \label{NoahMP50_ini} ! ! !INTERFACE: - subroutine NoahMPnew_ini() + subroutine NoahMP50_ini() ! !USES: use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_verify, LIS_logunit @@ -266,14 +266,14 @@ subroutine NoahMPnew_ini() use LIS_surfaceModelDataMod, only : LIS_sfmodel_struc ! !DESCRIPTION: ! -! This routine creates the datatypes and allocates memory for NoahMPnew-specific +! This routine creates the datatypes and allocates memory for NoahMP50-specific ! variables. It also invokes the routine to read the runtime specific options -! for NoahMPnew from the configuration file. +! for NoahMP50 from the configuration file. ! ! The routines invoked are: ! \begin{description} -! \item[NoahMPnew\_readcrd](\ref{NoahMPnew_readcrd})\\ -! reads the runtime options for NoahMPnew model +! \item[NoahMP50\_readcrd](\ref{NoahMP50_readcrd})\\ +! reads the runtime options for NoahMP50 model ! \end{description} !EOP implicit none @@ -282,111 +282,111 @@ subroutine NoahMPnew_ini() character*3 :: fnest ! EMK for RHMin ! allocate memory for nest - allocate(NoahmpNew_struc(LIS_rc%nnest)) + allocate(Noahmp50_struc(LIS_rc%nnest)) ! read configuation information from lis.config file - call NoahMPnew_readcrd() + call NoahMP50_readcrd() do n=1, LIS_rc%nnest ! allocate memory for all tiles in current nest - allocate(NoahmpNew_struc(n)%noahmpnew(LIS_rc%npatch(n, LIS_rc%lsm_index))) + allocate(Noahmp50_struc(n)%noahmp50(LIS_rc%npatch(n, LIS_rc%lsm_index))) !------------------------------------------------------------------------ ! allocate memory for vector variables passed to model interfaces ! TODO: check the following allocation statements carefully! !------------------------------------------------------------------------ ! allocate memory for multilevel spatial parameter do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - allocate(NoahmpNew_struc(n)%noahmpnew(t)%shdfac_monthly(12)) - allocate(NoahmpNew_struc(n)%noahmpnew(t)%soilcomp(8)) + allocate(Noahmp50_struc(n)%noahmp50(t)%shdfac_monthly(12)) + allocate(Noahmp50_struc(n)%noahmp50(t)%soilcomp(8)) enddo ! allocate memory for state variables do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - allocate(NoahmpNew_struc(n)%noahmpnew(t)%smc(NoahmpNew_struc(n)%nsoil)) - allocate(NoahmpNew_struc(n)%noahmpnew(t)%sh2o(NoahmpNew_struc(n)%nsoil)) - allocate(NoahmpNew_struc(n)%noahmpnew(t)%tslb(NoahmpNew_struc(n)%nsoil)) - allocate(NoahmpNew_struc(n)%noahmpnew(t)%tsno(NoahmpNew_struc(n)%nsnow)) - allocate(NoahmpNew_struc(n)%noahmpnew(t)%zss(NoahmpNew_struc(n)%nsnow + NoahmpNew_struc(n)%nsoil)) - allocate(NoahmpNew_struc(n)%noahmpnew(t)%snowice(NoahmpNew_struc(n)%nsnow)) - allocate(NoahmpNew_struc(n)%noahmpnew(t)%snowliq(NoahmpNew_struc(n)%nsnow)) - allocate(NoahmpNew_struc(n)%noahmpnew(t)%smoiseq(NoahmpNew_struc(n)%nsoil)) - allocate(NoahmpNew_struc(n)%noahmpnew(t)%accetrani(NoahmpNew_struc(n)%nsoil)) + allocate(Noahmp50_struc(n)%noahmp50(t)%smc(Noahmp50_struc(n)%nsoil)) + allocate(Noahmp50_struc(n)%noahmp50(t)%sh2o(Noahmp50_struc(n)%nsoil)) + allocate(Noahmp50_struc(n)%noahmp50(t)%tslb(Noahmp50_struc(n)%nsoil)) + allocate(Noahmp50_struc(n)%noahmp50(t)%tsno(Noahmp50_struc(n)%nsnow)) + allocate(Noahmp50_struc(n)%noahmp50(t)%zss(Noahmp50_struc(n)%nsnow + Noahmp50_struc(n)%nsoil)) + allocate(Noahmp50_struc(n)%noahmp50(t)%snowice(Noahmp50_struc(n)%nsnow)) + allocate(Noahmp50_struc(n)%noahmp50(t)%snowliq(Noahmp50_struc(n)%nsnow)) + allocate(Noahmp50_struc(n)%noahmp50(t)%smoiseq(Noahmp50_struc(n)%nsoil)) + allocate(Noahmp50_struc(n)%noahmp50(t)%accetrani(Noahmp50_struc(n)%nsoil)) enddo ! initialize forcing variables to zeros do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - NoahmpNew_struc(n)%noahmpnew(t)%lwdown = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%swdown = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%psurf = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%prcp = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%tair = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%qair = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%wind_e = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%wind_n = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%sfcheadrt = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%irnumsi = 0 - NoahmpNew_struc(n)%noahmpnew(t)%irnummi = 0 - NoahmpNew_struc(n)%noahmpnew(t)%irnumfi = 0 - NoahmpNew_struc(n)%noahmpnew(t)%irwatsi = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%irwatmi = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%irwatfi = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%irsivol = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%irmivol = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%irfivol = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%ireloss = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%irrsplh = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%qtdrain = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%accssoil = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%accqinsur = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%accqseva = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%accetrani = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%accdwater = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%accprcp = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%accecan = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%accetran = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%accedir = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%sfcrunoff = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%udrrunoff = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%deeprech = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%rech = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%acsnom = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%acsnow = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%irfract = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%sifract = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%mifract = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%fifract = 0.0 + Noahmp50_struc(n)%noahmp50(t)%lwdown = 0.0 + Noahmp50_struc(n)%noahmp50(t)%swdown = 0.0 + Noahmp50_struc(n)%noahmp50(t)%psurf = 0.0 + Noahmp50_struc(n)%noahmp50(t)%prcp = 0.0 + Noahmp50_struc(n)%noahmp50(t)%tair = 0.0 + Noahmp50_struc(n)%noahmp50(t)%qair = 0.0 + Noahmp50_struc(n)%noahmp50(t)%wind_e = 0.0 + Noahmp50_struc(n)%noahmp50(t)%wind_n = 0.0 + Noahmp50_struc(n)%noahmp50(t)%sfcheadrt = 0.0 + Noahmp50_struc(n)%noahmp50(t)%irnumsi = 0 + Noahmp50_struc(n)%noahmp50(t)%irnummi = 0 + Noahmp50_struc(n)%noahmp50(t)%irnumfi = 0 + Noahmp50_struc(n)%noahmp50(t)%irwatsi = 0.0 + Noahmp50_struc(n)%noahmp50(t)%irwatmi = 0.0 + Noahmp50_struc(n)%noahmp50(t)%irwatfi = 0.0 + Noahmp50_struc(n)%noahmp50(t)%irsivol = 0.0 + Noahmp50_struc(n)%noahmp50(t)%irmivol = 0.0 + Noahmp50_struc(n)%noahmp50(t)%irfivol = 0.0 + Noahmp50_struc(n)%noahmp50(t)%ireloss = 0.0 + Noahmp50_struc(n)%noahmp50(t)%irrsplh = 0.0 + Noahmp50_struc(n)%noahmp50(t)%qtdrain = 0.0 + Noahmp50_struc(n)%noahmp50(t)%accssoil = 0.0 + Noahmp50_struc(n)%noahmp50(t)%accqinsur = 0.0 + Noahmp50_struc(n)%noahmp50(t)%accqseva = 0.0 + Noahmp50_struc(n)%noahmp50(t)%accetrani = 0.0 + Noahmp50_struc(n)%noahmp50(t)%accdwater = 0.0 + Noahmp50_struc(n)%noahmp50(t)%accprcp = 0.0 + Noahmp50_struc(n)%noahmp50(t)%accecan = 0.0 + Noahmp50_struc(n)%noahmp50(t)%accetran = 0.0 + Noahmp50_struc(n)%noahmp50(t)%accedir = 0.0 + Noahmp50_struc(n)%noahmp50(t)%sfcrunoff = 0.0 + Noahmp50_struc(n)%noahmp50(t)%udrrunoff = 0.0 + Noahmp50_struc(n)%noahmp50(t)%deeprech = 0.0 + Noahmp50_struc(n)%noahmp50(t)%rech = 0.0 + Noahmp50_struc(n)%noahmp50(t)%acsnom = 0.0 + Noahmp50_struc(n)%noahmp50(t)%acsnow = 0.0 + Noahmp50_struc(n)%noahmp50(t)%irfract = 0.0 + Noahmp50_struc(n)%noahmp50(t)%sifract = 0.0 + Noahmp50_struc(n)%noahmp50(t)%mifract = 0.0 + Noahmp50_struc(n)%noahmp50(t)%fifract = 0.0 !ag(05Jan2021) - NoahmpNew_struc(n)%noahmpnew(t)%rivsto = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%fldsto = 0.0 - NoahmpNew_struc(n)%noahmpnew(t)%fldfrc = 0.0 + Noahmp50_struc(n)%noahmp50(t)%rivsto = 0.0 + Noahmp50_struc(n)%noahmp50(t)%fldsto = 0.0 + Noahmp50_struc(n)%noahmp50(t)%fldfrc = 0.0 enddo ! end of tile (t) loop !------------------------------------------------------------------------ ! Model timestep Alarm !------------------------------------------------------------------------ - NoahmpNew_struc(n)%forc_count = 0 + Noahmp50_struc(n)%forc_count = 0 - call LIS_update_timestep(LIS_rc, n, NoahmpNew_struc(n)%ts) + call LIS_update_timestep(LIS_rc, n, Noahmp50_struc(n)%ts) - call LIS_registerAlarm("NoahMPnew model alarm",& - NoahmpNew_struc(n)%ts, & - NoahmpNew_struc(n)%ts) + call LIS_registerAlarm("NoahMP50 model alarm",& + Noahmp50_struc(n)%ts, & + Noahmp50_struc(n)%ts) ! CH2023: add soil timestep that is allowed to be different from main timestep - call LIS_registerAlarm("NoahMPnew model alarm",& - NoahmpNew_struc(n)%ts, & - NoahmpNew_struc(n)%ts_soil) + call LIS_registerAlarm("NoahMP50 model alarm",& + Noahmp50_struc(n)%ts, & + Noahmp50_struc(n)%ts_soil) - call LIS_registerAlarm("NoahMPnew restart alarm", & - NoahmpNew_struc(n)%ts,& - NoahmpNew_struc(n)%rstInterval) + call LIS_registerAlarm("NoahMP50 restart alarm", & + Noahmp50_struc(n)%ts,& + Noahmp50_struc(n)%rstInterval) ! EMK Add alarm to reset tair_agl_min for RHMin. This should ! match the output interval, since that is used for calculating ! Tair_F_min. write(fnest,'(i3.3)') n - call LIS_registerAlarm("NoahMPnew RHMin alarm "//trim(fnest),& - NoahmpNew_struc(n)%ts,& + call LIS_registerAlarm("NoahMP50 RHMin alarm "//trim(fnest),& + Noahmp50_struc(n)%ts,& LIS_sfmodel_struc(n)%outInterval) if (LIS_sfmodel_struc(n)%outInterval .gt. 86400 .or. & trim(LIS_sfmodel_struc(n)%outIntervalType) .eq. "dekad") then @@ -396,23 +396,23 @@ subroutine NoahMPnew_ini() end if ! Initialize min/max values to implausible values. - NoahmpNew_struc(n)%noahmpnew(:)%tair_agl_min = 999.0 - NoahmpNew_struc(n)%noahmpnew(:)%rhmin = 999.0 + Noahmp50_struc(n)%noahmp50(:)%tair_agl_min = 999.0 + Noahmp50_struc(n)%noahmp50(:)%rhmin = 999.0 !------------------------------------------------------------------------ ! TODO: setup number of soil moisture/temperature layers and depth here !------------------------------------------------------------------------ ! TODO: set number of soil moisture layers in surface model - LIS_sfmodel_struc(n)%nsm_layers = NoahmpNew_struc(n)%nsoil + LIS_sfmodel_struc(n)%nsm_layers = Noahmp50_struc(n)%nsoil ! TODO: set number of soil temperature layers in surface model - LIS_sfmodel_struc(n)%nst_layers = NoahmpNew_struc(n)%nsoil - allocate(LIS_sfmodel_struc(n)%lyrthk(NoahmpNew_struc(n)%nsoil)) - !LIS_sfmodel_struc(n)%lyrthk(:) = NoahmpNew_struc(n)%sldpth(:) + LIS_sfmodel_struc(n)%nst_layers = Noahmp50_struc(n)%nsoil + allocate(LIS_sfmodel_struc(n)%lyrthk(Noahmp50_struc(n)%nsoil)) + !LIS_sfmodel_struc(n)%lyrthk(:) = Noahmp50_struc(n)%sldpth(:) !EMK...Output soil layer thicknesses in centimeters for !consistency with other LSMs. LIS_sfmodel_struc(n)%lyrthk(:) = & - 100*NoahmpNew_struc(n)%sldpth(:) - LIS_sfmodel_struc(n)%ts = NoahmpNew_struc(n)%ts + 100*Noahmp50_struc(n)%sldpth(:) + LIS_sfmodel_struc(n)%ts = Noahmp50_struc(n)%ts enddo - end subroutine NoahMPnew_ini -end module NoahMPnew_lsmMod + end subroutine NoahMP50_ini +end module NoahMP50_lsmMod diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_main.F90 b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_main.F90 similarity index 58% rename from lis/surfacemodels/land/noahmp.new/NoahMPnew_main.F90 rename to lis/surfacemodels/land/noahmp.5.0/NoahMP50_main.F90 index a858a7dc9..f77040185 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_main.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_main.F90 @@ -11,15 +11,15 @@ #include "LIS_misc.h" !BOP ! -! !ROUTINE: NoahMPnew_main -! \label{NoahMPnew_main} +! !ROUTINE: NoahMP50_main +! \label{NoahMP50_main} ! ! !REVISION HISTORY: ! This subroutine is generated with the Model Implementation Toolkit ! developed by Shugong Wang for the NASA Land Information System V7. ! The initial specification of the subroutine is by Sujay Kumar. ! -! 10/25/18: Shugong Wang, Zhuo Wang; initial implementation for NoahMPnew with LIS-7 +! 10/25/18: Shugong Wang, Zhuo Wang; initial implementation for NoahMP50 with LIS-7 ! 05/15/19: Yeosang Yoon; code added for snow DA to work ! 10/29/19: David Mocko; Added RELSMC to output, and an option ! for different units for Qs/Qsb/Albedo @@ -27,7 +27,7 @@ ! 05/23/23: Cenlin He: modified for refactored NoahMP v5 and later ! !INTERFACE: -subroutine NoahMPnew_main(n) +subroutine NoahMP50_main(n) ! !USES: use LIS_coreMod use LIS_histDataMod @@ -36,7 +36,7 @@ subroutine NoahMPnew_main(n) use LIS_vegDataMod, only : LIS_lai, LIS_sai use LIS_logMod, only : LIS_logunit, LIS_endrun use LIS_FORC_AttributesMod - use NoahMPnew_lsmMod + use NoahMP50_lsmMod use NoahmpIOVarType implicit none @@ -53,8 +53,8 @@ subroutine NoahMPnew_main(n) ! ! !DESCRIPTION: -! This is the entry point for calling the NoahMPnew physics. -! This routine calls the {\tt noahmp_driver_new} routine that performs +! This is the entry point for calling the NoahMP50 physics. +! This routine calls the {\tt noahmp_driver_50} routine that performs ! the land surface computations, to solve water and energy equations. ! The arguments are: @@ -64,7 +64,7 @@ subroutine NoahMPnew_main(n) ! \end{description} !EOP -! define variables for NoahMPnew +! define variables for NoahMP50 ! Code added by Zhuo Wang 02/28/2019 real :: AvgSurfT_out ! average surface temperature [K] @@ -79,9 +79,9 @@ subroutine NoahMPnew_main(n) ! -------------------------------- - ! check NoahMPnew alarm. If alarm is ring, run model. + ! check NoahMP50 alarm. If alarm is ring, run model. - alarmCheck = LIS_isAlarmRinging(LIS_rc, "NoahMPnew model alarm") + alarmCheck = LIS_isAlarmRinging(LIS_rc, "NoahMP50 model alarm") if (alarmCheck) Then do t = 1, LIS_rc%npatch(n, LIS_rc%lsm_index) @@ -91,94 +91,94 @@ subroutine NoahMPnew_main(n) lat = LIS_domain(n)%grid(LIS_domain(n)%gindex(col, row))%lat lon = LIS_domain(n)%grid(LIS_domain(n)%gindex(col, row))%lon - ! retrieve forcing data from NoahMPnew_struc(n)%noahmpnew(t) and assign to 1-D NoahmpIO variables + ! retrieve forcing data from NoahMP50_struc(n)%noahmp50(t) and assign to 1-D NoahmpIO variables ! T_PHY: air temperature - NoahmpIO%T_PHY(1,1,1) = NoahMPnew_struc(n)%noahmpnew(t)%tair / NoahMPnew_struc(n)%forc_count + NoahmpIO%T_PHY(1,1,1) = NoahMP50_struc(n)%noahmp50(t)%tair / NoahMP50_struc(n)%forc_count ! Yeosang Yoon, for snow DA - NoahMPnew_struc(n)%noahmpnew(t)%sfctmp = NoahmpIO%T_PHY(1,1,1) + NoahMP50_struc(n)%noahmp50(t)%sfctmp = NoahmpIO%T_PHY(1,1,1) ! P8W: air pressure - NoahmpIO%P8W(1,1,1) = NoahMPnew_struc(n)%noahmpnew(t)%psurf / NoahMPnew_struc(n)%forc_count + NoahmpIO%P8W(1,1,1) = NoahMP50_struc(n)%noahmp50(t)%psurf / NoahMP50_struc(n)%forc_count ! U_PHY: U wind component - NoahmpIO%U_PHY(1,1,1) = NoahMPnew_struc(n)%noahmpnew(t)%wind_e / NoahMPnew_struc(n)%forc_count + NoahmpIO%U_PHY(1,1,1) = NoahMP50_struc(n)%noahmp50(t)%wind_e / NoahMP50_struc(n)%forc_count ! V_PHY: V wind component - NoahmpIO%V_PHY(1,1,1) = NoahMPnew_struc(n)%noahmpnew(t)%wind_n / NoahMPnew_struc(n)%forc_count + NoahmpIO%V_PHY(1,1,1) = NoahMP50_struc(n)%noahmp50(t)%wind_n / NoahMP50_struc(n)%forc_count ! QV_CURR: specific humidity - NoahmpIO%QV_CURR(1,1,1) = NoahMPnew_struc(n)%noahmpnew(t)%qair / NoahMPnew_struc(n)%forc_count + NoahmpIO%QV_CURR(1,1,1) = NoahMP50_struc(n)%noahmp50(t)%qair / NoahMP50_struc(n)%forc_count ! SWDOWN: downward solar radiation - NoahmpIO%SWDOWN(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%swdown / NoahMPnew_struc(n)%forc_count + NoahmpIO%SWDOWN(1,1) = NoahMP50_struc(n)%noahmp50(t)%swdown / NoahMP50_struc(n)%forc_count ! GLW: downward longwave radiation - NoahmpIO%GLW(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%lwdown / NoahMPnew_struc(n)%forc_count + NoahmpIO%GLW(1,1) = NoahMP50_struc(n)%noahmp50(t)%lwdown / NoahMP50_struc(n)%forc_count ! prcp: total precipitation (rainfall+snowfall) ! Noah-MP require total precipitation as forcing input. [mm per model timestep] ! T. Lahmers: Correct total precip for cases when model time step > forcing timestep. ! Edit suggested by D. Mocko and K. Arsenault - !if (NoahMPnew_struc(n)%ts > LIS_rc%ts) then - NoahmpIO%RAINBL(1,1) = NoahMPnew_struc(n)%ts * & - (NoahMPnew_struc(n)%noahmpnew(t)%prcp / NoahMPnew_struc(n)%forc_count) + !if (NoahMP50_struc(n)%ts > LIS_rc%ts) then + NoahmpIO%RAINBL(1,1) = NoahMP50_struc(n)%ts * & + (NoahMP50_struc(n)%noahmp50(t)%prcp / NoahMP50_struc(n)%forc_count) !else - ! NoahmpIO%RAINBL(1,1) = dt * (NoahMPnew_struc(n)%noahmpnew(t)%prcp / NoahMPnew_struc(n)%forc_count) + ! NoahmpIO%RAINBL(1,1) = dt * (NoahMP50_struc(n)%noahmp50(t)%prcp / NoahMP50_struc(n)%forc_count) !endif !ag(05Jan2021) ! rivsto/fldsto: River storage and flood storage - ! NoahMPnew_struc(n)%noahmpnew(t)%rivsto and NoahMPnew_struc(n)%noahmpnew(t)%fldsto - ! are updated in noahmpnew_getsws_hymap2.F90 - NoahmpIO%rivsto(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%rivsto - NoahmpIO%fldsto(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%fldsto - NoahmpIO%fldfrc(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%fldfrc + ! NoahMP50_struc(n)%noahmp50(t)%rivsto and NoahMP50_struc(n)%noahmp50(t)%fldsto + ! are updated in noahmp50_getsws_hymap2.F90 + NoahmpIO%rivsto(1,1) = NoahMP50_struc(n)%noahmp50(t)%rivsto + NoahmpIO%fldsto(1,1) = NoahMP50_struc(n)%noahmp50(t)%fldsto + NoahmpIO%fldfrc(1,1) = NoahMP50_struc(n)%noahmp50(t)%fldfrc ! check validity of tair if(NoahmpIO%T_PHY(1,1,1) .eq. LIS_rc%udef) then - write(LIS_logunit, *) "[ERR] undefined value found for forcing variable tair in NoahMPnew" + write(LIS_logunit, *) "[ERR] undefined value found for forcing variable tair in NoahMP50" write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon call LIS_endrun() endif ! check validity of psurf if(NoahmpIO%P8W(1,1,1) .eq. LIS_rc%udef) then - write(LIS_logunit, *) "[ERR] undefined value found for forcing variable psurf in NoahMPnew" + write(LIS_logunit, *) "[ERR] undefined value found for forcing variable psurf in NoahMP50" write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon call LIS_endrun() endif ! check validity of wind_e if(NoahmpIO%U_PHY(1,1,1) .eq. LIS_rc%udef) then - write(LIS_logunit, *) "[ERR] undefined value found for forcing variable wind_e in NoahMPnew" + write(LIS_logunit, *) "[ERR] undefined value found for forcing variable wind_e in NoahMP50" write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon call LIS_endrun() endif ! check validity of wind_n if(NoahmpIO%V_PHY(1,1,1) .eq. LIS_rc%udef) then - write(LIS_logunit, *) "[ERR] undefined value found for forcing variable wind_n in NoahMPnew" + write(LIS_logunit, *) "[ERR] undefined value found for forcing variable wind_n in NoahMP50" write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon call LIS_endrun() endif ! check validity of qair if(NoahmpIO%QV_CURR(1,1,1) .eq. LIS_rc%udef) then - write(LIS_logunit, *) "[ERR] undefined value found for forcing variable qair in NoahMPnew" + write(LIS_logunit, *) "[ERR] undefined value found for forcing variable qair in NoahMP50" write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon call LIS_endrun() endif ! check validity of swdown if(NoahmpIO%SWDOWN(1,1) .eq. LIS_rc%udef) then - write(LIS_logunit, *) "[ERR] undefined value found for forcing variable swdown in NoahMPnew" + write(LIS_logunit, *) "[ERR] undefined value found for forcing variable swdown in NoahMP50" write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon call LIS_endrun() endif ! check validity of lwdown if(NoahmpIO%GLW(1,1) .eq. LIS_rc%udef) then - write(LIS_logunit, *) "[ERR] undefined value found for forcing variable lwdown in NoahMPnew" + write(LIS_logunit, *) "[ERR] undefined value found for forcing variable lwdown in NoahMP50" write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon call LIS_endrun() endif ! check validity of prcp if(NoahmpIO%RAINBL(1,1) .eq. LIS_rc%udef) then - write(LIS_logunit, *) "[ERR] undefined value found for forcing variable prcp in NoahMPnew" + write(LIS_logunit, *) "[ERR] undefined value found for forcing variable prcp in NoahMP50" write(LIS_logunit, *) "for tile ", t, "latitude = ", lat, "longitude = ", lon call LIS_endrun() endif @@ -214,44 +214,44 @@ subroutine NoahMPnew_main(n) NoahmpIO%minute = LIS_rc%mn NoahmpIO%ttile = t NoahmpIO%itimestep = LIS_rc%tscount(n) - NoahmpIO%dtbl = NoahMPnew_struc(n)%ts - NoahmpIO%soiltstep = NoahMPnew_struc(n)%ts_soil - NoahmpIO%dzs(:) = NoahMPnew_struc(n)%sldpth(:) - NoahmpIO%nsoil = NoahMPnew_struc(n)%nsoil - NoahmpIO%nsnow = NoahMPnew_struc(n)%nsnow - NoahmpIO%ivgtyp(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%vegetype - NoahmpIO%isltyp(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%soiltype + NoahmpIO%dtbl = NoahMP50_struc(n)%ts + NoahmpIO%soiltstep = NoahMP50_struc(n)%ts_soil + NoahmpIO%dzs(:) = NoahMP50_struc(n)%sldpth(:) + NoahmpIO%nsoil = NoahMP50_struc(n)%nsoil + NoahmpIO%nsnow = NoahMP50_struc(n)%nsnow + NoahmpIO%ivgtyp(1,1) = NoahMP50_struc(n)%noahmp50(t)%vegetype + NoahmpIO%isltyp(1,1) = NoahMP50_struc(n)%noahmp50(t)%soiltype ! Multiply shdfac by 100.0 because noahmpdrv.f90, expects it in units of percentage, not fraction. - NoahmpIO%shdfac_monthly(1,:,1) = NoahMPnew_struc(n)%noahmpnew(t)%shdfac_monthly(:) * 100.0 - NoahmpIO%tmn(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%tbot + NoahmpIO%shdfac_monthly(1,:,1) = NoahMP50_struc(n)%noahmp50(t)%shdfac_monthly(:) * 100.0 + NoahmpIO%tmn(1,1) = NoahMP50_struc(n)%noahmp50(t)%tbot NoahmpIO%urban_vegtype(1,1) = LIS_rc%urbanclass NoahmpIO%cropcat(1,1) = LIS_rc%cropclass - NoahmpIO%IOPT_DVEG = NoahMPnew_struc(n)%dveg_opt - NoahmpIO%IOPT_CRS = NoahMPnew_struc(n)%crs_opt - NoahmpIO%IOPT_BTR = NoahMPnew_struc(n)%btr_opt - NoahmpIO%IOPT_RUNSRF = NoahMPnew_struc(n)%runsfc_opt - NoahmpIO%IOPT_RUNSUB = NoahMPnew_struc(n)%runsub_opt - NoahmpIO%IOPT_SFC = NoahMPnew_struc(n)%sfc_opt - NoahmpIO%IOPT_FRZ = NoahMPnew_struc(n)%frz_opt - NoahmpIO%IOPT_INF = NoahMPnew_struc(n)%inf_opt - NoahmpIO%IOPT_RAD = NoahMPnew_struc(n)%rad_opt - NoahmpIO%IOPT_ALB = NoahMPnew_struc(n)%alb_opt - NoahmpIO%IOPT_SNF = NoahMPnew_struc(n)%snf_opt - NoahmpIO%IOPT_TKSNO = NoahMPnew_struc(n)%tksno_opt - NoahmpIO%IOPT_TBOT = NoahMPnew_struc(n)%tbot_opt - NoahmpIO%IOPT_STC = NoahMPnew_struc(n)%stc_opt - NoahmpIO%IOPT_GLA = NoahMPnew_struc(n)%gla_opt - NoahmpIO%IOPT_sndpth_gla = NoahMPnew_struc(n)%sndpth_gla_opt - NoahmpIO%IOPT_RSF = NoahMPnew_struc(n)%rsf_opt - NoahmpIO%IOPT_SOIL = NoahMPnew_struc(n)%soil_opt - NoahmpIO%IOPT_PEDO = NoahMPnew_struc(n)%pedo_opt - NoahmpIO%IOPT_CROP = NoahMPnew_struc(n)%crop_opt - NoahmpIO%IOPT_IRR = NoahMPnew_struc(n)%irr_opt - NoahmpIO%IOPT_IRRM = NoahMPnew_struc(n)%irrm_opt - NoahmpIO%IOPT_INFDV = NoahMPnew_struc(n)%infdv_opt - NoahmpIO%IOPT_TDRN = NoahMPnew_struc(n)%tdrn_opt + NoahmpIO%IOPT_DVEG = NoahMP50_struc(n)%dveg_opt + NoahmpIO%IOPT_CRS = NoahMP50_struc(n)%crs_opt + NoahmpIO%IOPT_BTR = NoahMP50_struc(n)%btr_opt + NoahmpIO%IOPT_RUNSRF = NoahMP50_struc(n)%runsfc_opt + NoahmpIO%IOPT_RUNSUB = NoahMP50_struc(n)%runsub_opt + NoahmpIO%IOPT_SFC = NoahMP50_struc(n)%sfc_opt + NoahmpIO%IOPT_FRZ = NoahMP50_struc(n)%frz_opt + NoahmpIO%IOPT_INF = NoahMP50_struc(n)%inf_opt + NoahmpIO%IOPT_RAD = NoahMP50_struc(n)%rad_opt + NoahmpIO%IOPT_ALB = NoahMP50_struc(n)%alb_opt + NoahmpIO%IOPT_SNF = NoahMP50_struc(n)%snf_opt + NoahmpIO%IOPT_TKSNO = NoahMP50_struc(n)%tksno_opt + NoahmpIO%IOPT_TBOT = NoahMP50_struc(n)%tbot_opt + NoahmpIO%IOPT_STC = NoahMP50_struc(n)%stc_opt + NoahmpIO%IOPT_GLA = NoahMP50_struc(n)%gla_opt + NoahmpIO%IOPT_sndpth_gla = NoahMP50_struc(n)%sndpth_gla_opt + NoahmpIO%IOPT_RSF = NoahMP50_struc(n)%rsf_opt + NoahmpIO%IOPT_SOIL = NoahMP50_struc(n)%soil_opt + NoahmpIO%IOPT_PEDO = NoahMP50_struc(n)%pedo_opt + NoahmpIO%IOPT_CROP = NoahMP50_struc(n)%crop_opt + NoahmpIO%IOPT_IRR = NoahMP50_struc(n)%irr_opt + NoahmpIO%IOPT_IRRM = NoahMP50_struc(n)%irrm_opt + NoahmpIO%IOPT_INFDV = NoahMP50_struc(n)%infdv_opt + NoahmpIO%IOPT_TDRN = NoahMP50_struc(n)%tdrn_opt NoahmpIO%iz0tlnd = 0 - NoahmpIO%sf_urban_physics = NoahMPnew_struc(n)%urban_opt + NoahmpIO%sf_urban_physics = NoahMP50_struc(n)%urban_opt ! Multiply reference height by 2.0 because module_sf_noahmpdrv ! expects this variable to be in terms of a thickness of the ! atmospheric layers, and it later divides this value by 2.0. @@ -260,12 +260,12 @@ subroutine NoahMPnew_main(n) ! correctly use this actual value. This code is confirmed in ! the HRLDAS driver, which also multiplies this value by 2.0. ! 11/30/2018 - dmm - NoahmpIO%dz8w(1,1,1) = NoahMPnew_struc(n)%dz8w * 2.0 + NoahmpIO%dz8w(1,1,1) = NoahMP50_struc(n)%dz8w * 2.0 if (NoahmpIO%IOPT_CROP > 0) then - NoahmpIO%planting(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%planting - NoahmpIO%harvest(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%harvest - NoahmpIO%season_gdd(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%season_gdd + NoahmpIO%planting(1,1) = NoahMP50_struc(n)%noahmp50(t)%planting + NoahmpIO%harvest(1,1) = NoahMP50_struc(n)%noahmp50(t)%harvest + NoahmpIO%season_gdd(1,1) = NoahMP50_struc(n)%noahmp50(t)%season_gdd else NoahmpIO%planting(1,1) = 0.0 NoahmpIO%harvest(1,1) = 0.0 @@ -274,110 +274,110 @@ subroutine NoahMPnew_main(n) ! Zhuo Wang tested on 11/15/2018, not read from LDT-generated netcdf input file if (NoahmpIO%IOPT_SOIL .eq. 2) then - NoahmpIO%soilcL1(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%soilcL1 - NoahmpIO%soilcL2(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%soilcL2 - NoahmpIO%soilcL3(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%soilcL3 - NoahmpIO%soilcL4(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%soilcL4 + NoahmpIO%soilcL1(1,1) = NoahMP50_struc(n)%noahmp50(t)%soilcL1 + NoahmpIO%soilcL2(1,1) = NoahMP50_struc(n)%noahmp50(t)%soilcL2 + NoahmpIO%soilcL3(1,1) = NoahMP50_struc(n)%noahmp50(t)%soilcL3 + NoahmpIO%soilcL4(1,1) = NoahMP50_struc(n)%noahmp50(t)%soilcL4 endif if (NoahmpIO%IOPT_SOIL .eq. 3) then - NoahmpIO%soilcomp(1,:,1) = NoahMPnew_struc(n)%noahmpnew(t)%soilcomp(:) + NoahmpIO%soilcomp(1,:,1) = NoahMP50_struc(n)%noahmp50(t)%soilcomp(:) endif ! for irrigation if (NoahmpIO%IOPT_IRR > 0) then - NoahmpIO%irnumsi(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%irnumsi - NoahmpIO%irnummi(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%irnummi - NoahmpIO%irnumfi(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%irnumfi - NoahmpIO%irfract(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%irfract - NoahmpIO%sifract(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%sifract - NoahmpIO%mifract(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%mifract - NoahmpIO%fifract(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%fifract - NoahmpIO%irwatsi(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%irwatsi - NoahmpIO%irwatmi(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%irwatmi - NoahmpIO%irwatfi(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%irwatfi - NoahmpIO%ireloss(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%ireloss - NoahmpIO%irrsplh(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%irrsplh - NoahmpIO%irsivol(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%irsivol - NoahmpIO%irmivol(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%irmivol - NoahmpIO%irfivol(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%irfivol + NoahmpIO%irnumsi(1,1) = NoahMP50_struc(n)%noahmp50(t)%irnumsi + NoahmpIO%irnummi(1,1) = NoahMP50_struc(n)%noahmp50(t)%irnummi + NoahmpIO%irnumfi(1,1) = NoahMP50_struc(n)%noahmp50(t)%irnumfi + NoahmpIO%irfract(1,1) = NoahMP50_struc(n)%noahmp50(t)%irfract + NoahmpIO%sifract(1,1) = NoahMP50_struc(n)%noahmp50(t)%sifract + NoahmpIO%mifract(1,1) = NoahMP50_struc(n)%noahmp50(t)%mifract + NoahmpIO%fifract(1,1) = NoahMP50_struc(n)%noahmp50(t)%fifract + NoahmpIO%irwatsi(1,1) = NoahMP50_struc(n)%noahmp50(t)%irwatsi + NoahmpIO%irwatmi(1,1) = NoahMP50_struc(n)%noahmp50(t)%irwatmi + NoahmpIO%irwatfi(1,1) = NoahMP50_struc(n)%noahmp50(t)%irwatfi + NoahmpIO%ireloss(1,1) = NoahMP50_struc(n)%noahmp50(t)%ireloss + NoahmpIO%irrsplh(1,1) = NoahMP50_struc(n)%noahmp50(t)%irrsplh + NoahmpIO%irsivol(1,1) = NoahMP50_struc(n)%noahmp50(t)%irsivol + NoahmpIO%irmivol(1,1) = NoahMP50_struc(n)%noahmp50(t)%irmivol + NoahmpIO%irfivol(1,1) = NoahMP50_struc(n)%noahmp50(t)%irfivol endif ! for tile drainage if (NoahmpIO%IOPT_TDRN > 0) then - NoahmpIO%TD_FRACTION(1,1)= NoahMPnew_struc(n)%noahmpnew(t)%tdfract - NoahmpIO%qtdrain(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%qtdrain - NoahmpIO%qtiledrain(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%qtdrainflx + NoahmpIO%TD_FRACTION(1,1)= NoahMP50_struc(n)%noahmp50(t)%tdfract + NoahmpIO%qtdrain(1,1) = NoahMP50_struc(n)%noahmp50(t)%qtdrain + NoahmpIO%qtiledrain(1,1) = NoahMP50_struc(n)%noahmp50(t)%qtdrainflx endif ! for MMF groundwater if (NoahmpIO%IOPT_RUNSUB == 5) then - NoahmpIO%fdepthxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%fdepth + NoahmpIO%fdepthxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%fdepth NoahmpIO%msftx(1,1) = 1.0 NoahmpIO%msfty(1,1) = 1.0 - NoahmpIO%eqzwt(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%eqzwt - NoahmpIO%riverbedxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%riverbed - NoahmpIO%rivercondxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%rivercond - NoahmpIO%pexpxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%pexp - NoahmpIO%areaxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%area - NoahmpIO%qrfsxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%qrfs - NoahmpIO%qspringxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%qspring - NoahmpIO%qrfxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%qrf - NoahmpIO%qspringsxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%qsprings - NoahmpIO%qslatxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%qslat - NoahmpIO%rechclim(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%rechclim - NoahmpIO%rivermask(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%rivermask - NoahmpIO%nonriverxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%nonriver + NoahmpIO%eqzwt(1,1) = NoahMP50_struc(n)%noahmp50(t)%eqzwt + NoahmpIO%riverbedxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%riverbed + NoahmpIO%rivercondxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%rivercond + NoahmpIO%pexpxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%pexp + NoahmpIO%areaxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%area + NoahmpIO%qrfsxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%qrfs + NoahmpIO%qspringxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%qspring + NoahmpIO%qrfxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%qrf + NoahmpIO%qspringsxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%qsprings + NoahmpIO%qslatxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%qslat + NoahmpIO%rechclim(1,1) = NoahMP50_struc(n)%noahmp50(t)%rechclim + NoahmpIO%rivermask(1,1) = NoahMP50_struc(n)%noahmp50(t)%rivermask + NoahmpIO%nonriverxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%nonriver endif ! get state variables - NoahmpIO%sfcrunoff(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%sfcrunoff - NoahmpIO%udrunoff(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%udrrunoff - NoahmpIO%smois(1,:,1) = NoahMPnew_struc(n)%noahmpnew(t)%smc(:) - NoahmpIO%sh2o(1,:,1) = NoahMPnew_struc(n)%noahmpnew(t)%sh2o(:) - NoahmpIO%tslb(1,:,1) = NoahMPnew_struc(n)%noahmpnew(t)%tslb(:) - NoahmpIO%snow(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%sneqv - NoahmpIO%snowh(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%snowh - NoahmpIO%canwat(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%canwat - NoahmpIO%acsnom(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%acsnom - NoahmpIO%acsnow(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%acsnow - NoahmpIO%isnowxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%isnow - NoahmpIO%tvxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%tv - NoahmpIO%tgxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%tg - NoahmpIO%canicexy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%canice - NoahmpIO%canliqxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%canliq - NoahmpIO%eahxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%eah - NoahmpIO%tahxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%tah - NoahmpIO%cmxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%cm - NoahmpIO%chxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%ch - NoahmpIO%fwetxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%fwet - NoahmpIO%sneqvoxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%sneqvo - NoahmpIO%alboldxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%albold - NoahmpIO%qsnowxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%qsnow - NoahmpIO%wslakexy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%wslake - NoahmpIO%zwtxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%zwt - NoahmpIO%waxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%wa - NoahmpIO%wtxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%wt - NoahmpIO%tsnoxy(1,:,1) = NoahMPnew_struc(n)%noahmpnew(t)%tsno(:) - NoahmpIO%zsnsoxy(1,:,1) = NoahMPnew_struc(n)%noahmpnew(t)%zss(:) - NoahmpIO%snicexy(1,:,1) = NoahMPnew_struc(n)%noahmpnew(t)%snowice(:) - NoahmpIO%snliqxy(1,:,1) = NoahMPnew_struc(n)%noahmpnew(t)%snowliq(:) - NoahmpIO%lfmassxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%lfmass - NoahmpIO%rtmassxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%rtmass - NoahmpIO%stmassxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%stmass - NoahmpIO%woodxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%wood - NoahmpIO%stblcpxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%stblcp - NoahmpIO%fastcpxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%fastcp + NoahmpIO%sfcrunoff(1,1) = NoahMP50_struc(n)%noahmp50(t)%sfcrunoff + NoahmpIO%udrunoff(1,1) = NoahMP50_struc(n)%noahmp50(t)%udrrunoff + NoahmpIO%smois(1,:,1) = NoahMP50_struc(n)%noahmp50(t)%smc(:) + NoahmpIO%sh2o(1,:,1) = NoahMP50_struc(n)%noahmp50(t)%sh2o(:) + NoahmpIO%tslb(1,:,1) = NoahMP50_struc(n)%noahmp50(t)%tslb(:) + NoahmpIO%snow(1,1) = NoahMP50_struc(n)%noahmp50(t)%sneqv + NoahmpIO%snowh(1,1) = NoahMP50_struc(n)%noahmp50(t)%snowh + NoahmpIO%canwat(1,1) = NoahMP50_struc(n)%noahmp50(t)%canwat + NoahmpIO%acsnom(1,1) = NoahMP50_struc(n)%noahmp50(t)%acsnom + NoahmpIO%acsnow(1,1) = NoahMP50_struc(n)%noahmp50(t)%acsnow + NoahmpIO%isnowxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%isnow + NoahmpIO%tvxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%tv + NoahmpIO%tgxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%tg + NoahmpIO%canicexy(1,1) = NoahMP50_struc(n)%noahmp50(t)%canice + NoahmpIO%canliqxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%canliq + NoahmpIO%eahxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%eah + NoahmpIO%tahxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%tah + NoahmpIO%cmxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%cm + NoahmpIO%chxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%ch + NoahmpIO%fwetxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%fwet + NoahmpIO%sneqvoxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%sneqvo + NoahmpIO%alboldxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%albold + NoahmpIO%qsnowxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%qsnow + NoahmpIO%wslakexy(1,1) = NoahMP50_struc(n)%noahmp50(t)%wslake + NoahmpIO%zwtxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%zwt + NoahmpIO%waxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%wa + NoahmpIO%wtxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%wt + NoahmpIO%tsnoxy(1,:,1) = NoahMP50_struc(n)%noahmp50(t)%tsno(:) + NoahmpIO%zsnsoxy(1,:,1) = NoahMP50_struc(n)%noahmp50(t)%zss(:) + NoahmpIO%snicexy(1,:,1) = NoahMP50_struc(n)%noahmp50(t)%snowice(:) + NoahmpIO%snliqxy(1,:,1) = NoahMP50_struc(n)%noahmp50(t)%snowliq(:) + NoahmpIO%lfmassxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%lfmass + NoahmpIO%rtmassxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%rtmass + NoahmpIO%stmassxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%stmass + NoahmpIO%woodxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%wood + NoahmpIO%stblcpxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%stblcp + NoahmpIO%fastcpxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%fastcp ! additional accumulated variables - NoahmpIO%ACC_SSOILXY(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%accssoil - NoahmpIO%ACC_QINSURXY(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%accqinsur - NoahmpIO%ACC_QSEVAXY(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%accqseva - NoahmpIO%ACC_ETRANIXY(1,:,1) = NoahMPnew_struc(n)%noahmpnew(t)%accetrani(:) - NoahmpIO%ACC_DWATERXY(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%accdwater - NoahmpIO%ACC_PRCPXY(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%accprcp - NoahmpIO%ACC_ECANXY(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%accecan - NoahmpIO%ACC_ETRANXY(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%accetran - NoahmpIO%ACC_EDIRXY (1,1) = NoahMPnew_struc(n)%noahmpnew(t)%accedir + NoahmpIO%ACC_SSOILXY(1,1) = NoahMP50_struc(n)%noahmp50(t)%accssoil + NoahmpIO%ACC_QINSURXY(1,1) = NoahMP50_struc(n)%noahmp50(t)%accqinsur + NoahmpIO%ACC_QSEVAXY(1,1) = NoahMP50_struc(n)%noahmp50(t)%accqseva + NoahmpIO%ACC_ETRANIXY(1,:,1) = NoahMP50_struc(n)%noahmp50(t)%accetrani(:) + NoahmpIO%ACC_DWATERXY(1,1) = NoahMP50_struc(n)%noahmp50(t)%accdwater + NoahmpIO%ACC_PRCPXY(1,1) = NoahMP50_struc(n)%noahmp50(t)%accprcp + NoahmpIO%ACC_ECANXY(1,1) = NoahMP50_struc(n)%noahmp50(t)%accecan + NoahmpIO%ACC_ETRANXY(1,1) = NoahMP50_struc(n)%noahmp50(t)%accetran + NoahmpIO%ACC_EDIRXY (1,1) = NoahMP50_struc(n)%noahmp50(t)%accedir ! DMM - If dynamic vegetation option DVEG = 7, 8, or 9 for "input LAI", ! then send LAI/SAI from input to the Noah-MP physics. If any @@ -404,24 +404,24 @@ subroutine NoahMPnew_main(n) ! If any LAI or SAI values are undefined at a tile, ! fill in the LAI or SAI values from MPTABLE. if (NoahmpIO%lai(1,1) .eq. LIS_rc%udef) then - NoahmpIO%lai(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%lai + NoahmpIO%lai(1,1) = NoahMP50_struc(n)%noahmp50(t)%lai endif if (NoahmpIO%xsaixy(1,1) .eq. LIS_rc%udef) then - NoahmpIO%xsaixy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%sai + NoahmpIO%xsaixy(1,1) = NoahMP50_struc(n)%noahmp50(t)%sai endif else - NoahmpIO%lai(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%lai - NoahmpIO%xsaixy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%sai + NoahmpIO%lai(1,1) = NoahMP50_struc(n)%noahmp50(t)%lai + NoahmpIO%xsaixy(1,1) = NoahMP50_struc(n)%noahmp50(t)%sai endif - NoahmpIO%taussxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%tauss - NoahmpIO%smoiseq(1,:,1) = NoahMPnew_struc(n)%noahmpnew(t)%smoiseq(:) - NoahmpIO%smcwtdxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%smcwtd - NoahmpIO%deeprechxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%deeprech - NoahmpIO%rechxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%rech - NoahmpIO%grainxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%grain - NoahmpIO%gddxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%gdd - NoahmpIO%pgsxy(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%pgs - NoahmpIO%sfcheadrt(1,1) = NoahMPnew_struc(n)%noahmpnew(t)%sfcheadrt + NoahmpIO%taussxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%tauss + NoahmpIO%smoiseq(1,:,1) = NoahMP50_struc(n)%noahmp50(t)%smoiseq(:) + NoahmpIO%smcwtdxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%smcwtd + NoahmpIO%deeprechxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%deeprech + NoahmpIO%rechxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%rech + NoahmpIO%grainxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%grain + NoahmpIO%gddxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%gdd + NoahmpIO%pgsxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%pgs + NoahmpIO%sfcheadrt(1,1) = NoahMP50_struc(n)%noahmp50(t)%sfcheadrt ! Calculate water storages at start of timestep startsm = 0.0 @@ -434,580 +434,580 @@ subroutine NoahMPnew_main(n) startgw = NoahmpIO%waxy(1,1) ! call model physics - call noahmp_driver_new(n, NoahMPnew_struc(n)%noahmpnew(t)%param) + call noahmp_driver_50(n, NoahMP50_struc(n)%noahmp50(t)%param) ! save state variables from NoahmpIO 1-D variables to global variables - NoahMPnew_struc(n)%noahmpnew(t)%sfcrunoff = NoahmpIO%sfcrunoff(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%udrrunoff = NoahmpIO%udrunoff(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%smc(:) = NoahmpIO%smois(1,:,1) - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(:) = NoahmpIO%sh2o(1,:,1) - NoahMPnew_struc(n)%noahmpnew(t)%tslb(:) = NoahmpIO%tslb(1,:,1) - NoahMPnew_struc(n)%noahmpnew(t)%sneqv = NoahmpIO%snow(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%snowh = NoahmpIO%snowh(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%canwat = NoahmpIO%canwat(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%acsnom = NoahmpIO%acsnom(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%acsnow = NoahmpIO%acsnow(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%isnow = NoahmpIO%isnowxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%tv = NoahmpIO%tvxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%tg = NoahmpIO%tgxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%canice = NoahmpIO%canicexy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%canliq = NoahmpIO%canliqxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%eah = NoahmpIO%eahxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%tah = NoahmpIO%tahxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%cm = NoahmpIO%cmxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%ch = NoahmpIO%chxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%fwet = NoahmpIO%fwetxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%sneqvo = NoahmpIO%sneqvoxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%albold = NoahmpIO%alboldxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%qsnow = NoahmpIO%qsnowxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%wslake = NoahmpIO%wslakexy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%zwt = NoahmpIO%zwtxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%wa = NoahmpIO%waxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%wt = NoahmpIO%wtxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%tsno(:) = NoahmpIO%tsnoxy(1,:,1) - NoahMPnew_struc(n)%noahmpnew(t)%zss(:) = NoahmpIO%zsnsoxy(1,:,1) - NoahMPnew_struc(n)%noahmpnew(t)%snowice(:) = NoahmpIO%snicexy(1,:,1) - NoahMPnew_struc(n)%noahmpnew(t)%snowliq(:) = NoahmpIO%snliqxy(1,:,1) - NoahMPnew_struc(n)%noahmpnew(t)%lfmass = NoahmpIO%lfmassxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%rtmass = NoahmpIO%rtmassxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%stmass = NoahmpIO%stmassxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%wood = NoahmpIO%woodxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%stblcp = NoahmpIO%stblcpxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%fastcp = NoahmpIO%fastcpxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%lai = NoahmpIO%lai(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%sai = NoahmpIO%xsaixy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%tauss = NoahmpIO%taussxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%smoiseq(:) = NoahmpIO%smoiseq(1,:,1) - NoahMPnew_struc(n)%noahmpnew(t)%smcwtd = NoahmpIO%smcwtdxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%deeprech = NoahmpIO%deeprechxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%rech = NoahmpIO%rechxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%grain = NoahmpIO%grainxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%gdd = NoahmpIO%gddxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%pgs = NoahmpIO%pgsxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%sfcrunoff = NoahmpIO%sfcrunoff(1,1) + NoahMP50_struc(n)%noahmp50(t)%udrrunoff = NoahmpIO%udrunoff(1,1) + NoahMP50_struc(n)%noahmp50(t)%smc(:) = NoahmpIO%smois(1,:,1) + NoahMP50_struc(n)%noahmp50(t)%sh2o(:) = NoahmpIO%sh2o(1,:,1) + NoahMP50_struc(n)%noahmp50(t)%tslb(:) = NoahmpIO%tslb(1,:,1) + NoahMP50_struc(n)%noahmp50(t)%sneqv = NoahmpIO%snow(1,1) + NoahMP50_struc(n)%noahmp50(t)%snowh = NoahmpIO%snowh(1,1) + NoahMP50_struc(n)%noahmp50(t)%canwat = NoahmpIO%canwat(1,1) + NoahMP50_struc(n)%noahmp50(t)%acsnom = NoahmpIO%acsnom(1,1) + NoahMP50_struc(n)%noahmp50(t)%acsnow = NoahmpIO%acsnow(1,1) + NoahMP50_struc(n)%noahmp50(t)%isnow = NoahmpIO%isnowxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%tv = NoahmpIO%tvxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%tg = NoahmpIO%tgxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%canice = NoahmpIO%canicexy(1,1) + NoahMP50_struc(n)%noahmp50(t)%canliq = NoahmpIO%canliqxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%eah = NoahmpIO%eahxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%tah = NoahmpIO%tahxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%cm = NoahmpIO%cmxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%ch = NoahmpIO%chxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%fwet = NoahmpIO%fwetxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%sneqvo = NoahmpIO%sneqvoxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%albold = NoahmpIO%alboldxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%qsnow = NoahmpIO%qsnowxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%wslake = NoahmpIO%wslakexy(1,1) + NoahMP50_struc(n)%noahmp50(t)%zwt = NoahmpIO%zwtxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%wa = NoahmpIO%waxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%wt = NoahmpIO%wtxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%tsno(:) = NoahmpIO%tsnoxy(1,:,1) + NoahMP50_struc(n)%noahmp50(t)%zss(:) = NoahmpIO%zsnsoxy(1,:,1) + NoahMP50_struc(n)%noahmp50(t)%snowice(:) = NoahmpIO%snicexy(1,:,1) + NoahMP50_struc(n)%noahmp50(t)%snowliq(:) = NoahmpIO%snliqxy(1,:,1) + NoahMP50_struc(n)%noahmp50(t)%lfmass = NoahmpIO%lfmassxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%rtmass = NoahmpIO%rtmassxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%stmass = NoahmpIO%stmassxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%wood = NoahmpIO%woodxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%stblcp = NoahmpIO%stblcpxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%fastcp = NoahmpIO%fastcpxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%lai = NoahmpIO%lai(1,1) + NoahMP50_struc(n)%noahmp50(t)%sai = NoahmpIO%xsaixy(1,1) + NoahMP50_struc(n)%noahmp50(t)%tauss = NoahmpIO%taussxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%smoiseq(:) = NoahmpIO%smoiseq(1,:,1) + NoahMP50_struc(n)%noahmp50(t)%smcwtd = NoahmpIO%smcwtdxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%deeprech = NoahmpIO%deeprechxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%rech = NoahmpIO%rechxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%grain = NoahmpIO%grainxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%gdd = NoahmpIO%gddxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%pgs = NoahmpIO%pgsxy(1,1) ! save output variables from NoahmpIO variables to global variables - NoahMPnew_struc(n)%noahmpnew(t)%tsk = NoahmpIO%tsk(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%hfx = NoahmpIO%hfx(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%qfx = NoahmpIO%qfx(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%lh = NoahmpIO%lh(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%grdflx = NoahmpIO%grdflx(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%albedo = NoahmpIO%albedo(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%snowc = NoahmpIO%snowc(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%emiss = NoahmpIO%emiss(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%rs = NoahmpIO%rs(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%t2mv = NoahmpIO%t2mvxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%t2mb = NoahmpIO%t2mbxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%q2mv = NoahmpIO%q2mvxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%q2mb = NoahmpIO%q2mbxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%trad = NoahmpIO%tradxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%nee = NoahmpIO%neexy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%gpp = NoahmpIO%gppxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%npp = NoahmpIO%nppxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%fveg = NoahmpIO%fvegxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%runsf = NoahmpIO%runsfxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%runsb = NoahmpIO%runsbxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%ecan = NoahmpIO%ecanxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%tsk = NoahmpIO%tsk(1,1) + NoahMP50_struc(n)%noahmp50(t)%hfx = NoahmpIO%hfx(1,1) + NoahMP50_struc(n)%noahmp50(t)%qfx = NoahmpIO%qfx(1,1) + NoahMP50_struc(n)%noahmp50(t)%lh = NoahmpIO%lh(1,1) + NoahMP50_struc(n)%noahmp50(t)%grdflx = NoahmpIO%grdflx(1,1) + NoahMP50_struc(n)%noahmp50(t)%albedo = NoahmpIO%albedo(1,1) + NoahMP50_struc(n)%noahmp50(t)%snowc = NoahmpIO%snowc(1,1) + NoahMP50_struc(n)%noahmp50(t)%emiss = NoahmpIO%emiss(1,1) + NoahMP50_struc(n)%noahmp50(t)%rs = NoahmpIO%rs(1,1) + NoahMP50_struc(n)%noahmp50(t)%t2mv = NoahmpIO%t2mvxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%t2mb = NoahmpIO%t2mbxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%q2mv = NoahmpIO%q2mvxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%q2mb = NoahmpIO%q2mbxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%trad = NoahmpIO%tradxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%nee = NoahmpIO%neexy(1,1) + NoahMP50_struc(n)%noahmp50(t)%gpp = NoahmpIO%gppxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%npp = NoahmpIO%nppxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%fveg = NoahmpIO%fvegxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%runsf = NoahmpIO%runsfxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%runsb = NoahmpIO%runsbxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%ecan = NoahmpIO%ecanxy(1,1) ! Direct soil evaporation does not include sublimation of the snowpack ! on the soil (by the strict ALMA definition of ESoil). - David Mocko - NoahMPnew_struc(n)%noahmpnew(t)%edir = NoahmpIO%edirxy(1,1) - NoahmpIO%qsnsubxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%etran = NoahmpIO%etranxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%rainf = NoahmpIO%rainlsm(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%snowf = NoahmpIO%snowlsm(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%fsa = NoahmpIO%fsaxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%fira = NoahmpIO%firaxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%apar = NoahmpIO%aparxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%psn = NoahmpIO%psnxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%sav = NoahmpIO%savxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%sag = NoahmpIO%sagxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%rssun = NoahmpIO%rssunxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%rssha = NoahmpIO%rsshaxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%bgap = NoahmpIO%bgapxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%wgap = NoahmpIO%wgapxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%tgb = NoahmpIO%tgbxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%tgv = NoahmpIO%tgvxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%chv = NoahmpIO%chvxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%chb = NoahmpIO%chbxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%shg = NoahmpIO%shgxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%shc = NoahmpIO%shcxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%shb = NoahmpIO%shbxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%evg = NoahmpIO%evgxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%evb = NoahmpIO%evbxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%ghv = NoahmpIO%ghvxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%ghb = NoahmpIO%ghbxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%irg = NoahmpIO%irgxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%irc = NoahmpIO%ircxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%irb = NoahmpIO%irbxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%tr = NoahmpIO%trxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%evc = NoahmpIO%evcxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%chleaf = NoahmpIO%chleafxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%chuc = NoahmpIO%chucxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%chv2 = NoahmpIO%chv2xy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%chb2 = NoahmpIO%chb2xy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%infxs1rt = NoahmpIO%infxsrt(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%soldrain1rt = NoahmpIO%soldrain(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%sfcheadrt = NoahmpIO%sfcheadrt(1,1) + NoahMP50_struc(n)%noahmp50(t)%edir = NoahmpIO%edirxy(1,1) - NoahmpIO%qsnsubxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%etran = NoahmpIO%etranxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%rainf = NoahmpIO%rainlsm(1,1) + NoahMP50_struc(n)%noahmp50(t)%snowf = NoahmpIO%snowlsm(1,1) + NoahMP50_struc(n)%noahmp50(t)%fsa = NoahmpIO%fsaxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%fira = NoahmpIO%firaxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%apar = NoahmpIO%aparxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%psn = NoahmpIO%psnxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%sav = NoahmpIO%savxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%sag = NoahmpIO%sagxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%rssun = NoahmpIO%rssunxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%rssha = NoahmpIO%rsshaxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%bgap = NoahmpIO%bgapxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%wgap = NoahmpIO%wgapxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%tgb = NoahmpIO%tgbxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%tgv = NoahmpIO%tgvxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%chv = NoahmpIO%chvxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%chb = NoahmpIO%chbxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%shg = NoahmpIO%shgxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%shc = NoahmpIO%shcxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%shb = NoahmpIO%shbxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%evg = NoahmpIO%evgxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%evb = NoahmpIO%evbxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%ghv = NoahmpIO%ghvxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%ghb = NoahmpIO%ghbxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%irg = NoahmpIO%irgxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%irc = NoahmpIO%ircxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%irb = NoahmpIO%irbxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%tr = NoahmpIO%trxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%evc = NoahmpIO%evcxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%chleaf = NoahmpIO%chleafxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%chuc = NoahmpIO%chucxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%chv2 = NoahmpIO%chv2xy(1,1) + NoahMP50_struc(n)%noahmp50(t)%chb2 = NoahmpIO%chb2xy(1,1) + NoahMP50_struc(n)%noahmp50(t)%infxs1rt = NoahmpIO%infxsrt(1,1) + NoahMP50_struc(n)%noahmp50(t)%soldrain1rt = NoahmpIO%soldrain(1,1) + NoahMP50_struc(n)%noahmp50(t)%sfcheadrt = NoahmpIO%sfcheadrt(1,1) ! additional accumulated variables - NoahMPnew_struc(n)%noahmpnew(t)%accssoil = NoahmpIO%ACC_SSOILXY(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%accqinsur = NoahmpIO%ACC_QINSURXY(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%accqseva = NoahmpIO%ACC_QSEVAXY(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%accetrani(:) = NoahmpIO%ACC_ETRANIXY(1,:,1) - NoahMPnew_struc(n)%noahmpnew(t)%accdwater = NoahmpIO%ACC_DWATERXY(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%accprcp = NoahmpIO%ACC_PRCPXY(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%accecan = NoahmpIO%ACC_ECANXY(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%accetran = NoahmpIO%ACC_ETRANXY(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%accedir = NoahmpIO%ACC_EDIRXY (1,1) + NoahMP50_struc(n)%noahmp50(t)%accssoil = NoahmpIO%ACC_SSOILXY(1,1) + NoahMP50_struc(n)%noahmp50(t)%accqinsur = NoahmpIO%ACC_QINSURXY(1,1) + NoahMP50_struc(n)%noahmp50(t)%accqseva = NoahmpIO%ACC_QSEVAXY(1,1) + NoahMP50_struc(n)%noahmp50(t)%accetrani(:) = NoahmpIO%ACC_ETRANIXY(1,:,1) + NoahMP50_struc(n)%noahmp50(t)%accdwater = NoahmpIO%ACC_DWATERXY(1,1) + NoahMP50_struc(n)%noahmp50(t)%accprcp = NoahmpIO%ACC_PRCPXY(1,1) + NoahMP50_struc(n)%noahmp50(t)%accecan = NoahmpIO%ACC_ECANXY(1,1) + NoahMP50_struc(n)%noahmp50(t)%accetran = NoahmpIO%ACC_ETRANXY(1,1) + NoahMP50_struc(n)%noahmp50(t)%accedir = NoahmpIO%ACC_EDIRXY (1,1) ! for irrigation if (NoahmpIO%IOPT_IRR > 0) then - NoahMPnew_struc(n)%noahmpnew(t)%irnumsi = NoahmpIO%irnumsi(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%irnummi = NoahmpIO%irnummi(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%irnumfi = NoahmpIO%irnumfi(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%irwatsi = NoahmpIO%irwatsi(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%irwatmi = NoahmpIO%irwatmi(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%irwatfi = NoahmpIO%irwatfi(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%ireloss = NoahmpIO%ireloss(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%irrsplh = NoahmpIO%irrsplh(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%irsivol = NoahmpIO%irsivol(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%irmivol = NoahmpIO%irmivol(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%irfivol = NoahmpIO%irfivol(1,1) + NoahMP50_struc(n)%noahmp50(t)%irnumsi = NoahmpIO%irnumsi(1,1) + NoahMP50_struc(n)%noahmp50(t)%irnummi = NoahmpIO%irnummi(1,1) + NoahMP50_struc(n)%noahmp50(t)%irnumfi = NoahmpIO%irnumfi(1,1) + NoahMP50_struc(n)%noahmp50(t)%irwatsi = NoahmpIO%irwatsi(1,1) + NoahMP50_struc(n)%noahmp50(t)%irwatmi = NoahmpIO%irwatmi(1,1) + NoahMP50_struc(n)%noahmp50(t)%irwatfi = NoahmpIO%irwatfi(1,1) + NoahMP50_struc(n)%noahmp50(t)%ireloss = NoahmpIO%ireloss(1,1) + NoahMP50_struc(n)%noahmp50(t)%irrsplh = NoahmpIO%irrsplh(1,1) + NoahMP50_struc(n)%noahmp50(t)%irsivol = NoahmpIO%irsivol(1,1) + NoahMP50_struc(n)%noahmp50(t)%irmivol = NoahmpIO%irmivol(1,1) + NoahMP50_struc(n)%noahmp50(t)%irfivol = NoahmpIO%irfivol(1,1) endif ! for tile drainage if (NoahmpIO%IOPT_TDRN > 0) then - NoahMPnew_struc(n)%noahmpnew(t)%qtdrain = NoahmpIO%qtdrain(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%qtdrainflx = NoahmpIO%qtiledrain(1,1) + NoahMP50_struc(n)%noahmp50(t)%qtdrain = NoahmpIO%qtdrain(1,1) + NoahMP50_struc(n)%noahmp50(t)%qtdrainflx = NoahmpIO%qtiledrain(1,1) endif ! for MMF groundwater if (NoahmpIO%IOPT_RUNSUB == 5) then - NoahMPnew_struc(n)%noahmpnew(t)%fdepth = NoahmpIO%fdepthxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%eqzwt = NoahmpIO%eqzwt(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%riverbed = NoahmpIO%riverbedxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%rivercond = NoahmpIO%rivercondxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%pexp = NoahmpIO%pexpxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%area = NoahmpIO%areaxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%qrfs = NoahmpIO%qrfsxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%qspring = NoahmpIO%qspringxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%qrf = NoahmpIO%qrfxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%qsprings = NoahmpIO%qspringsxy(1,1) - NoahMPnew_struc(n)%noahmpnew(t)%qslat = NoahmpIO%qslatxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%fdepth = NoahmpIO%fdepthxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%eqzwt = NoahmpIO%eqzwt(1,1) + NoahMP50_struc(n)%noahmp50(t)%riverbed = NoahmpIO%riverbedxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%rivercond = NoahmpIO%rivercondxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%pexp = NoahmpIO%pexpxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%area = NoahmpIO%areaxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%qrfs = NoahmpIO%qrfsxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%qspring = NoahmpIO%qspringxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%qrf = NoahmpIO%qrfxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%qsprings = NoahmpIO%qspringsxy(1,1) + NoahMP50_struc(n)%noahmp50(t)%qslat = NoahmpIO%qslatxy(1,1) endif ! EMK Update RHMin for 557WW if (NoahmpIO%T_PHY(1,1,1) .lt. & - noahmpnew_struc(n)%noahmpnew(t)%tair_agl_min) then - noahmpnew_struc(n)%noahmpnew(t)%tair_agl_min = NoahmpIO%T_PHY(1,1,1) + noahmp50_struc(n)%noahmp50(t)%tair_agl_min) then + noahmp50_struc(n)%noahmp50(t)%tair_agl_min = NoahmpIO%T_PHY(1,1,1) ! Use formulation based on Noah.3.6 code, which treats ! q2sat as saturated specific humidity tmp_es = 611.0*exp(2.501E6/461.0*(1./273.15 - 1./NoahmpIO%T_PHY(1,1,1))) tmp_q2sat = 0.622*tmp_es/(NoahmpIO%P8W(1,1,1)-(1.-0.622)*tmp_es) - noahmpnew_struc(n)%noahmpnew(t)%rhmin = NoahmpIO%QV_CURR(1,1,1) / tmp_q2sat + noahmp50_struc(n)%noahmp50(t)%rhmin = NoahmpIO%QV_CURR(1,1,1) / tmp_q2sat endif call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RHMIN, & - value=noahmpnew_struc(n)%noahmpnew(t)%rhmin, & + value=noahmp50_struc(n)%noahmp50(t)%rhmin, & vlevel=1, unit="-", direction="-",& surface_type=LIS_rc%lsm_index) call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RHMIN, & - value=(100.*noahmpnew_struc(n)%noahmpnew(t)%rhmin), & + value=(100.*noahmp50_struc(n)%noahmp50(t)%rhmin), & vlevel=1, unit="%", direction="-",& surface_type=LIS_rc%lsm_index) ![ 1] output variable: tsk (unit=K ). *** surface radiative temperature - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RADT, value = NoahMPnew_struc(n)%noahmpnew(t)%tsk, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RADT, value = NoahMP50_struc(n)%noahmp50(t)%tsk, & vlevel=1, unit="K", direction="-", surface_type = LIS_rc%lsm_index) ![ 2] output variable: fsh (unit=W/m2). *** sensible heat flux to atmosphere - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QH, value = NoahMPnew_struc(n)%noahmpnew(t)%hfx, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QH, value = NoahMP50_struc(n)%noahmp50(t)%hfx, & vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) ![ 3] output variable: lh (unit=W/m2). *** latent heat flux - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QLE, value = NoahMPnew_struc(n)%noahmpnew(t)%lh, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QLE, value = NoahMP50_struc(n)%noahmp50(t)%lh, & vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) ![ 4] output variable: grdflx (unit=W/m2). *** ground/snow heat flux to soil - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QG, value = NoahMPnew_struc(n)%noahmpnew(t)%grdflx, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QG, value = NoahMP50_struc(n)%noahmp50(t)%grdflx, & vlevel=1, unit="W m-2", direction="DN", surface_type = LIS_rc%lsm_index) ![ 5] output variable: albedo (unit=- ). *** total grid albedo - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_ALBEDO, value = NoahMPnew_struc(n)%noahmpnew(t)%albedo, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_ALBEDO, value = NoahMP50_struc(n)%noahmp50(t)%albedo, & vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) - !if (NoahMPnew_struc(n)%noahmpnew(t)%albedo .ne. LIS_rc%udef) & - ! NoahMPnew_struc(n)%noahmpnew(t)%albedo = NoahMPnew_struc(n)%noahmpnew(t)%albedo * 100.0 + !if (NoahMP50_struc(n)%noahmp50(t)%albedo .ne. LIS_rc%udef) & + ! NoahMP50_struc(n)%noahmp50(t)%albedo = NoahMP50_struc(n)%noahmp50(t)%albedo * 100.0 - !call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_ALBEDO, value = NoahMPnew_struc(n)%noahmpnew(t)%albedo, & + !call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_ALBEDO, value = NoahMP50_struc(n)%noahmp50(t)%albedo, & ! vlevel=1, unit="%", direction="-", surface_type = LIS_rc%lsm_index) ![ 6] output variable: snowc (unit=-). *** snow cover fraction - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWCOVER, value = NoahMPnew_struc(n)%noahmpnew(t)%snowc, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWCOVER, value = NoahMP50_struc(n)%noahmp50(t)%snowc, & vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWCOVER, value = (NoahMPnew_struc(n)%noahmpnew(t)%snowc*100.0), & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWCOVER, value = (NoahMP50_struc(n)%noahmp50(t)%snowc*100.0), & vlevel=1, unit="%", direction="-", surface_type = LIS_rc%lsm_index) ![ 7] output variable: smc (unit=m3/m3). *** volumetric soil moisture - do i=1, NoahMPnew_struc(n)%nsoil - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SOILMOIST, value = NoahMPnew_struc(n)%noahmpnew(t)%smc(i), & + do i=1, NoahMP50_struc(n)%nsoil + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SOILMOIST, value = NoahMP50_struc(n)%noahmp50(t)%smc(i), & vlevel=i, unit="m^3 m-3", direction="-", surface_type = LIS_rc%lsm_index) end do ![ 8] output variable: sh2o (unit=m3/m3). *** equilibrium volumetric liquid soil moisture content - do i=1, NoahMPnew_struc(n)%nsoil - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SMLIQFRAC, value = NoahMPnew_struc(n)%noahmpnew(t)%sh2o(i), & + do i=1, NoahMP50_struc(n)%nsoil + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SMLIQFRAC, value = NoahMP50_struc(n)%noahmp50(t)%sh2o(i), & vlevel=i, unit="m^3 m-3", direction="-", surface_type = LIS_rc%lsm_index) end do ![ 9] output variable: tslb (unit=K). *** soil temperature - do i=1, NoahMPnew_struc(n)%nsoil - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SOILTEMP, value = NoahMPnew_struc(n)%noahmpnew(t)%tslb(i), & + do i=1, NoahMP50_struc(n)%nsoil + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SOILTEMP, value = NoahMP50_struc(n)%noahmp50(t)%tslb(i), & vlevel=i, unit="K", direction="-", surface_type = LIS_rc%lsm_index) end do ![ 10] output variable: sneqv (unit=mm ). *** snow water equivalent - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SWE, value = NoahMPnew_struc(n)%noahmpnew(t)%sneqv, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SWE, value = NoahMP50_struc(n)%noahmp50(t)%sneqv, & vlevel=1, unit="kg m-2", direction="-", surface_type = LIS_rc%lsm_index) ![ 11] output variable: snowh (unit=m ). *** physical snow depth - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWDEPTH, value = NoahMPnew_struc(n)%noahmpnew(t)%snowh, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWDEPTH, value = NoahMP50_struc(n)%noahmp50(t)%snowh, & vlevel=1, unit="m ", direction="-", surface_type = LIS_rc%lsm_index) ![ 12] output variable: canwat (unit=kg/m2). *** total canopy water storage - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CANOPINT, value = NoahMPnew_struc(n)%noahmpnew(t)%canwat, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CANOPINT, value = NoahMP50_struc(n)%noahmp50(t)%canwat, & vlevel=1, unit="kg m-2", direction="- ", surface_type = LIS_rc%lsm_index) ![ 13] output variable: emiss (unit=- ). *** surface bulk emissivity - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_EMISSFORC, value = NoahMPnew_struc(n)%noahmpnew(t)%emiss, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_EMISSFORC, value = NoahMP50_struc(n)%noahmp50(t)%emiss, & vlevel=1, unit="- ", direction="-", surface_type = LIS_rc%lsm_index) ![ 14] output variable: rs (unit=s/m). *** total stomatal resistance - ! call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RS, value = NoahMPnew_struc(n)%noahmpnew(t)%rs, & + ! call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RS, value = NoahMP50_struc(n)%noahmp50(t)%rs, & ! vlevel=1, unit="s/m", direction="-", surface_type = LIS_rc%lsm_index) ![ 15] output variable: isnow (unit=-). *** actual number of snow layers - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SOWN_NLAYER, value = -1.0*NoahMPnew_struc(n)%noahmpnew(t)%isnow, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SOWN_NLAYER, value = -1.0*NoahMP50_struc(n)%noahmp50(t)%isnow, & vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) ![ 16] output variable: tv (unit=K ). *** vegetation leaf temperature - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_VEGT, value = NoahMPnew_struc(n)%noahmpnew(t)%tv, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_VEGT, value = NoahMP50_struc(n)%noahmp50(t)%tv, & vlevel=1, unit="K", direction="-", surface_type = LIS_rc%lsm_index) ![ 17] output variable: tg (unit=K). *** averaged ground surface temperature - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_GROUNDAVGT, value = NoahMPnew_struc(n)%noahmpnew(t)%tg, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_GROUNDAVGT, value = NoahMP50_struc(n)%noahmp50(t)%tg, & vlevel=1, unit="K", direction="-", surface_type = LIS_rc%lsm_index) ![ 18] output variable: canice (unit=mm). *** canopy intercepted ice - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SWEVEG, value = NoahMPnew_struc(n)%noahmpnew(t)%canice, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SWEVEG, value = NoahMP50_struc(n)%noahmp50(t)%canice, & vlevel=1, unit="kg m-2", direction="-", surface_type = LIS_rc%lsm_index) ![ 19] output variable: canliq (unit=mm). *** canopy intercepted liquid water - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CANOPY_INTL, value = NoahMPnew_struc(n)%noahmpnew(t)%canliq, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CANOPY_INTL, value = NoahMP50_struc(n)%noahmp50(t)%canliq, & vlevel=1, unit="mm", direction="-", surface_type = LIS_rc%lsm_index) ![ 20] output variable: eah (unit=Pa ). *** canopy air vapor pressure - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CANOPY_VP, value = NoahMPnew_struc(n)%noahmpnew(t)%eah, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CANOPY_VP, value = NoahMP50_struc(n)%noahmp50(t)%eah, & vlevel=1, unit="Pa", direction="-", surface_type = LIS_rc%lsm_index) ![ 21] output variable: tah (unit=K ). *** canopy air temperature - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CANOPY_TEMP, value = NoahMPnew_struc(n)%noahmpnew(t)%tah, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CANOPY_TEMP, value = NoahMP50_struc(n)%noahmp50(t)%tah, & vlevel=1, unit="K", direction="-", surface_type = LIS_rc%lsm_index) ![ 22] output variable: cm (unit=s/m ). *** bulk momentum drag coefficient - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CM, value = NoahMPnew_struc(n)%noahmpnew(t)%cm, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CM, value = NoahMP50_struc(n)%noahmp50(t)%cm, & vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) ![ 23] output variable: ch (unit=s/m ). *** bulk sensible heat exchange coefficient - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CH, value = NoahMPnew_struc(n)%noahmpnew(t)%ch, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CH, value = NoahMP50_struc(n)%noahmp50(t)%ch, & vlevel=1, unit="m", direction="-", surface_type = LIS_rc%lsm_index) ![ 24] output variable: fwet (unit=- ). *** wetted or snowed fraction of canopy - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CANOPY_WF, value = NoahMPnew_struc(n)%noahmpnew(t)%fwet, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CANOPY_WF, value = NoahMP50_struc(n)%noahmp50(t)%fwet, & vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) ![ 25] output variable: wslake (unit=mm). *** lake water storage - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_LAKEWATER, value = NoahMPnew_struc(n)%noahmpnew(t)%wslake, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_LAKEWATER, value = NoahMP50_struc(n)%noahmp50(t)%wslake, & vlevel=1, unit="mm", direction="-", surface_type = LIS_rc%lsm_index) ![ 26] output variable: zwt (unit=m). *** water table depth - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_WATERTABLED, value = NoahMPnew_struc(n)%noahmpnew(t)%zwt, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_WATERTABLED, value = NoahMP50_struc(n)%noahmp50(t)%zwt, & vlevel=1, unit="m", direction="-", surface_type = LIS_rc%lsm_index) ![ 27] output variable: wa (unit=mm). *** water storage in the "aquifer" - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_GWS, value = NoahMPnew_struc(n)%noahmpnew(t)%wa, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_GWS, value = NoahMP50_struc(n)%noahmp50(t)%wa, & vlevel=1, unit="mm", direction="-", surface_type = LIS_rc%lsm_index) ![ 28] output variable: wt (unit=mm). *** water in aquifer and saturated soil - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_WT_AQUI_SATSOIL, value = NoahMPnew_struc(n)%noahmpnew(t)%wt, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_WT_AQUI_SATSOIL, value = NoahMP50_struc(n)%noahmp50(t)%wt, & vlevel=1, unit="mm", direction="-", surface_type = LIS_rc%lsm_index) ![ 29] output variable: tsno (unit=K). *** snow layer temperature - do i=1, NoahMPnew_struc(n)%nsnow - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWTPROF, value = NoahMPnew_struc(n)%noahmpnew(t)%tsno(i), & + do i=1, NoahMP50_struc(n)%nsnow + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWTPROF, value = NoahMP50_struc(n)%noahmp50(t)%tsno(i), & vlevel=i, unit="K", direction="-", surface_type = LIS_rc%lsm_index) end do ![ 30] output variable: snowice (unit=mm ). *** snow layer ice - do i=1, NoahMPnew_struc(n)%nsnow - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWICE, value = NoahMPnew_struc(n)%noahmpnew(t)%snowice(i), & + do i=1, NoahMP50_struc(n)%nsnow + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWICE, value = NoahMP50_struc(n)%noahmp50(t)%snowice(i), & vlevel=i, unit="mm", direction="-", surface_type = LIS_rc%lsm_index) end do ![ 31] output variable: snowliq (unit=mm ). *** snow layer liquid water - do i=1, NoahMPnew_struc(n)%nsnow - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWLIQ, value = NoahMPnew_struc(n)%noahmpnew(t)%snowliq(i), & + do i=1, NoahMP50_struc(n)%nsnow + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWLIQ, value = NoahMP50_struc(n)%noahmp50(t)%snowliq(i), & vlevel=i, unit="mm", direction="-", surface_type = LIS_rc%lsm_index) end do ! Yeosang Yoon, for snow DA ! output variable: z_snow (unit=m). *** snow layer-bottom depth from snow surface - do i=1, NoahMPnew_struc(n)%nsnow - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOW_LBDFSS, value = NoahMPnew_struc(n)%noahmpnew(t)%zss(i), & + do i=1, NoahMP50_struc(n)%nsnow + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOW_LBDFSS, value = NoahMP50_struc(n)%noahmp50(t)%zss(i), & vlevel=i, unit="m", direction="-", surface_type = LIS_rc%lsm_index) end do ![ 32] output variable: lfmass (unit=g/m2). *** leaf mass - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_LEAFMASS, value = NoahMPnew_struc(n)%noahmpnew(t)%lfmass, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_LEAFMASS, value = NoahMP50_struc(n)%noahmp50(t)%lfmass, & vlevel=1, unit="g m-2", direction="-", surface_type = LIS_rc%lsm_index) ![ 33] output variable: rtmass (unit=g/m2 ). *** mass of fine roots - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_ROOTMASS, value = NoahMPnew_struc(n)%noahmpnew(t)%rtmass, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_ROOTMASS, value = NoahMP50_struc(n)%noahmp50(t)%rtmass, & vlevel=1, unit="g m-2 ", direction="-", surface_type = LIS_rc%lsm_index) ![ 34] output variable: stmass (unit=g/m2 ). *** stem mass - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_STEMMASS, value = NoahMPnew_struc(n)%noahmpnew(t)%stmass, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_STEMMASS, value = NoahMP50_struc(n)%noahmp50(t)%stmass, & vlevel=1, unit="g m-2", direction="-", surface_type = LIS_rc%lsm_index) ![ 35] output variable: wood (unit=g/m2). *** mass of wood including woody roots - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_WOODMASS, value = NoahMPnew_struc(n)%noahmpnew(t)%wood, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_WOODMASS, value = NoahMP50_struc(n)%noahmp50(t)%wood, & vlevel=1, unit="g m-2", direction="-", surface_type = LIS_rc%lsm_index) ![ 36] output variable: stblcp (unit=g/m2). *** stable carbon in deep soil - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CARBON_DEEPSOIL, value = NoahMPnew_struc(n)%noahmpnew(t)%stblcp, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CARBON_DEEPSOIL, value = NoahMP50_struc(n)%noahmp50(t)%stblcp, & vlevel=1, unit="g m-2", direction="-", surface_type = LIS_rc%lsm_index) ![ 37] output variable: fastcp (unit=g/m2 ). *** short-lived carbon in shallow soil - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CARBON_SHALLOWSOIL, value = NoahMPnew_struc(n)%noahmpnew(t)%fastcp, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CARBON_SHALLOWSOIL, value = NoahMP50_struc(n)%noahmp50(t)%fastcp, & vlevel=1, unit="g m-2", direction="-", surface_type = LIS_rc%lsm_index) ![ 38] output variable: lai (unit=-). *** leave area index - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_LAI, value = NoahMPnew_struc(n)%noahmpnew(t)%lai, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_LAI, value = NoahMP50_struc(n)%noahmp50(t)%lai, & vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) ![ 39] output variable: sai (unit=- ). *** stem area index - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SAI, value = NoahMPnew_struc(n)%noahmpnew(t)%sai, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SAI, value = NoahMP50_struc(n)%noahmp50(t)%sai, & vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) ![ 40] output variable: tauss (unit=- ). *** snow aging factor - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWAGE, value = NoahMPnew_struc(n)%noahmpnew(t)%tauss, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWAGE, value = NoahMP50_struc(n)%noahmp50(t)%tauss, & vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) ![ 41] output variable: smcwtd (unit=m3/m3). *** soil moisture content in the layer to the water table when deep - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_BETWEENWATER, value = NoahMPnew_struc(n)%noahmpnew(t)%smcwtd, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_BETWEENWATER, value = NoahMP50_struc(n)%noahmp50(t)%smcwtd, & vlevel=1, unit="m^3 m-3", direction="-", surface_type = LIS_rc%lsm_index) ![ 42] output variable: deeprech (unit=m). *** recharge to the water table when groundwater is deep - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QRECTOGW, value = NoahMPnew_struc(n)%noahmpnew(t)%deeprech, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QRECTOGW, value = NoahMP50_struc(n)%noahmp50(t)%deeprech, & vlevel=1, unit="m", direction="-", surface_type = LIS_rc%lsm_index) ![ 43] output variable: rech (unit=m). *** recharge from the water table when groundwater is shallow - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QRECFROMGW, value = NoahMPnew_struc(n)%noahmpnew(t)%rech, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QRECFROMGW, value = NoahMP50_struc(n)%noahmp50(t)%rech, & vlevel=1, unit="m", direction="-", surface_type = LIS_rc%lsm_index) ![ 44] output variable: t2mv (unit=K). *** 2-m air temperature over vegetated part - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_VEGE2MT, value = NoahMPnew_struc(n)%noahmpnew(t)%t2mv, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_VEGE2MT, value = NoahMP50_struc(n)%noahmp50(t)%t2mv, & vlevel=1, unit="K", direction="-", surface_type = LIS_rc%lsm_index) ![ 45] output variable: t2mb (unit=K ). *** 2-m height air temperature - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_BARE2MT, value = NoahMPnew_struc(n)%noahmpnew(t)%t2mb, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_BARE2MT, value = NoahMP50_struc(n)%noahmp50(t)%t2mb, & vlevel=1, unit="K", direction="-", surface_type = LIS_rc%lsm_index) ![ 46] output variable: q2mv (unit=kg/kg). *** 2-m mixing ratio of vegetation part - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_VEGE2MQ2, value = NoahMPnew_struc(n)%noahmpnew(t)%q2mv, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_VEGE2MQ2, value = NoahMP50_struc(n)%noahmp50(t)%q2mv, & vlevel=1, unit="kg kg-1", direction="-", surface_type = LIS_rc%lsm_index) ![ 47] output variable: q2mb (unit=kg/kg). *** 2-m mixing ratio of bare ground part - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_BARE2MQ2, value = NoahMPnew_struc(n)%noahmpnew(t)%q2mb, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_BARE2MQ2, value = NoahMP50_struc(n)%noahmp50(t)%q2mb, & vlevel=1, unit="kg kg-1", direction="-", surface_type = LIS_rc%lsm_index) ![ 48] output variable: trad (unit=K). *** surface radiative temperature - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RADT, value = NoahMPnew_struc(n)%noahmpnew(t)%trad, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RADT, value = NoahMP50_struc(n)%noahmp50(t)%trad, & vlevel=1, unit="K", direction="-", surface_type = LIS_rc%lsm_index) ![ 49] output variable: nee (unit=g/m2/s ). *** net ecosystem exchange of CO2 - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_NEE, value = NoahMPnew_struc(n)%noahmpnew(t)%nee, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_NEE, value = NoahMP50_struc(n)%noahmp50(t)%nee, & vlevel=1, unit="g m-2 s-1", direction="OUT", surface_type = LIS_rc%lsm_index) ![ 50] output variable: gpp (unit=g/m2/s ). *** gross primary assimilation of carbon - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_GPP, value = NoahMPnew_struc(n)%noahmpnew(t)%gpp, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_GPP, value = NoahMP50_struc(n)%noahmp50(t)%gpp, & vlevel=1, unit="g m-2 s-1", direction="IN", surface_type = LIS_rc%lsm_index) ![ 51] output variable: npp (unit=g/m2/s). *** net primary productivity of carbon - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_NPP, value = NoahMPnew_struc(n)%noahmpnew(t)%npp, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_NPP, value = NoahMP50_struc(n)%noahmp50(t)%npp, & vlevel=1, unit="g m-2 s-1", direction="OUT", surface_type = LIS_rc%lsm_index) ![ 52] output variable: fveg (unit=-). *** Noah-MP green vegetation fraction - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_GREENNESS, value = NoahMPnew_struc(n)%noahmpnew(t)%fveg, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_GREENNESS, value = NoahMP50_struc(n)%noahmp50(t)%fveg, & vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) ![ 53] output variable: runsf (unit=mm/s). *** surface runoff - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QS, value = NoahMPnew_struc(n)%noahmpnew(t)%runsf/NoahMPnew_struc(n)%ts,& + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QS, value = NoahMP50_struc(n)%noahmp50(t)%runsf/NoahMP50_struc(n)%ts,& vlevel=1, unit="kg m-2 s-1", direction="OUT", surface_type = LIS_rc%lsm_index) - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QS, value = NoahMPnew_struc(n)%noahmpnew(t)%runsf, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QS, value = NoahMP50_struc(n)%noahmp50(t)%runsf, & vlevel=1, unit="kg m-2", direction="OUT", surface_type = LIS_rc%lsm_index) ![ 54] output variable: runsb (unit=mm/s ). *** baseflow (saturation excess) - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QSB, value = NoahMPnew_struc(n)%noahmpnew(t)%runsb/NoahMPnew_struc(n)%ts,& + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QSB, value = NoahMP50_struc(n)%noahmp50(t)%runsb/NoahMP50_struc(n)%ts,& vlevel=1, unit="kg m-2 s-1", direction="OUT", surface_type = LIS_rc%lsm_index) - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QSB, value = NoahMPnew_struc(n)%noahmpnew(t)%runsb, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QSB, value = NoahMP50_struc(n)%noahmp50(t)%runsb, & vlevel=1, unit="kg m-2", direction="OUT", surface_type = LIS_rc%lsm_index) ! Combined output variable: qtot (unit=mm | mm/s). *** total runoff call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QTOT, & - value = NoahMPnew_struc(n)%noahmpnew(t)%runsf/NoahMPnew_struc(n)%ts + & - NoahMPnew_struc(n)%noahmpnew(t)%runsb/NoahMPnew_struc(n)%ts, & + value = NoahMP50_struc(n)%noahmp50(t)%runsf/NoahMP50_struc(n)%ts + & + NoahMP50_struc(n)%noahmp50(t)%runsb/NoahMP50_struc(n)%ts, & vlevel=1, unit="kg m-2 s-1", direction="OUT", surface_type = LIS_rc%lsm_index) call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_QTOT, & - value = NoahMPnew_struc(n)%noahmpnew(t)%runsf + NoahMPnew_struc(n)%noahmpnew(t)%runsb, & + value = NoahMP50_struc(n)%noahmp50(t)%runsf + NoahMP50_struc(n)%noahmp50(t)%runsb, & vlevel=1, unit="kg m-2", direction="OUT", surface_type = LIS_rc%lsm_index) ![ 55] output variable: ecan (unit=mm/s ). *** evaporation of intercepted water - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_ECANOP, value = NoahMPnew_struc(n)%noahmpnew(t)%ecan, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_ECANOP, value = NoahMP50_struc(n)%noahmp50(t)%ecan, & vlevel=1, unit="kg m-2 s-1", direction="UP", surface_type = LIS_rc%lsm_index) ![ 56] output variable: edir (unit=mm/s ). *** soil surface evaporation rate - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_ESOIL, value = NoahMPnew_struc(n)%noahmpnew(t)%edir, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_ESOIL, value = NoahMP50_struc(n)%noahmp50(t)%edir, & vlevel=1, unit="kg m-2 s-1", direction="UP", surface_type = LIS_rc%lsm_index) ![ 57] output variable: etran (unit=mm/s ). *** transpiration rate - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_TVEG, value = NoahMPnew_struc(n)%noahmpnew(t)%etran, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_TVEG, value = NoahMP50_struc(n)%noahmp50(t)%etran, & vlevel=1, unit="kg m-2 s-1", direction="UP", surface_type = LIS_rc%lsm_index) ![ 58] output variable: fsa (unit=W/m2). *** total absorbed solar radiation - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SWNET, value = NoahMPnew_struc(n)%noahmpnew(t)%fsa, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SWNET, value = NoahMP50_struc(n)%noahmp50(t)%fsa, & vlevel=1, unit="W m-2", direction="DN", surface_type = LIS_rc%lsm_index) ![ 59] output variable: fira (unit=W/m2 ). *** total net longwave radiation [+ to atm] - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_LWUP, value = NoahMPnew_struc(n)%noahmpnew(t)%fira, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_LWUP, value = NoahMP50_struc(n)%noahmp50(t)%fira, & vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) ![ 60] output variable: apar (unit=W/m2). *** photosynthesis active energy by canopy - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_APAR, value = NoahMPnew_struc(n)%noahmpnew(t)%apar, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_APAR, value = NoahMP50_struc(n)%noahmp50(t)%apar, & vlevel=1, unit="W m-2", direction="IN", surface_type = LIS_rc%lsm_index) ![ 61] output variable: psn (unit=umol/m2/s ). *** total photosynthesis of CO2 [+] - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_PSCO2, value = NoahMPnew_struc(n)%noahmpnew(t)%psn, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_PSCO2, value = NoahMP50_struc(n)%noahmp50(t)%psn, & vlevel=1, unit="umol m-2 s-1", direction="IN", surface_type = LIS_rc%lsm_index) ![ 62] output variable: sav (unit=W/m2 ). *** solar radiation absorbed by vegetation - !call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SAV, value = NoahMPnew_struc(n)%noahmpnew(t)%sav, & + !call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SAV, value = NoahMP50_struc(n)%noahmp50(t)%sav, & ! vlevel=1, unit="W/m2 ", direction="IN", surface_type = LIS_rc%lsm_index) ![ 63] output variable: sag (unit=W/m2 ). *** solar radiation absorbed by ground - !call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SAG, value = NoahMPnew_struc(n)%noahmpnew(t)%sag, & + !call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SAG, value = NoahMP50_struc(n)%noahmp50(t)%sag, & ! vlevel=1, unit="W/m2 ", direction="IN", surface_type = LIS_rc%lsm_index) ![ 64] output variable: rssun (unit=s/m). *** sunlit leaf stomatal resistance - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RSSUN, value = NoahMPnew_struc(n)%noahmpnew(t)%rssun, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RSSUN, value = NoahMP50_struc(n)%noahmp50(t)%rssun, & vlevel=1, unit="s m-1", direction="-", surface_type = LIS_rc%lsm_index) ![ 65] output variable: rssha (unit=s/m). *** shaded leaf stomatal resistance - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RSSHA, value = NoahMPnew_struc(n)%noahmpnew(t)%rssha, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RSSHA, value = NoahMP50_struc(n)%noahmp50(t)%rssha, & vlevel=1, unit="s m-1", direction="-", surface_type = LIS_rc%lsm_index) ![ 66] output variable: bgap (unit=-). *** between gap fraction - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_BGAP, value = NoahMPnew_struc(n)%noahmpnew(t)%bgap, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_BGAP, value = NoahMP50_struc(n)%noahmp50(t)%bgap, & vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) ![ 67] output variable: wgap (unit=- ). *** within gap fraction - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_WGAP, value = NoahMPnew_struc(n)%noahmpnew(t)%wgap, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_WGAP, value = NoahMP50_struc(n)%noahmp50(t)%wgap, & vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) ![ 68] output variable: tgb (unit=K). *** bare ground temperature - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_BARESOILT, value = NoahMPnew_struc(n)%noahmpnew(t)%tgb, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_BARESOILT, value = NoahMP50_struc(n)%noahmp50(t)%tgb, & vlevel=1, unit="K", direction="-", surface_type = LIS_rc%lsm_index) ![ 69] output variable: tgv (unit=K). *** vegetated ground surface temperature - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_GROUNDVEGT, value = NoahMPnew_struc(n)%noahmpnew(t)%tgv, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_GROUNDVEGT, value = NoahMP50_struc(n)%noahmp50(t)%tgv, & vlevel=1, unit="K", direction="-", surface_type = LIS_rc%lsm_index) ![ 70] output variable: chv (unit=s/m). *** sensible heat exchange coefficient over vegetated fraction - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CHV, value = NoahMPnew_struc(n)%noahmpnew(t)%chv, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CHV, value = NoahMP50_struc(n)%noahmp50(t)%chv, & vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) ![ 71] output variable: chb (unit=s/m). *** sensible heat exchange coefficient over bare-ground fraction - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CHB, value = NoahMPnew_struc(n)%noahmpnew(t)%chb, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CHB, value = NoahMP50_struc(n)%noahmp50(t)%chb, & vlevel=1, unit="-", direction="-", surface_type = LIS_rc%lsm_index) ![ 72] output variable: shg (unit=W/m2 ). *** get ground sensible heat [+ to atm] - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SHG, value = NoahMPnew_struc(n)%noahmpnew(t)%shg, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SHG, value = NoahMP50_struc(n)%noahmp50(t)%shg, & vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) ![ 73] output variable: shc (unit=W/m2 ). *** canopy sensible heat [+ to atm] - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SHC, value = NoahMPnew_struc(n)%noahmpnew(t)%shc, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SHC, value = NoahMP50_struc(n)%noahmp50(t)%shc, & vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) ![ 74] output variable: shb (unit=W/m2 ). *** bare ground sensible heat [+ to atm] - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SHB, value = NoahMPnew_struc(n)%noahmpnew(t)%shb, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SHB, value = NoahMP50_struc(n)%noahmp50(t)%shb, & vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) ![ 75] output variable: evg (unit=W/m2 ). *** veg ground evaporation [+ to atm] - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_EVG, value = NoahMPnew_struc(n)%noahmpnew(t)%evg, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_EVG, value = NoahMP50_struc(n)%noahmp50(t)%evg, & vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) ![ 76] output variable: evb (unit=W/m2 ). *** bare soil evaporation [+ to atm] - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_EVB, value = NoahMPnew_struc(n)%noahmpnew(t)%evb, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_EVB, value = NoahMP50_struc(n)%noahmp50(t)%evb, & vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) ![ 77] output variable: ghv (unit=W/m2 ). *** vegetated ground heat flux [+ to soil] - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_GHV, value = NoahMPnew_struc(n)%noahmpnew(t)%ghv, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_GHV, value = NoahMP50_struc(n)%noahmp50(t)%ghv, & vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) ![ 78] output variable: ghb (unit=W/m2 ). *** bare ground heat flux [+ to soil] - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_GHB, value = NoahMPnew_struc(n)%noahmpnew(t)%ghb, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_GHB, value = NoahMP50_struc(n)%noahmp50(t)%ghb, & vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) ![ 79] output variable: irg (unit=W/m2 ). *** veg ground net long wave radiation [+ to atm] - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_IRV, value = NoahMPnew_struc(n)%noahmpnew(t)%irg, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_IRV, value = NoahMP50_struc(n)%noahmp50(t)%irg, & vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) ![ 80] output variable: irc (unit=W/m2 ). *** canopy net long wave radiation [+ to atm] - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_IRC, value = NoahMPnew_struc(n)%noahmpnew(t)%irc, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_IRC, value = NoahMP50_struc(n)%noahmp50(t)%irc, & vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) ![ 81] output variable: irb (unit=W/m2 ). *** bare net long wave radiation [+ to atm] - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_IRB, value = NoahMPnew_struc(n)%noahmpnew(t)%irb, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_IRB, value = NoahMP50_struc(n)%noahmp50(t)%irb, & vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) ![ 82] output variable: tr (unit=W/m2 ). *** transpiration heat [to atm] - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_HTR, value = NoahMPnew_struc(n)%noahmpnew(t)%tr, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_HTR, value = NoahMP50_struc(n)%noahmp50(t)%tr, & vlevel=1, unit="W m-2", direction="UP", surface_type = LIS_rc%lsm_index) ![ 83] output variable: evc (unit=W/m2 ). *** canopy evaporation heat [to atm] - !call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_EVC, value = NoahMPnew_struc(n)%noahmpnew(t)%evc, & + !call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_EVC, value = NoahMP50_struc(n)%noahmp50(t)%evc, & ! vlevel=1, unit="W/m2 ", direction="UP", surface_type = LIS_rc%lsm_index) ![ 84] output variable: chleaf (unit=m/s). *** leaf exchange coefficient - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CHLEAF, value = NoahMPnew_struc(n)%noahmpnew(t)%chleaf, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CHLEAF, value = NoahMP50_struc(n)%noahmp50(t)%chleaf, & vlevel=1, unit="m s-1", direction="-", surface_type = LIS_rc%lsm_index) ![ 85] output variable: chuc (unit=m/s). *** under canopy exchange coefficient - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CHUC, value = NoahMPnew_struc(n)%noahmpnew(t)%chuc, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CHUC, value = NoahMP50_struc(n)%noahmp50(t)%chuc, & vlevel=1, unit="m s-1", direction="-", surface_type = LIS_rc%lsm_index) ![ 86] output variable: chv2 (unit=m/s). *** veg 2m exchange coefficient - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CHV2, value = NoahMPnew_struc(n)%noahmpnew(t)%chv2, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CHV2, value = NoahMP50_struc(n)%noahmp50(t)%chv2, & vlevel=1, unit="m s-1", direction="-", surface_type = LIS_rc%lsm_index) ![ 87] output variable: chb2 (unit=m/s). *** bare 2m exchange coefficient - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CHB2, value = NoahMPnew_struc(n)%noahmpnew(t)%chb2, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_CHB2, value = NoahMP50_struc(n)%noahmp50(t)%chb2, & vlevel=1, unit="m s-1", direction="-", surface_type = LIS_rc%lsm_index) ![ 88] output variable: evap (unit=kg/m2/s). *** total evapotranspiration - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_EVAP, value = NoahMPnew_struc(n)%noahmpnew(t)%qfx, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_EVAP, value = NoahMP50_struc(n)%noahmp50(t)%qfx, & vlevel=1, unit="kg m-2 s-1", direction="UP", surface_type = LIS_rc%lsm_index) !PET call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_POTEVAP, & @@ -1018,16 +1018,16 @@ subroutine NoahMPnew_main(n) vlevel=1,unit="kg m-2 s-1", direction="UP",surface_type=LIS_rc%lsm_index) ![ 89] output variable: rainf (unit=kg/m2). *** precipitation rate - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RAINF, value = NoahMPnew_struc(n)%noahmpnew(t)%rainf, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_RAINF, value = NoahMP50_struc(n)%noahmp50(t)%rainf, & vlevel=1, unit="kg m-2 s-1", direction="DN", surface_type = LIS_rc%lsm_index) ![ 90] output variable: snowf (unit=kg/m2). *** snowfall rate - call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWF, value = NoahMPnew_struc(n)%noahmpnew(t)%snowf, & + call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_SNOWF, value = NoahMP50_struc(n)%noahmp50(t)%snowf, & vlevel=1, unit="kg m-2 s-1", direction="DN", surface_type = LIS_rc%lsm_index) ![ 91] LWnet call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_LWNET,vlevel=1, & - value=(-1.0 * NoahMPnew_struc(n)%noahmpnew(t)%fira), & + value=(-1.0 * NoahMP50_struc(n)%noahmp50(t)%fira), & unit="W m-2", direction="DN", surface_type=LIS_rc%lsm_index) ! Code added by Zhuo Wang on 02/28/2019 @@ -1040,26 +1040,26 @@ subroutine NoahMPnew_main(n) vlevel=1, unit="kg m-2 s-1", direction="-", surface_type = LIS_rc%lsm_index) ![ 94] output variable: AvgSurfT (unit=K). *** average surface temperature - AvgSurfT_out = NoahMPnew_struc(n)%noahmpnew(t)%fveg * NoahMPnew_struc(n)%noahmpnew(t)%tv + & - (1.0-NoahMPnew_struc(n)%noahmpnew(t)%fveg) * NoahMPnew_struc(n)%noahmpnew(t)%tgb + AvgSurfT_out = NoahMP50_struc(n)%noahmp50(t)%fveg * NoahMP50_struc(n)%noahmp50(t)%tv + & + (1.0-NoahMP50_struc(n)%noahmp50(t)%fveg) * NoahMP50_struc(n)%noahmp50(t)%tgb call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_AVGSURFT, value = AvgSurfT_out, & vlevel=1, unit="K", direction="-",surface_type = LIS_rc%lsm_index) ![ 95] TWS should be SWE + CanopInt + Soil moisture + WA - David Mocko - TWS_out = NoahMPnew_struc(n)%noahmpnew(t)%sneqv - if ((NoahMPnew_struc(n)%noahmpnew(t)%canliq.ge.0.0).and. & - (NoahMPnew_struc(n)%noahmpnew(t)%canice.ge.0.0)) then + TWS_out = NoahMP50_struc(n)%noahmp50(t)%sneqv + if ((NoahMP50_struc(n)%noahmp50(t)%canliq.ge.0.0).and. & + (NoahMP50_struc(n)%noahmp50(t)%canice.ge.0.0)) then TWS_out = TWS_out + & - (NoahMPnew_struc(n)%noahmpnew(t)%canliq + & - NoahMPnew_struc(n)%noahmpnew(t)%canice) + (NoahMP50_struc(n)%noahmp50(t)%canliq + & + NoahMP50_struc(n)%noahmp50(t)%canice) endif - do i = 1,NoahMPnew_struc(n)%nsoil + do i = 1,NoahMP50_struc(n)%nsoil TWS_out = TWS_out + & - (NoahMPnew_struc(n)%noahmpnew(t)%smc(i) * & + (NoahMP50_struc(n)%noahmp50(t)%smc(i) * & NoahmpIO%dzs(i)*LIS_CONST_RHOFW) enddo - if (NoahMPnew_struc(n)%noahmpnew(t)%wa.ge.0.0) then - TWS_out = TWS_out + NoahMPnew_struc(n)%noahmpnew(t)%wa + if (NoahMP50_struc(n)%noahmp50(t)%wa.ge.0.0) then + TWS_out = TWS_out + NoahMP50_struc(n)%noahmp50(t)%wa endif call LIS_diagnoseSurfaceOutputVar(n, t, LIS_MOC_TWS, value = TWS_out, & vlevel=1, unit="mm", direction="-", surface_type = LIS_rc%lsm_index) @@ -1079,13 +1079,13 @@ subroutine NoahMPnew_main(n) value=(endsm - startsm),vlevel=1,unit="kg m-2", & direction="INC",surface_type=LIS_rc%lsm_index) call LIS_diagnoseSurfaceOutputVar(n,t,LIS_MOC_DELSWE, & - value=(NoahMPnew_struc(n)%noahmpnew(t)%sneqv - & + value=(NoahMP50_struc(n)%noahmp50(t)%sneqv - & startswe), & vlevel=1,unit="kg m-2",direction="INC", & surface_type=LIS_rc%lsm_index) call LIS_diagnoseSurfaceOutputVar(n,t,LIS_MOC_DELINTERCEPT,& - value=((NoahMPnew_struc(n)%noahmpnew(t)%canliq + & - NoahMPnew_struc(n)%noahmpnew(t)%canice) - & + value=((NoahMP50_struc(n)%noahmp50(t)%canliq + & + NoahMP50_struc(n)%noahmp50(t)%canice) - & startint), & vlevel=1,unit="kg m-2",direction="INC", & surface_type=LIS_rc%lsm_index) @@ -1095,7 +1095,7 @@ subroutine NoahMPnew_main(n) ! This is only a temporary fix, until LIS_MOC_DELGROUNDWATER or ! a similarly-named variable is added into LIS_histDataMod.F90. call LIS_diagnoseSurfaceOutputVar(n,t,LIS_MOC_DELSURFSTOR, & - value=(NoahMPnew_struc(n)%noahmpnew(t)%wa - & + value=(NoahMP50_struc(n)%noahmp50(t)%wa - & startgw), & vlevel=1,unit="kg m-2",direction="INC", & surface_type=LIS_rc%lsm_index) @@ -1126,32 +1126,32 @@ subroutine NoahMPnew_main(n) enddo ! reset forcing variables to zeros - NoahMPnew_struc(n)%noahmpnew(t)%tair = 0.0 - NoahMPnew_struc(n)%noahmpnew(t)%psurf = 0.0 - NoahMPnew_struc(n)%noahmpnew(t)%wind_e = 0.0 - NoahMPnew_struc(n)%noahmpnew(t)%wind_n = 0.0 - NoahMPnew_struc(n)%noahmpnew(t)%qair = 0.0 - NoahMPnew_struc(n)%noahmpnew(t)%swdown = 0.0 - NoahMPnew_struc(n)%noahmpnew(t)%lwdown = 0.0 - NoahMPnew_struc(n)%noahmpnew(t)%prcp = 0.0 + NoahMP50_struc(n)%noahmp50(t)%tair = 0.0 + NoahMP50_struc(n)%noahmp50(t)%psurf = 0.0 + NoahMP50_struc(n)%noahmp50(t)%wind_e = 0.0 + NoahMP50_struc(n)%noahmp50(t)%wind_n = 0.0 + NoahMP50_struc(n)%noahmp50(t)%qair = 0.0 + NoahMP50_struc(n)%noahmp50(t)%swdown = 0.0 + NoahMP50_struc(n)%noahmp50(t)%lwdown = 0.0 + NoahMP50_struc(n)%noahmp50(t)%prcp = 0.0 enddo ! end of tile (t) loop ! reset forcing counter to be zero - NoahMPnew_struc(n)%forc_count = 0 + NoahMP50_struc(n)%forc_count = 0 endif ! end of alarmCheck loop - ! EMK...See if noahmpnew_struc(n)%noahmpnew(t)%tair_agl_min needs to be + ! EMK...See if noahmp50_struc(n)%noahmp50(t)%tair_agl_min needs to be ! reset for calculating RHMin. write(fnest,'(i3.3)') n alarmCheck = LIS_isAlarmRinging(LIS_rc, & - "NoahMPnew RHMin alarm "//trim(fnest)) + "NoahMP50 RHMin alarm "//trim(fnest)) if (alarmCheck) then write(LIS_logunit,*) & '[INFO] Resetting tair_agl_min for RHMin calculation' do t = 1,LIS_rc%npatch(n,LIS_rc%lsm_index) - noahmpnew_struc(n)%noahmpnew(t)%tair_agl_min = 999. + noahmp50_struc(n)%noahmp50(t)%tair_agl_min = 999. end do end if -end subroutine NoahMPnew_main +end subroutine NoahMP50_main diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_module.F90 b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_module.F90 similarity index 99% rename from lis/surfacemodels/land/noahmp.new/NoahMPnew_module.F90 rename to lis/surfacemodels/land/noahmp.5.0/NoahMP50_module.F90 index 63287e269..4b585f116 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_module.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_module.F90 @@ -8,10 +8,10 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- -module NoahMPnew_module +module NoahMP50_module !BOP ! -! !MODULE: NoahMPnew_module +! !MODULE: NoahMP50_module ! ! !DESCRIPTION: ! The code in this file provides a description of the @@ -369,7 +369,7 @@ module NoahMPnew_module INTEGER, PRIVATE, PARAMETER :: NSOIL = 4 INTEGER, PRIVATE, PARAMETER :: NSTAGE = 8 - type, public :: noahmpnewdec + type, public :: noahmp50dec !------------------------------------------------------ ! forcing !------------------------------------------------------ @@ -572,6 +572,6 @@ module NoahMPnew_module real :: infxs1rt real :: soldrain1rt - end type noahmpnewdec + end type noahmp50dec -end module NoahMPnew_module +end module NoahMP50_module diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_read_OPT_parameters.F90 b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_read_OPT_parameters.F90 similarity index 74% rename from lis/surfacemodels/land/noahmp.new/NoahMPnew_read_OPT_parameters.F90 rename to lis/surfacemodels/land/noahmp.5.0/NoahMP50_read_OPT_parameters.F90 index bf6e68e74..4076619de 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_read_OPT_parameters.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_read_OPT_parameters.F90 @@ -10,8 +10,8 @@ #include "LIS_misc.h" !BOP ! -! !ROUTINE: NoahMPnew_read_OPT_parameters -! \label{NoahMPnew_read_OPT_parameters} +! !ROUTINE: NoahMP50_read_OPT_parameters +! \label{NoahMP50_read_OPT_parameters} ! ! !REVISION HISTORY: ! @@ -24,10 +24,10 @@ ! !INTERFACE: ! -subroutine NoahMPnew_read_OPT_parameters() +subroutine NoahMP50_read_OPT_parameters() ! !USES: use LIS_coreMod - use NoahMPnew_lsmMod + use NoahMP50_lsmMod implicit none @@ -42,281 +42,281 @@ subroutine NoahMPnew_read_OPT_parameters() do n=1,LIS_rc%nnest allocate(placeholder(LIS_rc%lnc(n), LIS_rc%lnr(n))) - call NoahMPnew_read_OPT_param(n, "ALBDRY1", placeholder, var_found) + call NoahMP50_read_OPT_param(n, "ALBDRY1", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NoahMPnew_struc(n)%noahmpnew(t)%param%albdry(1) =& + NoahMP50_struc(n)%noahmp50(t)%param%albdry(1) =& placeholder(col, row) endif enddo endif - call NoahMPnew_read_OPT_param(n, "ALBDRY2", placeholder, var_found) + call NoahMP50_read_OPT_param(n, "ALBDRY2", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NoahMPnew_struc(n)%noahmpnew(t)%param%albdry(2) =& + NoahMP50_struc(n)%noahmp50(t)%param%albdry(2) =& placeholder(col, row) endif enddo endif - call NoahMPnew_read_OPT_param(n, "ALBICE1", placeholder, var_found) + call NoahMP50_read_OPT_param(n, "ALBICE1", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NoahMPnew_struc(n)%noahmpnew(t)%param%albice(1) =& + NoahMP50_struc(n)%noahmp50(t)%param%albice(1) =& placeholder(col, row) endif enddo endif - call NoahMPnew_read_OPT_param(n, "ALBICE2", placeholder, var_found) + call NoahMP50_read_OPT_param(n, "ALBICE2", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NoahMPnew_struc(n)%noahmpnew(t)%param%albice(2) =& + NoahMP50_struc(n)%noahmp50(t)%param%albice(2) =& placeholder(col, row) endif enddo endif - call NoahMPnew_read_OPT_param(n, "ALBSAT1", placeholder, var_found) + call NoahMP50_read_OPT_param(n, "ALBSAT1", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NoahMPnew_struc(n)%noahmpnew(t)%param%albsat(1) =& + NoahMP50_struc(n)%noahmp50(t)%param%albsat(1) =& placeholder(col, row) endif enddo endif - call NoahMPnew_read_OPT_param(n, "ALBSAT2", placeholder, var_found) + call NoahMP50_read_OPT_param(n, "ALBSAT2", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NoahMPnew_struc(n)%noahmpnew(t)%param%albsat(2) =& + NoahMP50_struc(n)%noahmp50(t)%param%albsat(2) =& placeholder(col, row) endif enddo endif - call NoahMPnew_read_OPT_param(n, "BETADS", placeholder, var_found) + call NoahMP50_read_OPT_param(n, "BETADS", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NoahMPnew_struc(n)%noahmpnew(t)%param%betads =& + NoahMP50_struc(n)%noahmp50(t)%param%betads =& placeholder(col, row) endif enddo endif - call NoahMPnew_read_OPT_param(n, "BETAIS", placeholder, var_found) + call NoahMP50_read_OPT_param(n, "BETAIS", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NoahMPnew_struc(n)%noahmpnew(t)%param%betais =& + NoahMP50_struc(n)%noahmp50(t)%param%betais =& placeholder(col, row) endif enddo endif - call NoahMPnew_read_OPT_param(n, "EG1", placeholder, var_found) + call NoahMP50_read_OPT_param(n, "EG1", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NoahMPnew_struc(n)%noahmpnew(t)%param%eg(1) =& + NoahMP50_struc(n)%noahmp50(t)%param%eg(1) =& placeholder(col, row) endif enddo endif - call NoahMPnew_read_OPT_param(n, "EG2", placeholder, var_found) + call NoahMP50_read_OPT_param(n, "EG2", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NoahMPnew_struc(n)%noahmpnew(t)%param%eg(2) =& + NoahMP50_struc(n)%noahmp50(t)%param%eg(2) =& placeholder(col, row) endif enddo endif - call NoahMPnew_read_OPT_param(n, "MFSNO", placeholder, var_found) + call NoahMP50_read_OPT_param(n, "MFSNO", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NoahMPnew_struc(n)%noahmpnew(t)%param%mfsno =& + NoahMP50_struc(n)%noahmp50(t)%param%mfsno =& placeholder(col, row) endif enddo endif - call NoahMPnew_read_OPT_param(n, "OMEGAS1", placeholder, var_found) + call NoahMP50_read_OPT_param(n, "OMEGAS1", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NoahMPnew_struc(n)%noahmpnew(t)%param%omegas(1) =& + NoahMP50_struc(n)%noahmp50(t)%param%omegas(1) =& placeholder(col, row) endif enddo endif - call NoahMPnew_read_OPT_param(n, "OMGEAS2", placeholder, var_found) + call NoahMP50_read_OPT_param(n, "OMGEAS2", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NoahMPnew_struc(n)%noahmpnew(t)%param%omegas(2) =& + NoahMP50_struc(n)%noahmp50(t)%param%omegas(2) =& placeholder(col, row) endif enddo endif - call NoahMPnew_read_OPT_param(n, "RSURF_SNOW", placeholder, var_found) + call NoahMP50_read_OPT_param(n, "RSURF_SNOW", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NoahMPnew_struc(n)%noahmpnew(t)%param%rsurf_snow =& + NoahMP50_struc(n)%noahmp50(t)%param%rsurf_snow =& placeholder(col, row) endif enddo endif - call NoahMPnew_read_OPT_param(n, "SSI", placeholder, var_found) + call NoahMP50_read_OPT_param(n, "SSI", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NoahMPnew_struc(n)%noahmpnew(t)%param%ssi =& + NoahMP50_struc(n)%noahmp50(t)%param%ssi =& placeholder(col, row) endif enddo endif - call NoahMPnew_read_OPT_param(n, "Z0SNO", placeholder, var_found) + call NoahMP50_read_OPT_param(n, "Z0SNO", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NoahMPnew_struc(n)%noahmpnew(t)%param%z0sno =& + NoahMP50_struc(n)%noahmp50(t)%param%z0sno =& placeholder(col, row) endif enddo endif - call NoahMPnew_read_OPT_param(n, "MXSNALB", placeholder, var_found) + call NoahMP50_read_OPT_param(n, "MXSNALB", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NoahMPnew_struc(n)%noahmpnew(t)%param%mxsnalb =& + NoahMP50_struc(n)%noahmp50(t)%param%mxsnalb =& placeholder(col, row) endif enddo endif - call NoahMPnew_read_OPT_param(n, "MNSNALB", placeholder, var_found) + call NoahMP50_read_OPT_param(n, "MNSNALB", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NoahMPnew_struc(n)%noahmpnew(t)%param%mnsnalb =& + NoahMP50_struc(n)%noahmp50(t)%param%mnsnalb =& placeholder(col, row) endif enddo endif - call NoahMPnew_read_OPT_param(n, "SNDECAYEXP", placeholder, var_found) + call NoahMP50_read_OPT_param(n, "SNDECAYEXP", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NoahMPnew_struc(n)%noahmpnew(t)%param%sndecayexp =& + NoahMP50_struc(n)%noahmp50(t)%param%sndecayexp =& placeholder(col, row) endif enddo endif - call NoahMPnew_read_OPT_param(n, "T_ULIMIT", placeholder, var_found) + call NoahMP50_read_OPT_param(n, "T_ULIMIT", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NoahMPnew_struc(n)%noahmpnew(t)%param%t_ulimit =& + NoahMP50_struc(n)%noahmp50(t)%param%t_ulimit =& placeholder(col, row) endif enddo endif - call NoahMPnew_read_OPT_param(n, "T_MLIMIT", placeholder, var_found) + call NoahMP50_read_OPT_param(n, "T_MLIMIT", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NoahMPnew_struc(n)%noahmpnew(t)%param%t_mlimit =& + NoahMP50_struc(n)%noahmp50(t)%param%t_mlimit =& placeholder(col, row) endif enddo endif - call NoahMPnew_read_OPT_param(n, "T_LLIMIT", placeholder, var_found) + call NoahMP50_read_OPT_param(n, "T_LLIMIT", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NoahMPnew_struc(n)%noahmpnew(t)%param%t_llimit =& + NoahMP50_struc(n)%noahmp50(t)%param%t_llimit =& placeholder(col, row) endif enddo endif - call NoahMPnew_read_OPT_param(n, "SNOWF_SCALEF", placeholder, var_found) + call NoahMP50_read_OPT_param(n, "SNOWF_SCALEF", placeholder, var_found) if(var_found) then do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row if(placeholder(col,row).ne.LIS_rc%udef) then - NoahMPnew_struc(n)%noahmpnew(t)%param%snowf_scalef =& + NoahMP50_struc(n)%noahmp50(t)%param%snowf_scalef =& placeholder(col, row) endif enddo @@ -325,19 +325,19 @@ subroutine NoahMPnew_read_OPT_parameters() deallocate(placeholder) end do -end subroutine NoahMPnew_read_OPT_parameters +end subroutine NoahMP50_read_OPT_parameters !BOP ! -! !ROUTINE: NoahMPnew_read_OPT_param -! \label{NoahMPnew_read_OPT_param} +! !ROUTINE: NoahMP50_read_OPT_param +! \label{NoahMP50_read_OPT_param} ! ! !REVISION HISTORY: ! 03 Sept 2004: Sujay Kumar; Initial Specification for read_laiclimo ! 30 Oct 2013: Shugong Wang; Generalization for reading OPT spatial parameter ! ! !INTERFACE: -subroutine NoahMPnew_read_OPT_param(n, ncvar_name, placeholder,var_found) +subroutine NoahMP50_read_OPT_param(n, ncvar_name, placeholder,var_found) ! !USES: use netcdf use LIS_coreMod, only : LIS_rc, LIS_domain, LIS_localPet, & @@ -382,27 +382,27 @@ subroutine NoahMPnew_read_OPT_param(n, ncvar_name, placeholder,var_found) ! open NetCDF parameter file ios = nf90_open(path=trim(LIS_rc%paramfile(n)), & mode=NF90_NOWRITE, ncid=nid) - call LIS_verify(ios, 'Error in nf90_open in NoahMPnew_read_OPT_param') + call LIS_verify(ios, 'Error in nf90_open in NoahMP50_read_OPT_param') ! inquire the ID of east-west dimension ios = nf90_inq_dimid(nid, 'east_west', nc_ID) call LIS_verify(ios, & - 'Error in nf90_inq_dimid in NoahMPnew_read_OPT_param') + 'Error in nf90_inq_dimid in NoahMP50_read_OPT_param') ! inquire the ID of north-south dimension ios = nf90_inq_dimid(nid, 'north_south', nr_ID) call LIS_verify(ios, & - 'Error in nf90_inq_dimid in NoahMPnew_read_OPT_param') + 'Error in nf90_inq_dimid in NoahMP50_read_OPT_param') ! inquire the length of east-west dimension ios = nf90_inquire_dimension(nid, nc_ID, len=nc) call LIS_verify(ios, & - 'Error in nf90_inquire_dimension in NoahMPnew_read_OPT_param') + 'Error in nf90_inquire_dimension in NoahMP50_read_OPT_param') ! inquire the length of north-south dimension ios = nf90_inquire_dimension(nid, nr_ID, len=nr) call LIS_verify(ios, & - 'Error in nf90_inquire_dimension in NoahMPnew_read_OPT_param') + 'Error in nf90_inquire_dimension in NoahMP50_read_OPT_param') ! inquire the ID of parameter. ios = nf90_inq_varid(nid, Trim(ncvar_name), param_ID) @@ -421,7 +421,7 @@ subroutine NoahMPnew_read_OPT_param(n, ncvar_name, placeholder,var_found) ! read parameter ios = nf90_get_var(nid, param_ID, level_data) - call LIS_verify(ios, 'Error in nf90_get_var in NoahMPnew_read_OPT_param') + call LIS_verify(ios, 'Error in nf90_get_var in NoahMP50_read_OPT_param') ! grab parameter at specific level placeholder(:, :) = & @@ -438,8 +438,8 @@ subroutine NoahMPnew_read_OPT_param(n, ncvar_name, placeholder,var_found) ! close netcdf file ios = nf90_close(nid) - call LIS_verify(ios, 'Error in nf90_close in NoahMPnew_read_OPT_param') + call LIS_verify(ios, 'Error in nf90_close in NoahMP50_read_OPT_param') endif -end subroutine NoahMPnew_read_OPT_param +end subroutine NoahMP50_read_OPT_param diff --git a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_readcrd.F90 b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_readcrd.F90 new file mode 100644 index 000000000..93e4bc7c7 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_readcrd.F90 @@ -0,0 +1,621 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- + +!BOP +! +! !ROUTINE: NoahMP50_readcrd +! \label{NoahMP50\_readcrd} +! +! !REVISION HISTORY: +! This subroutine is generated with the Model Implementation Toolkit developed +! by Shugong Wang for the NASA Land Information System Version 7. The initial +! specification of the subroutine is defined by Sujay Kumar. +! 10/25/18 : Shugong Wang, Zhuo Wang, initial implementation for LIS 7 and NoahMP401 +! May 2023: Cenlin He; update to work with refactored NoahMP (v5.0 and newer) +! +! !INTERFACE: + +subroutine NoahMP50_readcrd() +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc , LIS_config + use LIS_timeMgrMod, only : LIS_parseTimeString + use LIS_logMod, only : LIS_logunit, LIS_verify, LIS_endrun + use NoahMP50_lsmMod, only : Noahmp50_struc + use netcdf +! +! !DESCRIPTION: +! +! This routine reads the options specific to NoahMP50 model from +! the LIS configuration file. +! +!EOP + implicit none + + integer :: rc + integer :: n, i + character*10 :: time + character*6 :: str_i + integer :: ios + integer, allocatable :: nids(:) + character*32 :: soil_scheme_name, landuse_scheme_name + + allocate(nids(LIS_rc%nnest)) + + write(LIS_logunit,*) & + "[INFO] Start reading LIS configuration file for NoahMP.5.0 (v5.0 or newer)" + + ! open NetCDF parameter file for reading global attributes + do n=1,LIS_rc%nnest + ios = nf90_open(path=trim(LIS_rc%paramfile(n)), mode=NF90_NOWRITE,ncid=nids(n)) + call LIS_verify(ios,'Error in nf90_open in '//trim(LIS_rc%paramfile(n))//' in NoahMP50_readcrd') + enddo + + ! main Noah-MP model timestep + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 model timestep:", rc = rc) + do n=1,LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Time, rc = rc) + call LIS_verify(rc, "NoahMP.5.0 model timestep: not defined") + call LIS_parseTimeString(time, Noahmp50_struc(n)%ts) + enddo + + ! Noah-MP soil process timestep + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 soil timestep:", rc = rc) + do n=1,LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Time, rc = rc) + call LIS_verify(rc, "NoahMP.5.0 soil timestep: not defined") + call LIS_parseTimeString(time, Noahmp50_struc(n)%ts_soil) + enddo + + ! restart timestep + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 restart output interval:", rc = rc) + do n=1,LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Time, rc = rc) + call LIS_verify(rc, & + "NoahMP.5.0 restart output interval: not defined") + call LIS_parseTimeString(time, Noahmp50_struc(n)%rstInterval) + enddo + + !---------------------------! + ! Constant Parameters ! + !---------------------------! + ! number of soil layers + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 number of soil layers:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%nsoil, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 number of soil layers: not defined") + enddo + + ! allocate memory for sldpth using nsoil as dimension + do n=1, LIS_rc%nnest + allocate(Noahmp50_struc(n)%sldpth(Noahmp50_struc(n)%nsoil)) + enddo + ! allocate memory for init_smc using nsoil as dimension + do n=1, LIS_rc%nnest + allocate(Noahmp50_struc(n)%init_smc(Noahmp50_struc(n)%nsoil)) + enddo + ! allocate memory for init_tslb using nsoil as dimension + do n=1, LIS_rc%nnest + allocate(Noahmp50_struc(n)%init_tslb(Noahmp50_struc(n)%nsoil)) + enddo + + ! maximum number of snow layers (e.g., 3) + do n=1, LIS_rc%nnest + Noahmp50_struc(n)%nsnow = 3 + enddo + + ! thickness of atmospheric layers + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 reference height of temperature and humidity:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%dz8w, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 reference height of temperature and "//& + "humidity: not defined") + enddo + + ! thickness of soil layers + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 thickness of soil layers:", rc = rc) + do n=1, LIS_rc%nnest + do i = 1, Noahmp50_struc(n)%nsoil + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%sldpth(i), rc=rc) + call LIS_verify(rc, & + 'NoahMP.5.0 thickness of soil layers: not defined') + enddo + enddo + + ! Landuse classification scheme + do n=1, LIS_rc%nnest + ios = nf90_get_att(nids(n), NF90_GLOBAL, 'LANDCOVER_SCHEME', landuse_scheme_name) + call LIS_verify(ios, 'Error in nf90_get_att: LANDCOVER_SCHEME') + if (trim(landuse_scheme_name) .eq. "USGS") then + Noahmp50_struc(n)%landuse_scheme_name = "USGS" + elseif (trim(landuse_scheme_name) .eq. "IGBPNCEP") then + Noahmp50_struc(n)%landuse_scheme_name = & + "MODIFIED_IGBP_MODIS_NOAH" + elseif (trim(landuse_scheme_name) .eq. "NALCMS_SM_IGBPNCEP" ) then + Noahmp50_struc(n)%landuse_scheme_name = & + "MODIFIED_IGBP_MODIS_NOAH" + elseif (trim(landuse_scheme_name) .eq. "UMD") then + Noahmp50_struc(n)%landuse_scheme_name = "UMD" + else + write(LIS_logunit,*) & + "[ERR] Currently, only USGS, IGBPNCEP, and UMD" + write(LIS_logunit,*) "[ERR] are supported by NoahMP.5.0 LSM" + write(LIS_logunit,*) "[ERR] program stopping ..." + call LIS_endrun() + endif + enddo + + ! NoahMP.5.0 parameter table (merged SOILPARM.TBL,GENPARM.TBL,MPTABLE.TBL) + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 parameter table:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%noahmp_tbl_name, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 parameter table: not defined") + enddo + + write(LIS_logunit,*) & + "[INFO] Setting NoahMP.5.0 physics options:" + + ! dynamic vegetation + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 dynamic vegetation option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%dveg_opt, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 dynamic vegetation option: not defined") + write(LIS_logunit,33) "dynamic vegetation:", & + Noahmp50_struc(n)%dveg_opt + enddo + + ! canopy stomatal resistance (1->Ball-Berry; 2->Jarvis) + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 canopy stomatal resistance option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%crs_opt, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 canopy stomatal resistance option: not defined") + write(LIS_logunit,33) "canopy stomatal resistance:", & + Noahmp50_struc(n)%crs_opt + enddo + + ! soil moisture factor for stomatal resistance(1->Noah;2->CLM;3->SSiB) + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 soil moisture factor for stomatal resistance:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%btr_opt, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 soil moisture factor for stomatal resistance:"//& + " not defined") + write(LIS_logunit,33) "soil moisture factor for stomatal "//& + "resistance:",Noahmp50_struc(n)%btr_opt + enddo + + ! surface runoff (1->SIMGM; 2->SIMTOP; 3->Schaake96; 4->BATS; 5->MMF; 6->VIC; 7->XAJ; 8->DynVIC) + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 surface runoff option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%runsfc_opt, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 surface runoff option: not defined") + write(LIS_logunit,33) "surface runoff:", & + Noahmp50_struc(n)%runsfc_opt + enddo + + ! subsurface runoff and groundwater (1->SIMGM; 2->SIMTOP; 3->Schaake96; 4->BATS; 5->MMF; 6->VIC; 7->XAJ; 8->DynVIC) + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 subsurface runoff and groundwater option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%runsub_opt, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 subsurface runoff and groundwater option: not defined") + write(LIS_logunit,33) "subsurface runoff and groundwater:", & + Noahmp50_struc(n)%runsub_opt + enddo + + ! infiltration options for dynamic VIC (1->Philip; 2-> Green-Ampt;3->Smith-Parlange) + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 dynamic VIC infiltration option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%infdv_opt, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 dynamic VIC infiltration option: not defined") + write(LIS_logunit,33) "dynamic VIC infiltration:", & + Noahmp50_struc(n)%infdv_opt + enddo + + ! surface layer drag coeff (CH & CM) (1->M-O; 2->Chen97) + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 surface layer drag coefficient option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%sfc_opt, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 surface layer drag coefficient option:"//& + " not defined") + write(LIS_logunit,33) "surface layer drag coefficient:", & + Noahmp50_struc(n)%sfc_opt + enddo + + ! supercooled liquid water (1->NY06; 2->Koren99) + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 supercooled liquid water option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%frz_opt, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 supercooled liquid water option: not defined") + write(LIS_logunit,33) "supercooled liquid water:", & + Noahmp50_struc(n)%frz_opt + enddo + + ! frozen soil permeability (1->NY06; 2->Koren99) + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 frozen soil permeability option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%inf_opt, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 frozen soil permeability option: not defined") + write(LIS_logunit,33) "frozen soil permeability:", & + Noahmp50_struc(n)%inf_opt + enddo + + ! radiation transfer (1->gap=F(3D,cosz); 2->gap=0; 3->gap=1-Fveg) + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 canopy radiative transfer option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%rad_opt, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 canopy radiative transfer option: not defined") + write(LIS_logunit,33) "canopy radiative transfer:", & + Noahmp50_struc(n)%rad_opt + enddo + + ! snow surface albedo (1->BATS; 2->CLASS) + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 snow surface albedo option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%alb_opt, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 snow surface albedo option: not defined") + write(LIS_logunit,33) "snow surface albedo:", & + Noahmp50_struc(n)%alb_opt + enddo + + ! rainfall & snowfall (1->Jordan91; 2->BATS; 3->Noah; 4->WRF; 5->Wet-bulb) + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 rain-snow partition option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%snf_opt, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 rain-snow partition option: not defined") + write(LIS_logunit,33) "rain-snow partition:", & + Noahmp50_struc(n)%snf_opt + enddo + + ! lower boundary of soil temperature + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 lower boundary of soil temperature option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%tbot_opt, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 lower boundary of soil temperature option:"//& + " not defined") + write(LIS_logunit,33) "lower boundary of soil temperature:", & + Noahmp50_struc(n)%tbot_opt + enddo + + ! snow/soil temperature time scheme + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 snow&soil temperature time scheme option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%stc_opt, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 snow&soil temperature time scheme option:"//& + " not defined") + write(LIS_logunit,33) "snow&soil temperature time scheme:", & + Noahmp50_struc(n)%stc_opt + enddo + + ! glacier option (1->phase change; 2->simple) + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 glacier ice option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%gla_opt, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 glacier ice option: not defined") + write(LIS_logunit,33) "glacier ice:",Noahmp50_struc(n)%gla_opt + enddo + + ! Custom snowpack depth for glacier model (in mm) + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 snow depth glacier model option:", rc = rc) + if(rc /= 0) then + write(LIS_logunit,33) "[WARN] Max snow depth not defined." + write(LIS_logunit,33) "[WARN] Setting to default value of 5000." + do n=1, LIS_rc%nnest + Noahmp50_struc(n)%sndpth_gla_opt = 5000 + write(LIS_logunit,33) "snow depth for glacier model: ",Noahmp50_struc(n)%sndpth_gla_opt + enddo + else + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%sndpth_gla_opt, rc=rc) + write(LIS_logunit,33) "snow depth for glacier model: ",Noahmp50_struc(n)%sndpth_gla_opt + enddo + endif + + ! surface resistance (1->Sakaguchi/Zeng;2->Seller;3->mod Sellers;4->1+snow) + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 surface resistance option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%rsf_opt, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 surface resistance option: not defined") + write(LIS_logunit,33) "surface resistance:", & + Noahmp50_struc(n)%rsf_opt + enddo + + ! soil configuration option + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 soil configuration option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%soil_opt, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 soil configuration option: not defined") + write(LIS_logunit,33) "soil configuration:", & + Noahmp50_struc(n)%soil_opt + enddo + + ! soil pedotransfer function option + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 soil pedotransfer function option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%pedo_opt, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 soil pedotransfer function option: not defined") + write(LIS_logunit,33) "soil pedotransfer function:", & + Noahmp50_struc(n)%pedo_opt + enddo + + ! crop model option (0->none; 1->Liu2016) + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 crop model option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%crop_opt, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 crop model option: not defined") + write(LIS_logunit,33) "crop model:", & + Noahmp50_struc(n)%crop_opt + enddo + + ! urban physics option + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 urban physics option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%urban_opt, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 urban physics option: not defined") + write(LIS_logunit,33) "urban physics:", & + Noahmp50_struc(n)%urban_opt + enddo + + ! snow thermal conductivity option (1->Yen1965; 2->Anderson1976; 3->Constant; 4->Verseghy1991; 5->Yen1981) + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 snow thermal conductivity option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%tksno_opt, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 snow thermal conductivity option: not defined") + write(LIS_logunit,33) "snow thermal conductivity:",Noahmp50_struc(n)%tksno_opt + enddo + + ! irrigation option (0->none; 1->always on; 2->trigger by planting/harvest dates; 3->trigger by LAI) + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 irrigation trigger option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%irr_opt, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 irrigation trigger option: not defined") + write(LIS_logunit,33) "irrigation trigger:",Noahmp50_struc(n)%irr_opt + enddo + + ! irrigation method option (0->fraction from input; 1->sprinkler; 2->micro/drip; 3->flood) + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 irrigation method option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%irrm_opt, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 irrigation method option: not defined") + write(LIS_logunit,33) "irrigation method:",Noahmp50_struc(n)%irrm_opt + enddo + + ! tile drainage option (0->none; 1->simple drainage; 2->Hooghoudt's scheme) + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 tile drainage option:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%tdrn_opt, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 tile drainage option: not defined") + write(LIS_logunit,33) "tile drainage:",Noahmp50_struc(n)%tdrn_opt + enddo + + + ! The following lines hard code the LDT NetCDF variable names. + ! Modified by Zhuo Wang on 11/08/2018 + ! Setting some values to PLANTING, HARVEST, SEASON_GDD, SOILCOMP, SOILCL1-->SOILCL4 in NoahMP50_main.F90 + do n=1, LIS_rc%nnest + ! Noahmp50_struc(n)%LDT_ncvar_vegetype = ' ! Edit here if hard code name + ! Noahmp50_struc(n)%LDT_ncvar_soiltype = ' ! Edit here if hard code name + Noahmp50_struc(n)%LDT_ncvar_tbot = 'TBOT' !'NoahMP50_TBOT' + Noahmp50_struc(n)%LDT_ncvar_shdfac_monthly = 'GREENNESS' !'NoahMP50_SHDFAC_MONTHLY' + Noahmp50_struc(n)%LDT_ncvar_planting = 'PLANTING' !'NoahMP50_PLANTING' + Noahmp50_struc(n)%LDT_ncvar_harvest = 'HARVEST' !'NoahMP50_HARVEST' + Noahmp50_struc(n)%LDT_ncvar_season_gdd = 'SEASON_GDD' !'NoahMP50_SEASON_GDD' + Noahmp50_struc(n)%LDT_ncvar_soilcomp = 'SOILCOMP' !'NoahMP50_SOILCOMP' + Noahmp50_struc(n)%LDT_ncvar_soilcL1 = 'SOILCL1' !'NoahMP50_SOILCL1' + Noahmp50_struc(n)%LDT_ncvar_soilcL2 = 'SOILCL2' !'NoahMP50_SOILCL2' + Noahmp50_struc(n)%LDT_ncvar_soilcL3 = 'SOILCL3' !'NoahMP50_SOILCL3' + Noahmp50_struc(n)%LDT_ncvar_soilcL4 = 'SOILCL4' !'NoahMP50_SOILCL4' + Noahmp50_struc(n)%LDT_ncvar_irfract = 'IRFRACT' + Noahmp50_struc(n)%LDT_ncvar_sifract = 'SIFRACT' + Noahmp50_struc(n)%LDT_ncvar_mifract = 'MIFRACT' + Noahmp50_struc(n)%LDT_ncvar_fifract = 'FIFRACT' + Noahmp50_struc(n)%LDT_ncvar_tdfract = 'TD_FRACTION' + Noahmp50_struc(n)%LDT_ncvar_fdepth = 'FDEPTH' + Noahmp50_struc(n)%LDT_ncvar_eqzwt = 'EQZWT' + Noahmp50_struc(n)%LDT_ncvar_rechclim = 'RECHCLIM' + Noahmp50_struc(n)%LDT_ncvar_riverbed = 'RIVERBED' + enddo + +!------------------------------------------------------------------------------------------ + ! set default restart format to netcdf + do n=1,LIS_rc%nnest + Noahmp50_struc(n)%rformat = "netcdf" + enddo + ! restart run, read restart file + if (trim(LIS_rc%startcode) == "restart") then + Call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 restart file:", rc=rc) + do n=1,LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%rfile, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 restart file: not defined") + enddo + + Call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 restart file format:", rc=rc) + do n=1,LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%rformat, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 restart file format: not defined") + enddo + + ! coldstart run, read initial state variables + else + ! skin temperature + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 initial surface skin temperature:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%init_tskin, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 initial surface skin temperature:"//& + " not defined") + enddo + + ! snow water equivalent + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 initial snow water equivalent:", rc = rc) + do n=1,LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%init_sneqv, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 initial snow water equivalent:"//& + " not defined") + enddo + + ! physical snow depth + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 initial snow depth:", rc = rc) + do n=1,LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%init_snowh, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 initial snow depth:"//& + " not defined") + enddo + + ! total canopy water + ice + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 initial total canopy surface water:", rc = rc) + do n=1,LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%init_canwat, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 initial total canopy surface water:"//& + " not defined") + enddo + + ! soil temperature + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 initial soil temperatures:", rc = rc) + do n=1,LIS_rc%nnest + do i=1, Noahmp50_struc(n)%nsoil + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%init_tslb(i), rc=rc) + end do + call LIS_verify(rc, & + "NoahMP.5.0 initial soil temperatures:"//& + " not defined") + enddo + + ! volumetric soil moisture + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 initial total soil moistures:", rc = rc) + do n=1,LIS_rc%nnest + do i=1, Noahmp50_struc(n)%nsoil + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%init_smc(i), rc=rc) + end do + call LIS_verify(rc, & + "NoahMP.5.0 initial total soil moistures:"//& + " not defined") + enddo + + ! water table depth + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 initial water table depth:", rc = rc) + do n=1,LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%init_zwt, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 initial water table depth:"//& + " not defined") + enddo + + ! water in the "aquifer" + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 initial water in the aquifer:", rc = rc) + do n=1,LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%init_wa, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 initial water in the aquifer:"//& + " not defined") + enddo + + ! water in aquifer and saturated soil + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 initial water in aquifer and saturated soil:", rc = rc) + do n=1,LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%init_wt, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 initial water in aquifer and saturated soil:"//& + " not defined") + enddo + + ! leaf area index + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 initial leaf area index:", rc = rc) + do n=1,LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%init_lai, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 initial leaf area index:"//& + " not defined") + enddo + + endif + + deallocate(nids) + + 33 format(a47,i4) + + write(LIS_logunit, *) & + "[INFO] Finish reading LIS configuration file for NoahMP.5.0" + +end subroutine NoahMP50_readcrd diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_readrst.F90 b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_readrst.F90 similarity index 80% rename from lis/surfacemodels/land/noahmp.new/NoahMPnew_readrst.F90 rename to lis/surfacemodels/land/noahmp.5.0/NoahMP50_readrst.F90 index 7a117aff6..1d7ee6288 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_readrst.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_readrst.F90 @@ -11,8 +11,8 @@ #include "LIS_misc.h" !BOP ! -! !ROUTINE: NoahMPnew_readrst -! \label{NoahMPnew_readrst} +! !ROUTINE: NoahMP50_readrst +! \label{NoahMP50_readrst} ! ! !REVISION HISTORY: ! This subroutine is generated with the Model Implementation Toolkit developed @@ -23,7 +23,7 @@ ! May 2023: Cenlin He, modified for refactored NoahMP v5 and later ! !INTERFACE: -subroutine NoahMPnew_readrst() +subroutine NoahMP50_readrst() ! !USES: use LIS_coreMod, only : LIS_rc, LIS_masterproc use LIS_historyMod, only : LIS_readvar_restart @@ -32,7 +32,7 @@ subroutine NoahMPnew_readrst() LIS_releaseUnitNumber, & LIS_verify use LIS_constantsMod, only : LIS_CONST_PATH_LEN - use NoahMPnew_lsmMod + use NoahMP50_lsmMod use ESMF use LIS_fileIOMod use LIS_timeMgrMod @@ -102,7 +102,7 @@ subroutine NoahMPnew_readrst() ! \begin{description} ! \item[LIS\_readvar\_restart](\ref{LIS_readvar_restart})\\ ! reads a variable from the restart file -! \item[NoahMPnew\_coldstart](\ref{NoahMPnew_coldstart})\\ +! \item[NoahMP50\_coldstart](\ref{NoahMP50_coldstart})\\ ! initializes the NoahMP state variables ! \end{description} !EOP @@ -125,16 +125,16 @@ subroutine NoahMPnew_readrst() do n=1, LIS_rc%nnest - wformat = trim(NoahMPnew_struc(n)%rformat) + wformat = trim(NoahMP50_struc(n)%rformat) ! coldstart if(LIS_rc%startcode .eq. "coldstart") then - call NoahMPnew_coldstart(LIS_rc%lsm_index) + call NoahMP50_coldstart(LIS_rc%lsm_index) ! restart elseif(LIS_rc%startcode .eq. "restart") then !---create restart filename based on timewindow for EnKS if(LIS_rc%runmode.eq."ensemble smoother") then if(LIS_rc%iterationId(n).gt.1) then - if(NoahMPnew_struc(n)%rstInterval.eq.2592000) then + if(NoahMP50_struc(n)%rstInterval.eq.2592000) then !create the restart filename based on the timewindow start time call ESMF_TimeGet(LIS_twStartTime,yy=yr,mm=mo,& dd=da,calendar=LIS_calendar,rc=status) @@ -150,391 +150,391 @@ subroutine NoahMPnew_readrst() ss = 0 endif - call LIS_create_restart_filename(n,filen,'SURFACEMODEL','NOAHMPnew', & + call LIS_create_restart_filename(n,filen,'SURFACEMODEL','NoahMP50', & yr,mo,da,hr,mn,ss, wformat=wformat) - NoahMPnew_struc(n)%rfile = filen + NoahMP50_struc(n)%rfile = filen endif endif allocate(tmptilen(LIS_rc%npatch(n, LIS_rc%lsm_index))) ! check the existance of restart file - inquire(file=NoahMPnew_struc(n)%rfile, exist=file_exists) + inquire(file=NoahMP50_struc(n)%rfile, exist=file_exists) If (.not. file_exists) then - write(LIS_logunit,*) "[ERR] NoahMPnew restart file: ", & - trim(NoahMPnew_struc(n)%rfile) + write(LIS_logunit,*) "[ERR] NoahMP50 restart file: ", & + trim(NoahMP50_struc(n)%rfile) write(LIS_logunit,*) "[ERR] does not exist." write(LIS_logunit,*) "[ERR] Program stopping ..." call LIS_endrun endif write(LIS_logunit,*) & - "[INFO] Noah-MP.New restart file used: ",trim(NoahMPnew_struc(n)%rfile) + "[INFO] Noah-MP.New restart file used: ",trim(NoahMP50_struc(n)%rfile) ! open restart file if(wformat .eq. "binary") then ftn = LIS_getNextUnitNumber() - open(ftn, file=NoahMPnew_struc(n)%rfile, & + open(ftn, file=NoahMP50_struc(n)%rfile, & form="unformatted") read(ftn) nc, nr, npatch !time, veg class, no. tiles ! check for grid space conflict if((nc .ne. LIS_rc%gnc(n)) .or. (nr .ne. LIS_rc%gnr(n))) then - write(LIS_logunit,*) "[ERR]",trim(NoahMPnew_struc(n)%rfile) + write(LIS_logunit,*) "[ERR]",trim(NoahMP50_struc(n)%rfile) write(LIS_logunit,*) "[ERR] grid space mismatch" write(LIS_logunit,*) "[ERR] Program stopping..." call LIS_endrun endif if(npatch .ne. LIS_rc%glbnpatch_red(n, LIS_rc%lsm_index)) then - write(LIS_logunit,*) "[ERR]",trim(NoahMPnew_struc(n)%rfile) + write(LIS_logunit,*) "[ERR]",trim(NoahMP50_struc(n)%rfile) write(LIS_logunit,*) "[ERR] tile space mismatch" write(LIS_logunit,*) "[ERR] Program stopping..." call LIS_endrun endif elseif(wformat .eq. "netcdf") then #if (defined USE_NETCDF3 || defined USE_NETCDF4) - status = nf90_open(path=NoahMPnew_struc(n)%rfile, & + status = nf90_open(path=NoahMP50_struc(n)%rfile, & mode=NF90_NOWRITE, ncid=ftn) - call LIS_verify(status, "Error opening file "//NoahMPnew_struc(n)%rfile) + call LIS_verify(status, "Error opening file "//NoahMP50_struc(n)%rfile) #endif endif ! read: accumulated surface runoff - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%sfcrunoff, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%sfcrunoff, & varname="SFCRUNOFF", wformat=wformat) ! read: accumulated sub-surface runoff - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%udrrunoff, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%udrrunoff, & varname="UDRRUNOFF", wformat=wformat) ! read: volumtric soil moisture - do l=1, NoahMPnew_struc(n)%nsoil ! TODO: check loop + do l=1, NoahMP50_struc(n)%nsoil ! TODO: check loop call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, varname="SMC", & - dim=l, vlevels = NoahMPnew_struc(n)%nsoil, wformat=wformat) + dim=l, vlevels = NoahMP50_struc(n)%nsoil, wformat=wformat) do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - NoahMPnew_struc(n)%noahmpnew(t)%smc(l) = tmptilen(t) + NoahMP50_struc(n)%noahmp50(t)%smc(l) = tmptilen(t) enddo enddo ! read: volumtric liquid soil moisture - do l=1, NoahMPnew_struc(n)%nsoil ! TODO: check loop + do l=1, NoahMP50_struc(n)%nsoil ! TODO: check loop call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, varname="SH2O", & - dim=l, vlevels = NoahMPnew_struc(n)%nsoil, wformat=wformat) + dim=l, vlevels = NoahMP50_struc(n)%nsoil, wformat=wformat) do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(l) = tmptilen(t) + NoahMP50_struc(n)%noahmp50(t)%sh2o(l) = tmptilen(t) enddo enddo ! read: soil temperature - do l=1, NoahMPnew_struc(n)%nsoil ! TODO: check loop + do l=1, NoahMP50_struc(n)%nsoil ! TODO: check loop call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, varname="TSLB", & - dim=l, vlevels = NoahMPnew_struc(n)%nsoil, wformat=wformat) + dim=l, vlevels = NoahMP50_struc(n)%nsoil, wformat=wformat) do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - NoahMPnew_struc(n)%noahmpnew(t)%tslb(l) = tmptilen(t) + NoahMP50_struc(n)%noahmp50(t)%tslb(l) = tmptilen(t) enddo enddo ! read: snow water equivalent - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%sneqv, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%sneqv, & varname="SNEQV", wformat=wformat) ! read: physical snow depth - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%snowh, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%snowh, & varname="SNOWH", wformat=wformat) ! read: total canopy water + ice - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%canwat, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%canwat, & varname="CANWAT", wformat=wformat) ! read: accumulated snow melt leaving pack - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%acsnom, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%acsnom, & varname="ACSNOM", wformat=wformat) ! read: accumulated snow on grid - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%acsnow, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%acsnow, & varname="ACSNOW", wformat=wformat) ! read: actual no. of snow layers - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%isnow, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%isnow, & varname="ISNOW", wformat=wformat) ! read: vegetation leaf temperature - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%tv, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%tv, & varname="TV", wformat=wformat) ! read: bulk ground surface temperature - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%tg, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%tg, & varname="TG", wformat=wformat) ! read: canopy-intercepted ice - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%canice, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%canice, & varname="CANICE", wformat=wformat) ! read: canopy-intercepted liquid water - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%canliq, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%canliq, & varname="CANLIQ", wformat=wformat) ! read: canopy air vapor pressure - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%eah, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%eah, & varname="EAH", wformat=wformat) ! read: canopy air temperature - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%tah, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%tah, & varname="TAH", wformat=wformat) ! read: bulk momentum drag coefficient - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%cm, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%cm, & varname="CM", wformat=wformat) ! read: bulk sensible heat exchange coefficient - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%ch, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%ch, & varname="CH", wformat=wformat) ! read: wetted or snowed fraction of canopy - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%fwet, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%fwet, & varname="FWET", wformat=wformat) ! read: snow mass at last time step - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%sneqvo, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%sneqvo, & varname="SNEQVO", wformat=wformat) ! read: snow albedo at last time step - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%albold, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%albold, & varname="ALBOLD", wformat=wformat) ! read: snowfall on the ground - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%qsnow, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%qsnow, & varname="QSNOW", wformat=wformat) ! read: lake water storage - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%wslake, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%wslake, & varname="WSLAKE", wformat=wformat) ! read: water table depth - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%zwt, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%zwt, & varname="ZWT", wformat=wformat) ! read: water in the "aquifer" - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%wa, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%wa, & varname="WA", wformat=wformat) ! read: water in aquifer and saturated soil - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%wt, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%wt, & varname="WT", wformat=wformat) ! read: snow layer temperature - do l=1, NoahMPnew_struc(n)%nsnow ! TODO: check loop + do l=1, NoahMP50_struc(n)%nsnow ! TODO: check loop call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, varname="TSNO", & - dim=l, vlevels = NoahMPnew_struc(n)%nsnow, wformat=wformat) + dim=l, vlevels = NoahMP50_struc(n)%nsnow, wformat=wformat) do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - NoahMPnew_struc(n)%noahmpnew(t)%tsno(l) = tmptilen(t) + NoahMP50_struc(n)%noahmp50(t)%tsno(l) = tmptilen(t) enddo enddo ! read: snow/soil layer depth from snow surface - do l=1, NoahMPnew_struc(n)%nsnow + NoahMPnew_struc(n)%nsoil + do l=1, NoahMP50_struc(n)%nsnow + NoahMP50_struc(n)%nsoil call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, varname="ZSS", & - dim=l, vlevels = NoahMPnew_struc(n)%nsnow + NoahMPnew_struc(n)%nsoil, wformat=wformat) + dim=l, vlevels = NoahMP50_struc(n)%nsnow + NoahMP50_struc(n)%nsoil, wformat=wformat) do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - NoahMPnew_struc(n)%noahmpnew(t)%zss(l) = tmptilen(t) + NoahMP50_struc(n)%noahmp50(t)%zss(l) = tmptilen(t) enddo enddo ! read: snow layer ice - do l=1, NoahMPnew_struc(n)%nsnow ! TODO: check loop + do l=1, NoahMP50_struc(n)%nsnow ! TODO: check loop call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, varname="SNOWICE", & - dim=l, vlevels = NoahMPnew_struc(n)%nsnow, wformat=wformat) + dim=l, vlevels = NoahMP50_struc(n)%nsnow, wformat=wformat) do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - NoahMPnew_struc(n)%noahmpnew(t)%snowice(l) = tmptilen(t) + NoahMP50_struc(n)%noahmp50(t)%snowice(l) = tmptilen(t) enddo enddo ! read: snow layer liquid water - do l=1, NoahMPnew_struc(n)%nsnow ! TODO: check loop + do l=1, NoahMP50_struc(n)%nsnow ! TODO: check loop call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, varname="SNOWLIQ", & - dim=l, vlevels = NoahMPnew_struc(n)%nsnow, wformat=wformat) + dim=l, vlevels = NoahMP50_struc(n)%nsnow, wformat=wformat) do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - NoahMPnew_struc(n)%noahmpnew(t)%snowliq(l) = tmptilen(t) + NoahMP50_struc(n)%noahmp50(t)%snowliq(l) = tmptilen(t) enddo enddo ! read: leaf mass - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%lfmass, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%lfmass, & varname="LFMASS", wformat=wformat) ! read: mass of fine roots - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%rtmass, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%rtmass, & varname="RTMASS", wformat=wformat) ! read: stem mass - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%stmass, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%stmass, & varname="STMASS", wformat=wformat) ! read: mass of wood (including woody roots) - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%wood, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%wood, & varname="WOOD", wformat=wformat) ! read: stable carbon in deep soil - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%stblcp, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%stblcp, & varname="STBLCP", wformat=wformat) ! read: short-lived carbon in shallow soil - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%fastcp, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%fastcp, & varname="FASTCP", wformat=wformat) ! read: leaf area index - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%lai, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%lai, & varname="LAI", wformat=wformat) ! read: stem area index - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%sai, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%sai, & varname="SAI", wformat=wformat) ! read: snow age factor - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%tauss, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%tauss, & varname="TAUSS", wformat=wformat) - if (NoahMPnew_struc(n)%runsub_opt == 5) then + if (NoahMP50_struc(n)%runsub_opt == 5) then ! read: equilibrium volumetric soil moisture content - do l=1, NoahMPnew_struc(n)%nsoil ! TODO: check loop + do l=1, NoahMP50_struc(n)%nsoil ! TODO: check loop call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, varname="SMOISEQ", & - dim=l, vlevels = NoahMPnew_struc(n)%nsoil, wformat=wformat) + dim=l, vlevels = NoahMP50_struc(n)%nsoil, wformat=wformat) do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - NoahMPnew_struc(n)%noahmpnew(t)%smoiseq(l) = tmptilen(t) + NoahMP50_struc(n)%noahmp50(t)%smoiseq(l) = tmptilen(t) enddo enddo ! read: soil moisture content in the layer to the water table when deep - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%smcwtd, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%smcwtd, & varname="SMCWTD", wformat=wformat) ! read: recharge to the water table when deep - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%deeprech, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%deeprech, & varname="DEEPRECH", wformat=wformat) ! read: recharge to the water table (diagnostic) - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%rech, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%rech, & varname="RECH", wformat=wformat) - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%pexp, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%pexp, & varname="PEXP", wformat=wformat) - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%area, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%area, & varname="AREA", wformat=wformat) - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%qrf, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%qrf, & varname="QRF", wformat=wformat) - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%qspring, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%qspring, & varname="QSPRING", wformat=wformat) - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%qslat, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%qslat, & varname="QSLAT", wformat=wformat) - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%qrfs, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%qrfs, & varname="QRFS", wformat=wformat) - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%qsprings, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%qsprings, & varname="QSPRINGS", wformat=wformat) - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%fdepth, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%fdepth, & varname="FDEPTH", wformat=wformat) - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%rivercond, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%rivercond, & varname="RIVERCOND", wformat=wformat) - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%riverbed, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%riverbed, & varname="RIVERBED", wformat=wformat) - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%eqzwt, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%eqzwt, & varname="EQZWT", wformat=wformat) endif ! MMF groundwater ! for irrigation - if (NoahMPnew_struc(n)%irr_opt >0) then - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irnumsi, & + if (NoahMP50_struc(n)%irr_opt >0) then + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%irnumsi, & varname="IRNUMSI", wformat=wformat) - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irnummi, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%irnummi, & varname="IRNUMMI", wformat=wformat) - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irnumfi, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%irnumfi, & varname="IRNUMFI", wformat=wformat) - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irwatsi, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%irwatsi, & varname="IRWATSI", wformat=wformat) - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irwatmi, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%irwatmi, & varname="IRWATMI", wformat=wformat) - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irwatfi, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%irwatfi, & varname="IRWATFI", wformat=wformat) - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irsivol, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%irsivol, & varname="IRSIVOL", wformat=wformat) - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irmivol, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%irmivol, & varname="IRMIVOL", wformat=wformat) - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irfivol, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%irfivol, & varname="IRFIVOL", wformat=wformat) - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%ireloss, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%ireloss, & varname="IRELOSS", wformat=wformat) - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irrsplh, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%irrsplh, & varname="IRRSPLH", wformat=wformat) endif ! irrigation ! for tile drainage - if (NoahMPnew_struc(n)%tdrn_opt >0) then - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%qtdrain, & + if (NoahMP50_struc(n)%tdrn_opt >0) then + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%qtdrain, & varname="QTDRAIN", wformat=wformat) endif ! for crop ! read: mass of grain XING - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%grain, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%grain, & varname="GRAIN", wformat=wformat) ! read: growing degree days XING (based on 10C) - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%gdd, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%gdd, & varname="GDD", wformat=wformat) ! read: growing degree days XING - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%pgs, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%pgs, & varname="PGS", wformat=wformat) ! for additional restart variables - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accssoil, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%accssoil, & varname="ACC_SSOIL", wformat=wformat) - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accqinsur, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%accqinsur, & varname="ACC_QINSUR", wformat=wformat) - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accqseva, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%accqseva, & varname="ACC_QSEVA", wformat=wformat) - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accdwater, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%accdwater, & varname="ACC_DWATER", wformat=wformat) - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accprcp, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%accprcp, & varname="ACC_PRCP", wformat=wformat) - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accecan, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%accecan, & varname="ACC_ECAN", wformat=wformat) - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accetran, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%accetran, & varname="ACC_ETRAN", wformat=wformat) - call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accedir, & + call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%accedir, & varname="ACC_EDIR", wformat=wformat) - do l=1, NoahMPnew_struc(n)%nsoil ! TODO: check loop + do l=1, NoahMP50_struc(n)%nsoil ! TODO: check loop call LIS_readvar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, varname="ACC_ETRANI", & - dim=l, vlevels = NoahMPnew_struc(n)%nsoil, wformat=wformat) + dim=l, vlevels = NoahMP50_struc(n)%nsoil, wformat=wformat) do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - NoahMPnew_struc(n)%noahmpnew(t)%accetrani(l) = tmptilen(t) + NoahMP50_struc(n)%noahmp50(t)%accetrani(l) = tmptilen(t) enddo enddo @@ -545,10 +545,10 @@ subroutine NoahMPnew_readrst() #if (defined USE_NETCDF3 || defined USE_NETCDF4) status = nf90_close(ftn) call LIS_verify(status, & - "Error in nf90_close in NoahMPnew_readrst") + "Error in nf90_close in NoahMP50_readrst") #endif endif deallocate(tmptilen) endif enddo -end subroutine NoahMPnew_readrst +end subroutine NoahMP50_readrst diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_reset.F90 b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_reset.F90 similarity index 66% rename from lis/surfacemodels/land/noahmp.new/NoahMPnew_reset.F90 rename to lis/surfacemodels/land/noahmp.5.0/NoahMP50_reset.F90 index 3a49bdb30..5a5ec486f 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_reset.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_reset.F90 @@ -9,19 +9,19 @@ !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP ! -! !ROUTINE: NoahMPnew_reset -! \label{NoahMPnew_reset} +! !ROUTINE: NoahMP50_reset +! \label{NoahMP50_reset} ! ! !REVISION HISTORY: ! Modified by Shugong Wang for Noah-MP.4.0.1 ! modified by Cenlin He for refactored Noah-MP v5 and later ! !INTERFACE: -subroutine NoahMPnew_reset() +subroutine NoahMP50_reset() ! !USES: use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_logunit - use NoahMPnew_lsmMod + use NoahMP50_lsmMod ! ! !DESCRIPTION: @@ -42,16 +42,16 @@ subroutine NoahMPnew_reset() ! initialize forcing variables to zeros do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - NoahMPnew_struc(n)%noahmpnew(t)%lwdown = 0.0 - NoahMPnew_struc(n)%noahmpnew(t)%swdown = 0.0 - NoahMPnew_struc(n)%noahmpnew(t)%psurf = 0.0 - NoahMPnew_struc(n)%noahmpnew(t)%prcp = 0.0 - NoahMPnew_struc(n)%noahmpnew(t)%tair = 0.0 - NoahMPnew_struc(n)%noahmpnew(t)%qair = 0.0 - NoahMPnew_struc(n)%noahmpnew(t)%wind_e = 0.0 - NoahMPnew_struc(n)%noahmpnew(t)%wind_n = 0.0 + NoahMP50_struc(n)%noahmp50(t)%lwdown = 0.0 + NoahMP50_struc(n)%noahmp50(t)%swdown = 0.0 + NoahMP50_struc(n)%noahmp50(t)%psurf = 0.0 + NoahMP50_struc(n)%noahmp50(t)%prcp = 0.0 + NoahMP50_struc(n)%noahmp50(t)%tair = 0.0 + NoahMP50_struc(n)%noahmp50(t)%qair = 0.0 + NoahMP50_struc(n)%noahmp50(t)%wind_e = 0.0 + NoahMP50_struc(n)%noahmp50(t)%wind_n = 0.0 enddo ! end of tile (t) loop - NoahMPnew_struc(n)%forc_count = 0 + NoahMP50_struc(n)%forc_count = 0 enddo ! do n=1,LIS_rc%nnest -end subroutine NoahMPnew_reset +end subroutine NoahMP50_reset diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_setup.F90 b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_setup.F90 similarity index 86% rename from lis/surfacemodels/land/noahmp.new/NoahMPnew_setup.F90 rename to lis/surfacemodels/land/noahmp.5.0/NoahMP50_setup.F90 index 9182a9e70..ae8278a3e 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_setup.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_setup.F90 @@ -11,21 +11,21 @@ #include "LIS_misc.h" !BOP ! -! !ROUTINE: NoahMPnew_setup -! \label{NoahMPnew_setup} +! !ROUTINE: NoahMP50_setup +! \label{NoahMP50_setup} ! ! !REVISION HISTORY: ! This subroutine is generated with the Model Implementation Toolkit developed ! by Shugong Wang for the NASA Land Information System Version 7. The initial ! specification of the subroutine is defined by Sujay Kumar. -! 10/25/18: Shugong Wang, Zhuo Wang; initial implementation for LIS 7 and NoahMPnew +! 10/25/18: Shugong Wang, Zhuo Wang; initial implementation for LIS 7 and NoahMP50 ! 05/01/23: Cenlin He, update to work with refactored Noah-MP (v5.0 and later) ! !INTERFACE: -subroutine NoahMPnew_setup() +subroutine NoahMP50_setup() ! !USES: - use NoahMPnew_lsmMod + use NoahMP50_lsmMod use NoahmpIOVarType use LIS_logMod, only: LIS_logunit, LIS_verify, LIS_endrun use LIS_fileIOMod, only: LIS_read_param!, LIS_convertParamDataToLocalDomain @@ -37,7 +37,7 @@ subroutine NoahMPnew_setup() ! !DESCRIPTION: ! ! This routine is the entry point to set up the parameters -! required for NoahMPnew. These include: +! required for NoahMP50. These include: ! vegetype - vegetation type [-] ! soiltype - soil type [-] ! tbot - deep soil temperature [K] @@ -57,7 +57,7 @@ subroutine NoahMPnew_setup() ! \begin{description} ! \item[LIS\_read\_param](\ref{LIS_read_param}) \\ ! retrieves LIS parameter data from NetCDF file -! \item[NOAHMPnew\_read\_MULTILEVEL\_param](\ref{NOAHMPnew_read_MULTILEVEL_param}) \\ +! \item[NoahMP50\_read\_MULTILEVEL\_param](\ref{NoahMP50_read_MULTILEVEL_param}) \\ ! retrieves MULTILEVEL spatial parameter from NetCDF file ! \end{description} !EOP @@ -83,18 +83,18 @@ subroutine NoahMPnew_setup() write(LIS_logunit,*) & "[INFO] Noah-MP.New retrieve parameter VEGETYPE from LIS" do t=1, LIS_rc%npatch(n, mtype) - NoahMPnew_struc(n)%noahmpnew(t)%vegetype= LIS_surface(n, mtype)%tile(t)%vegt + NoahMP50_struc(n)%noahmp50(t)%vegetype= LIS_surface(n, mtype)%tile(t)%vegt enddo else ! read: vegetype write(LIS_logunit,*) & "[INFO] Noah-MP.New reading parameter VEGETYPE from ", & trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_vegetype), placeholder) + call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_vegetype), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NoahMPnew_struc(n)%noahmpnew(t)%vegetype = placeholder(col, row) + NoahMP50_struc(n)%noahmp50(t)%vegetype = placeholder(col, row) enddo endif ! soiltype takes value from the LIS built-in parameter soilt @@ -103,213 +103,213 @@ subroutine NoahMPnew_setup() write(LIS_logunit,*) & "[INFO] Noah-MP.New retrieve parameter SOILTYPE from LIS" do t=1, LIS_rc%npatch(n, mtype) - NoahMPnew_struc(n)%noahmpnew(t)%soiltype= LIS_surface(n, mtype)%tile(t)%soilt + NoahMP50_struc(n)%noahmp50(t)%soiltype= LIS_surface(n, mtype)%tile(t)%soilt enddo else ! read: soiltype write(LIS_logunit,*) & "[INFO] Noah-MP.New reading parameter SOILTYPE from ", & trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_soiltype), placeholder) + call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_soiltype), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NoahMPnew_struc(n)%noahmpnew(t)%soiltype = placeholder(col, row) + NoahMP50_struc(n)%noahmp50(t)%soiltype = placeholder(col, row) enddo endif ! read: tbot write(LIS_logunit,*) & "[INFO] Noah-MP.New reading parameter TBOT from ", & trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_tbot), placeholder) + call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_tbot), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NoahMPnew_struc(n)%noahmpnew(t)%tbot = placeholder(col, row) + NoahMP50_struc(n)%noahmp50(t)%tbot = placeholder(col, row) enddo !!! SW 11/06/2018 - if(NoahMPnew_struc(n)%crop_opt > 0) then + if(NoahMP50_struc(n)%crop_opt > 0) then ! read: planting write(LIS_logunit,*) & "[INFO] Noah-MP.New reading parameter PLANTING from ", & trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_planting), placeholder) + call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_planting), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NoahMPnew_struc(n)%noahmpnew(t)%planting = placeholder(col, row) + NoahMP50_struc(n)%noahmp50(t)%planting = placeholder(col, row) enddo ! read: harvest write(LIS_logunit,*) "[INFO] Noah-MP.New reading parameter HARVEST from ",& trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_harvest), placeholder) + call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_harvest), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NoahMPnew_struc(n)%noahmpnew(t)%harvest = placeholder(col, row) + NoahMP50_struc(n)%noahmp50(t)%harvest = placeholder(col, row) enddo ! read: season_gdd write(LIS_logunit,*) "[INFO] Noah-MP.New reading parameter SEASON_GDD from ", & trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_season_gdd), placeholder) + call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_season_gdd), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NoahMPnew_struc(n)%noahmpnew(t)%season_gdd = placeholder(col, row) + NoahMP50_struc(n)%noahmp50(t)%season_gdd = placeholder(col, row) enddo endif ! CH 05/01/2023: for irrigation - if(NoahMPnew_struc(n)%irr_opt > 0) then + if(NoahMP50_struc(n)%irr_opt > 0) then ! read: total irrigation fraction write(LIS_logunit,*) & "[INFO] Noah-MP.New reading parameter IRFRACT from ", & trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_irfract), placeholder) + call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_irfract), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NoahMPnew_struc(n)%noahmpnew(t)%irfract = placeholder(col, row) + NoahMP50_struc(n)%noahmp50(t)%irfract = placeholder(col, row) enddo ! read: sprinkler irrigation fraction write(LIS_logunit,*) & "[INFO] Noah-MP.New reading parameter SIFRACT from ", & trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_sifract), placeholder) + call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_sifract), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NoahMPnew_struc(n)%noahmpnew(t)%sifract = placeholder(col, row) + NoahMP50_struc(n)%noahmp50(t)%sifract = placeholder(col, row) enddo ! read: micro/drip irrigation fraction write(LIS_logunit,*) & "[INFO] Noah-MP.New reading parameter MIFRACT from ", & trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_mifract), placeholder) + call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_mifract), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NoahMPnew_struc(n)%noahmpnew(t)%mifract = placeholder(col, row) + NoahMP50_struc(n)%noahmp50(t)%mifract = placeholder(col, row) enddo ! read: flood irrigation fraction write(LIS_logunit,*) & "[INFO] Noah-MP.New reading parameter FIFRACT from ", & trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_fifract), placeholder) + call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_fifract), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NoahMPnew_struc(n)%noahmpnew(t)%fifract = placeholder(col, row) + NoahMP50_struc(n)%noahmp50(t)%fifract = placeholder(col, row) enddo endif ! CH 05/01/2023: for tile drainage - if(NoahMPnew_struc(n)%tdrn_opt > 0) then + if(NoahMP50_struc(n)%tdrn_opt > 0) then ! read: tile drainage fraction write(LIS_logunit,*) & "[INFO] Noah-MP.New reading parameter TDFRACT from ", & trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_tdfract), placeholder) + call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_tdfract), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NoahMPnew_struc(n)%noahmpnew(t)%tdfract = placeholder(col, row) + NoahMP50_struc(n)%noahmp50(t)%tdfract = placeholder(col, row) enddo endif !!! SW 11/06/2018 - if(NoahMPnew_struc(n)%soil_opt .eq. 2) then + if(NoahMP50_struc(n)%soil_opt .eq. 2) then ! read: soilcL1 write(LIS_logunit,*) "[INFO] Noah-MP.New reading parameter SOILCL1 from ", & trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_soilcL1), placeholder) + call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_soilcL1), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NoahMPnew_struc(n)%noahmpnew(t)%soilcl1 = placeholder(col, row) + NoahMP50_struc(n)%noahmp50(t)%soilcl1 = placeholder(col, row) enddo ! read: soilcL2 write(LIS_logunit,*) "[INFO] Noah-MP.New reading parameter SOILCL2 from ", & trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_soilcL2), placeholder) + call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_soilcL2), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NoahMPnew_struc(n)%noahmpnew(t)%soilcl2 = placeholder(col, row) + NoahMP50_struc(n)%noahmp50(t)%soilcl2 = placeholder(col, row) enddo ! read: soilcL3 write(LIS_logunit,*) "[INFO] Noah-MP.New reading parameter SOILCL3 from ", & trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_soilcL3), placeholder) + call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_soilcL3), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NoahMPnew_struc(n)%noahmpnew(t)%soilcl3 = placeholder(col, row) + NoahMP50_struc(n)%noahmp50(t)%soilcl3 = placeholder(col, row) enddo ! read: soilcL4 write(LIS_logunit,*) "[INFO] Noah-MP.New reading parameter SOILCL4 from ", & trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_soilcL4), placeholder) + call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_soilcL4), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NoahMPnew_struc(n)%noahmpnew(t)%soilcl4 = placeholder(col, row) + NoahMP50_struc(n)%noahmp50(t)%soilcl4 = placeholder(col, row) enddo endif ! CH 05/01/2023: for MMF groundwater - if(NoahMPnew_struc(n)%runsub_opt == 5) then + if(NoahMP50_struc(n)%runsub_opt == 5) then ! read: efolding depth for transmissivity (m) write(LIS_logunit,*) & "[INFO] Noah-MP.New reading parameter FDEPTH from ", & trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_fdepth), placeholder) + call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_fdepth), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NoahMPnew_struc(n)%noahmpnew(t)%fdepth = placeholder(col, row) + NoahMP50_struc(n)%noahmp50(t)%fdepth = placeholder(col, row) enddo ! read: equilibrium water table depth (m) write(LIS_logunit,*) & "[INFO] Noah-MP.New reading parameter EQZWT from ", & trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_eqzwt), placeholder) + call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_eqzwt), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NoahMPnew_struc(n)%noahmpnew(t)%eqzwt = placeholder(col, row) + NoahMP50_struc(n)%noahmp50(t)%eqzwt = placeholder(col, row) enddo ! read: riverbed depth (m) write(LIS_logunit,*) & "[INFO] Noah-MP.New reading parameter RIVERBED from ", & trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_riverbed), placeholder) + call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_riverbed), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NoahMPnew_struc(n)%noahmpnew(t)%riverbed = placeholder(col, row) + NoahMP50_struc(n)%noahmp50(t)%riverbed = placeholder(col, row) enddo ! read: climatology recharge write(LIS_logunit,*) & "[INFO] Noah-MP.New reading parameter RECHCLIM from ", & trim(LIS_rc%paramfile(n)) - call LIS_read_param(n, trim(NoahMPnew_struc(n)%LDT_ncvar_rechclim), placeholder) + call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_rechclim), placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NoahMPnew_struc(n)%noahmpnew(t)%rechclim = placeholder(col, row) + NoahMP50_struc(n)%noahmp50(t)%rechclim = placeholder(col, row) enddo endif @@ -319,24 +319,24 @@ subroutine NoahMPnew_setup() write(LIS_logunit,*) "[INFO] Noah-MP.New reading parameter SHDFAC_MONTHLY from ",& trim(LIS_rc%paramfile(n)) do k = 1, 12 - call NOAHMPnew_read_MULTILEVEL_param(n, NoahMPnew_struc(n)%LDT_ncvar_shdfac_monthly, k, placeholder) + call NoahMP50_read_MULTILEVEL_param(n, NoahMP50_struc(n)%LDT_ncvar_shdfac_monthly, k, placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NoahMPnew_struc(n)%noahmpnew(t)%shdfac_monthly(k) = placeholder(col, row) + NoahMP50_struc(n)%noahmp50(t)%shdfac_monthly(k) = placeholder(col, row) enddo enddo - if(NoahMPnew_struc(n)%soil_opt .eq. 3) then + if(NoahMP50_struc(n)%soil_opt .eq. 3) then ! read: soilcomp write(LIS_logunit,*) "[INFO] Noah-MP.New reading parameter SOILCOMP from ", & trim(LIS_rc%paramfile(n)) do k = 1, 8 - call NOAHMPnew_read_MULTILEVEL_param(n, NoahMPnew_struc(n)%LDT_ncvar_soilcomp, k, placeholder) + call NoahMP50_read_MULTILEVEL_param(n, NoahMP50_struc(n)%LDT_ncvar_soilcomp, k, placeholder) do t = 1, LIS_rc%npatch(n, mtype) col = LIS_surface(n, mtype)%tile(t)%col row = LIS_surface(n, mtype)%tile(t)%row - NoahMPnew_struc(n)%noahmpnew(t)%soilcomp(k) = placeholder(col, row) + NoahMP50_struc(n)%noahmp50(t)%soilcomp(k) = placeholder(col, row) enddo enddo endif @@ -344,28 +344,28 @@ subroutine NoahMPnew_setup() !!!! read Noah-MP parameter tables write(LIS_logunit,*) "[INFO] Noah-MP.New parameter table (veg, soil, general): ", & - trim(NoahMPnew_struc(n)%noahmp_tbl_name) + trim(NoahMP50_struc(n)%noahmp_tbl_name) write(LIS_logunit,*) "[INFO] Noah-MP.New Landuse classification scheme: ", & - trim(NoahMPnew_struc(n)%landuse_scheme_name) + trim(NoahMP50_struc(n)%landuse_scheme_name) write(LIS_logunit,*) "[INFO] Noah-MP.New Soil classification scheme: ", & "STAS (default, cannot change)" - call NoahmpReadTable(trim(NoahMPnew_struc(n)%landuse_scheme_name), & - trim(NoahMPnew_struc(n)%noahmp_tbl_name)) + call NoahmpReadTable(trim(NoahMP50_struc(n)%landuse_scheme_name), & + trim(NoahMP50_struc(n)%noahmp_tbl_name)) do t=1,LIS_rc%npatch(n,mtype) - SOILTYP = NoahMPnew_struc(n)%noahmpnew(t)%soiltype - VEGTYP = NoahMPnew_struc(n)%noahmpnew(t)%vegetype + SOILTYP = NoahMP50_struc(n)%noahmp50(t)%soiltype + VEGTYP = NoahMP50_struc(n)%noahmp50(t)%vegetype SLOPETYP = 1 ! set underground runoff slope term SOILCOLOR = 4 ! soil color: assuming a middle color category ????????? CROPTYPE = 0 - if (NoahMPnew_struc(n)%crop_opt > 0 .and. VEGTYP == NoahmpIO%ISCROP_TABLE) & + if (NoahMP50_struc(n)%crop_opt > 0 .and. VEGTYP == NoahmpIO%ISCROP_TABLE) & CROPTYPE = NoahmpIO%DEFAULT_CROP_TABLE call TRANSFER_MP_PARAMETERS_NEW(VEGTYP,SOILTYP,SLOPETYP,SOILCOLOR,CROPTYPE,& - NoahMPnew_struc(n)%noahmpnew(t)%param) + NoahMP50_struc(n)%noahmp50(t)%param) enddo ! optional read of Optimized parameters - call NoahMPnew_read_OPT_parameters() + call NoahMP50_read_OPT_parameters() !-------- initialize NoahmpIO 1-D interface variables NoahmpIO%xstart = 1 @@ -390,19 +390,19 @@ subroutine NoahMPnew_setup() NoahmpIO%jme = NoahmpIO%yend NoahmpIO%kms = 1 NoahmpIO%kme = 2 - NoahmpIO%nsoil = NoahMPnew_struc(n)%nsoil - NoahmpIO%nsnow = NoahMPnew_struc(n)%nsnow + NoahmpIO%nsoil = NoahMP50_struc(n)%nsoil + NoahmpIO%nsnow = NoahMP50_struc(n)%nsnow call NoahmpIOVarInitDefault(NoahmpIO) ! initialize NoahmpIO to undefined/default value !-------- NoahmpIO init complete enddo -end subroutine NoahMPnew_setup +end subroutine NoahMP50_setup !BOP ! -! !ROUTINE: NOAHMPnew_read_MULTILEVEL_param +! !ROUTINE: NoahMP50_read_MULTILEVEL_param ! \label{read_MULTILEVEL_param} ! ! !REVISION HISTORY: @@ -410,7 +410,7 @@ end subroutine NoahMPnew_setup ! 30 Oct 2013: Shugong Wang; Generalization for reading MULTILEVEL spatial parameter ! ! !INTERFACE: -subroutine NOAHMPnew_read_MULTILEVEL_param(n, ncvar_name, level, placeholder) +subroutine NoahMP50_read_MULTILEVEL_param(n, ncvar_name, level, placeholder) ! !USES: use netcdf use LIS_coreMod, only : LIS_rc, LIS_domain, LIS_localPet, & @@ -452,23 +452,23 @@ subroutine NOAHMPnew_read_MULTILEVEL_param(n, ncvar_name, level, placeholder) ! open NetCDF parameter file ios = nf90_open(path=trim(LIS_rc%paramfile(n)), mode=NF90_NOWRITE, ncid=nid) - call LIS_verify(ios, 'Error in nf90_open in NOAHMPnew_read_MULTILEVEL_param') + call LIS_verify(ios, 'Error in nf90_open in NoahMP50_read_MULTILEVEL_param') ! inquire the ID of east-west dimension ios = nf90_inq_dimid(nid, 'east_west', nc_ID) - call LIS_verify(ios, 'Error in nf90_inq_dimid in NOAHMPnew_read_MULTILEVEL_param') + call LIS_verify(ios, 'Error in nf90_inq_dimid in NoahMP50_read_MULTILEVEL_param') ! inquire the ID of north-south dimension ios = nf90_inq_dimid(nid, 'north_south', nr_ID) - call LIS_verify(ios, 'Error in nf90_inq_dimid in NOAHMPnew_read_MULTILEVEL_param') + call LIS_verify(ios, 'Error in nf90_inq_dimid in NoahMP50_read_MULTILEVEL_param') ! inquire the length of east-west dimension ios = nf90_inquire_dimension(nid, nc_ID, len=nc) - call LIS_verify(ios, 'Error in nf90_inquire_dimension in NOAHMPnew_read_MULTILEVEL_param') + call LIS_verify(ios, 'Error in nf90_inquire_dimension in NoahMP50_read_MULTILEVEL_param') ! inquire the length of north-south dimension ios = nf90_inquire_dimension(nid, nr_ID, len=nr) - call LIS_verify(ios, 'Error in nf90_inquire_dimension in NOAHMPnew_read_MULTILEVEL_param') + call LIS_verify(ios, 'Error in nf90_inquire_dimension in NoahMP50_read_MULTILEVEL_param') ! inquire the ID of parameter. ios = nf90_inq_varid(nid, Trim(ncvar_name), param_ID) @@ -491,11 +491,11 @@ subroutine NOAHMPnew_read_MULTILEVEL_param(n, ncvar_name, level, placeholder) ! read parameter ios = nf90_get_var(nid, param_ID, level_data) - call LIS_verify(ios, 'Error in nf90_get_var in NOAHMPnew_read_MULTILEVEL_param') + call LIS_verify(ios, 'Error in nf90_get_var in NoahMP50_read_MULTILEVEL_param') ! close netcdf file ios = nf90_close(nid) - call LIS_verify(ios, 'Error in nf90_close in NOAHMPnew_read_MULTILEVEL_param') + call LIS_verify(ios, 'Error in nf90_close in NoahMP50_read_MULTILEVEL_param') ! grab parameter at specific level placeholder(:, :) = & @@ -513,7 +513,7 @@ subroutine NOAHMPnew_read_MULTILEVEL_param(n, ncvar_name, level, placeholder) call LIS_endrun endif - end subroutine NOAHMPnew_read_MULTILEVEL_param + end subroutine NoahMP50_read_MULTILEVEL_param SUBROUTINE TRANSFER_MP_PARAMETERS_NEW(VEGTYPE,SOILTYPE,SLOPETYPE,SOILCOLOR,CROPTYPE,parameters) diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_snowphys_updateMod.F90 b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_snowphys_updateMod.F90 similarity index 99% rename from lis/surfacemodels/land/noahmp.new/NoahMPnew_snowphys_updateMod.F90 rename to lis/surfacemodels/land/noahmp.5.0/NoahMP50_snowphys_updateMod.F90 index acbc4d939..0ffcbb07e 100755 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_snowphys_updateMod.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_snowphys_updateMod.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !Module: NoahMPnew_snowphys_updateMod -! \label{NoahMPnew_snowphys_updateMod} +! !Module: NoahMP50_snowphys_updateMod +! \label{NoahMP50_snowphys_updateMod} ! ! !REVISION HISTORY: ! May 2023: Cenlin He; copied from NoahMP v4.5 (same physics as NoahMP v5.0) @@ -17,7 +17,7 @@ ! TODO: This is only for snow DA use. May need a better integration with NoahMP ! refactored source code directly. -Module NoahMPnew_snowphys_updateMod +Module NoahMP50_snowphys_updateMod use LisNoahmpParamType @@ -494,4 +494,4 @@ subroutine Combo(parameters,DZ, WLIQ, WICE, T, DZ2, WLIQ2, WICE2, T2) end subroutine Combo -end module NoahMPnew_snowphys_updateMod +end module NoahMP50_snowphys_updateMod diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_writerst.F90 b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_writerst.F90 similarity index 82% rename from lis/surfacemodels/land/noahmp.new/NoahMPnew_writerst.F90 rename to lis/surfacemodels/land/noahmp.5.0/NoahMP50_writerst.F90 index f21f8654a..05ed7e607 100644 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_writerst.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_writerst.F90 @@ -11,8 +11,8 @@ #include "LIS_misc.h" !BOP ! -! !ROUTINE: NoahMPnew_writerst -! \label{NoahMPnew_writerst} +! !ROUTINE: NoahMP50_writerst +! \label{NoahMP50_writerst} ! ! !REVISION HISTORY: ! This subroutine is generated with the Model Implementation Toolkit developed @@ -22,7 +22,7 @@ ! May 2023: Cenlin He, modified for refactored NoahMP v5 and later ! !INTERFACE: -subroutine NoahMPnew_writerst(n) +subroutine NoahMP50_writerst(n) ! !USES: use LIS_coreMod, only : LIS_rc, LIS_masterproc use LIS_timeMgrMod, only : LIS_isAlarmRinging @@ -31,7 +31,7 @@ subroutine NoahMPnew_writerst(n) use LIS_fileIOMod, only : LIS_create_output_directory, & LIS_create_restart_filename use LIS_constantsMod, only : LIS_CONST_PATH_LEN - use NoahMPnew_lsmMod + use NoahMP50_lsmMod #if (defined USE_NETCDF3 || defined USE_NETCDF4) use netcdf @@ -51,8 +51,8 @@ subroutine NoahMPnew_writerst(n) ! creates a timestamped directory for the restart files ! \item[LIS\_create\_restart\_filename](\ref{LIS_create_restart_filename})\\ ! generates a timestamped restart filename -! \item[NoahMPnew\_dump\_restart](\ref{NoahMPnew_dump_restart})\\ -! writes the NoahMPnew variables into the restart file +! \item[NoahMP50\_dump\_restart](\ref{NoahMP50_dump_restart})\\ +! writes the NoahMP50 variables into the restart file ! \end{description} !EOP @@ -63,16 +63,16 @@ subroutine NoahMPnew_writerst(n) integer :: status ! set restart alarm - alarmCheck = LIS_isAlarmRinging(LIS_rc, "NoahMPnew restart alarm") + alarmCheck = LIS_isAlarmRinging(LIS_rc, "NoahMP50 restart alarm") ! set restart file format (read from LIS configration file_ - wformat = trim(NoahMPnew_struc(n)%rformat) + wformat = trim(NoahMP50_struc(n)%rformat) if(alarmCheck .or. (LIS_rc%endtime ==1)) then If (LIS_masterproc) Then call LIS_create_output_directory("SURFACEMODEL") call LIS_create_restart_filename(n, filen, "SURFACEMODEL", & - "NOAHMPnew",wformat=wformat) + "NoahMP50",wformat=wformat) if(wformat .eq. "binary") then ftn = LIS_getNextUnitNumber() open(ftn,file=filen,status="unknown", form="unformatted") @@ -80,17 +80,17 @@ subroutine NoahMPnew_writerst(n) #if (defined USE_NETCDF4) status = nf90_create(path=filen, cmode=nf90_hdf5, ncid = ftn) call LIS_verify(status, & - "Error in nf90_open in NoahMPnew_writerst") + "Error in nf90_open in NoahMP50_writerst") #endif #if (defined USE_NETCDF3) status = nf90_create(Path = filen, cmode = nf90_clobber, ncid = ftn) call LIS_verify(status, & - "Error in nf90_open in NoahMPnew_writerst") + "Error in nf90_open in NoahMP50_writerst") #endif endif endif - call NoahMPnew_dump_restart(n, ftn, wformat) + call NoahMP50_dump_restart(n, ftn, wformat) if (LIS_masterproc) then if(wformat .eq. "binary") then @@ -99,19 +99,19 @@ subroutine NoahMPnew_writerst(n) #if (defined USE_NETCDF3 || defined USE_NETCDF4) status = nf90_close(ftn) call LIS_verify(status, & - "Error in nf90_close in NoahMPnew_writerst") + "Error in nf90_close in NoahMP50_writerst") #endif endif write(LIS_logunit, *)& "[INFO] Noah-MP.New archive restart written: ",trim(filen) endif endif -end subroutine NoahMPnew_writerst +end subroutine NoahMP50_writerst !BOP ! -! !ROUTINE: NoahMPnew_dump_restart -! \label{NoahMPnew_dump_restart} +! !ROUTINE: NoahMP50_dump_restart +! \label{NoahMP50_dump_restart} ! ! !REVISION HISTORY: ! This subroutine is generated with the Model Implementation Toolkit developed @@ -120,13 +120,13 @@ end subroutine NoahMPnew_writerst ! 10/25/18: Shugong Wang, Zhuo Wang, initial implementation for LIS 7 and NoahMP401 ! May 2023: Cenlin He, modified for refactored NoahMP v5 and later ! !INTERFACE: -subroutine NoahMPnew_dump_restart(n, ftn, wformat) +subroutine NoahMP50_dump_restart(n, ftn, wformat) ! !USES: use LIS_coreMod, only : LIS_rc, LIS_masterproc use LIS_logMod, only : LIS_logunit use LIS_historyMod - use NoahMPnew_lsmMod + use NoahMP50_lsmMod implicit none @@ -301,10 +301,10 @@ subroutine NoahMPnew_dump_restart(n, ftn, wformat) ! write the header of the restart file call LIS_writeGlobalHeader_restart(ftn, n, LIS_rc%lsm_index, & - "NOAHMPnew", & - dim1=NoahMPnew_struc(n)%nsoil+NoahMPnew_struc(n)%nsnow, & - dim2=NoahMPnew_struc(n)%nsoil, & - dim3=NoahMPnew_struc(n)%nsnow, & + "NoahMP50", & + dim1=NoahMP50_struc(n)%nsoil+NoahMP50_struc(n)%nsnow, & + dim2=NoahMP50_struc(n)%nsoil, & + dim3=NoahMP50_struc(n)%nsnow, & dim4=1, & dimID=dimID, & output_format = trim(wformat)) @@ -324,7 +324,7 @@ subroutine NoahMPnew_dump_restart(n, ftn, wformat) !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max call LIS_writeHeader_restart(ftn, n, dimID, smc_ID, "SMC", & "volumtric soil moisture", & - "m3/m3", vlevels=NoahMPnew_struc(n)%nsoil , valid_min=-99999.0, valid_max=99999.0, & + "m3/m3", vlevels=NoahMP50_struc(n)%nsoil , valid_min=-99999.0, valid_max=99999.0, & var_flag = "dim2") ! write the header for state variable sh2o @@ -332,7 +332,7 @@ subroutine NoahMPnew_dump_restart(n, ftn, wformat) !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max call LIS_writeHeader_restart(ftn, n, dimID, sh2o_ID, "SH2O", & "volumtric liquid soil moisture", & - "m3/m3", vlevels=NoahMPnew_struc(n)%nsoil , valid_min=-99999.0, valid_max=99999.0, & + "m3/m3", vlevels=NoahMP50_struc(n)%nsoil , valid_min=-99999.0, valid_max=99999.0, & var_flag = "dim2") ! write the header for state variable tslb @@ -340,7 +340,7 @@ subroutine NoahMPnew_dump_restart(n, ftn, wformat) !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max call LIS_writeHeader_restart(ftn, n, dimID, tslb_ID, "TSLB", & "soil temperature", & - "K", vlevels=NoahMPnew_struc(n)%nsoil , valid_min=-99999.0, valid_max=99999.0, & + "K", vlevels=NoahMP50_struc(n)%nsoil , valid_min=-99999.0, valid_max=99999.0, & var_flag = "dim2") ! write the header for state variable sneqv @@ -458,7 +458,7 @@ subroutine NoahMPnew_dump_restart(n, ftn, wformat) !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max call LIS_writeHeader_restart(ftn, n, dimID, tsno_ID, "TSNO", & "snow layer temperature", & - "K", vlevels=NoahMPnew_struc(n)%nsnow , valid_min=-99999.0, valid_max=99999.0, & + "K", vlevels=NoahMP50_struc(n)%nsnow , valid_min=-99999.0, valid_max=99999.0, & var_flag = "dim3") ! write the header for state variable zss @@ -466,7 +466,7 @@ subroutine NoahMPnew_dump_restart(n, ftn, wformat) !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max call LIS_writeHeader_restart(ftn, n, dimID, zss_ID, "ZSS", & "snow/soil layer depth from snow surface", & - "m", vlevels=NoahMPnew_struc(n)%nsnow+NoahMPnew_struc(n)%nsoil , valid_min=-99999.0, valid_max=99999.0, & + "m", vlevels=NoahMP50_struc(n)%nsnow+NoahMP50_struc(n)%nsoil , valid_min=-99999.0, valid_max=99999.0, & var_flag = "dim1") ! write the header for state variable snowice @@ -474,7 +474,7 @@ subroutine NoahMPnew_dump_restart(n, ftn, wformat) !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max call LIS_writeHeader_restart(ftn, n, dimID, snowice_ID, "SNOWICE", & "snow layer ice", & - "mm", vlevels=NoahMPnew_struc(n)%nsnow , valid_min=-99999.0, valid_max=99999.0, & + "mm", vlevels=NoahMP50_struc(n)%nsnow , valid_min=-99999.0, valid_max=99999.0, & var_flag = "dim3") ! write the header for state variable snowliq @@ -482,7 +482,7 @@ subroutine NoahMPnew_dump_restart(n, ftn, wformat) !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max call LIS_writeHeader_restart(ftn, n, dimID, snowliq_ID, "SNOWLIQ", & "snow layer liquid water", & - "mm", vlevels=NoahMPnew_struc(n)%nsnow , valid_min=-99999.0, valid_max=99999.0, & + "mm", vlevels=NoahMP50_struc(n)%nsnow , valid_min=-99999.0, valid_max=99999.0, & var_flag = "dim3") ! write the header for state variable lfmass @@ -532,13 +532,13 @@ subroutine NoahMPnew_dump_restart(n, ftn, wformat) "-", vlevels=1, valid_min=-99999.0, valid_max=99999.0) ! for MMF groundwater - if (NoahMPnew_struc(n)%runsub_opt == 5) then + if (NoahMP50_struc(n)%runsub_opt == 5) then ! write the header for state variable smoiseq !TODO: check dimension of the state variable following "vlevels=" !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max call LIS_writeHeader_restart(ftn, n, dimID, smoiseq_ID, "SMOISEQ", & "equilibrium volumetric soil moisture content", & - "m3/m3", vlevels=NoahMPnew_struc(n)%nsoil , valid_min=-99999.0, valid_max=99999.0, & + "m3/m3", vlevels=NoahMP50_struc(n)%nsoil , valid_min=-99999.0, valid_max=99999.0, & var_flag = "dim2") ! write the header for state variable smcwtd @@ -614,7 +614,7 @@ subroutine NoahMPnew_dump_restart(n, ftn, wformat) endif ! for irrigation - if (NoahMPnew_struc(n)%irr_opt >0) then + if (NoahMP50_struc(n)%irr_opt >0) then ! write the header for state variable irnumsi !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max call LIS_writeHeader_restart(ftn, n, dimID, irnumsi_ID, "IRNUMSI", & @@ -673,7 +673,7 @@ subroutine NoahMPnew_dump_restart(n, ftn, wformat) endif ! for tile drainage - if (NoahMPnew_struc(n)%tdrn_opt >0) then + if (NoahMP50_struc(n)%tdrn_opt >0) then ! write the header for state variable qtdrain !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max call LIS_writeHeader_restart(ftn, n, dimID, qtdrain_ID, "QTDRAIN", & @@ -715,7 +715,7 @@ subroutine NoahMPnew_dump_restart(n, ftn, wformat) ! write the header for state variable accetrani call LIS_writeHeader_restart(ftn, n, dimID, accetrani_ID, "ACC_ETRANI", & "accumulated plant transpiration each layer", & - "m/s", vlevels=NoahMPnew_struc(n)%nsoil , valid_min=-99999.0, valid_max=99999.0, & + "m/s", vlevels=NoahMP50_struc(n)%nsoil , valid_min=-99999.0, valid_max=99999.0, & var_flag = "dim2") ! write the header for state variable accdwater !TODO: replace -99999 and 99999 with correct values for valid_min and valid_max @@ -744,387 +744,387 @@ subroutine NoahMPnew_dump_restart(n, ftn, wformat) "m/s", vlevels=1, valid_min=-99999.0, valid_max=99999.0) ! close header of restart file - call LIS_closeHeader_restart(ftn, n, LIS_rc%lsm_index, dimID, NoahMPnew_struc(n)%rstInterval) + call LIS_closeHeader_restart(ftn, n, LIS_rc%lsm_index, dimID, NoahMP50_struc(n)%rstInterval) ! write state variables into restart file ! accumulated surface runoff - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%sfcrunoff, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%sfcrunoff, & varid=sfcrunoff_ID, dim=1, wformat=wformat) ! accumulated sub-surface runoff - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%udrrunoff, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%udrrunoff, & varid=udrrunoff_ID, dim=1, wformat=wformat) ! volumtric soil moisture - do l=1, NoahMPnew_struc(n)%nsoil ! TODO: check loop + do l=1, NoahMP50_struc(n)%nsoil ! TODO: check loop tmptilen = 0 do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - tmptilen(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(l) + tmptilen(t) = NoahMP50_struc(n)%noahmp50(t)%smc(l) enddo call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, & varid=smc_ID, dim=l, wformat=wformat) enddo ! volumtric liquid soil moisture - do l=1, NoahMPnew_struc(n)%nsoil ! TODO: check loop + do l=1, NoahMP50_struc(n)%nsoil ! TODO: check loop tmptilen = 0 do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - tmptilen(t) = NoahMPnew_struc(n)%noahmpnew(t)%sh2o(l) + tmptilen(t) = NoahMP50_struc(n)%noahmp50(t)%sh2o(l) enddo call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, & varid=sh2o_ID, dim=l, wformat=wformat) enddo ! soil temperature - do l=1, NoahMPnew_struc(n)%nsoil ! TODO: check loop + do l=1, NoahMP50_struc(n)%nsoil ! TODO: check loop tmptilen = 0 do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - tmptilen(t) = NoahMPnew_struc(n)%noahmpnew(t)%tslb(l) + tmptilen(t) = NoahMP50_struc(n)%noahmp50(t)%tslb(l) enddo call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, & varid=tslb_ID, dim=l, wformat=wformat) enddo ! snow water equivalent - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%sneqv, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%sneqv, & varid=sneqv_ID, dim=1, wformat=wformat) ! physical snow depth - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%snowh, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%snowh, & varid=snowh_ID, dim=1, wformat=wformat) ! total canopy water + ice - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%canwat, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%canwat, & varid=canwat_ID, dim=1, wformat=wformat) ! accumulated snow melt leaving pack - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%acsnom, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%acsnom, & varid=acsnom_ID, dim=1, wformat=wformat) ! accumulated snow on grid - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%acsnow, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%acsnow, & varid=acsnow_ID, dim=1, wformat=wformat) ! actual no. of snow layers - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%isnow, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%isnow, & varid=isnow_ID, dim=1, wformat=wformat) ! vegetation leaf temperature - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%tv, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%tv, & varid=tv_ID, dim=1, wformat=wformat) ! bulk ground surface temperature - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%tg, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%tg, & varid=tg_ID, dim=1, wformat=wformat) ! canopy-intercepted ice - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%canice, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%canice, & varid=canice_ID, dim=1, wformat=wformat) ! canopy-intercepted liquid water - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%canliq, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%canliq, & varid=canliq_ID, dim=1, wformat=wformat) ! canopy air vapor pressure - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%eah, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%eah, & varid=eah_ID, dim=1, wformat=wformat) ! canopy air temperature - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%tah, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%tah, & varid=tah_ID, dim=1, wformat=wformat) ! bulk momentum drag coefficient - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%cm, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%cm, & varid=cm_ID, dim=1, wformat=wformat) ! bulk sensible heat exchange coefficient - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%ch, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%ch, & varid=ch_ID, dim=1, wformat=wformat) ! wetted or snowed fraction of canopy - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%fwet, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%fwet, & varid=fwet_ID, dim=1, wformat=wformat) ! snow mass at last time step - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%sneqvo, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%sneqvo, & varid=sneqvo_ID, dim=1, wformat=wformat) ! snow albedo at last time step - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%albold, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%albold, & varid=albold_ID, dim=1, wformat=wformat) ! snowfall on the ground - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%qsnow, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%qsnow, & varid=qsnow_ID, dim=1, wformat=wformat) ! lake water storage - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%wslake, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%wslake, & varid=wslake_ID, dim=1, wformat=wformat) ! water table depth - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%zwt, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%zwt, & varid=zwt_ID, dim=1, wformat=wformat) ! water in the "aquifer" - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%wa, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%wa, & varid=wa_ID, dim=1, wformat=wformat) ! water in aquifer and saturated soil - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%wt, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%wt, & varid=wt_ID, dim=1, wformat=wformat) ! snow layer temperature - do l=1, NoahMPnew_struc(n)%nsnow ! TODO: check loop + do l=1, NoahMP50_struc(n)%nsnow ! TODO: check loop tmptilen = 0 do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - tmptilen(t) = NoahMPnew_struc(n)%noahmpnew(t)%tsno(l) + tmptilen(t) = NoahMP50_struc(n)%noahmp50(t)%tsno(l) enddo call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, & varid=tsno_ID, dim=l, wformat=wformat) enddo ! snow/soil layer depth from snow surface - do l=1, NoahMPnew_struc(n)%nsnow+NoahMPnew_struc(n)%nsoil ! TODO: check loop + do l=1, NoahMP50_struc(n)%nsnow+NoahMP50_struc(n)%nsoil ! TODO: check loop tmptilen = 0 do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - tmptilen(t) = NoahMPnew_struc(n)%noahmpnew(t)%zss(l) + tmptilen(t) = NoahMP50_struc(n)%noahmp50(t)%zss(l) enddo call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, & varid=zss_ID, dim=l, wformat=wformat) enddo ! snow layer ice - do l=1, NoahMPnew_struc(n)%nsnow ! TODO: check loop + do l=1, NoahMP50_struc(n)%nsnow ! TODO: check loop tmptilen = 0 do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - tmptilen(t) = NoahMPnew_struc(n)%noahmpnew(t)%snowice(l) + tmptilen(t) = NoahMP50_struc(n)%noahmp50(t)%snowice(l) enddo call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, & varid=snowice_ID, dim=l, wformat=wformat) enddo ! snow layer liquid water - do l=1, NoahMPnew_struc(n)%nsnow ! TODO: check loop + do l=1, NoahMP50_struc(n)%nsnow ! TODO: check loop tmptilen = 0 do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - tmptilen(t) = NoahMPnew_struc(n)%noahmpnew(t)%snowliq(l) + tmptilen(t) = NoahMP50_struc(n)%noahmp50(t)%snowliq(l) enddo call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, & varid=snowliq_ID, dim=l, wformat=wformat) enddo ! leaf mass - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%lfmass, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%lfmass, & varid=lfmass_ID, dim=1, wformat=wformat) ! mass of fine roots - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%rtmass, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%rtmass, & varid=rtmass_ID, dim=1, wformat=wformat) ! stem mass - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%stmass, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%stmass, & varid=stmass_ID, dim=1, wformat=wformat) ! mass of wood (including woody roots) - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%wood, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%wood, & varid=wood_ID, dim=1, wformat=wformat) ! stable carbon in deep soil - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%stblcp, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%stblcp, & varid=stblcp_ID, dim=1, wformat=wformat) ! short-lived carbon in shallow soil - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%fastcp, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%fastcp, & varid=fastcp_ID, dim=1, wformat=wformat) ! leaf area index - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%lai, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%lai, & varid=lai_ID, dim=1, wformat=wformat) ! stem area index - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%sai, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%sai, & varid=sai_ID, dim=1, wformat=wformat) ! snow age factor - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%tauss, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%tauss, & varid=tauss_ID, dim=1, wformat=wformat) ! for MMF groundwater - if (NoahMPnew_struc(n)%runsub_opt == 5) then + if (NoahMP50_struc(n)%runsub_opt == 5) then ! equilibrium volumetric soil moisture content - do l=1, NoahMPnew_struc(n)%nsoil ! TODO: check loop + do l=1, NoahMP50_struc(n)%nsoil ! TODO: check loop tmptilen = 0 do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - tmptilen(t) = NoahMPnew_struc(n)%noahmpnew(t)%smoiseq(l) + tmptilen(t) = NoahMP50_struc(n)%noahmp50(t)%smoiseq(l) enddo call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, & varid=smoiseq_ID, dim=l, wformat=wformat) enddo ! soil moisture content in the layer to the water table when deep - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%smcwtd, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%smcwtd, & varid=smcwtd_ID, dim=1, wformat=wformat) ! recharge to the water table when deep - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%deeprech, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%deeprech, & varid=deeprech_ID, dim=1, wformat=wformat) ! recharge to the water table (diagnostic) - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%rech, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%rech, & varid=rech_ID, dim=1, wformat=wformat) ! groundwater expotential parameter - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%pexp, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%pexp, & varid=pexp_ID, dim=1, wformat=wformat) ! river area - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%area, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%area, & varid=area_ID, dim=1, wformat=wformat) ! groundwater baseflow - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%qrf, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%qrf, & varid=qrf_ID, dim=1, wformat=wformat) ! seeping water - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%qspring, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%qspring, & varid=qspring_ID, dim=1, wformat=wformat) ! accumulated lateral flow - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%qslat, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%qslat, & varid=qslat_ID, dim=1, wformat=wformat) ! accumulated GW baseflow - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%qrfs, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%qrfs, & varid=qrfs_ID, dim=1, wformat=wformat) ! accumulated seeping water - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%qsprings, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%qsprings, & varid=qsprings_ID, dim=1, wformat=wformat) ! depth - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%fdepth, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%fdepth, & varid=fdepth_ID, dim=1, wformat=wformat) ! river conductivity - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%rivercond, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%rivercond, & varid=rivercond_ID, dim=1, wformat=wformat) ! riverbed depth - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%riverbed, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%riverbed, & varid=riverbed_ID, dim=1, wformat=wformat) ! equilibrium water table depth - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%eqzwt, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%eqzwt, & varid=eqzwt_ID, dim=1, wformat=wformat) endif ! for irrigation - if (NoahMPnew_struc(n)%irr_opt >0) then + if (NoahMP50_struc(n)%irr_opt >0) then ! sprinkler irrigation count - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irnumsi, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%irnumsi, & varid=irnumsi_ID, dim=1, wformat=wformat) ! micro irrigation count - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irnummi, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%irnummi, & varid=irnummi_ID, dim=1, wformat=wformat) ! flood irrigation count - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irnumfi, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%irnumfi, & varid=irnumfi_ID, dim=1, wformat=wformat) ! sprinkler irrigation water amount - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irwatsi, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%irwatsi, & varid=irwatsi_ID, dim=1, wformat=wformat) ! micro irrigation water amount - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irwatmi, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%irwatmi, & varid=irwatmi_ID, dim=1, wformat=wformat) ! flood irrigation water amount - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irwatfi, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%irwatfi, & varid=irwatfi_ID, dim=1, wformat=wformat) ! sprinkler irrigation water volume - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irsivol, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%irsivol, & varid=irsivol_ID, dim=1, wformat=wformat) ! micro irrigation water volume - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irmivol, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%irmivol, & varid=irmivol_ID, dim=1, wformat=wformat) ! flood irrigation water volume - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irfivol, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%irfivol, & varid=irfivol_ID, dim=1, wformat=wformat) ! loss of irrigation water to evaporation - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%ireloss, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%ireloss, & varid=ireloss_ID, dim=1, wformat=wformat) ! latent heating from sprinkler evaporation - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%irrsplh, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%irrsplh, & varid=irrsplh_ID, dim=1, wformat=wformat) endif ! for tile drainage - if (NoahMPnew_struc(n)%tdrn_opt >0) then + if (NoahMP50_struc(n)%tdrn_opt >0) then ! accumulated tile drainage discharge - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%qtdrain, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%qtdrain, & varid=qtdrain_ID, dim=1, wformat=wformat) endif ! mass of grain XING - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%grain, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%grain, & varid=grain_ID, dim=1, wformat=wformat) ! growing degree days XING (based on 10C) - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%gdd, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%gdd, & varid=gdd_ID, dim=1, wformat=wformat) ! growing degree days XING - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%pgs, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%pgs, & varid=pgs_ID, dim=1, wformat=wformat) ! for additional variables ! accumulated ground heat flux - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accssoil, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%accssoil, & varid=accssoil_ID, dim=1, wformat=wformat) ! accumulated soil surface water flux - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accqinsur, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%accqinsur, & varid=accqinsur_ID, dim=1, wformat=wformat) ! accumulated soil surface evaporation - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accqseva, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%accqseva, & varid=accqseva_ID, dim=1, wformat=wformat) ! accumulated plant transpiration each layer - do l=1, NoahMPnew_struc(n)%nsoil ! TODO: check loop + do l=1, NoahMP50_struc(n)%nsoil ! TODO: check loop tmptilen = 0 do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) - tmptilen(t) = NoahMPnew_struc(n)%noahmpnew(t)%accetrani(l) + tmptilen(t) = NoahMP50_struc(n)%noahmp50(t)%accetrani(l) enddo call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, tmptilen, & varid=accetrani_ID, dim=l, wformat=wformat) enddo ! accumulated water storage change - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accdwater, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%accdwater, & varid=accdwater_ID, dim=1, wformat=wformat) ! accumulated precipitation - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accprcp, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%accprcp, & varid=accprcp_ID, dim=1, wformat=wformat) ! accumulated canopy evaporation - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accecan, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%accecan, & varid=accecan_ID, dim=1, wformat=wformat) ! accumulated transpiration - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accetran, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%accetran, & varid=accetran_ID, dim=1, wformat=wformat) ! accumulated net soil evaporation - call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew%accedir, & + call LIS_writevar_restart(ftn, n, LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50%accedir, & varid=accedir_ID, dim=1, wformat=wformat) !!! END OF writing state variables -end subroutine NoahMPnew_dump_restart +end subroutine NoahMP50_dump_restart diff --git a/lis/surfacemodels/land/noahmp.new/cpl_wrf_noesmf/noahMPnew_setwrfexport.F90 b/lis/surfacemodels/land/noahmp.5.0/cpl_wrf_noesmf/noahMP50_setwrfexport.F90 similarity index 77% rename from lis/surfacemodels/land/noahmp.new/cpl_wrf_noesmf/noahMPnew_setwrfexport.F90 rename to lis/surfacemodels/land/noahmp.5.0/cpl_wrf_noesmf/noahMP50_setwrfexport.F90 index 9b59dd1b5..4b4ca5434 100755 --- a/lis/surfacemodels/land/noahmp.new/cpl_wrf_noesmf/noahMPnew_setwrfexport.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/cpl_wrf_noesmf/noahMP50_setwrfexport.F90 @@ -9,7 +9,7 @@ !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP ! -! !ROUTINE: NoahMPnew_setwrfexport.F90 +! !ROUTINE: NoahMP50_setwrfexport.F90 ! ! !DESCRIPTION: ! Defines the export states from NoahMP to WRF in coupled mode @@ -30,14 +30,14 @@ ! May 2023: Cenlin He, modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine NoahMPnew_setwrfexport(n) +subroutine NoahMP50_setwrfexport(n) ! !USES: use ESMF use LIS_coreMod use LIS_historyMod, only : LIS_patch2tile use LIS_logMod use LISWRFGridCompMod, only : LISWRF_export - use NoahMPnew_lsmMod + use NoahMP50_lsmMod implicit none ! !ARGUMENTS: @@ -49,77 +49,77 @@ subroutine NoahMPnew_setwrfexport(n) allocate(temp(LIS_rc%npatch(n,LIS_rc%lsm_index))) ! surface albedo call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%albedo_t,& - NoahMPnew_struc(n)%noahmpnew%albedo) + NoahMP50_struc(n)%noahmp50%albedo) #ifdef WRF_HYDRO ! infiltration excess call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%infxsrt_t,& - NoahMPnew_struc(n)%noahmpnew%infxs1rt) + NoahMP50_struc(n)%noahmp50%infxs1rt) ! soil drainage call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%soldrain_t,& - NoahMPnew_struc(n)%noahmpnew%soldrain1rt) + NoahMP50_struc(n)%noahmp50%soldrain1rt) #endif ! soil moisture content layers 1:4 do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - temp(i) = NoahMPnew_struc(n)%noahmpnew(i)%smc(1) + temp(i) = NoahMP50_struc(n)%noahmp50(i)%smc(1) enddo call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%smc1_t,& temp) do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - temp(i) = NoahMPnew_struc(n)%noahmpnew(i)%smc(2) + temp(i) = NoahMP50_struc(n)%noahmp50(i)%smc(2) enddo call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%smc2_t,& temp) do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - temp(i) = NoahMPnew_struc(n)%noahmpnew(i)%smc(3) + temp(i) = NoahMP50_struc(n)%noahmp50(i)%smc(3) enddo call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%smc3_t,& temp) do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - temp(i) = NoahMPnew_struc(n)%noahmpnew(i)%smc(4) + temp(i) = NoahMP50_struc(n)%noahmp50(i)%smc(4) enddo call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%smc4_t,& temp) do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - temp(i) = NoahMPnew_struc(n)%noahmpnew(i)%tslb(1) + temp(i) = NoahMP50_struc(n)%noahmp50(i)%tslb(1) enddo ! soil temperature layers 1:4 call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%stc1_t,temp) do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - temp(i) = NoahMPnew_struc(n)%noahmpnew(i)%tslb(2) + temp(i) = NoahMP50_struc(n)%noahmp50(i)%tslb(2) enddo call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%stc2_t,temp) do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - temp(i) = NoahMPnew_struc(n)%noahmpnew(i)%tslb(3) + temp(i) = NoahMP50_struc(n)%noahmp50(i)%tslb(3) enddo call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%stc3_t,temp) do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - temp(i) = NoahMPnew_struc(n)%noahmpnew(i)%tslb(4) + temp(i) = NoahMP50_struc(n)%noahmp50(i)%tslb(4) enddo call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%stc4_t,temp) ! snow water equivalent call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%snow_t,& - NoahMPnew_struc(n)%noahmpnew%sneqv*1000.0) + NoahMP50_struc(n)%noahmp50%sneqv*1000.0) ! snow height NUWRF EMK call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%snowh_t,& - NoahMPnew_struc(n)%noahmpnew%snowh) + NoahMP50_struc(n)%noahmp50%snowh) ! volumetric liquid soil moisture layers 1:4 do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - temp(i) = NoahMPnew_struc(n)%noahmpnew(i)%sh2o(1) + temp(i) = NoahMP50_struc(n)%noahmp50(i)%sh2o(1) enddo call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%sh2o1_t,temp) do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - temp(i) = NoahMPnew_struc(n)%noahmpnew(i)%sh2o(2) + temp(i) = NoahMP50_struc(n)%noahmp50(i)%sh2o(2) enddo call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%sh2o2_t,temp) do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - temp(i) = NoahMPnew_struc(n)%noahmpnew(i)%sh2o(3) + temp(i) = NoahMP50_struc(n)%noahmp50(i)%sh2o(3) enddo call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%sh2o3_t,temp) do i=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - temp(i) = NoahMPnew_struc(n)%noahmpnew(i)%sh2o(4) + temp(i) = NoahMP50_struc(n)%noahmp50(i)%sh2o(4) enddo call LIS_patch2tile(n,LIS_rc%lsm_index,LISWRF_export(n)%sh2o4_t,temp) deallocate(temp) -end subroutine NoahMPnew_setwrfexport +end subroutine NoahMP50_setwrfexport diff --git a/lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmpnew_getCROCUSexport.F90 b/lis/surfacemodels/land/noahmp.5.0/cplsubLSM/noahmp50_getCROCUSexport.F90 similarity index 77% rename from lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmpnew_getCROCUSexport.F90 rename to lis/surfacemodels/land/noahmp.5.0/cplsubLSM/noahmp50_getCROCUSexport.F90 index 26dcaab39..f5048c9ee 100644 --- a/lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmpnew_getCROCUSexport.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/cplsubLSM/noahmp50_getCROCUSexport.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_getCROCUSexport -! \label{noahmpnew_getCROCUSexport} +! !ROUTINE: noahmp50_getCROCUSexport +! \label{noahmp50_getCROCUSexport} ! ! !REVISION HISTORY: ! 19 Sep 2020: Sujay Kumar; Initial Specification @@ -18,12 +18,12 @@ ! May 2023: Cenlin He; modified to work with refactored Noah-MP v5 and later ! ! !INTERFACE: -subroutine noahmpnew_getCROCUSexport(n, LSM2SUBLSM_State) +subroutine noahmp50_getCROCUSexport(n, LSM2SUBLSM_State) ! !USES: use ESMF use LIS_coreMod use LIS_logMod - use noahmpnew_lsmMod + use noahmp50_lsmMod implicit none ! !ARGUMENTS: @@ -63,11 +63,11 @@ subroutine noahmpnew_getCROCUSexport(n, LSM2SUBLSM_State) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - gt(t) = NoahMPnew_struc(n)%noahmpnew(t)%tslb(1) - !gt(t) = NoahMPnew_struc(n)%noahmpnew(t)%tgb - XWGI(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(1) - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(1) ! volumetric frozen soil moisture [m3/m3] - XWG(t) = NoahMPnew_struc(n)%noahmpnew(t)%sh2o(1) ! volumetric liquid soil moisture [m3/m3] + gt(t) = NoahMP50_struc(n)%noahmp50(t)%tslb(1) + !gt(t) = NoahMP50_struc(n)%noahmp50(t)%tgb + XWGI(t) = NoahMP50_struc(n)%noahmp50(t)%smc(1) - NoahMP50_struc(n)%noahmp50(t)%sh2o(1) ! volumetric frozen soil moisture [m3/m3] + XWG(t) = NoahMP50_struc(n)%noahmp50(t)%sh2o(1) ! volumetric liquid soil moisture [m3/m3] enddo -end subroutine noahmpnew_getCROCUSexport +end subroutine noahmp50_getCROCUSexport diff --git a/lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmpnew_getSnowModelexport.F90 b/lis/surfacemodels/land/noahmp.5.0/cplsubLSM/noahmp50_getSnowModelexport.F90 similarity index 78% rename from lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmpnew_getSnowModelexport.F90 rename to lis/surfacemodels/land/noahmp.5.0/cplsubLSM/noahmp50_getSnowModelexport.F90 index 3b853126a..b32188543 100644 --- a/lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmpnew_getSnowModelexport.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/cplsubLSM/noahmp50_getSnowModelexport.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_getSnowModelexport -! \label{noahmpnew_getSnowModelexport} +! !ROUTINE: noahmp50_getSnowModelexport +! \label{noahmp50_getSnowModelexport} ! ! !REVISION HISTORY: ! 19 Sep 2020: Sujay Kumar; Initial Specification @@ -19,12 +19,12 @@ ! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmpnew_getSnowModelexport(n, LSM2SUBLSM_State) +subroutine noahmp50_getSnowModelexport(n, LSM2SUBLSM_State) ! !USES: use ESMF use LIS_coreMod use LIS_logMod - use NoahMPnew_lsmMod + use NoahMP50_lsmMod implicit none ! !ARGUMENTS: @@ -61,14 +61,14 @@ subroutine noahmpnew_getSnowModelexport(n, LSM2SUBLSM_State) call LIS_verify(status) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - gt(t) = NoahMPnew_struc(n)%noahmpnew(t)%tslb(1) - !gt(t) = NoahMPnew_struc(n)%noahmpnew(t)%tgb - XWGI(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(1) - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(1) ! volumetric frozen soil moisture [m3/m3] - XWG(t) = NoahMPnew_struc(n)%noahmpnew(t)%sh2o(1) ! volumetric liquid soil moisture [m3/m3] + gt(t) = NoahMP50_struc(n)%noahmp50(t)%tslb(1) + !gt(t) = NoahMP50_struc(n)%noahmp50(t)%tgb + XWGI(t) = NoahMP50_struc(n)%noahmp50(t)%smc(1) - NoahMP50_struc(n)%noahmp50(t)%sh2o(1) ! volumetric frozen soil moisture [m3/m3] + XWG(t) = NoahMP50_struc(n)%noahmp50(t)%sh2o(1) ! volumetric liquid soil moisture [m3/m3] enddo #endif -end subroutine noahmpnew_getSnowModelexport +end subroutine noahmp50_getSnowModelexport diff --git a/lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmpnew_setCROCUSimport.F90 b/lis/surfacemodels/land/noahmp.5.0/cplsubLSM/noahmp50_setCROCUSimport.F90 similarity index 78% rename from lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmpnew_setCROCUSimport.F90 rename to lis/surfacemodels/land/noahmp.5.0/cplsubLSM/noahmp50_setCROCUSimport.F90 index 3d84b640a..ef3946479 100755 --- a/lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmpnew_setCROCUSimport.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/cplsubLSM/noahmp50_setCROCUSimport.F90 @@ -8,20 +8,20 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_setCROCUSimport -! \label{noahmpnew_setCROCUSimport} +! !ROUTINE: noahmp50_setCROCUSimport +! \label{noahmp50_setCROCUSimport} ! ! !REVISION HISTORY: ! 19 Sep 2020: Sujay Kumar; Initial Specification ! May 2023: Cenlin He; Modified to work with refactored Noah-MP v5 and later ! ! !INTERFACE: -subroutine noahmpnew_setCROCUSimport(n, SubLSM2LSM_State) +subroutine noahmp50_setCROCUSimport(n, SubLSM2LSM_State) ! !USES: use ESMF use LIS_coreMod use LIS_logMod - use noahmpnew_lsmMod + use noahmp50_lsmMod implicit none ! !ARGUMENTS: @@ -49,14 +49,14 @@ subroutine noahmpnew_setCROCUSimport(n, SubLSM2LSM_State) call LIS_verify(status) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - dsneqv = swe(t) - NoahMPnew_struc(n)%noahmpnew(t)%sneqv !in mm - dsnowh = snwd(t) - NoahMPnew_struc(n)%noahmpnew(t)%snowh !in m + dsneqv = swe(t) - NoahMP50_struc(n)%noahmp50(t)%sneqv !in mm + dsnowh = snwd(t) - NoahMP50_struc(n)%noahmp50(t)%snowh !in m ! update - call noahmpnew_snow_update(n, t, dsneqv, dsnowh) + call noahmp50_snow_update(n, t, dsneqv, dsnowh) enddo -end subroutine noahmpnew_setCROCUSimport +end subroutine noahmp50_setCROCUSimport diff --git a/lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmpnew_setSnowModelimport.F90 b/lis/surfacemodels/land/noahmp.5.0/cplsubLSM/noahmp50_setSnowModelimport.F90 similarity index 61% rename from lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmpnew_setSnowModelimport.F90 rename to lis/surfacemodels/land/noahmp.5.0/cplsubLSM/noahmp50_setSnowModelimport.F90 index 9be479cac..64b74e60d 100755 --- a/lis/surfacemodels/land/noahmp.new/cplsubLSM/noahmpnew_setSnowModelimport.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/cplsubLSM/noahmp50_setSnowModelimport.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_setSnowModelimport -! \label{noahmpnew_setSnowModelimport} +! !ROUTINE: noahmp50_setSnowModelimport +! \label{noahmp50_setSnowModelimport} ! ! !REVISION HISTORY: ! 19 Sep 2020: Sujay Kumar; Initial Specification @@ -17,12 +17,12 @@ ! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmpnew_setSnowModelimport(n, SubLSM2LSM_State) +subroutine noahmp50_setSnowModelimport(n, SubLSM2LSM_State) ! !USES: use ESMF use LIS_coreMod use LIS_logMod - use NoahMPnew_lsmMod + use NoahMP50_lsmMod implicit none ! !ARGUMENTS: @@ -40,30 +40,30 @@ subroutine noahmpnew_setSnowModelimport(n, SubLSM2LSM_State) integer :: status call ESMF_StateGet(SubLSM2LSM_State,"Total SWE",sweField,rc=status) - call LIS_verify(status,"noahmpnew_setSnowModelimport: error in swe state get from SnowModel") + call LIS_verify(status,"noahmp50_setSnowModelimport: error in swe state get from SnowModel") call ESMF_StateGet(SubLSM2LSM_State,"Total snowdepth",snwdField,rc=status) - call LIS_verify(status,"noahmpnew_setSnowModelimport: error in snwd state get from SnowModel") + call LIS_verify(status,"noahmp50_setSnowModelimport: error in snwd state get from SnowModel") call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) - call LIS_verify(status,"noahmpnew_setSnowModelimport: error in swe data values") + call LIS_verify(status,"noahmp50_setSnowModelimport: error in swe data values") call ESMF_FieldGet(snwdField,localDE=0,farrayPtr=snwd,rc=status) - call LIS_verify(status,"noahmpnew_setSnowModelimport: error in snwd data values") + call LIS_verify(status,"noahmp50_setSnowModelimport: error in snwd data values") do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) ! SnowModel has its SWE in meters -- conversion here to mm: - dsneqv = (swe(t)*1000.) - NoahMPnew_struc(n)%noahmpnew(t)%sneqv !in mm - dsnowh = snwd(t) - NoahMPnew_struc(n)%noahmpnew(t)%snowh !in m + dsneqv = (swe(t)*1000.) - NoahMP50_struc(n)%noahmp50(t)%sneqv !in mm + dsnowh = snwd(t) - NoahMP50_struc(n)%noahmp50(t)%snowh !in m ! if( dsneqv > 0. .or. dsnowh > 0. ) then -! write(501,*) t, swe(t), noahmpnew_struc(n)%noahmpnew(t)%sneqv, & -! snwd(t), noahmpnew_struc(n)%noahmpnew(t)%snowh +! write(501,*) t, swe(t), noahmp50_struc(n)%noahmp50(t)%sneqv, & +! snwd(t), noahmp50_struc(n)%noahmp50(t)%snowh ! endif ! Update NoahMP's Snow states: - call noahmpnew_snow_update(n, t, dsneqv, dsnowh) + call noahmp50_snow_update(n, t, dsneqv, dsnowh) enddo -end subroutine noahmpnew_setSnowModelimport +end subroutine noahmp50_setSnowModelimport diff --git a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_daveg_Mod.F90 b/lis/surfacemodels/land/noahmp.5.0/da_LAI/noahmp50_daveg_Mod.F90 similarity index 78% rename from lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_daveg_Mod.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_LAI/noahmp50_daveg_Mod.F90 index 917c87b28..e89f7009f 100755 --- a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_daveg_Mod.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_LAI/noahmp50_daveg_Mod.F90 @@ -8,10 +8,10 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- #include "LIS_misc.h" -module noahmpnew_daveg_Mod +module noahmp50_daveg_Mod !BOP ! -! !MODULE: noahmpnew_daveg_Mod +! !MODULE: noahmp50_daveg_Mod ! ! !DESCRIPTION: ! @@ -30,17 +30,17 @@ module noahmpnew_daveg_Mod !----------------------------------------------------------------------------- ! !PUBLIC MEMBER FUNCTIONS: !----------------------------------------------------------------------------- - public :: noahmpnew_daveg_init + public :: noahmp50_daveg_init !EOP contains !BOP ! -! !ROUTINE: noahmpnew_daveg_init -! \label{noahmpnew_daveg_init} +! !ROUTINE: noahmp50_daveg_init +! \label{noahmp50_daveg_init} ! ! !INTERFACE: - subroutine noahmpnew_daveg_init(k) + subroutine noahmp50_daveg_init(k) ! !USES: ! !DESCRIPTION: ! @@ -49,5 +49,5 @@ subroutine noahmpnew_daveg_init(k) implicit none integer, intent(in) :: k - end subroutine noahmpnew_daveg_init -end module noahmpnew_daveg_Mod + end subroutine noahmp50_daveg_init +end module noahmp50_daveg_Mod diff --git a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_descale_veg.F90 b/lis/surfacemodels/land/noahmp.5.0/da_LAI/noahmp50_descale_veg.F90 similarity index 84% rename from lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_descale_veg.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_LAI/noahmp50_descale_veg.F90 index 5b3da8b39..97b64b50a 100755 --- a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_descale_veg.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_LAI/noahmp50_descale_veg.F90 @@ -8,20 +8,20 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_descale_veg -! \label{noahmpnew_descale_veg} +! !ROUTINE: noahmp50_descale_veg +! \label{noahmp50_descale_veg} ! ! !REVISION HISTORY: ! 13 Feb 2020: Sujay Kumar; Initial Specification ! ! !INTERFACE: -subroutine noahmpnew_descale_veg(n, LSM_State, LSM_Incr_State) +subroutine noahmp50_descale_veg(n, LSM_State, LSM_Incr_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_verify - use noahmpnew_lsmMod + use noahmp50_lsmMod implicit none ! !ARGUMENTS: @@ -42,5 +42,5 @@ subroutine noahmpnew_descale_veg(n, LSM_State, LSM_Incr_State) !EOP -end subroutine noahmpnew_descale_veg +end subroutine noahmp50_descale_veg diff --git a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_getLAIpred.F90 b/lis/surfacemodels/land/noahmp.5.0/da_LAI/noahmp50_getLAIpred.F90 similarity index 85% rename from lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_getLAIpred.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_LAI/noahmp50_getLAIpred.F90 index 0c7ce35ec..6ceca1900 100755 --- a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_getLAIpred.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_LAI/noahmp50_getLAIpred.F90 @@ -8,22 +8,22 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_getLAIpred -! \label{noahmpnew_getLAIpred} +! !ROUTINE: noahmp50_getLAIpred +! \label{noahmp50_getLAIpred} ! ! !REVISION HISTORY: ! 13 Feb 2020: Sujay Kumar; Initial Specification ! ! !INTERFACE: -subroutine noahmpnew_getLAIpred(n, k,obs_pred) +subroutine noahmp50_getLAIpred(n, k,obs_pred) ! !USES: use ESMF use LIS_constantsMod use LIS_coreMod use LIS_dataAssimMod use LIS_DAobservationsMod - use noahmpnew_lsmMod - use noahmpnew_dasoilm_Mod + use noahmp50_lsmMod + use noahmp50_dasoilm_Mod !EOP implicit none @@ -51,12 +51,12 @@ subroutine noahmpnew_getLAIpred(n, k,obs_pred) do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) - lai(t) = NoahMPnew_struc(n)%noahmpnew(t)%lai + lai(t) = NoahMP50_struc(n)%noahmp50(t)%lai enddo call LIS_convertPatchSpaceToObsEnsSpace(n,k,& LIS_rc%lsm_index, & lai,& obs_pred) -end subroutine noahmpnew_getLAIpred +end subroutine noahmp50_getLAIpred diff --git a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_getvegvars.F90 b/lis/surfacemodels/land/noahmp.5.0/da_LAI/noahmp50_getvegvars.F90 similarity index 87% rename from lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_getvegvars.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_LAI/noahmp50_getvegvars.F90 index 27cf6875a..d37f19f3a 100755 --- a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_getvegvars.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_LAI/noahmp50_getvegvars.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_getvegvars -! \label{noahmpnew_getvegvars} +! !ROUTINE: noahmp50_getvegvars +! \label{noahmp50_getvegvars} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -17,13 +17,13 @@ ! 1 Aug 2016: Mahdi Navari; Modified for Noahmp401 ! To do: makes it general for x layers (currently hard coded for 4 layers) ! !INTERFACE: -subroutine noahmpnew_getvegvars(n, LSM_State) +subroutine noahmp50_getvegvars(n, LSM_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_verify - use noahmpnew_lsmMod + use noahmp50_lsmMod implicit none ! !ARGUMENTS: @@ -56,8 +56,8 @@ subroutine noahmpnew_getvegvars(n, LSM_State) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - lai(t) = NoahMPnew_struc(n)%noahmpnew(t)%lai + lai(t) = NoahMP50_struc(n)%noahmp50(t)%lai enddo -end subroutine noahmpnew_getvegvars +end subroutine noahmp50_getvegvars diff --git a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_qc_LAIobs.F90 b/lis/surfacemodels/land/noahmp.5.0/da_LAI/noahmp50_qc_LAIobs.F90 similarity index 89% rename from lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_qc_LAIobs.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_LAI/noahmp50_qc_LAIobs.F90 index f1f1d2cf0..c14e44ff5 100755 --- a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_qc_LAIobs.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_LAI/noahmp50_qc_LAIobs.F90 @@ -8,22 +8,22 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_qc_LAIobs -! \label{noahmpnew_qc_LAIobs} +! !ROUTINE: noahmp50_qc_LAIobs +! \label{noahmp50_qc_LAIobs} ! ! !REVISION HISTORY: ! 25Feb2008: Sujay Kumar: Initial Specification ! 1 Aug 2016: Mahdi Navari; Modified for Noahmp401 ! ! !INTERFACE: -subroutine noahmpnew_qc_LAIobs(n,k,OBS_State) +subroutine noahmp50_qc_LAIobs(n,k,OBS_State) ! !USES: use ESMF use LIS_coreMod use LIS_logMod, only : LIS_verify use LIS_constantsMod, only : LIS_CONST_TKFRZ use LIS_DAobservationsMod - use noahmpnew_lsmMod + use noahmp50_lsmMod implicit none @@ -49,5 +49,5 @@ subroutine noahmpnew_qc_LAIobs(n,k,OBS_State) !EOP -end subroutine noahmpnew_qc_LAIobs +end subroutine noahmp50_qc_LAIobs diff --git a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_qcveg.F90 b/lis/surfacemodels/land/noahmp.5.0/da_LAI/noahmp50_qcveg.F90 similarity index 96% rename from lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_qcveg.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_LAI/noahmp50_qcveg.F90 index 031f90018..46743e6ae 100755 --- a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_qcveg.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_LAI/noahmp50_qcveg.F90 @@ -8,20 +8,20 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_qcveg -! \label{noahmpnew_qcveg} +! !ROUTINE: noahmp50_qcveg +! \label{noahmp50_qcveg} ! ! !REVISION HISTORY: ! 13 Feb 2020: Sujay Kumar; Initial Specification ! ! !INTERFACE: -subroutine noahmpnew_qcveg(n, LSM_State) +subroutine noahmp50_qcveg(n, LSM_State) ! !USES: use ESMF use LIS_coreMod use LIS_logMod, only : LIS_verify - use noahmpnew_lsmMod + use noahmp50_lsmMod implicit none ! !ARGUMENTS: @@ -165,5 +165,5 @@ subroutine noahmpnew_qcveg(n, LSM_State) #endif -end subroutine noahmpnew_qcveg +end subroutine noahmp50_qcveg diff --git a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_scale_veg.F90 b/lis/surfacemodels/land/noahmp.5.0/da_LAI/noahmp50_scale_veg.F90 similarity index 85% rename from lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_scale_veg.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_LAI/noahmp50_scale_veg.F90 index 86f31cb22..6beff2750 100755 --- a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_scale_veg.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_LAI/noahmp50_scale_veg.F90 @@ -8,20 +8,20 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_scale_veg -! \label{noahmpnew_scale_veg} +! !ROUTINE: noahmp50_scale_veg +! \label{noahmp50_scale_veg} ! ! !REVISION HISTORY: ! 13 Feb 2020: Sujay Kumar; Initial Specification ! ! !INTERFACE: -subroutine noahmpnew_scale_veg(n, LSM_State) +subroutine noahmp50_scale_veg(n, LSM_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_verify - use noahmpnew_lsmMod + use noahmp50_lsmMod implicit none ! !ARGUMENTS: @@ -41,5 +41,5 @@ subroutine noahmpnew_scale_veg(n, LSM_State) !EOP -end subroutine noahmpnew_scale_veg +end subroutine noahmp50_scale_veg diff --git a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_setvegvars.F90 b/lis/surfacemodels/land/noahmp.5.0/da_LAI/noahmp50_setvegvars.F90 similarity index 86% rename from lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_setvegvars.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_LAI/noahmp50_setvegvars.F90 index 69e775814..0d240773d 100755 --- a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_setvegvars.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_LAI/noahmp50_setvegvars.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_setvegvars -! \label{noahmpnew_setvegvars} +! !ROUTINE: noahmp50_setvegvars +! \label{noahmp50_setvegvars} ! ! !REVISION HISTORY: ! 13 Feb 2020: Sujay Kumar; Initial Specification @@ -28,12 +28,12 @@ ! !INTERFACE: -subroutine noahmpnew_setvegvars(n, LSM_State) +subroutine noahmp50_setvegvars(n, LSM_State) ! !USES: use ESMF use LIS_coreMod use LIS_logMod - use noahmpnew_lsmMod + use noahmp50_lsmMod implicit none ! !ARGUMENTS: @@ -78,12 +78,12 @@ subroutine noahmpnew_setvegvars(n, LSM_State) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - if(NoahMPnew_struc(n)%noahmpnew(t)%param%sla.ne.0) then - NoahMPnew_struc(n)%noahmpnew(t)%lai = lai(t) - lfmass = lai(t)*1000.0/(NoahMPnew_struc(n)%noahmpnew(t)%param%sla) - NoahMPnew_struc(n)%noahmpnew(t)%lfmass = lfmass + if(NoahMP50_struc(n)%noahmp50(t)%param%sla.ne.0) then + NoahMP50_struc(n)%noahmp50(t)%lai = lai(t) + lfmass = lai(t)*1000.0/(NoahMP50_struc(n)%noahmp50(t)%param%sla) + NoahMP50_struc(n)%noahmp50(t)%lfmass = lfmass endif enddo -end subroutine noahmpnew_setvegvars +end subroutine noahmp50_setvegvars diff --git a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_updatevegvars.F90 b/lis/surfacemodels/land/noahmp.5.0/da_LAI/noahmp50_updatevegvars.F90 similarity index 95% rename from lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_updatevegvars.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_LAI/noahmp50_updatevegvars.F90 index e423a5e2c..88308161a 100755 --- a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_updatevegvars.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_LAI/noahmp50_updatevegvars.F90 @@ -8,19 +8,19 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_updatevegvars -! \label{noahmpnew_updatevegvars} +! !ROUTINE: noahmp50_updatevegvars +! \label{noahmp50_updatevegvars} ! ! !REVISION HISTORY: ! 13 Feb 2020: Sujay Kumar; Initial Specification ! ! !INTERFACE: -subroutine noahmpnew_updatevegvars(n, LSM_State, LSM_Incr_State) +subroutine noahmp50_updatevegvars(n, LSM_State, LSM_Incr_State) ! !USES: use ESMF use LIS_coreMod use LIS_logMod - use noahmpnew_lsmMod + use noahmp50_lsmMod implicit none ! !ARGUMENTS: @@ -144,5 +144,5 @@ subroutine noahmpnew_updatevegvars(n, LSM_State, LSM_Incr_State) endif enddo -end subroutine noahmpnew_updatevegvars +end subroutine noahmp50_updatevegvars diff --git a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_veg_DAlog.F90 b/lis/surfacemodels/land/noahmp.5.0/da_LAI/noahmp50_veg_DAlog.F90 similarity index 89% rename from lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_veg_DAlog.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_LAI/noahmp50_veg_DAlog.F90 index 4a3ab144f..0a4fb4fec 100755 --- a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_veg_DAlog.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_LAI/noahmp50_veg_DAlog.F90 @@ -11,7 +11,7 @@ ! 15 Apr 2021: Wanshu Nie; created for Noah-MP4.0.1 ! -subroutine noahmpnew_veg_DAlog(n) +subroutine noahmp50_veg_DAlog(n) ! USES: @@ -21,5 +21,5 @@ subroutine noahmpnew_veg_DAlog(n) ! DESCRIPTION: -end subroutine noahmpnew_veg_DAlog +end subroutine noahmp50_veg_DAlog diff --git a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_write_veg.F90 b/lis/surfacemodels/land/noahmp.5.0/da_LAI/noahmp50_write_veg.F90 similarity index 80% rename from lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_write_veg.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_LAI/noahmp50_write_veg.F90 index 9b6bcd78d..e05dafb70 100755 --- a/lis/surfacemodels/land/noahmp.new/da_LAI/noahmpnew_write_veg.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_LAI/noahmp50_write_veg.F90 @@ -8,20 +8,20 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_write_veg -! \label{noahmpnew_write_veg} +! !ROUTINE: noahmp50_write_veg +! \label{noahmp50_write_veg} ! ! !REVISION HISTORY: ! 13 Feb 2020: Sujay Kumar; Initial Specification ! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmpnew_write_veg(ftn,n, LSM_State) +subroutine noahmp50_write_veg(ftn,n, LSM_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc - use noahmpnew_lsmMod + use noahmp50_lsmMod use LIS_historyMod, only : LIS_writevar_restart implicit none ! !ARGUMENTS: @@ -46,25 +46,25 @@ subroutine noahmpnew_write_veg(ftn,n, LSM_State) allocate(tmp(LIS_rc%npatch(n,LIS_rc%lsm_index))) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(1) + tmp(t) = NoahMP50_struc(n)%noahmp50(t)%smc(1) enddo call LIS_writevar_restart(ftn,n,1,tmp) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(2) + tmp(t) = NoahMP50_struc(n)%noahmp50(t)%smc(2) enddo call LIS_writevar_restart(ftn,n,1,tmp) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(3) + tmp(t) = NoahMP50_struc(n)%noahmp50(t)%smc(3) enddo call LIS_writevar_restart(ftn,n,1,tmp) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(4) + tmp(t) = NoahMP50_struc(n)%noahmp50(t)%smc(4) enddo call LIS_writevar_restart(ftn,n,1,tmp) deallocate(tmp) -end subroutine noahmpnew_write_veg +end subroutine noahmp50_write_veg diff --git a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_dasnodep_Mod.F90 b/lis/surfacemodels/land/noahmp.5.0/da_snodep/noahmp50_dasnodep_Mod.F90 similarity index 77% rename from lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_dasnodep_Mod.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_snodep/noahmp50_dasnodep_Mod.F90 index 82797da00..3ac493dd2 100755 --- a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_dasnodep_Mod.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_snodep/noahmp50_dasnodep_Mod.F90 @@ -8,10 +8,10 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- #include "LIS_misc.h" -module noahmpnew_dasnodep_Mod +module noahmp50_dasnodep_Mod !BOP ! -! !MODULE: noahmpnew_dasnodep_Mod +! !MODULE: noahmp50_dasnodep_Mod ! ! !DESCRIPTION: ! @@ -25,7 +25,7 @@ module noahmpnew_dasnodep_Mod !----------------------------------------------------------------------------- ! !PUBLIC MEMBER FUNCTIONS: !----------------------------------------------------------------------------- - public :: noahmpnew_dasnodep_init + public :: noahmp50_dasnodep_init !----------------------------------------------------------------------------- ! !PUBLIC TYPES: !----------------------------------------------------------------------------- @@ -35,15 +35,15 @@ module noahmpnew_dasnodep_Mod contains !BOP ! -! !ROUTINE: noahmpnew_dasnodep_init -! \label{noahmpnew_dasnodep_init} +! !ROUTINE: noahmp50_dasnodep_init +! \label{noahmp50_dasnodep_init} ! ! !INTERFACE: - subroutine noahmpnew_dasnodep_init() + subroutine noahmp50_dasnodep_init() ! !USES: ! !DESCRIPTION: ! !EOP implicit none - end subroutine noahmpnew_dasnodep_init -end module noahmpnew_dasnodep_Mod + end subroutine noahmp50_dasnodep_init +end module noahmp50_dasnodep_Mod diff --git a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_descale_snodep.F90 b/lis/surfacemodels/land/noahmp.5.0/da_snodep/noahmp50_descale_snodep.F90 similarity index 90% rename from lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_descale_snodep.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_snodep/noahmp50_descale_snodep.F90 index f7b0e03a5..ee3758ea3 100644 --- a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_descale_snodep.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_snodep/noahmp50_descale_snodep.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_descale_snodep -! \label{noahmpnew_descale_snodep} +! !ROUTINE: noahmp50_descale_snodep +! \label{noahmp50_descale_snodep} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -18,12 +18,12 @@ ! 14 Dec 2018: Yeosang Yoon; Modified for NoahMP 4.0.1 ! ! !INTERFACE: -subroutine noahmpnew_descale_snodep(n, LSM_State, LSM_Incr_State) +subroutine noahmp50_descale_snodep(n, LSM_State, LSM_Incr_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc - use noahmpnew_lsmMod + use noahmp50_lsmMod use LIS_logMod implicit none @@ -68,5 +68,5 @@ subroutine noahmpnew_descale_snodep(n, LSM_State, LSM_Incr_State) enddo #endif -end subroutine noahmpnew_descale_snodep +end subroutine noahmp50_descale_snodep diff --git a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_getsnodeppred.F90 b/lis/surfacemodels/land/noahmp.5.0/da_snodep/noahmp50_getsnodeppred.F90 similarity index 83% rename from lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_getsnodeppred.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_snodep/noahmp50_getsnodeppred.F90 index cf6b7d0ca..8a2055bc9 100644 --- a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_getsnodeppred.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_snodep/noahmp50_getsnodeppred.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_getsnodeppred -! \label{noahmpnew_getsnodeppred} +! !ROUTINE: noahmp50_getsnodeppred +! \label{noahmp50_getsnodeppred} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -23,12 +23,12 @@ ! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmpnew_getsnodeppred(n, k, obs_pred) +subroutine noahmp50_getsnodeppred(n, k, obs_pred) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc,LIS_surface - use noahmpnew_lsmMod + use noahmp50_lsmMod use SNODEPobs_Mod, only: SNODEP_obs_obj use LIS_DAobservationsMod @@ -44,9 +44,9 @@ subroutine noahmpnew_getsnodeppred(n, k, obs_pred) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) if (SNODEP_obs_obj(n)%mesh .eq. 8) then - snwd(t) = NoahMPnew_struc(n)%noahmpnew(t)%snowh*39.37 !convert from meter to inch + snwd(t) = NoahMP50_struc(n)%noahmp50(t)%snowh*39.37 !convert from meter to inch elseif (SNODEP_obs_obj(n)%mesh .eq. 16 .or. SNODEP_obs_obj(n)%mesh .eq. 25) then - snwd(t) = NoahMPnew_struc(n)%noahmpnew(t)%snowh + snwd(t) = NoahMP50_struc(n)%noahmp50(t)%snowh endif enddo @@ -55,5 +55,5 @@ subroutine noahmpnew_getsnodeppred(n, k, obs_pred) snwd,& obs_pred) -end subroutine noahmpnew_getsnodeppred +end subroutine noahmp50_getsnodeppred diff --git a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_getsnodepvars.F90 b/lis/surfacemodels/land/noahmp.5.0/da_snodep/noahmp50_getsnodepvars.F90 similarity index 86% rename from lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_getsnodepvars.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_snodep/noahmp50_getsnodepvars.F90 index 7121a6648..b51d5fc3e 100644 --- a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_getsnodepvars.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_snodep/noahmp50_getsnodepvars.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_getsnodepvars -! \label{noahmpnew_getsnodepvars} +! !ROUTINE: noahmp50_getsnodepvars +! \label{noahmp50_getsnodepvars} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -20,12 +20,12 @@ ! May 2023: Cenlin He; Modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmpnew_getsnodepvars(n, LSM_State) +subroutine noahmp50_getsnodepvars(n, LSM_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_verify - use noahmpnew_lsmMod + use noahmp50_lsmMod implicit none ! !ARGUMENTS: @@ -63,8 +63,8 @@ subroutine noahmpnew_getsnodepvars(n, LSM_State) call LIS_verify(status) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - swe(t) = NoahMPnew_struc(n)%noahmpnew(t)%sneqv - snod(t) = NoahMPnew_struc(n)%noahmpnew(t)%snowh + swe(t) = NoahMP50_struc(n)%noahmp50(t)%sneqv + snod(t) = NoahMP50_struc(n)%noahmp50(t)%snowh enddo -end subroutine noahmpnew_getsnodepvars +end subroutine noahmp50_getsnodepvars diff --git a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_map_snodep.F90 b/lis/surfacemodels/land/noahmp.5.0/da_snodep/noahmp50_map_snodep.F90 similarity index 82% rename from lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_map_snodep.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_snodep/noahmp50_map_snodep.F90 index f73175888..f9ede066e 100644 --- a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_map_snodep.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_snodep/noahmp50_map_snodep.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_map_snodep -! \label{noahmpnew_map_snodep} +! !ROUTINE: noahmp50_map_snodep +! \label{noahmp50_map_snodep} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -20,14 +20,14 @@ ! May 2023: Cenlin He; Modified for NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmpnew_map_snodep(n,k,OBS_State,LSM_Incr_State) +subroutine noahmp50_map_snodep(n,k,OBS_State,LSM_Incr_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc, LIS_surface use LIS_constantsMod, only : LIS_CONST_TKFRZ use LIS_logMod, only : LIS_logunit, LIS_verify use LIS_lsmMod - use noahmpnew_lsmMod + use noahmp50_lsmMod implicit none ! !ARGUMENTS: @@ -60,12 +60,12 @@ subroutine noahmpnew_map_snodep(n,k,OBS_State,LSM_Incr_State) integer :: obs_state_count integer :: st_id, en_id character*100,allocatable :: obs_state_objs(:) - real, allocatable :: noahmpnew_swe(:) - real, allocatable :: noahmpnew_snod(:) + real, allocatable :: noahmp50_swe(:) + real, allocatable :: noahmp50_snod(:) real, allocatable :: snod(:) - allocate(noahmpnew_swe(LIS_rc%npatch(n,LIS_rc%lsm_index))) - allocate(noahmpnew_snod(LIS_rc%npatch(n,LIS_rc%lsm_index))) + allocate(noahmp50_swe(LIS_rc%npatch(n,LIS_rc%lsm_index))) + allocate(noahmp50_snod(LIS_rc%npatch(n,LIS_rc%lsm_index))) allocate(snod(LIS_rc%npatch(n,LIS_rc%lsm_index))) call ESMF_StateGet(LSM_Incr_State,"SWE",sweIncrField,rc=status) @@ -94,8 +94,8 @@ subroutine noahmpnew_map_snodep(n,k,OBS_State,LSM_Incr_State) call LIS_verify(status) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - noahmpnew_swe(t) = NoahMPnew_struc(n)%noahmpnew(t)%sneqv - noahmpnew_snod(t) = NoahMPnew_struc(n)%noahmpnew(t)%snowh + noahmp50_swe(t) = NoahMP50_struc(n)%noahmp50(t)%sneqv + noahmp50_snod(t) = NoahMP50_struc(n)%noahmp50(t)%snowh enddo do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) @@ -106,8 +106,8 @@ subroutine noahmpnew_map_snodep(n,k,OBS_State,LSM_Incr_State) ! working with an model grid finer than the observation grid if(snodepobs(st_id).ge.0) then - if(noahmpnew_snod(t).gt.1e-6) then - tmpsneqv = noahmpnew_swe(t)/noahmpnew_snod(t) + if(noahmp50_snod(t).gt.1e-6) then + tmpsneqv = noahmp50_swe(t)/noahmp50_snod(t) else tmpsneqv = 0.0 endif @@ -119,8 +119,8 @@ subroutine noahmpnew_map_snodep(n,k,OBS_State,LSM_Incr_State) if(snod(t).ge.2.54E-3.and.tmpsneqv.lt.0.001) then tmpsneqv = 0.20 endif - sweincr(t) = tmpsneqv*snod(t) - noahmpnew_swe(t) - snodincr(t) = snod(t) - noahmpnew_snod(t) + sweincr(t) = tmpsneqv*snod(t) - noahmp50_swe(t) + snodincr(t) = snod(t) - noahmp50_snod(t) else sweincr(t) = 0 snodincr(t) = 0 @@ -128,9 +128,9 @@ subroutine noahmpnew_map_snodep(n,k,OBS_State,LSM_Incr_State) enddo ! stop deallocate(obs_state_objs) - deallocate(noahmpnew_swe) - deallocate(noahmpnew_snod) + deallocate(noahmp50_swe) + deallocate(noahmp50_snod) deallocate(snod) -end subroutine noahmpnew_map_snodep +end subroutine noahmp50_map_snodep diff --git a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_qc_snodepobs.F90 b/lis/surfacemodels/land/noahmp.5.0/da_snodep/noahmp50_qc_snodepobs.F90 similarity index 84% rename from lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_qc_snodepobs.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_snodep/noahmp50_qc_snodepobs.F90 index f98e30962..7936d803e 100755 --- a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_qc_snodepobs.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_snodep/noahmp50_qc_snodepobs.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_qc_snodepobs -! \label{noahmpnew_qc_snodepobs} +! !ROUTINE: noahmp50_qc_snodepobs +! \label{noahmp50_qc_snodepobs} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -22,14 +22,14 @@ ! May 2023: Cenlin He; Modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmpnew_qc_snodepobs(n,k,OBS_State) +subroutine noahmp50_qc_snodepobs(n,k,OBS_State) ! !USES: use ESMF use LIS_coreMod use LIS_logMod, only : LIS_verify use LIS_constantsMod, only : LIS_CONST_TKFRZ use LIS_DAobservationsMod - use noahmpnew_lsmMod + use noahmp50_lsmMod implicit none ! !ARGUMENTS: @@ -66,21 +66,21 @@ subroutine noahmpnew_qc_snodepobs(n,k,OBS_State) call ESMF_StateGet(OBS_State,"Observation01",obs_snow_field,rc=status) call LIS_verify(status,& - "ESMF_StateGet failed in noahmpnew_qc_snodepobs") + "ESMF_StateGet failed in noahmp50_qc_snodepobs") call ESMF_FieldGet(obs_snow_field,localDE=0,farrayPtr=snowobs,rc=status) call LIS_verify(status,& - "ESMF_FieldGet failed in noahmpnew_qc_snodepobs") + "ESMF_FieldGet failed in noahmp50_qc_snodepobs") do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) - !stc1(t) = NoahMPnew_struc(n)%noahmpnew(t)%sstc(1) ! get snow/veg temp. - stc1(t) = NoahMPnew_struc(n)%noahmpnew(t)%tslb(1) ! get snow/veg temp. + !stc1(t) = NoahMP50_struc(n)%noahmp50(t)%sstc(1) ! get snow/veg temp. + stc1(t) = NoahMP50_struc(n)%noahmp50(t)%tslb(1) ! get snow/veg temp. vegt(t) = LIS_surface(n,1)%tile(t)%vegt enddo call LIS_convertPatchSpaceToObsSpace(n,k,& - LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew(:)%tv,tv_obs) !tv: vegetation temperature. unit: K + LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50(:)%tv,tv_obs) !tv: vegetation temperature. unit: K call LIS_convertPatchSpaceToObsSpace(n,k,LIS_rc%lsm_index, & !fveg: green vegetation fraction. unit: - - NoahMPnew_struc(n)%noahmpnew(:)%fveg,fveg_obs) + NoahMP50_struc(n)%noahmp50(:)%fveg,fveg_obs) call LIS_convertPatchSpaceToObsSpace(n,k,& LIS_rc%lsm_index,stc1,stc1_obs) @@ -102,5 +102,5 @@ subroutine noahmpnew_qc_snodepobs(n,k,OBS_State) ! endif ! enddo -end subroutine noahmpnew_qc_snodepobs +end subroutine noahmp50_qc_snodepobs diff --git a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_qcsnodep.F90 b/lis/surfacemodels/land/noahmp.5.0/da_snodep/noahmp50_qcsnodep.F90 similarity index 89% rename from lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_qcsnodep.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_snodep/noahmp50_qcsnodep.F90 index a8eb4e391..6e8dd1300 100644 --- a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_qcsnodep.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_snodep/noahmp50_qcsnodep.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_qcsnodep -! \label{noahmpnew_qcsnow} +! !ROUTINE: noahmp50_qcsnodep +! \label{noahmp50_qcsnow} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -23,12 +23,12 @@ ! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmpnew_qcsnodep(n, LSM_State) +subroutine noahmp50_qcsnodep(n, LSM_State) ! !USES: use ESMF use LIS_coreMod - use noahmpnew_lsmMod + use noahmp50_lsmMod use LIS_logMod implicit none @@ -99,8 +99,8 @@ subroutine noahmpnew_qcsnodep(n, LSM_State) !Use the model's snow density from the previous timestep sndens = 0.0 - if(NoahMPnew_struc(n)%noahmpnew(t)%snowh.gt.0) then - sndens = NoahMPnew_struc(n)%noahmpnew(t)%sneqv/NoahMPnew_struc(n)%noahmpnew(t)%snowh + if(NoahMP50_struc(n)%noahmp50(t)%snowh.gt.0) then + sndens = NoahMP50_struc(n)%noahmp50(t)%sneqv/NoahMP50_struc(n)%noahmp50(t)%snowh endif !If the update is unphysical, do not update. @@ -108,8 +108,8 @@ subroutine noahmpnew_qcsnodep(n, LSM_State) snod(t) = snod(t) swe(t) = snod(t)*sndens else ! do not update - snod(t) = NoahMPnew_struc(n)%noahmpnew(t)%snowh - swe(t) = NoahMPnew_struc(n)%noahmpnew(t)%sneqv + snod(t) = NoahMP50_struc(n)%noahmp50(t)%snowh + swe(t) = NoahMP50_struc(n)%noahmp50(t)%sneqv end if if(swe(t).gt.swemax) then @@ -121,5 +121,5 @@ subroutine noahmpnew_qcsnodep(n, LSM_State) end do -end subroutine noahmpnew_qcsnodep +end subroutine noahmp50_qcsnodep diff --git a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_scale_snodep.F90 b/lis/surfacemodels/land/noahmp.5.0/da_snodep/noahmp50_scale_snodep.F90 similarity index 91% rename from lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_scale_snodep.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_snodep/noahmp50_scale_snodep.F90 index 69cd80134..d26a63d10 100644 --- a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_scale_snodep.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_snodep/noahmp50_scale_snodep.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_scale_snodep -! \label{noahmpnew_scale_snodep} +! !ROUTINE: noahmp50_scale_snodep +! \label{noahmp50_scale_snodep} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -20,12 +20,12 @@ ! May 2023: Cenlin He; Modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmpnew_scale_snodep(n, LSM_State) +subroutine noahmp50_scale_snodep(n, LSM_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc - use noahmpnew_lsmMod + use noahmp50_lsmMod use LIS_logMod implicit none @@ -69,5 +69,5 @@ subroutine noahmpnew_scale_snodep(n, LSM_State) enddo #endif -end subroutine noahmpnew_scale_snodep +end subroutine noahmp50_scale_snodep diff --git a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_setsnodepvars.F90 b/lis/surfacemodels/land/noahmp.5.0/da_snodep/noahmp50_setsnodepvars.F90 similarity index 87% rename from lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_setsnodepvars.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_snodep/noahmp50_setsnodepvars.F90 index 5e52df310..1237965b0 100644 --- a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_setsnodepvars.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_snodep/noahmp50_setsnodepvars.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_setsnodepvars -! \label{noahmpnew_setsnodepvars} +! !ROUTINE: noahmp50_setsnodepvars +! \label{noahmp50_setsnodepvars} ! ! !REVISION HISTORY: ! 15 Aug 2017: Sujay Kumar; Initial Specification @@ -25,13 +25,13 @@ ! May 2023: Cenlin He; Modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmpnew_setsnodepvars(n, LSM_State) +subroutine noahmp50_setsnodepvars(n, LSM_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc, LIS_domain, LIS_surface use LIS_logMod, only : LIS_logunit, LIS_verify use LIS_snowMod, only : LIS_snow_struc - use noahmpnew_lsmMod + use noahmp50_lsmMod implicit none ! !ARGUMENTS: @@ -68,11 +68,11 @@ subroutine noahmpnew_setsnodepvars(n, LSM_State) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - dsneqv = swe(t) - NoahMPnew_struc(n)%noahmpnew(t)%sneqv !in mm - dsnowh = snod(t) - NoahMPnew_struc(n)%noahmpnew(t)%snowh !in m + dsneqv = swe(t) - NoahMP50_struc(n)%noahmp50(t)%sneqv !in mm + dsnowh = snod(t) - NoahMP50_struc(n)%noahmp50(t)%snowh !in m ! update - call noahmpnew_snodep_update(n, t, dsneqv, dsnowh) + call noahmp50_snodep_update(n, t, dsneqv, dsnowh) enddo @@ -86,7 +86,7 @@ subroutine noahmpnew_setsnodepvars(n, LSM_State) do t = 1, LIS_rc%npatch(n, LIS_rc%lsm_index) tid = LIS_surface(n, LIS_rc%lsm_index)%tile(t)%tile_id LIS_snow_struc(n)%sneqv(tid) = LIS_snow_struc(n)%sneqv(tid) + & - NoahMPnew_struc(n)%noahmpnew(t)%sneqv + NoahMP50_struc(n)%noahmp50(t)%sneqv end do ! Collect mean snow depth at grid points @@ -94,7 +94,7 @@ subroutine noahmpnew_setsnodepvars(n, LSM_State) gid = LIS_surface(n,LIS_rc%lsm_index)%tile(t)%index LIS_snow_struc(n)%snowdepth(gid) = & LIS_snow_struc(n)%snowdepth(gid) + & - NoahMPnew_struc(n)%noahmpnew(t)%snowh + NoahMP50_struc(n)%noahmp50(t)%snowh ncount(gid) = ncount(gid) + 1 end do do t = 1, LIS_rc%ngrid(n) @@ -107,6 +107,6 @@ subroutine noahmpnew_setsnodepvars(n, LSM_State) end do end if -end subroutine noahmpnew_setsnodepvars +end subroutine noahmp50_setsnodepvars diff --git a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_snodep_update.F90 b/lis/surfacemodels/land/noahmp.5.0/da_snodep/noahmp50_snodep_update.F90 similarity index 77% rename from lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_snodep_update.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_snodep/noahmp50_snodep_update.F90 index 172c6ad60..4074f0542 100644 --- a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_snodep_update.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_snodep/noahmp50_snodep_update.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_snodep_update -! \label{noahmpnew_snodep_update} +! !ROUTINE: noahmp50_snodep_update +! \label{noahmp50_snodep_update} ! ! !REVISION HISTORY: ! 13 Aug 2017: Sujay Kumar; Initial specification @@ -17,11 +17,11 @@ ! May 2023: Cenlin He; Modified for refactored NoahMP v5 and later ! ! !INTERFACE -subroutine noahmpnew_snodep_update(n, t, dsneqv, dsnowh) +subroutine noahmp50_snodep_update(n, t, dsneqv, dsnowh) use LIS_coreMod - use NoahMPnew_lsmMod - use NoahMPnew_snowphys_updateMod + use NoahMP50_lsmMod + use NoahMP50_snowphys_updateMod implicit none ! @@ -70,9 +70,9 @@ subroutine noahmpnew_snodep_update(n, t, dsneqv, dsnowh) ! local real :: SNOFLOW, BDSNOW - isnow = NoahMPnew_struc(n)%noahmpnew(t)%isnow - nsoil = NoahMPnew_struc(n)%nsoil - nsnow = NoahMPnew_struc(n)%nsnow + isnow = NoahMP50_struc(n)%noahmp50(t)%isnow + nsoil = NoahMP50_struc(n)%nsoil + nsnow = NoahMP50_struc(n)%nsnow allocate(ficeold(-nsnow+1:0)) allocate(snice(-nsnow+1:0)) @@ -101,17 +101,17 @@ subroutine noahmpnew_snodep_update(n, t, dsneqv, dsnowh) enddo ! initialize the variables - soiltype = NoahMPnew_struc(n)%noahmpnew(t)%soiltype + soiltype = NoahMP50_struc(n)%noahmp50(t)%soiltype do isoil = 1, size(soiltype) - BEXP(isoil) = NoahmpNew_struc(n)%noahmpnew(t)%param%BEXP(isoil) - PSISAT(isoil) = NoahmpNew_struc(n)%noahmpnew(t)%param%PSISAT(isoil) - SMCMAX(isoil) = NoahmpNew_struc(n)%noahmpnew(t)%param%SMCMAX(isoil) + BEXP(isoil) = Noahmp50_struc(n)%noahmp50(t)%param%BEXP(isoil) + PSISAT(isoil) = Noahmp50_struc(n)%noahmp50(t)%param%PSISAT(isoil) + SMCMAX(isoil) = Noahmp50_struc(n)%noahmp50(t)%param%SMCMAX(isoil) end do - sneqv = NoahMPnew_struc(n)%noahmpnew(t)%sneqv - snowh = NoahMPnew_struc(n)%noahmpnew(t)%snowh + sneqv = NoahMP50_struc(n)%noahmp50(t)%sneqv + snowh = NoahMP50_struc(n)%noahmp50(t)%snowh - zsnso(-nsnow+1:nsoil) = NoahMPnew_struc(n)%noahmpnew(t)%zss(1:nsnow+nsoil) + zsnso(-nsnow+1:nsoil) = NoahMP50_struc(n)%noahmp50(t)%zss(1:nsnow+nsoil) ! snow/soil layer thickness (m) do iz = isnow+1, nsoil @@ -125,22 +125,22 @@ subroutine noahmpnew_snodep_update(n, t, dsneqv, dsnowh) ! set ZSOIL allocate(zsoil(nsoil)) ! zsoil is negative. - zsoil(1) = -NoahMPnew_struc(n)%sldpth(1) + zsoil(1) = -NoahMP50_struc(n)%sldpth(1) do i = 2, nsoil - zsoil(i) = zsoil(i-1) - NoahMPnew_struc(n)%sldpth(i) + zsoil(i) = zsoil(i-1) - NoahMP50_struc(n)%sldpth(i) enddo ! state variables snice(-nsnow+1:0) = & - NoahMPnew_struc(n)%noahmpnew(t)%snowice(1:nsnow) + NoahMP50_struc(n)%noahmp50(t)%snowice(1:nsnow) snliq(-nsnow+1:0) = & - NoahMPnew_struc(n)%noahmpnew(t)%snowliq(1:nsnow) + NoahMP50_struc(n)%noahmp50(t)%snowliq(1:nsnow) stc(-nsnow+1:0) = & - NoahMPnew_struc(n)%noahmpnew(t)%tsno(1:nsnow) + NoahMP50_struc(n)%noahmp50(t)%tsno(1:nsnow) ! soil temperature stc(1:nsoil) = & - NoahMPnew_struc(n)%noahmpnew(t)%tslb(1:nsoil) + NoahMP50_struc(n)%noahmp50(t)%tslb(1:nsoil) ! from snowfall routine @@ -158,7 +158,7 @@ subroutine noahmpnew_snodep_update(n, t, dsneqv, dsnowh) NEWNODE = 1 DZSNSO(0)= SNOWH SNOWH = 0. - STC(0) = MIN(273.16, NoahMPnew_struc(n)%noahmpnew(t)%sfctmp) ! temporary setup + STC(0) = MIN(273.16, NoahMP50_struc(n)%noahmp50(t)%sfctmp) ! temporary setup SNICE(0) = SNEQV SNLIQ(0) = 0. END IF @@ -203,8 +203,8 @@ subroutine noahmpnew_snodep_update(n, t, dsneqv, dsnowh) endif enddo - sice(:) = max(0.0, NoahMPnew_struc(n)%noahmpnew(t)%smc(:)& - - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(:)) + sice(:) = max(0.0, NoahMP50_struc(n)%noahmp50(t)%smc(:)& + - NoahMP50_struc(n)%noahmp50(t)%sh2o(:)) !imelt do j = -nsnow+1, nsoil @@ -217,9 +217,9 @@ subroutine noahmpnew_snodep_update(n, t, dsneqv, dsnowh) end do do j = 1, nsoil ! soil - mliq(j) = NoahMPnew_struc(n)%noahmpnew(t)%sh2o(j) * dzsnso(j) * 1000. - mice(j) = (NoahMPnew_struc(n)%noahmpnew(t)%smc(j) - & - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(j)) * dzsnso(j) * 1000. + mliq(j) = NoahMP50_struc(n)%noahmp50(t)%sh2o(j) * dzsnso(j) * 1000. + mice(j) = (NoahMP50_struc(n)%noahmp50(t)%smc(j) - & + NoahMP50_struc(n)%noahmp50(t)%sh2o(j)) * dzsnso(j) * 1000. end do do j = isnow+1,nsoil ! all layers @@ -237,9 +237,9 @@ subroutine noahmpnew_snodep_update(n, t, dsneqv, dsnowh) ! end if ! if (opt_frz == 2) then ! call frh2o (supercool(j),& -! NoahMPnew_struc(n)%noahmpnew(t)%sstc(j),& -! NoahMPnew_struc(n)%noahmpnew(t)%smc(j),& -! NoahMPnew_struc(n)%noahmpnew(t)%sh2o(j)) +! NoahMP50_struc(n)%noahmp50(t)%sstc(j),& +! NoahMP50_struc(n)%noahmp50(t)%smc(j),& +! NoahMP50_struc(n)%noahmp50(t)%sh2o(j)) ! supercool(j) = supercool(j)*dzsnso(j)*1000. !(mm) ! end if enddo @@ -267,18 +267,18 @@ subroutine noahmpnew_snodep_update(n, t, dsneqv, dsnowh) ponding2 = 0.0 if(isnow < 0) & ! when multi-layer - call compact (NoahmpNew_struc(n)%noahmpnew(t)%param, & - nsnow, nsoil, NoahMPnew_struc(n)%ts, & !in + call compact (Noahmp50_struc(n)%noahmp50(t)%param, & + nsnow, nsoil, NoahMP50_struc(n)%ts, & !in stc, snice, snliq, zsoil, imelt, ficeold, iloc, jloc, & !in isnow, dzsnso ,zsnso) !inout if(isnow < 0) & - call combine (NoahmpNew_struc(n)%noahmpnew(t)%param, & + call combine (Noahmp50_struc(n)%noahmp50(t)%param, & nsnow, nsoil ,iloc, jloc, & !in - isnow, NoahMPnew_struc(n)%noahmpnew(t)%sh2o, & !inout + isnow, NoahMP50_struc(n)%noahmp50(t)%sh2o, & !inout stc, snice, snliq, dzsnso, sice, snowh, sneqv, & !inout ponding1, ponding2) !out if(isnow < 0) & - call divide (NoahmpNew_struc(n)%noahmpnew(t)%param, nsnow, nsoil, & !in + call divide (Noahmp50_struc(n)%noahmp50(t)%param, nsnow, nsoil, & !in isnow, stc, snice, snliq, dzsnso) !inout !set empty snow layers to zero @@ -343,15 +343,15 @@ subroutine noahmpnew_snodep_update(n, t, dsneqv, dsnowh) END IF ! update state vars - NoahMPnew_struc(n)%noahmpnew(t)%isnow = isnow - NoahMPnew_struc(n)%noahmpnew(t)%sneqv = sneqv - NoahMPnew_struc(n)%noahmpnew(t)%snowh = snowh + NoahMP50_struc(n)%noahmp50(t)%isnow = isnow + NoahMP50_struc(n)%noahmp50(t)%sneqv = sneqv + NoahMP50_struc(n)%noahmp50(t)%snowh = snowh - NoahMPnew_struc(n)%noahmpnew(t)%zss(1:nsnow+nsoil) = zsnso(-nsnow+1:nsoil) - NoahMPnew_struc(n)%noahmpnew(t)%snowice(1:nsnow) = snice(-nsnow+1:0) - NoahMPnew_struc(n)%noahmpnew(t)%snowliq(1:nsnow) = snliq(-nsnow+1:0) - NoahMPnew_struc(n)%noahmpnew(t)%tsno(1:nsnow) = stc(-nsnow+1:0) - NoahMPnew_struc(n)%noahmpnew(t)%tslb(1:nsoil) = stc(1:nsoil) + NoahMP50_struc(n)%noahmp50(t)%zss(1:nsnow+nsoil) = zsnso(-nsnow+1:nsoil) + NoahMP50_struc(n)%noahmp50(t)%snowice(1:nsnow) = snice(-nsnow+1:0) + NoahMP50_struc(n)%noahmp50(t)%snowliq(1:nsnow) = snliq(-nsnow+1:0) + NoahMP50_struc(n)%noahmp50(t)%tsno(1:nsnow) = stc(-nsnow+1:0) + NoahMP50_struc(n)%noahmp50(t)%tslb(1:nsoil) = stc(1:nsoil) deallocate(ficeold) deallocate(snice) @@ -368,5 +368,5 @@ subroutine noahmpnew_snodep_update(n, t, dsneqv, dsnowh) deallocate(psisat) deallocate(smcmax) -end subroutine noahmpnew_snodep_update +end subroutine noahmp50_snodep_update diff --git a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_transform_snodep.F90 b/lis/surfacemodels/land/noahmp.5.0/da_snodep/noahmp50_transform_snodep.F90 similarity index 84% rename from lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_transform_snodep.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_snodep/noahmp50_transform_snodep.F90 index 11f248e03..b9e920811 100755 --- a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_transform_snodep.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_snodep/noahmp50_transform_snodep.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_transform_snodep -! \label{noahmpnew_transform_snodep} +! !ROUTINE: noahmp50_transform_snodep +! \label{noahmp50_transform_snodep} ! ! !REVISION HISTORY: ! 25Jun2006: Sujay Kumar: Initial Specification @@ -20,13 +20,13 @@ ! May 2023: Cenlin He; Modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmpnew_transform_snodep(n,OBS_State) +subroutine noahmp50_transform_snodep(n,OBS_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_verify - use noahmpnew_lsmMod + use noahmp50_lsmMod use SNODEPobs_Mod, only : SNODEP_obs_obj !EOP implicit none @@ -53,12 +53,12 @@ subroutine noahmpnew_transform_snodep(n,OBS_State) call ESMF_AttributeGet(OBS_State,name="Number Of Observations",& value=N_obs_size,rc=status) - call LIS_verify(status, 'attributeget error in noahmpnew_transform_snodep') + call LIS_verify(status, 'attributeget error in noahmp50_transform_snodep') call ESMF_StateGet(OBS_State,"Observation01",obs_snodep_field,& rc=status) - call LIS_verify(status,'stateget error in noahmpnew_transform_snodep') + call LIS_verify(status,'stateget error in noahmp50_transform_snodep') call ESMF_FieldGet(obs_snodep_field,localDE=0,farrayPtr=snodepobs,rc=status) - call LIS_verify(status,'fieldget error in noahmpnew_transform_snodep') + call LIS_verify(status,'fieldget error in noahmp50_transform_snodep') ! If using 8th mesh SNODEP data, convert it from inches to meters. ! 16th mesh SNODEP data are already in meters. @@ -72,4 +72,4 @@ subroutine noahmpnew_transform_snodep(n,OBS_State) endif enddo endif -end subroutine noahmpnew_transform_snodep +end subroutine noahmp50_transform_snodep diff --git a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_updatesnodepvars.F90 b/lis/surfacemodels/land/noahmp.5.0/da_snodep/noahmp50_updatesnodepvars.F90 similarity index 91% rename from lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_updatesnodepvars.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_snodep/noahmp50_updatesnodepvars.F90 index eff9b6a1b..b87aee58a 100644 --- a/lis/surfacemodels/land/noahmp.new/da_snodep/noahmpnew_updatesnodepvars.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_snodep/noahmp50_updatesnodepvars.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_updatesnodepvars -! \label{noahmpnew_updatesnodepvars} +! !ROUTINE: noahmp50_updatesnodepvars +! \label{noahmp50_updatesnodepvars} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -20,11 +20,11 @@ ! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmpnew_updatesnodepvars(n, LSM_State, LSM_Incr_State) +subroutine noahmp50_updatesnodepvars(n, LSM_State, LSM_Incr_State) ! !USES: use ESMF use LIS_coreMod - use noahmpnew_lsmMod + use noahmp50_lsmMod use LIS_logMod, only : LIS_logunit, LIS_verify implicit none @@ -146,8 +146,8 @@ subroutine noahmpnew_updatesnodepvars(n, LSM_State, LSM_Incr_State) !Use the model's snow density from the previous timestep sndens = 0.0 - if(NoahMPnew_struc(n)%noahmpnew(t)%snowh.gt.0) then - sndens = NoahMPnew_struc(n)%noahmpnew(t)%sneqv/NoahMPnew_struc(n)%noahmpnew(t)%snowh + if(NoahMP50_struc(n)%noahmp50(t)%snowh.gt.0) then + sndens = NoahMP50_struc(n)%noahmp50(t)%sneqv/NoahMP50_struc(n)%noahmp50(t)%snowh endif if(update_flag(gid)) then @@ -162,11 +162,11 @@ subroutine noahmpnew_updatesnodepvars(n, LSM_State, LSM_Incr_State) swe(t) = swetmp endif else ! do not update - snod(t) = NoahMPnew_struc(n)%noahmpnew(t)%snowh - swe(t) = NoahMPnew_struc(n)%noahmpnew(t)%sneqv + snod(t) = NoahMP50_struc(n)%noahmp50(t)%snowh + swe(t) = NoahMP50_struc(n)%noahmp50(t)%sneqv end if enddo -end subroutine noahmpnew_updatesnodepvars +end subroutine noahmp50_updatesnodepvars diff --git a/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_dasnow_Mod.F90 b/lis/surfacemodels/land/noahmp.5.0/da_snow/noahmp50_dasnow_Mod.F90 similarity index 78% rename from lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_dasnow_Mod.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_snow/noahmp50_dasnow_Mod.F90 index a04fbf6f7..da42f7e42 100755 --- a/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_dasnow_Mod.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_snow/noahmp50_dasnow_Mod.F90 @@ -8,10 +8,10 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- #include "LIS_misc.h" -module noahmpnew_dasnow_Mod +module noahmp50_dasnow_Mod !BOP ! -! !MODULE: noahmpnew_dasnow_Mod +! !MODULE: noahmp50_dasnow_Mod ! ! !DESCRIPTION: ! @@ -25,7 +25,7 @@ module noahmpnew_dasnow_Mod !----------------------------------------------------------------------------- ! !PUBLIC MEMBER FUNCTIONS: !----------------------------------------------------------------------------- - public :: noahmpnew_dasnow_init + public :: noahmp50_dasnow_init !----------------------------------------------------------------------------- ! !PUBLIC TYPES: !----------------------------------------------------------------------------- @@ -35,15 +35,15 @@ module noahmpnew_dasnow_Mod contains !BOP ! -! !ROUTINE: noahmpnew_dasnow_init -! \label{noahmpnew_dasnow_init} +! !ROUTINE: noahmp50_dasnow_init +! \label{noahmp50_dasnow_init} ! ! !INTERFACE: - subroutine noahmpnew_dasnow_init() + subroutine noahmp50_dasnow_init() ! !USES: ! !DESCRIPTION: ! !EOP implicit none - end subroutine noahmpnew_dasnow_init -end module noahmpnew_dasnow_Mod + end subroutine noahmp50_dasnow_init +end module noahmp50_dasnow_Mod diff --git a/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_descale_snow.F90 b/lis/surfacemodels/land/noahmp.5.0/da_snow/noahmp50_descale_snow.F90 similarity index 88% rename from lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_descale_snow.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_snow/noahmp50_descale_snow.F90 index ed9fda131..5dcf40e22 100755 --- a/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_descale_snow.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_snow/noahmp50_descale_snow.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_descale_snow -! \label{noahmpnew_descale_snow} +! !ROUTINE: noahmp50_descale_snow +! \label{noahmp50_descale_snow} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -20,12 +20,12 @@ ! 13 Dec 2019: Eric Kemp; Replaced LDTSI with SNOW ! ! !INTERFACE: -subroutine noahmpnew_descale_snow(n, LSM_State, LSM_Incr_State) +subroutine noahmp50_descale_snow(n, LSM_State, LSM_Incr_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc - use noahmpnew_lsmMod + use noahmp50_lsmMod use LIS_logMod implicit none @@ -55,5 +55,5 @@ subroutine noahmpnew_descale_snow(n, LSM_State, LSM_Incr_State) real, pointer :: snod(:) -end subroutine noahmpnew_descale_snow +end subroutine noahmp50_descale_snow diff --git a/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_getsnowpred.F90 b/lis/surfacemodels/land/noahmp.5.0/da_snow/noahmp50_getsnowpred.F90 similarity index 87% rename from lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_getsnowpred.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_snow/noahmp50_getsnowpred.F90 index a4861f671..a4fc7cddd 100755 --- a/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_getsnowpred.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_snow/noahmp50_getsnowpred.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_getsnowpred -! \label{noahmpnew_getsnowpred} +! !ROUTINE: noahmp50_getsnowpred +! \label{noahmp50_getsnowpred} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -25,12 +25,12 @@ ! May 2023: Cenlin He; Modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmpnew_getsnowpred(n, k, obs_pred) +subroutine noahmp50_getsnowpred(n, k, obs_pred) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc,LIS_surface - use noahmpnew_lsmMod + use noahmp50_lsmMod use LIS_DAobservationsMod implicit none @@ -48,7 +48,7 @@ subroutine noahmpnew_getsnowpred(n, k, obs_pred) integer :: t do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - snwd(t) = NoahMPnew_struc(n)%noahmpnew(t)%snowh ! Keep in meters + snwd(t) = NoahMP50_struc(n)%noahmp50(t)%snowh ! Keep in meters enddo call LIS_convertPatchSpaceToObsEnsSpace(n,k,& @@ -56,5 +56,5 @@ subroutine noahmpnew_getsnowpred(n, k, obs_pred) snwd,& obs_pred) -end subroutine noahmpnew_getsnowpred +end subroutine noahmp50_getsnowpred diff --git a/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_getsnowvars.F90 b/lis/surfacemodels/land/noahmp.5.0/da_snow/noahmp50_getsnowvars.F90 similarity index 87% rename from lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_getsnowvars.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_snow/noahmp50_getsnowvars.F90 index 372e7fe80..1b5eec7b5 100755 --- a/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_getsnowvars.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_snow/noahmp50_getsnowvars.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_getsnowvars -! \label{noahmpnew_getsnowvars} +! !ROUTINE: noahmp50_getsnowvars +! \label{noahmp50_getsnowvars} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -23,12 +23,12 @@ ! ! !INTERFACE: ! -subroutine noahmpnew_getsnowvars(n, LSM_State) +subroutine noahmp50_getsnowvars(n, LSM_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_verify - use noahmpnew_lsmMod + use noahmp50_lsmMod implicit none ! !ARGUMENTS: @@ -66,8 +66,8 @@ subroutine noahmpnew_getsnowvars(n, LSM_State) call LIS_verify(status) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - swe(t) = NoahMPnew_struc(n)%noahmpnew(t)%sneqv - snod(t) = NoahMPnew_struc(n)%noahmpnew(t)%snowh + swe(t) = NoahMP50_struc(n)%noahmp50(t)%sneqv + snod(t) = NoahMP50_struc(n)%noahmp50(t)%snowh enddo -end subroutine noahmpnew_getsnowvars +end subroutine noahmp50_getsnowvars diff --git a/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_getswepred.F90 b/lis/surfacemodels/land/noahmp.5.0/da_snow/noahmp50_getswepred.F90 similarity index 83% rename from lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_getswepred.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_snow/noahmp50_getswepred.F90 index 3a162a739..8e35a1cdd 100644 --- a/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_getswepred.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_snow/noahmp50_getswepred.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_getswepred -! \label{noahmpnew_getswepred} +! !ROUTINE: noahmp50_getswepred +! \label{noahmp50_getswepred} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -18,12 +18,12 @@ ! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmpnew_getswepred(n, k, obs_pred) +subroutine noahmp50_getswepred(n, k, obs_pred) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc,LIS_surface - use noahmpnew_lsmMod + use noahmp50_lsmMod use LIS_DAobservationsMod implicit none @@ -37,7 +37,7 @@ subroutine noahmpnew_getswepred(n, k, obs_pred) integer :: t do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - swe(t) = NoahMPnew_struc(n)%noahmpnew(t)%sneqv !obs in mm + swe(t) = NoahMP50_struc(n)%noahmp50(t)%sneqv !obs in mm enddo call LIS_convertPatchSpaceToObsEnsSpace(n,k,& @@ -45,5 +45,5 @@ subroutine noahmpnew_getswepred(n, k, obs_pred) swe,& obs_pred) -end subroutine noahmpnew_getswepred +end subroutine noahmp50_getswepred diff --git a/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_qc_snowobs.F90 b/lis/surfacemodels/land/noahmp.5.0/da_snow/noahmp50_qc_snowobs.F90 similarity index 85% rename from lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_qc_snowobs.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_snow/noahmp50_qc_snowobs.F90 index bf1636b8a..7911bd961 100755 --- a/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_qc_snowobs.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_snow/noahmp50_qc_snowobs.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_qc_snowobs -! \label{noahmpnew_qc_snowobs} +! !ROUTINE: noahmp50_qc_snowobs +! \label{noahmp50_qc_snowobs} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -24,14 +24,14 @@ ! May 2023: Cenlin He; modified for NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmpnew_qc_snowobs(n,k,OBS_State) +subroutine noahmp50_qc_snowobs(n,k,OBS_State) ! !USES: use ESMF use LIS_coreMod use LIS_logMod, only : LIS_verify use LIS_constantsMod, only : LIS_CONST_TKFRZ use LIS_DAobservationsMod - use noahmpnew_lsmMod + use noahmp50_lsmMod implicit none ! !ARGUMENTS: @@ -68,21 +68,21 @@ subroutine noahmpnew_qc_snowobs(n,k,OBS_State) call ESMF_StateGet(OBS_State,"Observation01",obs_snow_field,rc=status) call LIS_verify(status,& - "ESMF_StateGet failed in noahmpnew_qc_snowobs") + "ESMF_StateGet failed in noahmp50_qc_snowobs") call ESMF_FieldGet(obs_snow_field,localDE=0,farrayPtr=snowobs,rc=status) call LIS_verify(status,& - "ESMF_FieldGet failed in noahmpnew_qc_snowobs") + "ESMF_FieldGet failed in noahmp50_qc_snowobs") do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) - !stc1(t) = NoahMPnew_struc(n)%noahmpnew(t)%sstc(1) ! get snow/veg temp. - stc1(t) = NoahMPnew_struc(n)%noahmpnew(t)%tslb(1) ! get snow/veg temp. + !stc1(t) = NoahMP50_struc(n)%noahmp50(t)%sstc(1) ! get snow/veg temp. + stc1(t) = NoahMP50_struc(n)%noahmp50(t)%tslb(1) ! get snow/veg temp. vegt(t) = LIS_surface(n,1)%tile(t)%vegt enddo call LIS_convertPatchSpaceToObsSpace(n,k,& - LIS_rc%lsm_index, NoahMPnew_struc(n)%noahmpnew(:)%tv,tv_obs) !tv: vegetation temperature. unit: K + LIS_rc%lsm_index, NoahMP50_struc(n)%noahmp50(:)%tv,tv_obs) !tv: vegetation temperature. unit: K call LIS_convertPatchSpaceToObsSpace(n,k,LIS_rc%lsm_index, & !fveg: green vegetation fraction. unit: - - NoahMPnew_struc(n)%noahmpnew(:)%fveg,fveg_obs) + NoahMP50_struc(n)%noahmp50(:)%fveg,fveg_obs) call LIS_convertPatchSpaceToObsSpace(n,k,& LIS_rc%lsm_index,stc1,stc1_obs) @@ -106,5 +106,5 @@ subroutine noahmpnew_qc_snowobs(n,k,OBS_State) endif enddo -end subroutine noahmpnew_qc_snowobs +end subroutine noahmp50_qc_snowobs diff --git a/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_qcsnow.F90 b/lis/surfacemodels/land/noahmp.5.0/da_snow/noahmp50_qcsnow.F90 similarity index 89% rename from lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_qcsnow.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_snow/noahmp50_qcsnow.F90 index ef770516c..b4665b135 100755 --- a/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_qcsnow.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_snow/noahmp50_qcsnow.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_qcsnow -! \label{noahmpnew_qcsnow} +! !ROUTINE: noahmp50_qcsnow +! \label{noahmp50_qcsnow} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -25,12 +25,12 @@ ! May 2023: Cenlin He; modified for NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmpnew_qcsnow(n, LSM_State) +subroutine noahmp50_qcsnow(n, LSM_State) ! !USES: use ESMF use LIS_coreMod - use noahmpnew_lsmMod + use noahmp50_lsmMod use LIS_logMod implicit none @@ -101,8 +101,8 @@ subroutine noahmpnew_qcsnow(n, LSM_State) !Use the model's snow density from the previous timestep sndens = 0.0 - if(NoahMPnew_struc(n)%noahmpnew(t)%snowh.gt.0) then - sndens = NoahMPnew_struc(n)%noahmpnew(t)%sneqv/NoahMPnew_struc(n)%noahmpnew(t)%snowh + if(NoahMP50_struc(n)%noahmp50(t)%snowh.gt.0) then + sndens = NoahMP50_struc(n)%noahmp50(t)%sneqv/NoahMP50_struc(n)%noahmp50(t)%snowh endif !If the update is unphysical, do not update. @@ -110,8 +110,8 @@ subroutine noahmpnew_qcsnow(n, LSM_State) snod(t) = snod(t) swe(t) = snod(t)*sndens else ! do not update - snod(t) = NoahMPnew_struc(n)%noahmpnew(t)%snowh - swe(t) = NoahMPnew_struc(n)%noahmpnew(t)%sneqv + snod(t) = NoahMP50_struc(n)%noahmp50(t)%snowh + swe(t) = NoahMP50_struc(n)%noahmp50(t)%sneqv end if if(swe(t).gt.swemax) then @@ -123,5 +123,5 @@ subroutine noahmpnew_qcsnow(n, LSM_State) end do -end subroutine noahmpnew_qcsnow +end subroutine noahmp50_qcsnow diff --git a/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_scale_snow.F90 b/lis/surfacemodels/land/noahmp.5.0/da_snow/noahmp50_scale_snow.F90 similarity index 89% rename from lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_scale_snow.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_snow/noahmp50_scale_snow.F90 index 1489b5e9f..4321e17a2 100755 --- a/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_scale_snow.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_snow/noahmp50_scale_snow.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_scale_snow -! \label{noahmpnew_scale_snow} +! !ROUTINE: noahmp50_scale_snow +! \label{noahmp50_scale_snow} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -21,12 +21,12 @@ ! 13 Dec 2019: Eric Kemp; Replaced LDTSI with SNOW ! ! !INTERFACE: -subroutine noahmpnew_scale_snow(n, LSM_State) +subroutine noahmp50_scale_snow(n, LSM_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc - use noahmpnew_lsmMod + use noahmp50_lsmMod use LIS_logMod implicit none @@ -54,5 +54,5 @@ subroutine noahmpnew_scale_snow(n, LSM_State) real, pointer :: swe(:) real, pointer :: snod(:) -end subroutine noahmpnew_scale_snow +end subroutine noahmp50_scale_snow diff --git a/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_setsnowvars.F90 b/lis/surfacemodels/land/noahmp.5.0/da_snow/noahmp50_setsnowvars.F90 similarity index 86% rename from lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_setsnowvars.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_snow/noahmp50_setsnowvars.F90 index 702eb7ba0..dfb2e9b82 100755 --- a/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_setsnowvars.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_snow/noahmp50_setsnowvars.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_setsnowvars -! \label{noahmpnew_setsnowvars} +! !ROUTINE: noahmp50_setsnowvars +! \label{noahmp50_setsnowvars} ! ! !REVISION HISTORY: ! 15 Aug 2017: Sujay Kumar; Initial Specification @@ -26,13 +26,13 @@ ! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmpnew_setsnowvars(n, LSM_State) +subroutine noahmp50_setsnowvars(n, LSM_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc, LIS_domain, LIS_surface use LIS_snowMod, only : LIS_snow_struc use LIS_logMod, only : LIS_logunit, LIS_verify, LIS_endrun - use noahmpnew_lsmMod + use noahmp50_lsmMod implicit none ! !ARGUMENTS: @@ -67,13 +67,13 @@ subroutine noahmpnew_setsnowvars(n, LSM_State) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - dsneqv = swe(t) - NoahMPnew_struc(n)%noahmpnew(t)%sneqv !in mm - dsnowh = snod(t) - NoahMPnew_struc(n)%noahmpnew(t)%snowh !in m + dsneqv = swe(t) - NoahMP50_struc(n)%noahmp50(t)%sneqv !in mm + dsnowh = snod(t) - NoahMP50_struc(n)%noahmp50(t)%snowh !in m ! update - call noahmpnew_snow_update(n, t, dsneqv, dsnowh) + call noahmp50_snow_update(n, t, dsneqv, dsnowh) enddo -end subroutine noahmpnew_setsnowvars +end subroutine noahmp50_setsnowvars diff --git a/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_snow_update.F90 b/lis/surfacemodels/land/noahmp.5.0/da_snow/noahmp50_snow_update.F90 similarity index 79% rename from lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_snow_update.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_snow/noahmp50_snow_update.F90 index 9ed940777..ff149b2b2 100755 --- a/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_snow_update.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_snow/noahmp50_snow_update.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_snow_update -! \label{noahmpnew_snow_update} +! !ROUTINE: noahmp50_snow_update +! \label{noahmp50_snow_update} ! ! !REVISION HISTORY: ! 13 Aug 2017: Sujay Kumar; Initial specification @@ -19,11 +19,11 @@ ! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE -subroutine noahmpnew_snow_update(n, t, dsneqv, dsnowh) +subroutine noahmp50_snow_update(n, t, dsneqv, dsnowh) use LIS_coreMod - use NoahMPnew_lsmMod - use NoahMPnew_snowphys_updateMod + use NoahMP50_lsmMod + use NoahMP50_snowphys_updateMod implicit none ! @@ -72,9 +72,9 @@ subroutine noahmpnew_snow_update(n, t, dsneqv, dsnowh) ! local real :: SNOFLOW, BDSNOW - isnow = NoahMPnew_struc(n)%noahmpnew(t)%isnow - nsoil = NoahMPnew_struc(n)%nsoil - nsnow = NoahMPnew_struc(n)%nsnow + isnow = NoahMP50_struc(n)%noahmp50(t)%isnow + nsoil = NoahMP50_struc(n)%nsoil + nsnow = NoahMP50_struc(n)%nsnow allocate(ficeold(-nsnow+1:0)) allocate(snice(-nsnow+1:0)) @@ -103,17 +103,17 @@ subroutine noahmpnew_snow_update(n, t, dsneqv, dsnowh) enddo ! initialize the variables - soiltype = NoahMPnew_struc(n)%noahmpnew(t)%soiltype + soiltype = NoahMP50_struc(n)%noahmp50(t)%soiltype do isoil = 1, size(soiltype) - BEXP(isoil) = NoahmpNew_struc(n)%noahmpnew(t)%param%BEXP(isoil) - PSISAT(isoil) = NoahmpNew_struc(n)%noahmpnew(t)%param%PSISAT(isoil) - SMCMAX(isoil) = NoahmpNew_struc(n)%noahmpnew(t)%param%SMCMAX(isoil) + BEXP(isoil) = Noahmp50_struc(n)%noahmp50(t)%param%BEXP(isoil) + PSISAT(isoil) = Noahmp50_struc(n)%noahmp50(t)%param%PSISAT(isoil) + SMCMAX(isoil) = Noahmp50_struc(n)%noahmp50(t)%param%SMCMAX(isoil) end do - sneqv = NoahMPnew_struc(n)%noahmpnew(t)%sneqv - snowh = NoahMPnew_struc(n)%noahmpnew(t)%snowh + sneqv = NoahMP50_struc(n)%noahmp50(t)%sneqv + snowh = NoahMP50_struc(n)%noahmp50(t)%snowh - zsnso(-nsnow+1:nsoil) = NoahMPnew_struc(n)%noahmpnew(t)%zss(1:nsnow+nsoil) + zsnso(-nsnow+1:nsoil) = NoahMP50_struc(n)%noahmp50(t)%zss(1:nsnow+nsoil) ! snow/soil layer thickness (m) do iz = isnow+1, nsoil @@ -127,22 +127,22 @@ subroutine noahmpnew_snow_update(n, t, dsneqv, dsnowh) ! set ZSOIL allocate(zsoil(nsoil)) ! zsoil is negative. - zsoil(1) = -NoahMPnew_struc(n)%sldpth(1) + zsoil(1) = -NoahMP50_struc(n)%sldpth(1) do i = 2, nsoil - zsoil(i) = zsoil(i-1) - NoahMPnew_struc(n)%sldpth(i) + zsoil(i) = zsoil(i-1) - NoahMP50_struc(n)%sldpth(i) enddo ! state variables snice(-nsnow+1:0) = & - NoahMPnew_struc(n)%noahmpnew(t)%snowice(1:nsnow) + NoahMP50_struc(n)%noahmp50(t)%snowice(1:nsnow) snliq(-nsnow+1:0) = & - NoahMPnew_struc(n)%noahmpnew(t)%snowliq(1:nsnow) + NoahMP50_struc(n)%noahmp50(t)%snowliq(1:nsnow) stc(-nsnow+1:0) = & - NoahMPnew_struc(n)%noahmpnew(t)%tsno(1:nsnow) + NoahMP50_struc(n)%noahmp50(t)%tsno(1:nsnow) ! soil temperature stc(1:nsoil) = & - NoahMPnew_struc(n)%noahmpnew(t)%tslb(1:nsoil) + NoahMP50_struc(n)%noahmp50(t)%tslb(1:nsoil) ! from snowfall routine @@ -160,7 +160,7 @@ subroutine noahmpnew_snow_update(n, t, dsneqv, dsnowh) newnode = 1 dzsnso(0)= snowh snowh = 0. - stc(0) = min(273.16, NoahMPnew_struc(n)%noahmpnew(t)%sfctmp) + stc(0) = min(273.16, NoahMP50_struc(n)%noahmp50(t)%sfctmp) snice(0) = sneqv snliq(0) = 0. end if @@ -205,8 +205,8 @@ subroutine noahmpnew_snow_update(n, t, dsneqv, dsnowh) endif enddo - sice(:) = max(0.0, NoahMPnew_struc(n)%noahmpnew(t)%smc(:)& - - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(:)) + sice(:) = max(0.0, NoahMP50_struc(n)%noahmp50(t)%smc(:)& + - NoahMP50_struc(n)%noahmp50(t)%sh2o(:)) !imelt do j = -nsnow+1, nsoil @@ -219,9 +219,9 @@ subroutine noahmpnew_snow_update(n, t, dsneqv, dsnowh) end do do j = 1, nsoil ! soil - mliq(j) = NoahMPnew_struc(n)%noahmpnew(t)%sh2o(j) * dzsnso(j) * 1000. - mice(j) = (NoahMPnew_struc(n)%noahmpnew(t)%smc(j) - & - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(j)) * dzsnso(j) * 1000. + mliq(j) = NoahMP50_struc(n)%noahmp50(t)%sh2o(j) * dzsnso(j) * 1000. + mice(j) = (NoahMP50_struc(n)%noahmp50(t)%smc(j) - & + NoahMP50_struc(n)%noahmp50(t)%sh2o(j)) * dzsnso(j) * 1000. end do do j = isnow+1,nsoil ! all layers @@ -259,18 +259,18 @@ subroutine noahmpnew_snow_update(n, t, dsneqv, dsnowh) ponding2 = 0.0 if(isnow < 0) & ! when multi-layer - call compact (NoahmpNew_struc(n)%noahmpnew(t)%param, & - nsnow, nsoil, NoahMPnew_struc(n)%ts, & !in + call compact (Noahmp50_struc(n)%noahmp50(t)%param, & + nsnow, nsoil, NoahMP50_struc(n)%ts, & !in stc, snice, snliq, zsoil, imelt, ficeold, iloc, jloc, & !in isnow, dzsnso ,zsnso) !inout if(isnow < 0) & - call combine (NoahmpNew_struc(n)%noahmpnew(t)%param, & + call combine (Noahmp50_struc(n)%noahmp50(t)%param, & nsnow, nsoil ,iloc, jloc, & !in - isnow, NoahMPnew_struc(n)%noahmpnew(t)%sh2o, & !inout + isnow, NoahMP50_struc(n)%noahmp50(t)%sh2o, & !inout stc, snice, snliq, dzsnso, sice, snowh, sneqv, & !inout ponding1, ponding2) !out if(isnow < 0) & - call divide (NoahmpNew_struc(n)%noahmpnew(t)%param, nsnow, nsoil, & !in + call divide (Noahmp50_struc(n)%noahmp50(t)%param, nsnow, nsoil, & !in isnow, stc, snice, snliq, dzsnso) !inout !set empty snow layers to zero @@ -335,18 +335,18 @@ subroutine noahmpnew_snow_update(n, t, dsneqv, dsnowh) END IF ! update state vars - NoahMPnew_struc(n)%noahmpnew(t)%isnow = isnow - NoahMPnew_struc(n)%noahmpnew(t)%sneqv = sneqv - NoahMPnew_struc(n)%noahmpnew(t)%snowh = snowh + NoahMP50_struc(n)%noahmp50(t)%isnow = isnow + NoahMP50_struc(n)%noahmp50(t)%sneqv = sneqv + NoahMP50_struc(n)%noahmp50(t)%snowh = snowh - NoahMPnew_struc(n)%noahmpnew(t)%zss(1:nsnow+& + NoahMP50_struc(n)%noahmp50(t)%zss(1:nsnow+& nsoil) = zsnso(-nsnow+1:nsoil) - NoahMPnew_struc(n)%noahmpnew(t)%snowice(1:nsnow) = & + NoahMP50_struc(n)%noahmp50(t)%snowice(1:nsnow) = & snice(-nsnow+1:0) - NoahMPnew_struc(n)%noahmpnew(t)%snowliq(1:nsnow) = & + NoahMP50_struc(n)%noahmp50(t)%snowliq(1:nsnow) = & snliq(-nsnow+1:0) - NoahMPnew_struc(n)%noahmpnew(t)%tsno(1:nsnow) = stc(-nsnow+1:0) - NoahMPnew_struc(n)%noahmpnew(t)%tslb(1:nsoil) = stc(1:nsoil) + NoahMP50_struc(n)%noahmp50(t)%tsno(1:nsnow) = stc(-nsnow+1:0) + NoahMP50_struc(n)%noahmp50(t)%tslb(1:nsoil) = stc(1:nsoil) deallocate(ficeold) deallocate(snice) @@ -363,4 +363,4 @@ subroutine noahmpnew_snow_update(n, t, dsneqv, dsnowh) deallocate(psisat) deallocate(smcmax) -end subroutine noahmpnew_snow_update +end subroutine noahmp50_snow_update diff --git a/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_updatesnowvars.F90 b/lis/surfacemodels/land/noahmp.5.0/da_snow/noahmp50_updatesnowvars.F90 similarity index 91% rename from lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_updatesnowvars.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_snow/noahmp50_updatesnowvars.F90 index 8dc8e48b1..257cc936e 100755 --- a/lis/surfacemodels/land/noahmp.new/da_snow/noahmpnew_updatesnowvars.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_snow/noahmp50_updatesnowvars.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_updatesnowvars -! \label{noahmpnew_updatesnowvars} +! !ROUTINE: noahmp50_updatesnowvars +! \label{noahmp50_updatesnowvars} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -21,11 +21,11 @@ ! 09 Jan 2020: Yeosang Yoon; Updated QC ! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! !INTERFACE: -subroutine noahmpnew_updatesnowvars(n, LSM_State, LSM_Incr_State) +subroutine noahmp50_updatesnowvars(n, LSM_State, LSM_Incr_State) ! !USES: use ESMF use LIS_coreMod - use noahmpnew_lsmMod + use noahmp50_lsmMod use LIS_logMod, only : LIS_logunit, LIS_verify implicit none @@ -150,8 +150,8 @@ subroutine noahmpnew_updatesnowvars(n, LSM_State, LSM_Incr_State) !Use the model's snow density from the previous timestep sndens = 0.0 - if(NoahMPnew_struc(n)%noahmpnew(t)%snowh.gt.0) then - sndens = NoahMPnew_struc(n)%noahmpnew(t)%sneqv/NoahMPnew_struc(n)%noahmpnew(t)%snowh + if(NoahMP50_struc(n)%noahmp50(t)%snowh.gt.0) then + sndens = NoahMP50_struc(n)%noahmp50(t)%sneqv/NoahMP50_struc(n)%noahmp50(t)%snowh endif if(update_flag(gid)) then @@ -166,11 +166,11 @@ subroutine noahmpnew_updatesnowvars(n, LSM_State, LSM_Incr_State) swe(t) = swetmp endif else ! do not update - snod(t) = NoahMPnew_struc(n)%noahmpnew(t)%snowh - swe(t) = NoahMPnew_struc(n)%noahmpnew(t)%sneqv + snod(t) = NoahMP50_struc(n)%noahmp50(t)%snowh + swe(t) = NoahMP50_struc(n)%noahmp50(t)%sneqv end if enddo -end subroutine noahmpnew_updatesnowvars +end subroutine noahmp50_updatesnowvars diff --git a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_dasoilm_Mod.F90 b/lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_dasoilm_Mod.F90 similarity index 68% rename from lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_dasoilm_Mod.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_dasoilm_Mod.F90 index cae4eb428..59f027505 100644 --- a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_dasoilm_Mod.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_dasoilm_Mod.F90 @@ -8,10 +8,10 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- #include "LIS_misc.h" -module NoahMPnew_dasoilm_Mod +module NoahMP50_dasoilm_Mod !BOP ! -! !MODULE: NoahMPnew_dasoilm_Mod +! !MODULE: NoahMP50_dasoilm_Mod ! ! !DESCRIPTION: ! @@ -32,11 +32,11 @@ module NoahMPnew_dasoilm_Mod !----------------------------------------------------------------------------- ! !PUBLIC MEMBER FUNCTIONS: !----------------------------------------------------------------------------- - public :: NoahMPnew_dasoilm_init + public :: NoahMP50_dasoilm_init !----------------------------------------------------------------------------- ! !PUBLIC TYPES: !----------------------------------------------------------------------------- - public :: noahmpnew_dasm_struc + public :: noahmp50_dasm_struc !EOP type, public :: dasm_dec @@ -50,16 +50,16 @@ module NoahMPnew_dasoilm_Mod end type dasm_dec - type(dasm_dec), allocatable :: noahmpnew_dasm_struc(:) + type(dasm_dec), allocatable :: noahmp50_dasm_struc(:) contains !BOP ! -! !ROUTINE: NoahMPnew_dasoilm_init -! \label{NoahMPnew_dasoilm_init} +! !ROUTINE: NoahMP50_dasoilm_init +! \label{NoahMP50_dasoilm_init} ! ! !INTERFACE: - subroutine NoahMPnew_dasoilm_init(k) + subroutine NoahMP50_dasoilm_init(k) ! !USES: ! !DESCRIPTION: ! @@ -73,8 +73,8 @@ subroutine NoahMPnew_dasoilm_init(k) integer :: status integer :: ngrid - if(.not.allocated(noahmpnew_dasm_struc)) then - allocate(noahmpnew_dasm_struc(LIS_rc%nnest)) + if(.not.allocated(noahmp50_dasm_struc)) then + allocate(noahmp50_dasm_struc(LIS_rc%nnest)) endif !TBD: SVK @@ -90,29 +90,29 @@ subroutine NoahMPnew_dasoilm_init(k) do n=1,LIS_rc%nnest !Hardcoded for now. - noahmpnew_dasm_struc(n)%nbins = 100 + noahmp50_dasm_struc(n)%nbins = 100 call LIS_getCDFattributes(modelcdffile(n),& - noahmpnew_dasm_struc(n)%ntimes, ngrid) + noahmp50_dasm_struc(n)%ntimes, ngrid) - allocate(noahmpnew_dasm_struc(n)%model_xrange(& - LIS_rc%ngrid(n), noahmpnew_dasm_struc(n)%ntimes, & - noahmpnew_dasm_struc(n)%nbins)) - allocate(noahmpnew_dasm_struc(n)%model_cdf(& - LIS_rc%ngrid(n), noahmpnew_dasm_struc(n)%ntimes, & - noahmpnew_dasm_struc(n)%nbins)) + allocate(noahmp50_dasm_struc(n)%model_xrange(& + LIS_rc%ngrid(n), noahmp50_dasm_struc(n)%ntimes, & + noahmp50_dasm_struc(n)%nbins)) + allocate(noahmp50_dasm_struc(n)%model_cdf(& + LIS_rc%ngrid(n), noahmp50_dasm_struc(n)%ntimes, & + noahmp50_dasm_struc(n)%nbins)) call LIS_readCDFdata(n,& - noahmpnew_dasm_struc(n)%nbins, & - noahmpnew_dasm_struc(n)%ntimes, & + noahmp50_dasm_struc(n)%nbins, & + noahmp50_dasm_struc(n)%ntimes, & ngrid, & modelcdffile(n), & "SoilMoist",& - noahmpnew_dasm_struc(n)%model_xrange,& - noahmpnew_dasm_struc(n)%model_cdf) + noahmp50_dasm_struc(n)%model_xrange,& + noahmp50_dasm_struc(n)%model_cdf) enddo endif #endif - end subroutine NoahMPnew_dasoilm_init -end module NoahMPnew_dasoilm_Mod + end subroutine NoahMP50_dasoilm_init +end module NoahMP50_dasoilm_Mod diff --git a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_descale_soilm.F90 b/lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_descale_soilm.F90 similarity index 81% rename from lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_descale_soilm.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_descale_soilm.F90 index 5067f8106..0c3893e59 100644 --- a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_descale_soilm.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_descale_soilm.F90 @@ -8,22 +8,22 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: NoahMPnew_descale_soilm -! \label{NoahMPnew_descale_soilm} +! !ROUTINE: NoahMP50_descale_soilm +! \label{NoahMP50_descale_soilm} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification ! 25Jun2006: Sujay Kumar: Updated for the ESMF design -! 15 Dec 2018: Mahdi Navari; Modified for NoahMPnew +! 15 Dec 2018: Mahdi Navari; Modified for NoahMP50 ! ! !INTERFACE: -subroutine NoahMPnew_descale_soilm(n, LSM_State, LSM_Incr_State) +subroutine NoahMP50_descale_soilm(n, LSM_State, LSM_Incr_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_verify - use NoahMPnew_lsmMod + use NoahMP50_lsmMod implicit none ! !ARGUMENTS: @@ -44,5 +44,5 @@ subroutine NoahMPnew_descale_soilm(n, LSM_State, LSM_Incr_State) !EOP -end subroutine NoahMPnew_descale_soilm +end subroutine NoahMP50_descale_soilm diff --git a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_getsmpred.F90 b/lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_getsmpred.F90 similarity index 68% rename from lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_getsmpred.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_getsmpred.F90 index 1d486284d..117910ef7 100644 --- a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_getsmpred.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_getsmpred.F90 @@ -8,25 +8,25 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: NoahMPnew_getsmpred -! \label{NoahMPnew_getsmpred} +! !ROUTINE: NoahMP50_getsmpred +! \label{NoahMP50_getsmpred} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification ! 25Jun2006: Sujay Kumar: Updated for the ESMF design -! 9 Sep 2016: Mahdi Navari; Modified for NoahMPnew +! 9 Sep 2016: Mahdi Navari; Modified for NoahMP50 ! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine NoahMPnew_getsmpred(n, k,obs_pred) +subroutine NoahMP50_getsmpred(n, k,obs_pred) ! !USES: use ESMF use LIS_constantsMod use LIS_coreMod use LIS_dataAssimMod use LIS_DAobservationsMod - use NoahMPnew_lsmMod - use NoahMPnew_dasoilm_Mod + use NoahMP50_lsmMod + use NoahMP50_dasoilm_Mod !EOP implicit none @@ -54,7 +54,7 @@ subroutine NoahMPnew_getsmpred(n, k,obs_pred) do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) - smc1(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(1) + smc1(t) = NoahMP50_struc(n)%noahmp50(t)%smc(1) enddo call LIS_convertPatchSpaceToObsEnsSpace(n,k,& LIS_rc%lsm_index, & @@ -66,7 +66,7 @@ subroutine NoahMPnew_getsmpred(n, k,obs_pred) !rescaling to relative wetness space. if(LIS_rc%dascaloption(k).eq."Linear scaling") then - if(noahmpnew_dasm_struc(n)%ntimes.gt.1) then + if(noahmp50_dasm_struc(n)%ntimes.gt.1) then kk = LIS_rc%mo else kk = 1 @@ -74,9 +74,9 @@ subroutine NoahMPnew_getsmpred(n, k,obs_pred) do i=1,LIS_rc%obs_ngrid(k) do m=1,LIS_rc%nensem(n) - obs_tmp = (obs_pred(i,m) - noahmpnew_dasm_struc(n)%model_xrange(i,kk,1))/& - (noahmpnew_dasm_struc(n)%model_xrange(i,kk,noahmpnew_dasm_struc(n)%nbins) - & - noahmpnew_dasm_struc(n)%model_xrange(i,kk,1)) + obs_tmp = (obs_pred(i,m) - noahmp50_dasm_struc(n)%model_xrange(i,kk,1))/& + (noahmp50_dasm_struc(n)%model_xrange(i,kk,noahmp50_dasm_struc(n)%nbins) - & + noahmp50_dasm_struc(n)%model_xrange(i,kk,1)) obs_pred(i,m) = obs_tmp enddo enddo @@ -90,13 +90,13 @@ subroutine NoahMPnew_getsmpred(n, k,obs_pred) t = i+m-1 gid = LIS_surface(n,LIS_rc%lsm_index)%tile(t)%index - inputs_tp(1) = NoahMPnew_struc(n)%noahmpnew(t)%smc(1) - inputs_tp(2) = NoahMPnew_struc(n)%noahmpnew(t)%prcp*(1-NoahMPnew_struc(n)%noahmpnew(t)%fpice) !Noah33 rainf - inputs_tp(3) = NoahMPnew_struc(n)%noahmpnew(t)%prcp*NoahMPnew_struc(n)%noahmpnew(t)%fpice !Noah33 snowf - !MN: NOTE: noahmpnew --> prcp (total precip), fpice (snow fraction in precipitation [-]) - inputs_tp(4) = NoahMPnew_struc(n)%noahmpnew(t)%fveg !Noah33 shdfac - inputs_tp(5) = NoahMPnew_struc(n)%noahmpnew(t)%sstc(NoahMPnew_struc(n)%nsnow+1) !Noah33 stc(1) - inputs_tp(6) = NoahMPnew_struc(n)%noahmpnew(t)%sneqv*LIS_CONST_RHOFW + inputs_tp(1) = NoahMP50_struc(n)%noahmp50(t)%smc(1) + inputs_tp(2) = NoahMP50_struc(n)%noahmp50(t)%prcp*(1-NoahMP50_struc(n)%noahmp50(t)%fpice) !Noah33 rainf + inputs_tp(3) = NoahMP50_struc(n)%noahmp50(t)%prcp*NoahMP50_struc(n)%noahmp50(t)%fpice !Noah33 snowf + !MN: NOTE: noahmp50 --> prcp (total precip), fpice (snow fraction in precipitation [-]) + inputs_tp(4) = NoahMP50_struc(n)%noahmp50(t)%fveg !Noah33 shdfac + inputs_tp(5) = NoahMP50_struc(n)%noahmp50(t)%sstc(NoahMP50_struc(n)%nsnow+1) !Noah33 stc(1) + inputs_tp(6) = NoahMP50_struc(n)%noahmp50(t)%sneqv*LIS_CONST_RHOFW units_tp(1) = "m^3 m-3" units_tp(2) = "kg m-2 s-1" @@ -119,5 +119,5 @@ subroutine NoahMPnew_getsmpred(n, k,obs_pred) enddo endif #endif -end subroutine NoahMPnew_getsmpred +end subroutine NoahMP50_getsmpred diff --git a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_getsoilm.F90 b/lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_getsoilm.F90 similarity index 82% rename from lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_getsoilm.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_getsoilm.F90 index 6285b18ce..89d289b6b 100644 --- a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_getsoilm.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_getsoilm.F90 @@ -8,22 +8,22 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: NoahMPnew_getsoilm -! \label{NoahMPnew_getsoilm} +! !ROUTINE: NoahMP50_getsoilm +! \label{NoahMP50_getsoilm} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification ! 25Jun2006: Sujay Kumar: Updated for the ESMF design -! 15 Dec 2018: Mahdi Navari; Modified for NoahMPnew +! 15 Dec 2018: Mahdi Navari; Modified for NoahMP50 ! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! !INTERFACE: -subroutine NoahMPnew_getsoilm(n, LSM_State) +subroutine NoahMP50_getsoilm(n, LSM_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_verify - use NoahMPnew_lsmMod + use NoahMP50_lsmMod implicit none ! !ARGUMENTS: @@ -54,30 +54,30 @@ subroutine NoahMPnew_getsoilm(n, LSM_State) character*100 :: lsm_state_objs(4) call ESMF_StateGet(LSM_State,"Soil Moisture Layer 1",sm1Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm1 in NoahMPnew_getsoilm') + call LIS_verify(status,'ESMF_StateGet failed for sm1 in NoahMP50_getsoilm') call ESMF_StateGet(LSM_State,"Soil Moisture Layer 2",sm2Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm2 in NoahMPnew_getsoilm') + call LIS_verify(status,'ESMF_StateGet failed for sm2 in NoahMP50_getsoilm') call ESMF_StateGet(LSM_State,"Soil Moisture Layer 3",sm3Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm3 in NoahMPnew_getsoilm') + call LIS_verify(status,'ESMF_StateGet failed for sm3 in NoahMP50_getsoilm') call ESMF_StateGet(LSM_State,"Soil Moisture Layer 4",sm4Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm4 in NoahMPnew_getsoilm') + call LIS_verify(status,'ESMF_StateGet failed for sm4 in NoahMP50_getsoilm') call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm1,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm1 in NoahMPnew_getsoilm') + call LIS_verify(status,'ESMF_FieldGet failed for sm1 in NoahMP50_getsoilm') call ESMF_FieldGet(sm2Field,localDE=0,farrayPtr=soilm2,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm2 in NoahMPnew_getsoilm') + call LIS_verify(status,'ESMF_FieldGet failed for sm2 in NoahMP50_getsoilm') call ESMF_FieldGet(sm3Field,localDE=0,farrayPtr=soilm3,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm3 in NoahMPnew_getsoilm') + call LIS_verify(status,'ESMF_FieldGet failed for sm3 in NoahMP50_getsoilm') call ESMF_FieldGet(sm4Field,localDE=0,farrayPtr=soilm4,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm4 in NoahMPnew_getsoilm') + call LIS_verify(status,'ESMF_FieldGet failed for sm4 in NoahMP50_getsoilm') do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - soilm1(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(1) - soilm2(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(2) - soilm3(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(3) - soilm4(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(4) + soilm1(t) = NoahMP50_struc(n)%noahmp50(t)%smc(1) + soilm2(t) = NoahMP50_struc(n)%noahmp50(t)%smc(2) + soilm3(t) = NoahMP50_struc(n)%noahmp50(t)%smc(3) + soilm4(t) = NoahMP50_struc(n)%noahmp50(t)%smc(4) enddo -end subroutine NoahMPnew_getsoilm +end subroutine NoahMP50_getsoilm diff --git a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_qc_soilmobs.F90 b/lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_qc_soilmobs.F90 similarity index 80% rename from lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_qc_soilmobs.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_qc_soilmobs.F90 index 621ccbd19..f5e3827c9 100644 --- a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_qc_soilmobs.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_qc_soilmobs.F90 @@ -8,24 +8,24 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: NoahMPnew_qc_soilmobs -! \label{NoahMPnew_qc_soilmobs} +! !ROUTINE: NoahMP50_qc_soilmobs +! \label{NoahMP50_qc_soilmobs} ! ! !REVISION HISTORY: ! 25Feb2008: Sujay Kumar: Initial Specification -! 15 Dec 2018: Mahdi Navari; Modified for NoahMPnew +! 15 Dec 2018: Mahdi Navari; Modified for NoahMP50 ! 15 Jun 2020: Yonghwan Kwon: Modified vegetation fraction threshold ! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine NoahMPnew_qc_soilmobs(n,k,OBS_State) +subroutine NoahMP50_qc_soilmobs(n,k,OBS_State) ! !USES: use ESMF use LIS_coreMod use LIS_logMod, only : LIS_verify use LIS_constantsMod, only : LIS_CONST_TKFRZ use LIS_DAobservationsMod - use NoahMPnew_lsmMod + use NoahMP50_lsmMod implicit none ! !ARGUMENTS: @@ -99,65 +99,65 @@ subroutine NoahMPnew_qc_soilmobs(n,k,OBS_State) call ESMF_StateGet(OBS_State,"Observation01",obs_sm_field,& rc=status) call LIS_verify(status,& - "ESMF_StateGet failed in NoahMPnew_qc_soilmobs") + "ESMF_StateGet failed in NoahMP50_qc_soilmobs") call ESMF_FieldGet(obs_sm_field,localDE=0,farrayPtr=smobs,rc=status) call LIS_verify(status,& - "ESMF_FieldGet failed in NoahMPnew_qc_soilmobs") + "ESMF_FieldGet failed in NoahMP50_qc_soilmobs") do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) - smc1(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(1) - smc2(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(2) - smc3(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(3) - smc4(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(4) + smc1(t) = NoahMP50_struc(n)%noahmp50(t)%smc(1) + smc2(t) = NoahMP50_struc(n)%noahmp50(t)%smc(2) + smc3(t) = NoahMP50_struc(n)%noahmp50(t)%smc(3) + smc4(t) = NoahMP50_struc(n)%noahmp50(t)%smc(4) - sh2o1(t) = NoahMPnew_struc(n)%noahmpnew(t)%sh2o(1) - sh2o2(t) = NoahMPnew_struc(n)%noahmpnew(t)%sh2o(2) - sh2o3(t) = NoahMPnew_struc(n)%noahmpnew(t)%sh2o(3) - sh2o4(t) = NoahMPnew_struc(n)%noahmpnew(t)%sh2o(4) + sh2o1(t) = NoahMP50_struc(n)%noahmp50(t)%sh2o(1) + sh2o2(t) = NoahMP50_struc(n)%noahmp50(t)%sh2o(2) + sh2o3(t) = NoahMP50_struc(n)%noahmp50(t)%sh2o(3) + sh2o4(t) = NoahMP50_struc(n)%noahmp50(t)%sh2o(4) !--------------------------------------------------------------------------------------------------------- ! MN NOTE:sstc contain soil and snow temperature first snow ! temperature and then soil temeprature. ! But the number of snow layers changes from 0 to 3 !--------------------------------------------------------------------------------------------------------- - ! stc1(t) = NoahMPnew_struc(n)%noahmpnew(t)%sstc(NoahMPnew_struc(n)%nsnow+1) - ! stc2(t) = NoahMPnew_struc(n)%noahmpnew(t)%sstc(NoahMPnew_struc(n)%nsnow+2) - ! stc3(t) = NoahMPnew_struc(n)%noahmpnew(t)%sstc(NoahMPnew_struc(n)%nsnow+3) - ! stc4(t) = NoahMPnew_struc(n)%noahmpnew(t)%sstc(NoahMPnew_struc(n)%nsnow+4) + ! stc1(t) = NoahMP50_struc(n)%noahmp50(t)%sstc(NoahMP50_struc(n)%nsnow+1) + ! stc2(t) = NoahMP50_struc(n)%noahmp50(t)%sstc(NoahMP50_struc(n)%nsnow+2) + ! stc3(t) = NoahMP50_struc(n)%noahmp50(t)%sstc(NoahMP50_struc(n)%nsnow+3) + ! stc4(t) = NoahMP50_struc(n)%noahmp50(t)%sstc(NoahMP50_struc(n)%nsnow+4) - stc1(t) = NoahMPnew_struc(n)%noahmpnew(t)%tslb(1) - stc2(t) = NoahMPnew_struc(n)%noahmpnew(t)%tslb(2) - stc3(t) = NoahMPnew_struc(n)%noahmpnew(t)%tslb(3) - stc4(t) = NoahMPnew_struc(n)%noahmpnew(t)%tslb(4) + stc1(t) = NoahMP50_struc(n)%noahmp50(t)%tslb(1) + stc2(t) = NoahMP50_struc(n)%noahmp50(t)%tslb(2) + stc3(t) = NoahMP50_struc(n)%noahmp50(t)%tslb(3) + stc4(t) = NoahMP50_struc(n)%noahmp50(t)%tslb(4) - vegt(t) = NoahMPnew_struc(n)%noahmpnew(t)%vegetype + vegt(t) = NoahMP50_struc(n)%noahmp50(t)%vegetype - !SOILTYP = NoahMPnew_struc(n)%noahmpnew(t)%soiltype - !SMCMAX(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%SMCMAX(1) ! SMCMAX(t) = MAXSMC (SOILTYP) - !SMCWLT(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%SMCWLT(1) ! SMCWLT(t) = WLTSMC (SOILTYP) - SOILTYP = NoahMPnew_struc(n)%noahmpnew(t)%soiltype - SMCMAX(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%SMCMAX(1) !SMCMAX_TABLE(SOILTYP) - SMCWLT(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%SMCWLT(1) !SMCWLT_TABLE(SOILTYP) + !SOILTYP = NoahMP50_struc(n)%noahmp50(t)%soiltype + !SMCMAX(t) = NoahMP50_struc(n)%noahmp50(t)%param%SMCMAX(1) ! SMCMAX(t) = MAXSMC (SOILTYP) + !SMCWLT(t) = NoahMP50_struc(n)%noahmp50(t)%param%SMCWLT(1) ! SMCWLT(t) = WLTSMC (SOILTYP) + SOILTYP = NoahMP50_struc(n)%noahmp50(t)%soiltype + SMCMAX(t) = NoahMP50_struc(n)%noahmp50(t)%param%SMCMAX(1) !SMCMAX_TABLE(SOILTYP) + SMCWLT(t) = NoahMP50_struc(n)%noahmp50(t)%param%SMCWLT(1) !SMCWLT_TABLE(SOILTYP) enddo call LIS_convertPatchSpaceToObsSpace(n,k,& LIS_rc%lsm_index, & - NoahMPnew_struc(n)%noahmpnew(:)%prcp,& + NoahMP50_struc(n)%noahmp50(:)%prcp,& rainf_obs) ! MN prcp is total precip call LIS_convertPatchSpaceToObsSpace(n,k,& LIS_rc%lsm_index, & - NoahMPnew_struc(n)%noahmpnew(:)%sneqv,& + NoahMP50_struc(n)%noahmp50(:)%sneqv,& sneqv_obs) call LIS_convertPatchSpaceToObsSpace(n,k,& LIS_rc%lsm_index, & - NoahMPnew_struc(n)%noahmpnew(:)%snowc,& ! MP36 fsno + NoahMP50_struc(n)%noahmp50(:)%snowc,& ! MP36 fsno sca_obs) call LIS_convertPatchSpaceToObsSpace(n,k,& LIS_rc%lsm_index, & - NoahMPnew_struc(n)%noahmpnew(:)%fveg,& + NoahMP50_struc(n)%noahmp50(:)%fveg,& shdfac_obs) call LIS_convertPatchSpaceToObsSpace(n,k,& LIS_rc%lsm_index, & - NoahMPnew_struc(n)%noahmpnew(:)%tg,& + NoahMP50_struc(n)%noahmp50(:)%tg,& t1_obs) call LIS_convertPatchSpaceToObsSpace(n,k,& LIS_rc%lsm_index, & @@ -227,7 +227,7 @@ subroutine NoahMPnew_qc_soilmobs(n,k,OBS_State) ! MN: check for rain if(rainf_obs(t).gt.3E-6) then ! Var name Noah36 --> rainf smobs(t) = LIS_rc%udef -! print*, 'rainf ',gid,t,NoahMPnew_struc(n)%noahmpnew(t)%prcp +! print*, 'rainf ',gid,t,NoahMP50_struc(n)%noahmp50(t)%prcp ! MN: check for frozen soil elseif(abs(smc1_obs(t)- & sh2o1_obs(t)).gt.0.0001) then @@ -273,5 +273,5 @@ subroutine NoahMPnew_qc_soilmobs(n,k,OBS_State) endif enddo -end subroutine NoahMPnew_qc_soilmobs +end subroutine NoahMP50_qc_soilmobs diff --git a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_qcsoilm.F90 b/lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_qcsoilm.F90 similarity index 85% rename from lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_qcsoilm.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_qcsoilm.F90 index 1e4948534..539fb36d1 100644 --- a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_qcsoilm.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_qcsoilm.F90 @@ -8,22 +8,22 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: NoahMPnew_qcsoilm -! \label{NoahMPnew_qcsoilm} +! !ROUTINE: NoahMP50_qcsoilm +! \label{NoahMP50_qcsoilm} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification ! 25Jun2006: Sujay Kumar: Updated for the ESMF design -! 15 Dec 2018: Mahdi Navari; Modified for NoahMPnew +! 15 Dec 2018: Mahdi Navari; Modified for NoahMP50 ! ! !INTERFACE: -subroutine NoahMPnew_qcsoilm(n, LSM_State) +subroutine NoahMP50_qcsoilm(n, LSM_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_verify - use NoahMPnew_lsmMod + use NoahMP50_lsmMod implicit none ! !ARGUMENTS: @@ -56,19 +56,19 @@ subroutine NoahMPnew_qcsoilm(n, LSM_State) call ESMF_StateGet(LSM_State,"Soil Moisture Layer 1",sm1Field,rc=status) call LIS_verify(status,& - "ESMF_StateGet for Soil Moisture Layer 1 failed in NoahMPnew_qcsoilm") + "ESMF_StateGet for Soil Moisture Layer 1 failed in NoahMP50_qcsoilm") call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm1,rc=status) call LIS_verify(status,& - "ESMF_FieldGet for Soil Moisture Layer 1 failed in NoahMPnew_qcsoilm") + "ESMF_FieldGet for Soil Moisture Layer 1 failed in NoahMP50_qcsoilm") call ESMF_AttributeGet(sm1Field,"Max Value",smmax1,rc=status) call LIS_verify(status,& - "ESMF_AttributeGet: Max Value failed in NoahMPnew_qcsoilm") + "ESMF_AttributeGet: Max Value failed in NoahMP50_qcsoilm") call ESMF_AttributeGet(sm1Field,"Min Value",smmin1,rc=status) call LIS_verify(status,& - "ESMF_AttributeGet: Min Value failed in NoahMPnew_qcsoilm") + "ESMF_AttributeGet: Min Value failed in NoahMP50_qcsoilm") do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) @@ -76,5 +76,5 @@ subroutine NoahMPnew_qcsoilm(n, LSM_State) if(soilm1(t).lt.smmin1) soilm1(t) = smmin1 enddo -end subroutine NoahMPnew_qcsoilm +end subroutine NoahMP50_qcsoilm diff --git a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_scale_soilm.F90 b/lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_scale_soilm.F90 similarity index 82% rename from lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_scale_soilm.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_scale_soilm.F90 index 863f7faa3..e419e8531 100644 --- a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_scale_soilm.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_scale_soilm.F90 @@ -8,22 +8,22 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: NoahMPnew_scale_soilm -! \label{NoahMPnew_scale_soilm} +! !ROUTINE: NoahMP50_scale_soilm +! \label{NoahMP50_scale_soilm} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification ! 25Jun2006: Sujay Kumar: Updated for the ESMF design -! 15 Dec 2018: Mahdi Navari; Modified for NoahMPnew +! 15 Dec 2018: Mahdi Navari; Modified for NoahMP50 ! ! !INTERFACE: -subroutine NoahMPnew_scale_soilm(n, LSM_State) +subroutine NoahMP50_scale_soilm(n, LSM_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_verify - use NoahMPnew_lsmMod + use NoahMP50_lsmMod implicit none ! !ARGUMENTS: @@ -43,5 +43,5 @@ subroutine NoahMPnew_scale_soilm(n, LSM_State) !EOP -end subroutine NoahMPnew_scale_soilm +end subroutine NoahMP50_scale_soilm diff --git a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_setsoilm.F90 b/lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_setsoilm.F90 similarity index 67% rename from lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_setsoilm.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_setsoilm.F90 index a4c7c0131..a62af24c3 100644 --- a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_setsoilm.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_setsoilm.F90 @@ -8,13 +8,13 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: NoahMPnew_setsoilm -! \label{NoahMPnew_setsoilm} +! !ROUTINE: NoahMP50_setsoilm +! \label{NoahMP50_setsoilm} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification ! 25Jun2006: Sujay Kumar: Updated for the ESMF design -! 15 Dec 2018: Mahdi Navari: Modified for NoahMPnew +! 15 Dec 2018: Mahdi Navari: Modified for NoahMP50 ! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! Apply the update if it met the update conditions @@ -31,12 +31,12 @@ ! !INTERFACE: -subroutine NoahMPnew_setsoilm(n, LSM_State) +subroutine NoahMP50_setsoilm(n, LSM_State) ! !USES: use ESMF use LIS_coreMod use LIS_logMod - use NoahMPnew_lsmMod + use NoahMP50_lsmMod implicit none ! !ARGUMENTS: @@ -89,53 +89,53 @@ subroutine NoahMPnew_setsoilm(n, LSM_State) call ESMF_StateGet(LSM_State,"Soil Moisture Layer 1",sm1Field,rc=status) call LIS_verify(status,& - "ESMF_StateSet: Soil Moisture Layer 1 failed in NoahMPnew_setsoilm") + "ESMF_StateSet: Soil Moisture Layer 1 failed in NoahMP50_setsoilm") call ESMF_StateGet(LSM_State,"Soil Moisture Layer 2",sm2Field,rc=status) call LIS_verify(status,& - "ESMF_StateSet: Soil Moisture Layer 2 failed in NoahMPnew_setsoilm") + "ESMF_StateSet: Soil Moisture Layer 2 failed in NoahMP50_setsoilm") call ESMF_StateGet(LSM_State,"Soil Moisture Layer 3",sm3Field,rc=status) call LIS_verify(status,& - "ESMF_StateSet: Soil Moisture Layer 3 failed in NoahMPnew_setsoilm") + "ESMF_StateSet: Soil Moisture Layer 3 failed in NoahMP50_setsoilm") call ESMF_StateGet(LSM_State,"Soil Moisture Layer 4",sm4Field,rc=status) call LIS_verify(status,& - "ESMF_StateSet: Soil Moisture Layer 4 failed in NoahMPnew_setsoilm") + "ESMF_StateSet: Soil Moisture Layer 4 failed in NoahMP50_setsoilm") call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm1,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 1 failed in NoahMPnew_setsoilm") + "ESMF_FieldGet: Soil Moisture Layer 1 failed in NoahMP50_setsoilm") call ESMF_FieldGet(sm2Field,localDE=0,farrayPtr=soilm2,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 2 failed in NoahMPnew_setsoilm") + "ESMF_FieldGet: Soil Moisture Layer 2 failed in NoahMP50_setsoilm") call ESMF_FieldGet(sm3Field,localDE=0,farrayPtr=soilm3,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 3 failed in NoahMPnew_setsoilm") + "ESMF_FieldGet: Soil Moisture Layer 3 failed in NoahMP50_setsoilm") call ESMF_FieldGet(sm4Field,localDE=0,farrayPtr=soilm4,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 4 failed in NoahMPnew_setsoilm") + "ESMF_FieldGet: Soil Moisture Layer 4 failed in NoahMP50_setsoilm") update_flag = .true. update_flag_tile= .true. do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - SOILTYP = NoahMPnew_struc(n)%noahmpnew(t)%soiltype - MAX_THRESHOLD = NoahMPnew_struc(n)%noahmpnew(t)%param%SMCMAX(1) ! MAXSMC (SOILTYP) - sm_threshold = NoahMPnew_struc(n)%noahmpnew(t)%param%SMCMAX(1) - 0.02 ! MAXSMC (SOILTYP) - 0.02 + SOILTYP = NoahMP50_struc(n)%noahmp50(t)%soiltype + MAX_THRESHOLD = NoahMP50_struc(n)%noahmp50(t)%param%SMCMAX(1) ! MAXSMC (SOILTYP) + sm_threshold = NoahMP50_struc(n)%noahmp50(t)%param%SMCMAX(1) - 0.02 ! MAXSMC (SOILTYP) - 0.02 gid = LIS_domain(n)%gindex(& LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col,& LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) !MN: delta = X(+) - X(-) - !NOTE: "noahmpnew_updatesoilm.F90" updates the soilm_(t) - delta1 = soilm1(t)-NoahMPnew_struc(n)%noahmpnew(t)%smc(1) - delta2 = soilm2(t)-NoahMPnew_struc(n)%noahmpnew(t)%smc(2) - delta3 = soilm3(t)-NoahMPnew_struc(n)%noahmpnew(t)%smc(3) - delta4 = soilm4(t)-NoahMPnew_struc(n)%noahmpnew(t)%smc(4) + !NOTE: "noahmp50_updatesoilm.F90" updates the soilm_(t) + delta1 = soilm1(t)-NoahMP50_struc(n)%noahmp50(t)%smc(1) + delta2 = soilm2(t)-NoahMP50_struc(n)%noahmp50(t)%smc(2) + delta3 = soilm3(t)-NoahMP50_struc(n)%noahmp50(t)%smc(3) + delta4 = soilm4(t)-NoahMP50_struc(n)%noahmp50(t)%smc(4) ! MN: check MIN_THRESHOLD < volumetric liquid soil moisture < threshold - if(NoahMPnew_struc(n)%noahmpnew(t)%sh2o(1)+delta1.gt.MIN_THRESHOLD .and.& - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(1)+delta1.lt.& + if(NoahMP50_struc(n)%noahmp50(t)%sh2o(1)+delta1.gt.MIN_THRESHOLD .and.& + NoahMP50_struc(n)%noahmp50(t)%sh2o(1)+delta1.lt.& sm_threshold) then update_flag(gid) = update_flag(gid).and.(.true.) ! MN save the flag for each tile (col*row*ens) (64*44)*20 @@ -144,24 +144,24 @@ subroutine NoahMPnew_setsoilm(n, LSM_State) update_flag(gid) = update_flag(gid).and.(.false.) update_flag_tile(t) = update_flag_tile(t).and.(.false.) endif - if(NoahMPnew_struc(n)%noahmpnew(t)%sh2o(2)+delta2.gt.MIN_THRESHOLD .and.& - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(2)+delta2.lt.sm_threshold) then + if(NoahMP50_struc(n)%noahmp50(t)%sh2o(2)+delta2.gt.MIN_THRESHOLD .and.& + NoahMP50_struc(n)%noahmp50(t)%sh2o(2)+delta2.lt.sm_threshold) then update_flag(gid) = update_flag(gid).and.(.true.) update_flag_tile(t) = update_flag_tile(t).and.(.true.) else update_flag(gid) = update_flag(gid).and.(.false.) update_flag_tile(t) = update_flag_tile(t).and.(.false.) endif - if(NoahMPnew_struc(n)%noahmpnew(t)%sh2o(3)+delta3.gt.MIN_THRESHOLD .and.& - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(3)+delta3.lt.sm_threshold) then + if(NoahMP50_struc(n)%noahmp50(t)%sh2o(3)+delta3.gt.MIN_THRESHOLD .and.& + NoahMP50_struc(n)%noahmp50(t)%sh2o(3)+delta3.lt.sm_threshold) then update_flag(gid) = update_flag(gid).and.(.true.) update_flag_tile(t) = update_flag_tile(t).and.(.true.) else update_flag(gid) = update_flag(gid).and.(.false.) update_flag_tile(t) = update_flag_tile(t).and.(.false.) endif - if(NoahMPnew_struc(n)%noahmpnew(t)%sh2o(4)+delta4.gt.MIN_THRESHOLD .and.& - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(4)+delta4.lt.sm_threshold) then + if(NoahMP50_struc(n)%noahmp50(t)%sh2o(4)+delta4.gt.MIN_THRESHOLD .and.& + NoahMP50_struc(n)%noahmp50(t)%sh2o(4)+delta4.lt.sm_threshold) then update_flag(gid) = update_flag(gid).and.(.true.) update_flag_tile(t) = update_flag_tile(t).and.(.true.) else @@ -272,45 +272,45 @@ subroutine NoahMPnew_setsoilm(n, LSM_State) ! MN check update status for each tile if(update_flag_tile(t)) then - delta1 = soilm1(t)-NoahMPnew_struc(n)%noahmpnew(t)%smc(1) - delta2 = soilm2(t)-NoahMPnew_struc(n)%noahmpnew(t)%smc(2) - delta3 = soilm3(t)-NoahMPnew_struc(n)%noahmpnew(t)%smc(3) - delta4 = soilm4(t)-NoahMPnew_struc(n)%noahmpnew(t)%smc(4) + delta1 = soilm1(t)-NoahMP50_struc(n)%noahmp50(t)%smc(1) + delta2 = soilm2(t)-NoahMP50_struc(n)%noahmp50(t)%smc(2) + delta3 = soilm3(t)-NoahMP50_struc(n)%noahmp50(t)%smc(3) + delta4 = soilm4(t)-NoahMP50_struc(n)%noahmp50(t)%smc(4) - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(1) = NoahMPnew_struc(n)%noahmpnew(t)%sh2o(1)+& + NoahMP50_struc(n)%noahmp50(t)%sh2o(1) = NoahMP50_struc(n)%noahmp50(t)%sh2o(1)+& delta1 - NoahMPnew_struc(n)%noahmpnew(t)%smc(1) = soilm1(t) + NoahMP50_struc(n)%noahmp50(t)%smc(1) = soilm1(t) if(soilm1(t).lt.0) then print*, 'setsoilm1 ',t,soilm1(t) stop endif - if(NoahMPnew_struc(n)%noahmpnew(t)%sh2o(2)+delta2.gt.MIN_THRESHOLD .and.& - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(2)+delta2.lt.sm_threshold) then - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(2) = NoahMPnew_struc(n)%noahmpnew(t)%sh2o(2)+& - soilm2(t)-NoahMPnew_struc(n)%noahmpnew(t)%smc(2) - NoahMPnew_struc(n)%noahmpnew(t)%smc(2) = soilm2(t) + if(NoahMP50_struc(n)%noahmp50(t)%sh2o(2)+delta2.gt.MIN_THRESHOLD .and.& + NoahMP50_struc(n)%noahmp50(t)%sh2o(2)+delta2.lt.sm_threshold) then + NoahMP50_struc(n)%noahmp50(t)%sh2o(2) = NoahMP50_struc(n)%noahmp50(t)%sh2o(2)+& + soilm2(t)-NoahMP50_struc(n)%noahmp50(t)%smc(2) + NoahMP50_struc(n)%noahmp50(t)%smc(2) = soilm2(t) if(soilm2(t).lt.0) then print*, 'setsoilm2 ',t,soilm2(t) stop endif endif - if(NoahMPnew_struc(n)%noahmpnew(t)%sh2o(3)+delta3.gt.MIN_THRESHOLD .and.& - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(3)+delta3.lt.sm_threshold) then - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(3) = NoahMPnew_struc(n)%noahmpnew(t)%sh2o(3)+& - soilm3(t)-NoahMPnew_struc(n)%noahmpnew(t)%smc(3) - NoahMPnew_struc(n)%noahmpnew(t)%smc(3) = soilm3(t) + if(NoahMP50_struc(n)%noahmp50(t)%sh2o(3)+delta3.gt.MIN_THRESHOLD .and.& + NoahMP50_struc(n)%noahmp50(t)%sh2o(3)+delta3.lt.sm_threshold) then + NoahMP50_struc(n)%noahmp50(t)%sh2o(3) = NoahMP50_struc(n)%noahmp50(t)%sh2o(3)+& + soilm3(t)-NoahMP50_struc(n)%noahmp50(t)%smc(3) + NoahMP50_struc(n)%noahmp50(t)%smc(3) = soilm3(t) if(soilm3(t).lt.0) then print*, 'setsoilm3 ',t,soilm3(t) stop endif endif - if(NoahMPnew_struc(n)%noahmpnew(t)%sh2o(4)+delta4.gt.MIN_THRESHOLD .and.& - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(4)+delta4.lt.sm_threshold) then - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(4) = NoahMPnew_struc(n)%noahmpnew(t)%sh2o(4)+& - soilm4(t)-NoahMPnew_struc(n)%noahmpnew(t)%smc(4) - NoahMPnew_struc(n)%noahmpnew(t)%smc(4) = soilm4(t) + if(NoahMP50_struc(n)%noahmp50(t)%sh2o(4)+delta4.gt.MIN_THRESHOLD .and.& + NoahMP50_struc(n)%noahmp50(t)%sh2o(4)+delta4.lt.sm_threshold) then + NoahMP50_struc(n)%noahmp50(t)%sh2o(4) = NoahMP50_struc(n)%noahmp50(t)%sh2o(4)+& + soilm4(t)-NoahMP50_struc(n)%noahmp50(t)%smc(4) + NoahMP50_struc(n)%noahmp50(t)%smc(4) = soilm4(t) if(soilm4(t).lt.0) then print*, 'setsoilm4 ',t,soilm4(t) @@ -331,20 +331,20 @@ subroutine NoahMPnew_setsoilm(n, LSM_State) ! use mean value ! Assume sh2o = smc (i.e. ice content=0) smc_tmp = (MaxEnsSM1 - MinEnsSM1)/2 + MinEnsSM1 - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(1) = smc_tmp - NoahMPnew_struc(n)%noahmpnew(t)%smc(1) = smc_tmp + NoahMP50_struc(n)%noahmp50(t)%sh2o(1) = smc_tmp + NoahMP50_struc(n)%noahmp50(t)%smc(1) = smc_tmp smc_tmp = (MaxEnsSM2 - MinEnsSM2)/2 + MinEnsSM2 - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(2) = smc_tmp - NoahMPnew_struc(n)%noahmpnew(t)%smc(2) = smc_tmp + NoahMP50_struc(n)%noahmp50(t)%sh2o(2) = smc_tmp + NoahMP50_struc(n)%noahmp50(t)%smc(2) = smc_tmp smc_tmp = (MaxEnsSM3 - MinEnsSM3)/2 + MinEnsSM3 - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(3) = smc_tmp - NoahMPnew_struc(n)%noahmpnew(t)%smc(3) = smc_tmp + NoahMP50_struc(n)%noahmp50(t)%sh2o(3) = smc_tmp + NoahMP50_struc(n)%noahmp50(t)%smc(3) = smc_tmp smc_tmp = (MaxEnsSM4 - MinEnsSM4)/2 + MinEnsSM4 - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(4) = smc_tmp - NoahMPnew_struc(n)%noahmpnew(t)%smc(4) = smc_tmp + NoahMP50_struc(n)%noahmp50(t)%sh2o(4) = smc_tmp + NoahMP50_struc(n)%noahmp50(t)%smc(4) = smc_tmp endif ! flag for each tile @@ -374,8 +374,8 @@ subroutine NoahMPnew_setsoilm(n, LSM_State) if(m.ne.LIS_rc%nensem(n)) then delta(j) = delta(j) + & - (NoahMPnew_struc(n)%noahmpnew(t)%sh2o(j) - & - NoahMPnew_struc(n)%noahmpnew(t_unpert)%sh2o(j)) + (NoahMP50_struc(n)%noahmp50(t)%sh2o(j) - & + NoahMP50_struc(n)%noahmp50(t_unpert)%sh2o(j)) endif enddo @@ -386,25 +386,25 @@ subroutine NoahMPnew_setsoilm(n, LSM_State) do m=1,LIS_rc%nensem(n)-1 t = i+m-1 !t = (i-1)*LIS_rc%nensem(n)+m - SOILTYP = NoahMPnew_struc(n)%noahmpnew(t)%soiltype - MAX_THRESHOLD = NoahMPnew_struc(n)%noahmpnew(t)%param%SMCMAX(1) !SMCMAX_TABLE(SOILTYP) - sm_threshold = NoahMPnew_struc(n)%noahmpnew(t)%param%SMCMAX(1) - 0.02 !SMCMAX_TABLE(SOILTYP) - 0.02 + SOILTYP = NoahMP50_struc(n)%noahmp50(t)%soiltype + MAX_THRESHOLD = NoahMP50_struc(n)%noahmp50(t)%param%SMCMAX(1) !SMCMAX_TABLE(SOILTYP) + sm_threshold = NoahMP50_struc(n)%noahmp50(t)%param%SMCMAX(1) - 0.02 !SMCMAX_TABLE(SOILTYP) - 0.02 - tmpval = NoahMPnew_struc(n)%noahmpnew(t)%sh2o(j) - delta(j) + tmpval = NoahMP50_struc(n)%noahmp50(t)%sh2o(j) - delta(j) if(tmpval.le.MIN_THRESHOLD) then - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(j) = & - max(NoahMPnew_struc(n)%noahmpnew(t_unpert)%sh2o(j),& + NoahMP50_struc(n)%noahmp50(t)%sh2o(j) = & + max(NoahMP50_struc(n)%noahmp50(t_unpert)%sh2o(j),& MIN_THRESHOLD) - NoahMPnew_struc(n)%noahmpnew(t)%smc(j) = & - max(NoahMPnew_struc(n)%noahmpnew(t_unpert)%smc(j),& + NoahMP50_struc(n)%noahmp50(t)%smc(j) = & + max(NoahMP50_struc(n)%noahmp50(t_unpert)%smc(j),& MIN_THRESHOLD) ens_flag(m) = .false. elseif(tmpval.ge.sm_threshold) then - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(j) = & - min(NoahMPnew_struc(n)%noahmpnew(t_unpert)%sh2o(j),& + NoahMP50_struc(n)%noahmp50(t)%sh2o(j) = & + min(NoahMP50_struc(n)%noahmp50(t_unpert)%sh2o(j),& sm_threshold) - NoahMPnew_struc(n)%noahmpnew(t)%smc(j) = & - min(NoahMPnew_struc(n)%noahmpnew(t_unpert)%smc(j),& + NoahMP50_struc(n)%noahmp50(t)%smc(j) = & + min(NoahMP50_struc(n)%noahmp50(t_unpert)%smc(j),& sm_threshold) ens_flag(m) = .false. endif @@ -421,8 +421,8 @@ subroutine NoahMPnew_setsoilm(n, LSM_State) !t = (i-1)*LIS_rc%nensem(n)+m if(m.ne.LIS_rc%nensem(n)) then delta(j) = delta(j) + & - (NoahMPnew_struc(n)%noahmpnew(t)%sh2o(j) - & - NoahMPnew_struc(n)%noahmpnew(t_unpert)%sh2o(j)) + (NoahMP50_struc(n)%noahmp50(t)%sh2o(j) - & + NoahMP50_struc(n)%noahmp50(t_unpert)%sh2o(j)) endif enddo enddo @@ -434,25 +434,25 @@ subroutine NoahMPnew_setsoilm(n, LSM_State) !t = (i-1)*LIS_rc%nensem(n)+m if(ens_flag(m)) then - tmpval = NoahMPnew_struc(n)%noahmpnew(t)%sh2o(j) - & + tmpval = NoahMP50_struc(n)%noahmp50(t)%sh2o(j) - & delta(j) - SOILTYP = NoahMPnew_struc(n)%noahmpnew(t)%soiltype - MAX_THRESHOLD = NoahMPnew_struc(n)%noahmpnew(t)%param%SMCMAX(1) !SMCMAX_TABLE(SOILTYP) + SOILTYP = NoahMP50_struc(n)%noahmp50(t)%soiltype + MAX_THRESHOLD = NoahMP50_struc(n)%noahmp50(t)%param%SMCMAX(1) !SMCMAX_TABLE(SOILTYP) if(.not.(tmpval.le.0.0 .or.& tmpval.gt.(MAX_THRESHOLD))) then - NoahMPnew_struc(n)%noahmpnew(t)%smc(j) = & - NoahMPnew_struc(n)%noahmpnew(t)%smc(j) - delta(j) - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(j) = & - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(j) - delta(j) + NoahMP50_struc(n)%noahmp50(t)%smc(j) = & + NoahMP50_struc(n)%noahmp50(t)%smc(j) - delta(j) + NoahMP50_struc(n)%noahmp50(t)%sh2o(j) = & + NoahMP50_struc(n)%noahmp50(t)%sh2o(j) - delta(j) bounds_violation = .false. endif endif - tmpval = NoahMPnew_struc(n)%noahmpnew(t)%sh2o(j) - SOILTYP = NoahMPnew_struc(n)%noahmpnew(t)%soiltype - MAX_THRESHOLD = NoahMPnew_struc(n)%noahmpnew(t)%param%SMCMAX(1) !SMCMAX_TABLE(SOILTYP) + tmpval = NoahMP50_struc(n)%noahmp50(t)%sh2o(j) + SOILTYP = NoahMP50_struc(n)%noahmp50(t)%soiltype + MAX_THRESHOLD = NoahMP50_struc(n)%noahmp50(t)%param%SMCMAX(1) !SMCMAX_TABLE(SOILTYP) if(tmpval.le.0.0 .or.& tmpval.gt.(MAX_THRESHOLD)) then @@ -476,24 +476,24 @@ subroutine NoahMPnew_setsoilm(n, LSM_State) t = i+m-1 !t = (i-1)*LIS_rc%nensem(n)+m - SOILTYP = NoahMPnew_struc(n)%noahmpnew(t)%soiltype - MAX_THRESHOLD = NoahMPnew_struc(n)%noahmpnew(t)%param%SMCMAX(1) !SMCMAX_TABLE(SOILTYP) + SOILTYP = NoahMP50_struc(n)%noahmp50(t)%soiltype + MAX_THRESHOLD = NoahMP50_struc(n)%noahmp50(t)%param%SMCMAX(1) !SMCMAX_TABLE(SOILTYP) - if(NoahMPnew_struc(n)%noahmpnew(t)%sh2o(j).gt.MAX_THRESHOLD.or.& - NoahMPnew_struc(n)%noahmpnew(t)%smc(j).gt.MAX_THRESHOLD) then - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(j) = MAX_THRESHOLD - NoahMPnew_struc(n)%noahmpnew(t)%smc(j) = MAX_THRESHOLD + if(NoahMP50_struc(n)%noahmp50(t)%sh2o(j).gt.MAX_THRESHOLD.or.& + NoahMP50_struc(n)%noahmp50(t)%smc(j).gt.MAX_THRESHOLD) then + NoahMP50_struc(n)%noahmp50(t)%sh2o(j) = MAX_THRESHOLD + NoahMP50_struc(n)%noahmp50(t)%smc(j) = MAX_THRESHOLD endif - if(NoahMPnew_struc(n)%noahmpnew(t)%sh2o(j).lt.MIN_THRESHOLD.or.& - NoahMPnew_struc(n)%noahmpnew(t)%smc(j).lt.MIN_THRESHOLD) then - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(j) = MIN_THRESHOLD - NoahMPnew_struc(n)%noahmpnew(t)%smc(j) = MIN_THRESHOLD + if(NoahMP50_struc(n)%noahmp50(t)%sh2o(j).lt.MIN_THRESHOLD.or.& + NoahMP50_struc(n)%noahmp50(t)%smc(j).lt.MIN_THRESHOLD) then + NoahMP50_struc(n)%noahmp50(t)%sh2o(j) = MIN_THRESHOLD + NoahMP50_struc(n)%noahmp50(t)%smc(j) = MIN_THRESHOLD endif ! print*, i, m -! print*, 'smc',t, NoahMPnew_struc(n)%noahmpnew(t)%smc(:) -! print*, 'sh2o ',t,NoahMPnew_struc(n)%noahmpnew(t)%sh2o(:) -! print*, 'max ',t,MAX_THRESHOLD !NoahMPnew_struc(n)%noahmpnew(t)%smcmax +! print*, 'smc',t, NoahMP50_struc(n)%noahmp50(t)%smc(:) +! print*, 'sh2o ',t,NoahMP50_struc(n)%noahmp50(t)%sh2o(:) +! print*, 'max ',t,MAX_THRESHOLD !NoahMP50_struc(n)%noahmp50(t)%smcmax enddo ! call LIS_endrun() enddo @@ -504,5 +504,5 @@ subroutine NoahMPnew_setsoilm(n, LSM_State) enddo -end subroutine NoahMPnew_setsoilm +end subroutine NoahMP50_setsoilm diff --git a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_updatesoilm.F90 b/lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_updatesoilm.F90 similarity index 70% rename from lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_updatesoilm.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_updatesoilm.F90 index eaa3904b8..abe8e8950 100644 --- a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_updatesoilm.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_updatesoilm.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: NoahMPnew_updatesoilm -! \label{NoahMPnew_updatesoilm} +! !ROUTINE: NoahMP50_updatesoilm +! \label{NoahMP50_updatesoilm} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -17,12 +17,12 @@ ! 15 Dec 2018: Mahdi Navari; Modified for NoahMP401 ! ! !INTERFACE: -subroutine NoahMPnew_updatesoilm(n, LSM_State, LSM_Incr_State) +subroutine NoahMP50_updatesoilm(n, LSM_State, LSM_Incr_State) ! !USES: use ESMF use LIS_coreMod use LIS_logMod - use NoahMPnew_lsmMod + use NoahMP50_lsmMod implicit none ! !ARGUMENTS: @@ -59,55 +59,55 @@ subroutine NoahMPnew_updatesoilm(n, LSM_State, LSM_Incr_State) call ESMF_StateGet(LSM_State,"Soil Moisture Layer 1",sm1Field,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 1 failed in NoahMPnew_updatesoilm") + "ESMF_StateGet: Soil Moisture Layer 1 failed in NoahMP50_updatesoilm") call ESMF_StateGet(LSM_State,"Soil Moisture Layer 2",sm2Field,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 2 failed in NoahMPnew_updatesoilm") + "ESMF_StateGet: Soil Moisture Layer 2 failed in NoahMP50_updatesoilm") call ESMF_StateGet(LSM_State,"Soil Moisture Layer 3",sm3Field,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 3 failed in NoahMPnew_updatesoilm") + "ESMF_StateGet: Soil Moisture Layer 3 failed in NoahMP50_updatesoilm") call ESMF_StateGet(LSM_State,"Soil Moisture Layer 4",sm4Field,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 4 failed in NoahMPnew_updatesoilm") + "ESMF_StateGet: Soil Moisture Layer 4 failed in NoahMP50_updatesoilm") call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm1,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 1 failed in NoahMPnew_updatesoilm") + "ESMF_FieldGet: Soil Moisture Layer 1 failed in NoahMP50_updatesoilm") call ESMF_FieldGet(sm2Field,localDE=0,farrayPtr=soilm2,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 2 failed in NoahMPnew_updatesoilm") + "ESMF_FieldGet: Soil Moisture Layer 2 failed in NoahMP50_updatesoilm") call ESMF_FieldGet(sm3Field,localDE=0,farrayPtr=soilm3,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 3 failed in NoahMPnew_updatesoilm") + "ESMF_FieldGet: Soil Moisture Layer 3 failed in NoahMP50_updatesoilm") call ESMF_FieldGet(sm4Field,localDE=0,farrayPtr=soilm4,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 4 failed in NoahMPnew_updatesoilm") + "ESMF_FieldGet: Soil Moisture Layer 4 failed in NoahMP50_updatesoilm") call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 1",sm1IncrField,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 1 failed in NoahMPnew_updatesoilm") + "ESMF_StateGet: Soil Moisture Layer 1 failed in NoahMP50_updatesoilm") call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 2",sm2IncrField,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 2 failed in NoahMPnew_updatesoilm") + "ESMF_StateGet: Soil Moisture Layer 2 failed in NoahMP50_updatesoilm") call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 3",sm3IncrField,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 3 failed in NoahMPnew_updatesoilm") + "ESMF_StateGet: Soil Moisture Layer 3 failed in NoahMP50_updatesoilm") call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 4",sm4IncrField,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 4 failed in NoahMPnew_updatesoilm") + "ESMF_StateGet: Soil Moisture Layer 4 failed in NoahMP50_updatesoilm") call ESMF_FieldGet(sm1IncrField,localDE=0,farrayPtr=soilmIncr1,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 1 failed in NoahMPnew_updatesoilm") + "ESMF_FieldGet: Soil Moisture Layer 1 failed in NoahMP50_updatesoilm") call ESMF_FieldGet(sm2IncrField,localDE=0,farrayPtr=soilmIncr2,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 2 failed in NoahMPnew_updatesoilm") + "ESMF_FieldGet: Soil Moisture Layer 2 failed in NoahMP50_updatesoilm") call ESMF_FieldGet(sm3IncrField,localDE=0,farrayPtr=soilmIncr3,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 3 failed in NoahMPnew_updatesoilm") + "ESMF_FieldGet: Soil Moisture Layer 3 failed in NoahMP50_updatesoilm") call ESMF_FieldGet(sm4IncrField,localDE=0,farrayPtr=soilmIncr4,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 4 failed in NoahMPnew_updatesoilm") + "ESMF_FieldGet: Soil Moisture Layer 4 failed in NoahMP50_updatesoilm") do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) soilm1(t) = soilm1(t) + soilmIncr1(t) @@ -115,5 +115,5 @@ subroutine NoahMPnew_updatesoilm(n, LSM_State, LSM_Incr_State) soilm3(t) = soilm3(t) + soilmIncr3(t) soilm4(t) = soilm4(t) + soilmIncr4(t) enddo -end subroutine NoahMPnew_updatesoilm +end subroutine NoahMP50_updatesoilm diff --git a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_write_soilm.F90 b/lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_write_soilm.F90 similarity index 81% rename from lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_write_soilm.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_write_soilm.F90 index 0aab2b25d..5133c8352 100644 --- a/lis/surfacemodels/land/noahmp.new/da_soilm/noahmpnew_write_soilm.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_write_soilm.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: NoahMPnew_write_soilm -! \label{NoahMPnew_write_soilm} +! !ROUTINE: NoahMP50_write_soilm +! \label{NoahMP50_write_soilm} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -18,12 +18,12 @@ ! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine NoahMPnew_write_soilm(ftn,n, LSM_State) +subroutine NoahMP50_write_soilm(ftn,n, LSM_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc - use NoahMPnew_lsmMod + use NoahMP50_lsmMod use LIS_historyMod, only : LIS_writevar_restart implicit none ! !ARGUMENTS: @@ -48,25 +48,25 @@ subroutine NoahMPnew_write_soilm(ftn,n, LSM_State) allocate(tmp(LIS_rc%npatch(n,LIS_rc%lsm_index))) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(1) + tmp(t) = NoahMP50_struc(n)%noahmp50(t)%smc(1) enddo call LIS_writevar_restart(ftn,n,1,tmp) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(2) + tmp(t) = NoahMP50_struc(n)%noahmp50(t)%smc(2) enddo call LIS_writevar_restart(ftn,n,1,tmp) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(3) + tmp(t) = NoahMP50_struc(n)%noahmp50(t)%smc(3) enddo call LIS_writevar_restart(ftn,n,1,tmp) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(4) + tmp(t) = NoahMP50_struc(n)%noahmp50(t)%smc(4) enddo call LIS_writevar_restart(ftn,n,1,tmp) deallocate(tmp) -end subroutine NoahMPnew_write_soilm +end subroutine NoahMP50_write_soilm diff --git a/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_datws_Mod.F90 b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_datws_Mod.F90 similarity index 80% rename from lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_datws_Mod.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_datws_Mod.F90 index 6ec915d62..07390f7a3 100755 --- a/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_datws_Mod.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_datws_Mod.F90 @@ -8,10 +8,10 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- #include "LIS_misc.h" -module noahmpnew_datws_Mod +module noahmp50_datws_Mod !BOP ! -! !MODULE: noahmpnew_datws_Mod +! !MODULE: noahmp50_datws_Mod ! ! !DESCRIPTION: ! @@ -32,11 +32,11 @@ module noahmpnew_datws_Mod !----------------------------------------------------------------------------- ! !PUBLIC MEMBER FUNCTIONS: !----------------------------------------------------------------------------- - public :: noahmpnew_datws_init + public :: noahmp50_datws_init !----------------------------------------------------------------------------- ! !PUBLIC TYPES: !----------------------------------------------------------------------------- - public :: noahmpnew_dasm_struc + public :: noahmp50_dasm_struc !EOP type, public :: dasm_dec @@ -50,16 +50,16 @@ module noahmpnew_datws_Mod end type dasm_dec - type(dasm_dec), allocatable :: noahmpnew_dasm_struc(:) + type(dasm_dec), allocatable :: noahmp50_dasm_struc(:) contains !BOP ! -! !ROUTINE: noahmpnew_datws_init -! \label{noahmpnew_datws_init} +! !ROUTINE: noahmp50_datws_init +! \label{noahmp50_datws_init} ! ! !INTERFACE: - subroutine noahmpnew_datws_init(k) + subroutine noahmp50_datws_init(k) ! !USES: ! !DESCRIPTION: ! @@ -73,9 +73,9 @@ subroutine noahmpnew_datws_init(k) integer :: status integer :: ngrid - if(.not.allocated(noahmpnew_dasm_struc)) then - allocate(noahmpnew_dasm_struc(LIS_rc%nnest)) + if(.not.allocated(noahmp50_dasm_struc)) then + allocate(noahmp50_dasm_struc(LIS_rc%nnest)) endif - end subroutine noahmpnew_datws_init -end module noahmpnew_datws_Mod + end subroutine noahmp50_datws_init +end module noahmp50_datws_Mod diff --git a/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_descale_tws.F90 b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_descale_tws.F90 similarity index 76% rename from lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_descale_tws.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_descale_tws.F90 index 70382aef3..406fc09b2 100755 --- a/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_descale_tws.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_descale_tws.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_descale_tws -! \label{noahmpnew_descale_tws} +! !ROUTINE: noahmp50_descale_tws +! \label{noahmp50_descale_tws} ! ! !REVISION HISTORY: ! 14 Mar 2017: Sujay Kumar; Initial Specification @@ -17,13 +17,13 @@ ! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmpnew_descale_tws(n, LSM_State, LSM_Incr_State) +subroutine noahmp50_descale_tws(n, LSM_State, LSM_Incr_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_verify - use noahmpnew_lsmMod + use noahmp50_lsmMod use LIS_constantsMod, only : LIS_CONST_RHOFW ! Natt implicit none @@ -85,45 +85,45 @@ subroutine noahmpnew_descale_tws(n, LSM_State, LSM_Incr_State) ! Natt ! Descale TWS states call ESMF_StateGet(LSM_State,"Soil Moisture Layer 1",sm1Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm1 in noahmpnew_descale_tws') + call LIS_verify(status,'ESMF_StateGet failed for sm1 in noahmp50_descale_tws') call ESMF_StateGet(LSM_State,"Soil Moisture Layer 2",sm2Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm2 in noahmpnew_descale_tws') + call LIS_verify(status,'ESMF_StateGet failed for sm2 in noahmp50_descale_tws') call ESMF_StateGet(LSM_State,"Soil Moisture Layer 3",sm3Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm3 in noahmpnew_descale_tws') + call LIS_verify(status,'ESMF_StateGet failed for sm3 in noahmp50_descale_tws') call ESMF_StateGet(LSM_State,"Soil Moisture Layer 4",sm4Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm4 in noahmpnew_descale_tws') + call LIS_verify(status,'ESMF_StateGet failed for sm4 in noahmp50_descale_tws') call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for SWE in noahmpnew_descale_tws') + call LIS_verify(status,'ESMF_StateGet failed for SWE in noahmp50_descale_tws') call ESMF_StateGet(LSM_State,"Snowdepth",snodField,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for Snowdepth in noahmpnew_descale_tws') + call LIS_verify(status,'ESMF_StateGet failed for Snowdepth in noahmp50_descale_tws') call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm1,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm1 in noahmpnew_descale_tws') + call LIS_verify(status,'ESMF_FieldGet failed for sm1 in noahmp50_descale_tws') call ESMF_FieldGet(sm2Field,localDE=0,farrayPtr=soilm2,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm2 in noahmpnew_descale_tws') + call LIS_verify(status,'ESMF_FieldGet failed for sm2 in noahmp50_descale_tws') call ESMF_FieldGet(sm3Field,localDE=0,farrayPtr=soilm3,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm3 in noahmpnew_descale_tws') + call LIS_verify(status,'ESMF_FieldGet failed for sm3 in noahmp50_descale_tws') call ESMF_FieldGet(sm4Field,localDE=0,farrayPtr=soilm4,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm4 in noahmpnew_descale_tws') + call LIS_verify(status,'ESMF_FieldGet failed for sm4 in noahmp50_descale_tws') call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for SWE in noahmpnew_descale_tws') + call LIS_verify(status,'ESMF_FieldGet failed for SWE in noahmp50_descale_tws') call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for Snowdepth in noahmpnew_descale_tws') + call LIS_verify(status,'ESMF_FieldGet failed for Snowdepth in noahmp50_descale_tws') ! Natt ! Descale TWS state increment call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 1",sm1IncrField,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 1 failed in noahmpnew_descale_tws") + "ESMF_StateGet: Soil Moisture Layer 1 failed in noahmp50_descale_tws") call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 2",sm2IncrField,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 2 failed in noahmpnew_descale_tws") + "ESMF_StateGet: Soil Moisture Layer 2 failed in noahmp50_descale_tws") call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 3",sm3IncrField,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 3 failed in noahmpnew_descale_tws") + "ESMF_StateGet: Soil Moisture Layer 3 failed in noahmp50_descale_tws") call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 4",sm4IncrField,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 4 failed in noahmpnew_descale_tws") + "ESMF_StateGet: Soil Moisture Layer 4 failed in noahmp50_descale_tws") call ESMF_StateGet(LSM_Incr_State,"SWE",sweIncrField,rc=status) call LIS_verify(status) call ESMF_StateGet(LSM_Incr_State,"Snowdepth",snodIncrField,rc=status) @@ -131,16 +131,16 @@ subroutine noahmpnew_descale_tws(n, LSM_State, LSM_Incr_State) call ESMF_FieldGet(sm1IncrField,localDE=0,farrayPtr=soilmIncr1,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 1 failed in noahmpnew_descale_tws") + "ESMF_FieldGet: Soil Moisture Layer 1 failed in noahmp50_descale_tws") call ESMF_FieldGet(sm2IncrField,localDE=0,farrayPtr=soilmIncr2,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 2 failed in noahmpnew_descale_tws") + "ESMF_FieldGet: Soil Moisture Layer 2 failed in noahmp50_descale_tws") call ESMF_FieldGet(sm3IncrField,localDE=0,farrayPtr=soilmIncr3,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 3 failed in noahmpnew_descale_tws") + "ESMF_FieldGet: Soil Moisture Layer 3 failed in noahmp50_descale_tws") call ESMF_FieldGet(sm4IncrField,localDE=0,farrayPtr=soilmIncr4,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 4 failed in noahmpnew_descale_tws") + "ESMF_FieldGet: Soil Moisture Layer 4 failed in noahmp50_descale_tws") call ESMF_FieldGet(sweIncrField,localDE=0,farrayPtr=sweincr,rc=status) call LIS_verify(status) call ESMF_FieldGet(snodIncrField,localDE=0,farrayPtr=snodincr,rc=status) @@ -148,13 +148,13 @@ subroutine noahmpnew_descale_tws(n, LSM_State, LSM_Incr_State) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - !SOILTYP = NoahMPnew_struc(n)%noahmpnew(t)%soiltype - !MAX_THRESHOLD = NoahMPnew_struc(n)%noahmpnew(t)%param%SMCMAX(1) - !MIN_THRESHOLD = NoahMPnew_struc(n)%noahmpnew(t)%param%SMCWLT(1) - soilm1(t) = soilm1(t) / (NoahMPnew_struc(n)%sldpth(1)*1000.0) ! mm -> m3m-3 - soilm2(t) = soilm2(t) / (NoahMPnew_struc(n)%sldpth(2)*1000.0) ! mm -> m3m-3 - soilm3(t) = soilm3(t) / (NoahMPnew_struc(n)%sldpth(3)*1000.0) ! mm -> m3m-3 - soilm4(t) = soilm4(t) / (NoahMPnew_struc(n)%sldpth(4)*1000.0) ! mm -> m3m-3 + !SOILTYP = NoahMP50_struc(n)%noahmp50(t)%soiltype + !MAX_THRESHOLD = NoahMP50_struc(n)%noahmp50(t)%param%SMCMAX(1) + !MIN_THRESHOLD = NoahMP50_struc(n)%noahmp50(t)%param%SMCWLT(1) + soilm1(t) = soilm1(t) / (NoahMP50_struc(n)%sldpth(1)*1000.0) ! mm -> m3m-3 + soilm2(t) = soilm2(t) / (NoahMP50_struc(n)%sldpth(2)*1000.0) ! mm -> m3m-3 + soilm3(t) = soilm3(t) / (NoahMP50_struc(n)%sldpth(3)*1000.0) ! mm -> m3m-3 + soilm4(t) = soilm4(t) / (NoahMP50_struc(n)%sldpth(4)*1000.0) ! mm -> m3m-3 !if (soilm1(t) .lt. MIN_THRESHOLD) soilm1(t) = MIN_THRESHOLD !if (soilm2(t) .lt. MIN_THRESHOLD) soilm2(t) = MIN_THRESHOLD !if (soilm3(t) .lt. MIN_THRESHOLD) soilm3(t) = MIN_THRESHOLD @@ -166,14 +166,14 @@ subroutine noahmpnew_descale_tws(n, LSM_State, LSM_Incr_State) swe(t) = swe(t) / 1000.0 ! mm -> m snod(t) = snod(t) / 1000.0 ! mm -> m - soilmIncr1(t) = soilmIncr1(t) / (NoahMPnew_struc(n)%sldpth(1)*1000.0) ! mm -> m3m-3 - soilmIncr2(t) = soilmIncr2(t) / (NoahMPnew_struc(n)%sldpth(2)*1000.0) ! mm -> m3m-3 - soilmIncr3(t) = soilmIncr3(t) / (NoahMPnew_struc(n)%sldpth(3)*1000.0) ! mm -> m3m-3 - soilmIncr4(t) = soilmIncr4(t) / (NoahMPnew_struc(n)%sldpth(4)*1000.0) ! mm -> m3m-3 + soilmIncr1(t) = soilmIncr1(t) / (NoahMP50_struc(n)%sldpth(1)*1000.0) ! mm -> m3m-3 + soilmIncr2(t) = soilmIncr2(t) / (NoahMP50_struc(n)%sldpth(2)*1000.0) ! mm -> m3m-3 + soilmIncr3(t) = soilmIncr3(t) / (NoahMP50_struc(n)%sldpth(3)*1000.0) ! mm -> m3m-3 + soilmIncr4(t) = soilmIncr4(t) / (NoahMP50_struc(n)%sldpth(4)*1000.0) ! mm -> m3m-3 sweincr(t) = sweincr(t) / 1000.0 ! mm -> m snodincr(t) = snodincr(t) / 1000.0 ! mm -> m enddo #endif -end subroutine noahmpnew_descale_tws +end subroutine noahmp50_descale_tws diff --git a/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_gettws.F90 b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_gettws.F90 similarity index 80% rename from lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_gettws.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_gettws.F90 index 8ab401640..39ff075d6 100755 --- a/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_gettws.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_gettws.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_gettws -! \label{noahmpnew_gettws} +! !ROUTINE: noahmp50_gettws +! \label{noahmp50_gettws} ! ! !REVISION HISTORY: ! 14 Mar 2017: Sujay Kumar; Initial Specification @@ -17,13 +17,13 @@ ! 29 May 2020: Bailing Li; created for Noah-MP4.0.1 ! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! !INTERFACE: -subroutine noahmpnew_gettws(n, LSM_State) +subroutine noahmp50_gettws(n, LSM_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_verify - use noahmpnew_lsmMod + use noahmp50_lsmMod implicit none ! !ARGUMENTS: @@ -60,44 +60,44 @@ subroutine noahmpnew_gettws(n, LSM_State) character*100 :: lsm_state_objs(4) call ESMF_StateGet(LSM_State,"Soil Moisture Layer 1",sm1Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm1 in noahmpnew_gettws') + call LIS_verify(status,'ESMF_StateGet failed for sm1 in noahmp50_gettws') call ESMF_StateGet(LSM_State,"Soil Moisture Layer 2",sm2Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm2 in noahmpnew_gettws') + call LIS_verify(status,'ESMF_StateGet failed for sm2 in noahmp50_gettws') call ESMF_StateGet(LSM_State,"Soil Moisture Layer 3",sm3Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm3 in noahmpnew_gettws') + call LIS_verify(status,'ESMF_StateGet failed for sm3 in noahmp50_gettws') call ESMF_StateGet(LSM_State,"Soil Moisture Layer 4",sm4Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm4 in noahmpnew_gettws') + call LIS_verify(status,'ESMF_StateGet failed for sm4 in noahmp50_gettws') call ESMF_StateGet(LSM_State,"Groundwater Storage",gwField,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for gw in noahmpnew_gettws') + call LIS_verify(status,'ESMF_StateGet failed for gw in noahmp50_gettws') call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for SWE in noahmpnew_gettws') + call LIS_verify(status,'ESMF_StateGet failed for SWE in noahmp50_gettws') call ESMF_StateGet(LSM_State,"Snowdepth",snodField,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for Snowdepth in noahmpnew_gettws') + call LIS_verify(status,'ESMF_StateGet failed for Snowdepth in noahmp50_gettws') call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm1,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm1 in noahmpnew_gettws') + call LIS_verify(status,'ESMF_FieldGet failed for sm1 in noahmp50_gettws') call ESMF_FieldGet(sm2Field,localDE=0,farrayPtr=soilm2,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm2 in noahmpnew_gettws') + call LIS_verify(status,'ESMF_FieldGet failed for sm2 in noahmp50_gettws') call ESMF_FieldGet(sm3Field,localDE=0,farrayPtr=soilm3,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm3 in noahmpnew_gettws') + call LIS_verify(status,'ESMF_FieldGet failed for sm3 in noahmp50_gettws') call ESMF_FieldGet(sm4Field,localDE=0,farrayPtr=soilm4,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm4 in noahmpnew_gettws') + call LIS_verify(status,'ESMF_FieldGet failed for sm4 in noahmp50_gettws') call ESMF_FieldGet(gwField,localDE=0,farrayPtr=gws,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for gw in noahmpnew_gettws') + call LIS_verify(status,'ESMF_FieldGet failed for gw in noahmp50_gettws') call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for SWE in noahmpnew_gettws') + call LIS_verify(status,'ESMF_FieldGet failed for SWE in noahmp50_gettws') call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for Snowdepth in noahmpnew_gettws') + call LIS_verify(status,'ESMF_FieldGet failed for Snowdepth in noahmp50_gettws') do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) !to mm - soilm1(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(1) - soilm2(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(2) - soilm3(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(3) - soilm4(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(4) - gws(t) = NoahMPnew_struc(n)%noahmpnew(t)%wa - swe(t) = NoahMPnew_struc(n)%noahmpnew(t)%sneqv - snod(t) = NoahMPnew_struc(n)%noahmpnew(t)%snowh + soilm1(t) = NoahMP50_struc(n)%noahmp50(t)%smc(1) + soilm2(t) = NoahMP50_struc(n)%noahmp50(t)%smc(2) + soilm3(t) = NoahMP50_struc(n)%noahmp50(t)%smc(3) + soilm4(t) = NoahMP50_struc(n)%noahmp50(t)%smc(4) + gws(t) = NoahMP50_struc(n)%noahmp50(t)%wa + swe(t) = NoahMP50_struc(n)%noahmp50(t)%sneqv + snod(t) = NoahMP50_struc(n)%noahmp50(t)%snowh enddo -end subroutine noahmpnew_gettws +end subroutine noahmp50_gettws diff --git a/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_gettwspred.F90 b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_gettwspred.F90 similarity index 88% rename from lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_gettwspred.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_gettwspred.F90 index 4159b1f85..3d9be62ce 100755 --- a/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_gettwspred.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_gettwspred.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_gettwspred -! \label{noahmpnew_gettwspred} +! !ROUTINE: noahmp50_gettwspred +! \label{noahmp50_gettwspred} ! ! !REVISION HISTORY: ! 14 Mar 2017: Sujay Kumar; Initial Specification @@ -17,14 +17,14 @@ ! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmpnew_gettwspred(n, k,obs_pred) +subroutine noahmp50_gettwspred(n, k,obs_pred) ! !USES: use ESMF use LIS_coreMod use LIS_logMod use LIS_DAobservationsMod - use noahmpnew_tws_DAlogMod - use noahmpnew_lsmMod + use noahmp50_tws_DAlogMod + use noahmp50_lsmMod !EOP @@ -57,4 +57,4 @@ subroutine noahmpnew_gettwspred(n, k,obs_pred) LIS_rc%lsm_index, & tws,& obs_pred) -end subroutine noahmpnew_gettwspred +end subroutine noahmp50_gettwspred diff --git a/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_qc_twsobs.F90 b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_qc_twsobs.F90 similarity index 88% rename from lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_qc_twsobs.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_qc_twsobs.F90 index 82d445ab0..a26c6f278 100755 --- a/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_qc_twsobs.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_qc_twsobs.F90 @@ -8,21 +8,21 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_qc_twsobs -! \label{noahmpnew_qc_twsobs} +! !ROUTINE: noahmp50_qc_twsobs +! \label{noahmp50_qc_twsobs} ! ! !REVISION HISTORY: ! 14 Mar 2017: Sujay Kumar: Initial Specification ! ! !INTERFACE: -subroutine noahmpnew_qc_twsobs(n,k,OBS_State) +subroutine noahmp50_qc_twsobs(n,k,OBS_State) ! !USES: use ESMF use LIS_coreMod use LIS_logMod, only : LIS_verify use LIS_constantsMod, only : LIS_CONST_TKFRZ use LIS_DAobservationsMod - use noahmpnew_lsmMod + use noahmp50_lsmMod implicit none @@ -46,4 +46,4 @@ subroutine noahmpnew_qc_twsobs(n,k,OBS_State) ! \end{description} ! !EOP -end subroutine noahmpnew_qc_twsobs +end subroutine noahmp50_qc_twsobs diff --git a/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_qctws.F90 b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_qctws.F90 similarity index 86% rename from lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_qctws.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_qctws.F90 index f0f498883..5e7818db4 100755 --- a/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_qctws.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_qctws.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_qctws -! \label{noahmpnew_qctws} +! !ROUTINE: noahmp50_qctws +! \label{noahmp50_qctws} ! ! !REVISION HISTORY: ! 14 Mar 2017: Sujay Kumar; Initial Specification @@ -17,13 +17,13 @@ ! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmpnew_qctws(n, LSM_State) +subroutine noahmp50_qctws(n, LSM_State) ! !USES: use ESMF use LIS_coreMod use LIS_logMod, only : LIS_verify - use noahmpnew_lsmMod + use noahmp50_lsmMod implicit none ! !ARGUMENTS: @@ -74,50 +74,50 @@ subroutine noahmpnew_qctws(n, LSM_State) call ESMF_StateGet(LSM_State,"Soil Moisture Layer 1",sm1Field,rc=status) call LIS_verify(status,& - "ESMF_StateGet for Soil Moisture Layer 1 failed in noahmpnew_qctws") + "ESMF_StateGet for Soil Moisture Layer 1 failed in noahmp50_qctws") call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm1,rc=status) call LIS_verify(status,& - "ESMF_FieldGet for Soil Moisture Layer 1 failed in noahmpnew_qctws") + "ESMF_FieldGet for Soil Moisture Layer 1 failed in noahmp50_qctws") call ESMF_StateGet(LSM_State,"Soil Moisture Layer 2",sm2Field,rc=status) call LIS_verify(status,& - "ESMF_StateGet for Soil Moisture Layer 2 failed in noahmpnew_qctws") + "ESMF_StateGet for Soil Moisture Layer 2 failed in noahmp50_qctws") call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm2,rc=status) call LIS_verify(status,& - "ESMF_FieldGet for Soil Moisture Layer 2 failed in noahmpnew_qctws") + "ESMF_FieldGet for Soil Moisture Layer 2 failed in noahmp50_qctws") call ESMF_StateGet(LSM_State,"Soil Moisture Layer 3",sm3Field,rc=status) call LIS_verify(status,& - "ESMF_StateGet for Soil Moisture Layer 3 failed in noahmpnew_qctws") + "ESMF_StateGet for Soil Moisture Layer 3 failed in noahmp50_qctws") call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm3,rc=status) call LIS_verify(status,& - "ESMF_FieldGet for Soil Moisture Layer 3 failed in noahmpnew_qctws") + "ESMF_FieldGet for Soil Moisture Layer 3 failed in noahmp50_qctws") call ESMF_StateGet(LSM_State,"Soil Moisture Layer 4",sm4Field,rc=status) call LIS_verify(status,& - "ESMF_StateGet for Soil Moisture Layer 4 failed in noahmpnew_qctws") + "ESMF_StateGet for Soil Moisture Layer 4 failed in noahmp50_qctws") call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm4,rc=status) call LIS_verify(status,& - "ESMF_FieldGet for Soil Moisture Layer 4 failed in noahmpnew_qctws") + "ESMF_FieldGet for Soil Moisture Layer 4 failed in noahmp50_qctws") !Wanshu call ESMF_StateGet(LSM_State,"Groundwater Storage",gwField,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for gw in noahmpnew_qctws') + call LIS_verify(status,'ESMF_StateGet failed for gw in noahmp50_qctws') call ESMF_FieldGet(gwField,localDE=0,farrayPtr=gws,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for gw in noahmpnew_qctws') + call LIS_verify(status,'ESMF_FieldGet failed for gw in noahmp50_qctws') call ESMF_AttributeGet(gwField,"Max Value",gwsmax,rc=status) call LIS_verify(status,& - "ESMF_AttributeGet: Max Value failed in noahmpnew_qctws") + "ESMF_AttributeGet: Max Value failed in noahmp50_qctws") call ESMF_AttributeGet(gwField,"Min Value",gwsmin,rc=status) call LIS_verify(status,& - "ESMF_AttributeGet: Min Value failed in noahmpnew_qctws") + "ESMF_AttributeGet: Min Value failed in noahmp50_qctws") call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) call LIS_verify(status) @@ -143,9 +143,9 @@ subroutine noahmpnew_qctws(n, LSM_State) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) !Bailing Li: max min soil moisture should be retrieved based on soil type - SOILTYP = NoahMPnew_struc(n)%noahmpnew(t)%soiltype - MAX_THRESHOLD = NoahMPnew_struc(n)%noahmpnew(t)%param%SMCMAX(1) !SMCMAX_TABLE(SOILTYP) - MIN_THRESHOLD = NoahMPnew_struc(n)%noahmpnew(t)%param%SMCWLT(1) !SMCWLT_TABLE(SOILTYP) + SOILTYP = NoahMP50_struc(n)%noahmp50(t)%soiltype + MAX_THRESHOLD = NoahMP50_struc(n)%noahmp50(t)%param%SMCMAX(1) !SMCMAX_TABLE(SOILTYP) + MIN_THRESHOLD = NoahMP50_struc(n)%noahmp50(t)%param%SMCWLT(1) !SMCWLT_TABLE(SOILTYP) sm_threshold = MAX_THRESHOLD - 0.02 @@ -208,8 +208,8 @@ subroutine noahmpnew_qctws(n, LSM_State) !Use the model's snow density from the previous timestep sndens = 0.0 - if(NoahMPnew_struc(n)%noahmpnew(t)%snowh.gt.0) then - sndens = NoahMPnew_struc(n)%noahmpnew(t)%sneqv/NoahMPnew_struc(n)%noahmpnew(t)%snowh + if(NoahMP50_struc(n)%noahmp50(t)%snowh.gt.0) then + sndens = NoahMP50_struc(n)%noahmp50(t)%sneqv/NoahMP50_struc(n)%noahmp50(t)%snowh endif !If the update is unphysical, do not update. @@ -217,8 +217,8 @@ subroutine noahmpnew_qctws(n, LSM_State) snod(t) = snod(t) swe(t) = snod(t)*sndens else ! do not update - snod(t) = NoahMPnew_struc(n)%noahmpnew(t)%snowh - swe(t) = NoahMPnew_struc(n)%noahmpnew(t)%sneqv + snod(t) = NoahMP50_struc(n)%noahmp50(t)%snowh + swe(t) = NoahMP50_struc(n)%noahmp50(t)%sneqv end if if(swe(t).gt.swemax) then @@ -230,4 +230,4 @@ subroutine noahmpnew_qctws(n, LSM_State) end do -end subroutine noahmpnew_qctws +end subroutine noahmp50_qctws diff --git a/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_scale_tws.F90 b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_scale_tws.F90 similarity index 83% rename from lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_scale_tws.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_scale_tws.F90 index e4ad6db80..e9dfd243a 100755 --- a/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_scale_tws.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_scale_tws.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_scale_tws -! \label{noahmpnew_scale_tws} +! !ROUTINE: noahmp50_scale_tws +! \label{noahmp50_scale_tws} ! ! !REVISION HISTORY: ! 14 Mar 2017: Sujay Kumar; Initial Specification @@ -17,13 +17,13 @@ ! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmpnew_scale_tws(n, LSM_State) +subroutine noahmp50_scale_tws(n, LSM_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_verify - use noahmpnew_lsmMod + use noahmp50_lsmMod use LIS_constantsMod, only : LIS_CONST_RHOFW ! Natt implicit none @@ -69,39 +69,39 @@ subroutine noahmpnew_scale_tws(n, LSM_State) ! Natt ! Scale TWS states to mm (Note, GWS is already in mm) call ESMF_StateGet(LSM_State,"Soil Moisture Layer 1",sm1Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm1 in noahmpnew_scale_tws') + call LIS_verify(status,'ESMF_StateGet failed for sm1 in noahmp50_scale_tws') call ESMF_StateGet(LSM_State,"Soil Moisture Layer 2",sm2Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm2 in noahmpnew_scale_tws') + call LIS_verify(status,'ESMF_StateGet failed for sm2 in noahmp50_scale_tws') call ESMF_StateGet(LSM_State,"Soil Moisture Layer 3",sm3Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm3 in noahmpnew_scale_tws') + call LIS_verify(status,'ESMF_StateGet failed for sm3 in noahmp50_scale_tws') call ESMF_StateGet(LSM_State,"Soil Moisture Layer 4",sm4Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm4 in noahmpnew_scale_tws') + call LIS_verify(status,'ESMF_StateGet failed for sm4 in noahmp50_scale_tws') call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for SWE in noahmpnew_scale_tws') + call LIS_verify(status,'ESMF_StateGet failed for SWE in noahmp50_scale_tws') call ESMF_StateGet(LSM_State,"Snowdepth",snodField,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for Snowdepth in noahmpnew_scale_tws') + call LIS_verify(status,'ESMF_StateGet failed for Snowdepth in noahmp50_scale_tws') call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm1,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm1 in noahmpnew_scale_tws') + call LIS_verify(status,'ESMF_FieldGet failed for sm1 in noahmp50_scale_tws') call ESMF_FieldGet(sm2Field,localDE=0,farrayPtr=soilm2,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm2 in noahmpnew_scale_tws') + call LIS_verify(status,'ESMF_FieldGet failed for sm2 in noahmp50_scale_tws') call ESMF_FieldGet(sm3Field,localDE=0,farrayPtr=soilm3,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm3 in noahmpnew_scale_tws') + call LIS_verify(status,'ESMF_FieldGet failed for sm3 in noahmp50_scale_tws') call ESMF_FieldGet(sm4Field,localDE=0,farrayPtr=soilm4,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm4 in noahmpnew_scale_tws') + call LIS_verify(status,'ESMF_FieldGet failed for sm4 in noahmp50_scale_tws') call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for SWE in noahmpnew_scale_tws') + call LIS_verify(status,'ESMF_FieldGet failed for SWE in noahmp50_scale_tws') call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for Snowdepth in noahmpnew_scale_tws') + call LIS_verify(status,'ESMF_FieldGet failed for Snowdepth in noahmp50_scale_tws') do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - soilm1(t) = soilm1(t) * NoahMPnew_struc(n)%sldpth(1)*1000.0 ! m3m-3 -> mm - soilm2(t) = soilm2(t) * NoahMPnew_struc(n)%sldpth(2)*1000.0 ! m3m-3 -> mm - soilm3(t) = soilm3(t) * NoahMPnew_struc(n)%sldpth(3)*1000.0 ! m3m-3 -> mm - soilm4(t) = soilm4(t) * NoahMPnew_struc(n)%sldpth(4)*1000.0 ! m3m-3 -> mm + soilm1(t) = soilm1(t) * NoahMP50_struc(n)%sldpth(1)*1000.0 ! m3m-3 -> mm + soilm2(t) = soilm2(t) * NoahMP50_struc(n)%sldpth(2)*1000.0 ! m3m-3 -> mm + soilm3(t) = soilm3(t) * NoahMP50_struc(n)%sldpth(3)*1000.0 ! m3m-3 -> mm + soilm4(t) = soilm4(t) * NoahMP50_struc(n)%sldpth(4)*1000.0 ! m3m-3 -> mm swe(t) = swe(t) * 1000.0 ! m -> mm snod(t) = snod(t) * 1000.0 ! m -> mm enddo #endif -end subroutine noahmpnew_scale_tws +end subroutine noahmp50_scale_tws diff --git a/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_settws.F90 b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_settws.F90 similarity index 65% rename from lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_settws.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_settws.F90 index fda6b1e64..826b751a9 100755 --- a/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_settws.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_settws.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_settws -! \label{noahmpnew_settws} +! !ROUTINE: noahmp50_settws +! \label{noahmp50_settws} ! ! !REVISION HISTORY: ! 14 Mar 2017: Sujay Kumar; Initial Specification @@ -17,12 +17,12 @@ ! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmpnew_settws(n, LSM_State) +subroutine noahmp50_settws(n, LSM_State) ! !USES: use ESMF use LIS_coreMod use LIS_logMod - use NoahMPnew_lsmMod + use NoahMP50_lsmMod implicit none ! !ARGUMENTS: @@ -75,48 +75,48 @@ subroutine noahmpnew_settws(n, LSM_State) call ESMF_StateGet(LSM_State,"Soil Moisture Layer 1",sm1Field,rc=status) call LIS_verify(status,& - "ESMF_StateSet: Soil Moisture Layer 1 failed in noahmpnew_settws") + "ESMF_StateSet: Soil Moisture Layer 1 failed in noahmp50_settws") call ESMF_StateGet(LSM_State,"Soil Moisture Layer 2",sm2Field,rc=status) call LIS_verify(status,& - "ESMF_StateSet: Soil Moisture Layer 2 failed in noahmpnew_settws") + "ESMF_StateSet: Soil Moisture Layer 2 failed in noahmp50_settws") call ESMF_StateGet(LSM_State,"Soil Moisture Layer 3",sm3Field,rc=status) call LIS_verify(status,& - "ESMF_StateSet: Soil Moisture Layer 3 failed in noahmpnew_settws") + "ESMF_StateSet: Soil Moisture Layer 3 failed in noahmp50_settws") call ESMF_StateGet(LSM_State,"Soil Moisture Layer 4",sm4Field,rc=status) call LIS_verify(status,& - "ESMF_StateSet: Soil Moisture Layer 4 failed in noahmpnew_settws") + "ESMF_StateSet: Soil Moisture Layer 4 failed in noahmp50_settws") call ESMF_StateGet(LSM_State,"Groundwater Storage",gwField,rc=status) call LIS_verify(status,& - "ESMF_StateSet: Groundwater Storage failed in noahmpnew_settws") + "ESMF_StateSet: Groundwater Storage failed in noahmp50_settws") call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) call LIS_verify(status,& - "ESMF_StateSet: SWE failed in noahmpnew_settws") + "ESMF_StateSet: SWE failed in noahmp50_settws") call ESMF_StateGet(LSM_State,"Snowdepth",snodField,rc=status) call LIS_verify(status,& - "ESMF_StateSet: Snowdepth failed in noahmpnew_settws") + "ESMF_StateSet: Snowdepth failed in noahmp50_settws") call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm1,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 1 failed in noahmpnew_settws") + "ESMF_FieldGet: Soil Moisture Layer 1 failed in noahmp50_settws") call ESMF_FieldGet(sm2Field,localDE=0,farrayPtr=soilm2,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 2 failed in noahmpnew_settws") + "ESMF_FieldGet: Soil Moisture Layer 2 failed in noahmp50_settws") call ESMF_FieldGet(sm3Field,localDE=0,farrayPtr=soilm3,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 3 failed in noahmpnew_settws") + "ESMF_FieldGet: Soil Moisture Layer 3 failed in noahmp50_settws") call ESMF_FieldGet(sm4Field,localDE=0,farrayPtr=soilm4,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 4 failed in noahmpnew_settws") + "ESMF_FieldGet: Soil Moisture Layer 4 failed in noahmp50_settws") call ESMF_FieldGet(gwField,localDE=0,farrayPtr=gws,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Groundwater Storage failed in noahmpnew_settws") + "ESMF_FieldGet: Groundwater Storage failed in noahmp50_settws") call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: SWE failed in noahmpnew_settws") + "ESMF_FieldGet: SWE failed in noahmp50_settws") call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Snowdepth failed in noahmpnew_settws") + "ESMF_FieldGet: Snowdepth failed in noahmp50_settws") ensCheck = .true. @@ -129,13 +129,13 @@ subroutine noahmpnew_settws(n, LSM_State) r = LIS_domain(n)%tile(t)%row i = LIS_domain(n)%gindex(c,r) - SOILTYP = NoahMPnew_struc(n)%noahmpnew(t)%soiltype - MAX_THRESHOLD = NoahMPnew_struc(n)%noahmpnew(t)%param%SMCMAX(1) !SMCMAX_TABLE(SOILTYP) + SOILTYP = NoahMP50_struc(n)%noahmp50(t)%soiltype + MAX_THRESHOLD = NoahMP50_struc(n)%noahmp50(t)%param%SMCMAX(1) !SMCMAX_TABLE(SOILTYP) !locations with large soil moisture values are ice points. !we turn off the increments in such locations. - if(NoahMPnew_struc(n)%noahmpnew(t)%smc(1).gt.MAX_THRESHOLD.or.& - NoahMPnew_struc(n)%noahmpnew(t)%smc(1).gt.0.50) then + if(NoahMP50_struc(n)%noahmp50(t)%smc(1).gt.MAX_THRESHOLD.or.& + NoahMP50_struc(n)%noahmp50(t)%smc(1).gt.0.50) then largeSM(i) = .true. endif enddo @@ -146,13 +146,13 @@ subroutine noahmpnew_settws(n, LSM_State) r = LIS_domain(n)%tile(t)%row i = LIS_domain(n)%gindex(c,r) if(largeSM(i)) then - soilm1(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(1) - soilm2(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(2) - soilm3(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(3) - soilm4(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(4) - gws(t) = NoahMPnew_struc(n)%noahmpnew(t)%wa - snod(t) = NoahMPnew_struc(n)%noahmpnew(t)%snowh - swe(t) = NoahMPnew_struc(n)%noahmpnew(t)%sneqv + soilm1(t) = NoahMP50_struc(n)%noahmp50(t)%smc(1) + soilm2(t) = NoahMP50_struc(n)%noahmp50(t)%smc(2) + soilm3(t) = NoahMP50_struc(n)%noahmp50(t)%smc(3) + soilm4(t) = NoahMP50_struc(n)%noahmp50(t)%smc(4) + gws(t) = NoahMP50_struc(n)%noahmp50(t)%wa + snod(t) = NoahMP50_struc(n)%noahmp50(t)%snowh + swe(t) = NoahMP50_struc(n)%noahmp50(t)%sneqv endif enddo @@ -163,8 +163,8 @@ subroutine noahmpnew_settws(n, LSM_State) r = LIS_domain(n)%tile(t)%row i = LIS_domain(n)%gindex(c,r) - SOILTYP = NoahMPnew_struc(n)%noahmpnew(t)%soiltype - MAX_THRESHOLD = NoahMPnew_struc(n)%noahmpnew(t)%param%SMCMAX(1) !SMCMAX_TABLE(SOILTYP) + SOILTYP = NoahMP50_struc(n)%noahmp50(t)%soiltype + MAX_THRESHOLD = NoahMP50_struc(n)%noahmp50(t)%param%SMCMAX(1) !SMCMAX_TABLE(SOILTYP) MIN_THRESHOLD = 0.02 !SMCWLT_TABLE(SOILTYP) sm_threshold = MAX_THRESHOLD - 0.02 @@ -196,23 +196,23 @@ subroutine noahmpnew_settws(n, LSM_State) rc4 = .true. rc5 = .true. if(.not.ensCheck(i).and.diffCheck(i).and.(.not.largeSM(i))) then - call noahmpnew_tws_reorderEnsForOutliers(i,& + call noahmp50_tws_reorderEnsForOutliers(i,& LIS_rc%nensem(n),& soilm1((i-1)*LIS_rc%nensem(n)+1:i*LIS_rc%nensem(n)),& MIN_THRESHOLD, MAX_THRESHOLD,rc1) - call noahmpnew_tws_reorderEnsForOutliers(i,& + call noahmp50_tws_reorderEnsForOutliers(i,& LIS_rc%nensem(n),& soilm2((i-1)*LIS_rc%nensem(n)+1:i*LIS_rc%nensem(n)),& MIN_THRESHOLD, MAX_THRESHOLD,rc2) - call noahmpnew_tws_reorderEnsForOutliers(i,& + call noahmp50_tws_reorderEnsForOutliers(i,& LIS_rc%nensem(n),& soilm3((i-1)*LIS_rc%nensem(n)+1:i*LIS_rc%nensem(n)),& MIN_THRESHOLD, MAX_THRESHOLD,rc3) - call noahmpnew_tws_reorderEnsForOutliers(i,& + call noahmp50_tws_reorderEnsForOutliers(i,& LIS_rc%nensem(n),& soilm4((i-1)*LIS_rc%nensem(n)+1:i*LIS_rc%nensem(n)),& MIN_THRESHOLD, MAX_THRESHOLD,rc4) - call noahmpnew_tws_reorderEnsForOutliers(i,& + call noahmp50_tws_reorderEnsForOutliers(i,& LIS_rc%nensem(n),& gws((i-1)*LIS_rc%nensem(n)+1:i*LIS_rc%nensem(n)),& MIN_GWS_THRESHOLD, MAX_GWS_THRESHOLD,rc5) @@ -225,63 +225,63 @@ subroutine noahmpnew_settws(n, LSM_State) do m=1,LIS_rc%nensem(n) t = (i-1)*LIS_rc%nensem(n)+m - soilm1(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(1) - soilm2(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(2) - soilm3(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(3) - soilm4(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(4) - gws(t) = NoahMPnew_struc(n)%noahmpnew(t)%wa - snod(t) = NoahMPnew_struc(n)%noahmpnew(t)%snowh - swe(t) = NoahMPnew_struc(n)%noahmpnew(t)%sneqv + soilm1(t) = NoahMP50_struc(n)%noahmp50(t)%smc(1) + soilm2(t) = NoahMP50_struc(n)%noahmp50(t)%smc(2) + soilm3(t) = NoahMP50_struc(n)%noahmp50(t)%smc(3) + soilm4(t) = NoahMP50_struc(n)%noahmp50(t)%smc(4) + gws(t) = NoahMP50_struc(n)%noahmp50(t)%wa + snod(t) = NoahMP50_struc(n)%noahmp50(t)%snowh + swe(t) = NoahMP50_struc(n)%noahmp50(t)%sneqv enddo endif enddo do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - delta = soilm1(t) - NoahMPnew_struc(n)%noahmpnew(t)%smc(1) - NoahMPnew_struc(n)%noahmpnew(t)%smc(1) = soilm1(t) - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(1) = & - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(1) + delta + delta = soilm1(t) - NoahMP50_struc(n)%noahmp50(t)%smc(1) + NoahMP50_struc(n)%noahmp50(t)%smc(1) = soilm1(t) + NoahMP50_struc(n)%noahmp50(t)%sh2o(1) = & + NoahMP50_struc(n)%noahmp50(t)%sh2o(1) + delta - delta = soilm2(t) - NoahMPnew_struc(n)%noahmpnew(t)%smc(2) - NoahMPnew_struc(n)%noahmpnew(t)%smc(2) = soilm2(t) - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(2) = & - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(2) + delta + delta = soilm2(t) - NoahMP50_struc(n)%noahmp50(t)%smc(2) + NoahMP50_struc(n)%noahmp50(t)%smc(2) = soilm2(t) + NoahMP50_struc(n)%noahmp50(t)%sh2o(2) = & + NoahMP50_struc(n)%noahmp50(t)%sh2o(2) + delta - delta = soilm3(t) - NoahMPnew_struc(n)%noahmpnew(t)%smc(3) - NoahMPnew_struc(n)%noahmpnew(t)%smc(3) = soilm3(t) - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(3) = & - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(3) + delta + delta = soilm3(t) - NoahMP50_struc(n)%noahmp50(t)%smc(3) + NoahMP50_struc(n)%noahmp50(t)%smc(3) = soilm3(t) + NoahMP50_struc(n)%noahmp50(t)%sh2o(3) = & + NoahMP50_struc(n)%noahmp50(t)%sh2o(3) + delta - delta = soilm4(t) - NoahMPnew_struc(n)%noahmpnew(t)%smc(4) - NoahMPnew_struc(n)%noahmpnew(t)%smc(4) = soilm4(t) - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(4) = & - NoahMPnew_struc(n)%noahmpnew(t)%sh2o(4) + delta + delta = soilm4(t) - NoahMP50_struc(n)%noahmp50(t)%smc(4) + NoahMP50_struc(n)%noahmp50(t)%smc(4) = soilm4(t) + NoahMP50_struc(n)%noahmp50(t)%sh2o(4) = & + NoahMP50_struc(n)%noahmp50(t)%sh2o(4) + delta - NoahMPnew_struc(n)%noahmpnew(t)%wa=gws(t) + NoahMP50_struc(n)%noahmp50(t)%wa=gws(t) enddo do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - swe_old = NoahMPnew_struc(n)%noahmpnew(t)%sneqv - snowh_old = NoahMPnew_struc(n)%noahmpnew(t)%snowh + swe_old = NoahMP50_struc(n)%noahmp50(t)%sneqv + snowh_old = NoahMP50_struc(n)%noahmp50(t)%snowh - dsneqv = swe(t) - NoahMPnew_struc(n)%noahmpnew(t)%sneqv !in mm - dsnowh = snod(t) - NoahMPnew_struc(n)%noahmpnew(t)%snowh !in m + dsneqv = swe(t) - NoahMP50_struc(n)%noahmp50(t)%sneqv !in mm + dsnowh = snod(t) - NoahMP50_struc(n)%noahmp50(t)%snowh !in m !alternate option - call noahmpnew_snow_update(n, t, dsneqv, dsnowh) + call noahmp50_snow_update(n, t, dsneqv, dsnowh) - if(NoahMPnew_struc(n)%noahmpnew(t)%sneqv.eq.0.or.& - NoahMPnew_struc(n)%noahmpnew(t)%snowh.eq.0) then - NoahMPnew_struc(n)%noahmpnew(t)%sneqv = 0 - NoahMPnew_struc(n)%noahmpnew(t)%snowh = 0 + if(NoahMP50_struc(n)%noahmp50(t)%sneqv.eq.0.or.& + NoahMP50_struc(n)%noahmp50(t)%snowh.eq.0) then + NoahMP50_struc(n)%noahmp50(t)%sneqv = 0 + NoahMP50_struc(n)%noahmp50(t)%snowh = 0 endif enddo -end subroutine noahmpnew_settws +end subroutine noahmp50_settws -subroutine noahmpnew_tws_reorderEnsForOutliers(i,nensem, statevec, & +subroutine noahmp50_tws_reorderEnsForOutliers(i,nensem, statevec, & minvalue,maxvalue, status) use LIS_coreMod @@ -343,4 +343,4 @@ subroutine noahmpnew_tws_reorderEnsForOutliers(i,nensem, statevec, & enddo endif -end subroutine noahmpnew_tws_reorderEnsForOutliers +end subroutine noahmp50_tws_reorderEnsForOutliers diff --git a/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_tws_DAlogMod.F90 b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_tws_DAlogMod.F90 similarity index 73% rename from lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_tws_DAlogMod.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_tws_DAlogMod.F90 index c3dc97378..a28c9f946 100755 --- a/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_tws_DAlogMod.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_tws_DAlogMod.F90 @@ -13,13 +13,13 @@ ! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! -module noahmpnew_tws_DAlogMod +module noahmp50_tws_DAlogMod use LIS_constantsMod, only : LIS_CONST_RHOFW use ESMF ! !PUBLIC MEMBER FUNCTIONS: !------------------------------------------ - public :: noahmpnew_tws_DAlog + public :: noahmp50_tws_DAlog !----------------------------------------- ! !PUBLIC TYPES: !----------------------------------------- @@ -36,12 +36,12 @@ module noahmpnew_tws_DAlogMod contains - subroutine noahmpnew_tws_DAlog(n) + subroutine noahmp50_tws_DAlog(n) ! USES: use LIS_coreMod, only : LIS_rc,LIS_surface use LIS_timeMgrMod - use noahmpnew_lsmMod + use noahmp50_lsmMod use LIS_logMod, only : LIS_logunit, LIS_verify ! use smootherDA_runMod, only : smootherDA_increments_mode @@ -85,18 +85,18 @@ subroutine noahmpnew_tws_DAlog(n) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) NOAHMPpred_struc(n)%clmnwater(d,t)= & NOAHMPpred_struc(n)%clmnwater(d,t) + & - NoahMPnew_struc(n)%noahmpnew(t)%sneqv + & - (NoahMPnew_struc(n)%noahmpnew(t)%canliq + & - NoahMPnew_struc(n)%noahmpnew(t)%canice) + & - (NoahMPnew_struc(n)%noahmpnew(t)%smc(1) * & - NoahMPnew_struc(n)%sldpth(1)*LIS_CONST_RHOFW) + & - (NoahMPnew_struc(n)%noahmpnew(t)%smc(2) * & - NoahMPnew_struc(n)%sldpth(2)*LIS_CONST_RHOFW) + & - (NoahMPnew_struc(n)%noahmpnew(t)%smc(3) * & - NoahMPnew_struc(n)%sldpth(3)*LIS_CONST_RHOFW) + & - (NoahMPnew_struc(n)%noahmpnew(t)%smc(4) * & - NoahMPnew_struc(n)%sldpth(4)*LIS_CONST_RHOFW) + & - NoahMPnew_struc(n)%noahmpnew(t)%wa + NoahMP50_struc(n)%noahmp50(t)%sneqv + & + (NoahMP50_struc(n)%noahmp50(t)%canliq + & + NoahMP50_struc(n)%noahmp50(t)%canice) + & + (NoahMP50_struc(n)%noahmp50(t)%smc(1) * & + NoahMP50_struc(n)%sldpth(1)*LIS_CONST_RHOFW) + & + (NoahMP50_struc(n)%noahmp50(t)%smc(2) * & + NoahMP50_struc(n)%sldpth(2)*LIS_CONST_RHOFW) + & + (NoahMP50_struc(n)%noahmp50(t)%smc(3) * & + NoahMP50_struc(n)%sldpth(3)*LIS_CONST_RHOFW) + & + (NoahMP50_struc(n)%noahmp50(t)%smc(4) * & + NoahMP50_struc(n)%sldpth(4)*LIS_CONST_RHOFW) + & + NoahMP50_struc(n)%noahmp50(t)%wa enddo endif @@ -162,18 +162,18 @@ subroutine noahmpnew_tws_DAlog(n) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) NOAHMPpred_struc(n)%clmnwater(d,t)= & NOAHMPpred_struc(n)%clmnwater(d,t) + & - NoahMPnew_struc(n)%noahmpnew(t)%sneqv + & - (NoahMPnew_struc(n)%noahmpnew(t)%canliq + & - NoahMPnew_struc(n)%noahmpnew(t)%canice) + & - (NoahMPnew_struc(n)%noahmpnew(t)%smc(1) * & - NoahMPnew_struc(n)%sldpth(1)*LIS_CONST_RHOFW) + & - (NoahMPnew_struc(n)%noahmpnew(t)%smc(2) * & - NoahMPnew_struc(n)%sldpth(2)*LIS_CONST_RHOFW) + & - (NoahMPnew_struc(n)%noahmpnew(t)%smc(3) * & - NoahMPnew_struc(n)%sldpth(3)*LIS_CONST_RHOFW) + & - (NoahMPnew_struc(n)%noahmpnew(t)%smc(4) * & - NoahMPnew_struc(n)%sldpth(4)*LIS_CONST_RHOFW) + & - NoahMPnew_struc(n)%noahmpnew(t)%wa + NoahMP50_struc(n)%noahmp50(t)%sneqv + & + (NoahMP50_struc(n)%noahmp50(t)%canliq + & + NoahMP50_struc(n)%noahmp50(t)%canice) + & + (NoahMP50_struc(n)%noahmp50(t)%smc(1) * & + NoahMP50_struc(n)%sldpth(1)*LIS_CONST_RHOFW) + & + (NoahMP50_struc(n)%noahmp50(t)%smc(2) * & + NoahMP50_struc(n)%sldpth(2)*LIS_CONST_RHOFW) + & + (NoahMP50_struc(n)%noahmp50(t)%smc(3) * & + NoahMP50_struc(n)%sldpth(3)*LIS_CONST_RHOFW) + & + (NoahMP50_struc(n)%noahmp50(t)%smc(4) * & + NoahMP50_struc(n)%sldpth(4)*LIS_CONST_RHOFW) + & + NoahMP50_struc(n)%noahmp50(t)%wa enddo @@ -182,6 +182,6 @@ subroutine noahmpnew_tws_DAlog(n) endif endif - end subroutine noahmpnew_tws_DAlog + end subroutine noahmp50_tws_DAlog -end module noahmpnew_tws_DAlogMod +end module noahmp50_tws_DAlogMod diff --git a/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_updatetws.F90 b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_updatetws.F90 similarity index 79% rename from lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_updatetws.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_updatetws.F90 index 3c542c825..8719e5c99 100755 --- a/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_updatetws.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_updatetws.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_updatetws -! \label{noahmpnew_updatetws} +! !ROUTINE: noahmp50_updatetws +! \label{noahmp50_updatetws} ! ! !REVISION HISTORY: ! 14 Mar 2017: Sujay Kumar; Initial Specification @@ -17,12 +17,12 @@ ! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmpnew_updatetws(n, LSM_State, LSM_Incr_State) +subroutine noahmp50_updatetws(n, LSM_State, LSM_Incr_State) ! !USES: use ESMF use LIS_coreMod use LIS_logMod - use noahmpnew_lsmMod + use noahmp50_lsmMod implicit none ! !ARGUMENTS: @@ -76,20 +76,20 @@ subroutine noahmpnew_updatetws(n, LSM_State, LSM_Incr_State) call ESMF_StateGet(LSM_State,"Soil Moisture Layer 1",sm1Field,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 1 failed in noahmpnew_updatetws") + "ESMF_StateGet: Soil Moisture Layer 1 failed in noahmp50_updatetws") call ESMF_StateGet(LSM_State,"Soil Moisture Layer 2",sm2Field,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 2 failed in noahmpnew_updatetws") + "ESMF_StateGet: Soil Moisture Layer 2 failed in noahmp50_updatetws") call ESMF_StateGet(LSM_State,"Soil Moisture Layer 3",sm3Field,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 3 failed in noahmpnew_updatetws") + "ESMF_StateGet: Soil Moisture Layer 3 failed in noahmp50_updatetws") call ESMF_StateGet(LSM_State,"Soil Moisture Layer 4",sm4Field,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 4 failed in noahmpnew_updatetws") + "ESMF_StateGet: Soil Moisture Layer 4 failed in noahmp50_updatetws") call ESMF_StateGet(LSM_State,"Groundwater Storage",gwField,rc=status) call LIS_verify(status,& - "ESMF_StateSet: Groundwater Storage failed in noahmpnew_updatetws") + "ESMF_StateSet: Groundwater Storage failed in noahmp50_updatetws") call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) call LIS_verify(status) @@ -99,20 +99,20 @@ subroutine noahmpnew_updatetws(n, LSM_State, LSM_Incr_State) call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 1",sm1IncrField,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 1 failed in noahmpnew_updatetws") + "ESMF_StateGet: Soil Moisture Layer 1 failed in noahmp50_updatetws") call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 2",sm2IncrField,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 2 failed in noahmpnew_updatetws") + "ESMF_StateGet: Soil Moisture Layer 2 failed in noahmp50_updatetws") call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 3",sm3IncrField,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 3 failed in noahmpnew_updatetws") + "ESMF_StateGet: Soil Moisture Layer 3 failed in noahmp50_updatetws") call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 4",sm4IncrField,rc=status) call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 4 failed in noahmpnew_updatetws") + "ESMF_StateGet: Soil Moisture Layer 4 failed in noahmp50_updatetws") call ESMF_StateGet(LSM_Incr_State, "Groundwater Storage",gwIncrField,rc=status) call LIS_verify(status,& - "ESMF_StateSet: Groundwater Storage failed in noahmpnew_updatetws") + "ESMF_StateSet: Groundwater Storage failed in noahmp50_updatetws") call ESMF_StateGet(LSM_Incr_State,"SWE",sweIncrField,rc=status) call LIS_verify(status) call ESMF_StateGet(LSM_Incr_State,"Snowdepth",snodIncrField,rc=status) @@ -122,19 +122,19 @@ subroutine noahmpnew_updatetws(n, LSM_State, LSM_Incr_State) !------------------- call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm1,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 1 failed in noahmpnew_updatetws") + "ESMF_FieldGet: Soil Moisture Layer 1 failed in noahmp50_updatetws") call ESMF_FieldGet(sm2Field,localDE=0,farrayPtr=soilm2,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 2 failed in noahmpnew_updatetws") + "ESMF_FieldGet: Soil Moisture Layer 2 failed in noahmp50_updatetws") call ESMF_FieldGet(sm3Field,localDE=0,farrayPtr=soilm3,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 3 failed in noahmpnew_updatetws") + "ESMF_FieldGet: Soil Moisture Layer 3 failed in noahmp50_updatetws") call ESMF_FieldGet(sm4Field,localDE=0,farrayPtr=soilm4,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 4 failed in noahmpnew_updatetws") + "ESMF_FieldGet: Soil Moisture Layer 4 failed in noahmp50_updatetws") call ESMF_FieldGet(gwField,localDE=0,farrayPtr=gws,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Groundwater Storage failed in noahmpnew_updatetws") + "ESMF_FieldGet: Groundwater Storage failed in noahmp50_updatetws") call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) call LIS_verify(status) call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) @@ -143,19 +143,19 @@ subroutine noahmpnew_updatetws(n, LSM_State, LSM_Incr_State) call ESMF_FieldGet(sm1IncrField,localDE=0,farrayPtr=soilmIncr1,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 1 failed in noahmpnew_updatetws") + "ESMF_FieldGet: Soil Moisture Layer 1 failed in noahmp50_updatetws") call ESMF_FieldGet(sm2IncrField,localDE=0,farrayPtr=soilmIncr2,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 2 failed in noahmpnew_updatetws") + "ESMF_FieldGet: Soil Moisture Layer 2 failed in noahmp50_updatetws") call ESMF_FieldGet(sm3IncrField,localDE=0,farrayPtr=soilmIncr3,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 3 failed in noahmpnew_updatetws") + "ESMF_FieldGet: Soil Moisture Layer 3 failed in noahmp50_updatetws") call ESMF_FieldGet(sm4IncrField,localDE=0,farrayPtr=soilmIncr4,rc=status) call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 4 failed in noahmpnew_updatetws") + "ESMF_FieldGet: Soil Moisture Layer 4 failed in noahmp50_updatetws") call ESMF_FieldGet(gwIncrField, localDE=0, farrayPtr=gwsIncr,rc=status) call LIS_verify(status,& - "ESMF_StateSet: Groundwater Storage failed in noahmpnew_updatetws") + "ESMF_StateSet: Groundwater Storage failed in noahmp50_updatetws") call ESMF_FieldGet(sweIncrField,localDE=0,farrayPtr=sweincr,rc=status) call LIS_verify(status) call ESMF_FieldGet(snodIncrField,localDE=0,farrayPtr=snodincr,rc=status) @@ -237,8 +237,8 @@ subroutine noahmpnew_updatetws(n, LSM_State, LSM_Incr_State) !Use the model's snow density from the previous timestep sndens = 0.0 - if(NoahMPnew_struc(n)%noahmpnew(t)%snowh.gt.0) then - sndens = NoahMPnew_struc(n)%noahmpnew(t)%sneqv/NoahMPnew_struc(n)%noahmpnew(t)%snowh + if(NoahMP50_struc(n)%noahmp50(t)%snowh.gt.0) then + sndens = NoahMP50_struc(n)%noahmp50(t)%sneqv/NoahMP50_struc(n)%noahmp50(t)%snowh endif if(update_flag(gid)) then @@ -253,10 +253,10 @@ subroutine noahmpnew_updatetws(n, LSM_State, LSM_Incr_State) swe(t) = swetmp endif else ! do not update - snod(t) = NoahMPnew_struc(n)%noahmpnew(t)%snowh - swe(t) = NoahMPnew_struc(n)%noahmpnew(t)%sneqv + snod(t) = NoahMP50_struc(n)%noahmp50(t)%snowh + swe(t) = NoahMP50_struc(n)%noahmp50(t)%sneqv end if enddo -end subroutine noahmpnew_updatetws +end subroutine noahmp50_updatetws diff --git a/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_write_tws.F90 b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_write_tws.F90 similarity index 79% rename from lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_write_tws.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_write_tws.F90 index 406ebd3dd..428c6e1bd 100755 --- a/lis/surfacemodels/land/noahmp.new/da_tws/noahmpnew_write_tws.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_write_tws.F90 @@ -8,20 +8,20 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_write_tws -! \label{noahmpnew_write_tws} +! !ROUTINE: noahmp50_write_tws +! \label{noahmp50_write_tws} ! ! !REVISION HISTORY: ! 14 Mar 2017: Sujay Kumar; Initial Specification ! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmpnew_write_tws(ftn,n, LSM_State) +subroutine noahmp50_write_tws(ftn,n, LSM_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc - use noahmpnew_lsmMod + use noahmp50_lsmMod use LIS_historyMod, only : LIS_writevar_restart implicit none @@ -47,30 +47,30 @@ subroutine noahmpnew_write_tws(ftn,n, LSM_State) allocate(tmp(LIS_rc%npatch(n,LIS_rc%lsm_index))) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(1) + tmp(t) = NoahMP50_struc(n)%noahmp50(t)%smc(1) enddo call LIS_writevar_restart(ftn,n,1,tmp) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(2) + tmp(t) = NoahMP50_struc(n)%noahmp50(t)%smc(2) enddo call LIS_writevar_restart(ftn,n,1,tmp) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(3) + tmp(t) = NoahMP50_struc(n)%noahmp50(t)%smc(3) enddo call LIS_writevar_restart(ftn,n,1,tmp) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = NoahMPnew_struc(n)%noahmpnew(t)%smc(4) + tmp(t) = NoahMP50_struc(n)%noahmp50(t)%smc(4) enddo call LIS_writevar_restart(ftn,n,1,tmp) !Wanshu do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = NoahMPnew_struc(n)%noahmpnew(t)%wa + tmp(t) = NoahMP50_struc(n)%noahmp50(t)%wa enddo call LIS_writevar_restart(ftn,n,1,tmp) !--------- deallocate(tmp) -end subroutine noahmpnew_write_tws +end subroutine noahmp50_write_tws diff --git a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_dausafsi_Mod.F90 b/lis/surfacemodels/land/noahmp.5.0/da_usafsi/noahmp50_dausafsi_Mod.F90 similarity index 78% rename from lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_dausafsi_Mod.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_usafsi/noahmp50_dausafsi_Mod.F90 index f2f27ac91..979a34b4f 100755 --- a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_dausafsi_Mod.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_usafsi/noahmp50_dausafsi_Mod.F90 @@ -8,10 +8,10 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- #include "LIS_misc.h" -module noahmpnew_dausafsi_Mod +module noahmp50_dausafsi_Mod !BOP ! -! !MODULE: noahmpnew_dausafsi_Mod +! !MODULE: noahmp50_dausafsi_Mod ! ! !DESCRIPTION: ! @@ -26,7 +26,7 @@ module noahmpnew_dausafsi_Mod !----------------------------------------------------------------------------- ! !PUBLIC MEMBER FUNCTIONS: !----------------------------------------------------------------------------- - public :: noahmpnew_dausafsi_init + public :: noahmp50_dausafsi_init !----------------------------------------------------------------------------- ! !PUBLIC TYPES: !----------------------------------------------------------------------------- @@ -36,15 +36,15 @@ module noahmpnew_dausafsi_Mod contains !BOP ! -! !ROUTINE: noahmpnew_dausafsi_init -! \label{noahmpnew_dausafsi_init} +! !ROUTINE: noahmp50_dausafsi_init +! \label{noahmp50_dausafsi_init} ! ! !INTERFACE: - subroutine noahmpnew_dausafsi_init() + subroutine noahmp50_dausafsi_init() ! !USES: ! !DESCRIPTION: ! !EOP implicit none - end subroutine noahmpnew_dausafsi_init -end module noahmpnew_dausafsi_Mod + end subroutine noahmp50_dausafsi_init +end module noahmp50_dausafsi_Mod diff --git a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_descale_usafsi.F90 b/lis/surfacemodels/land/noahmp.5.0/da_usafsi/noahmp50_descale_usafsi.F90 similarity index 91% rename from lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_descale_usafsi.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_usafsi/noahmp50_descale_usafsi.F90 index 620cd3c67..87e4e6d99 100755 --- a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_descale_usafsi.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_usafsi/noahmp50_descale_usafsi.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_descale_usafsi -! \label{noahmpnew_descale_usafsi} +! !ROUTINE: noahmp50_descale_usafsi +! \label{noahmp50_descale_usafsi} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -21,12 +21,12 @@ ! May 2023: Cenlin He; update to work with refactored NoahMP (v5.0 and newer) ! ! !INTERFACE: -subroutine noahmpnew_descale_usafsi(n, LSM_State, LSM_Incr_State) +subroutine noahmp50_descale_usafsi(n, LSM_State, LSM_Incr_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc - use NoahMPnew_lsmMod + use NoahMP50_lsmMod use LIS_logMod implicit none @@ -71,5 +71,5 @@ subroutine noahmpnew_descale_usafsi(n, LSM_State, LSM_Incr_State) enddo #endif -end subroutine noahmpnew_descale_usafsi +end subroutine noahmp50_descale_usafsi diff --git a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_getusafsipred.F90 b/lis/surfacemodels/land/noahmp.5.0/da_usafsi/noahmp50_getusafsipred.F90 similarity index 87% rename from lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_getusafsipred.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_usafsi/noahmp50_getusafsipred.F90 index e8f8009b1..6fa11710c 100755 --- a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_getusafsipred.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_usafsi/noahmp50_getusafsipred.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_getusafsipred -! \label{noahmpnew_getusafsipred} +! !ROUTINE: noahmp50_getusafsipred +! \label{noahmp50_getusafsipred} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -25,12 +25,12 @@ ! May 2023: Cenlin He; update to work with refactored NoahMP (v5.0 and newer) ! ! !INTERFACE: -subroutine noahmpnew_getusafsipred(n, k, obs_pred) +subroutine noahmp50_getusafsipred(n, k, obs_pred) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc,LIS_surface - use NoahMPnew_lsmMod + use NoahMP50_lsmMod use LIS_DAobservationsMod implicit none @@ -48,7 +48,7 @@ subroutine noahmpnew_getusafsipred(n, k, obs_pred) integer :: t do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - snwd(t) = NoahmpNew_struc(n)%noahmpnew(t)%snowh ! Keep in meters + snwd(t) = Noahmp50_struc(n)%noahmp50(t)%snowh ! Keep in meters enddo call LIS_convertPatchSpaceToObsEnsSpace(n,k,& @@ -56,5 +56,5 @@ subroutine noahmpnew_getusafsipred(n, k, obs_pred) snwd,& obs_pred) -end subroutine noahmpnew_getusafsipred +end subroutine noahmp50_getusafsipred diff --git a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_getusafsivars.F90 b/lis/surfacemodels/land/noahmp.5.0/da_usafsi/noahmp50_getusafsivars.F90 similarity index 87% rename from lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_getusafsivars.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_usafsi/noahmp50_getusafsivars.F90 index 6f6bc9ce9..177969c22 100755 --- a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_getusafsivars.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_usafsi/noahmp50_getusafsivars.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_getusafsivars -! \label{noahmpnew_getusafsivars} +! !ROUTINE: noahmp50_getusafsivars +! \label{noahmp50_getusafsivars} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -23,12 +23,12 @@ ! !INTERFACE: ! -subroutine noahmpnew_getusafsivars(n, LSM_State) +subroutine noahmp50_getusafsivars(n, LSM_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_verify - use NoahMPnew_lsmMod + use NoahMP50_lsmMod implicit none ! !ARGUMENTS: @@ -66,8 +66,8 @@ subroutine noahmpnew_getusafsivars(n, LSM_State) call LIS_verify(status) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - swe(t) = NoahmpNew_struc(n)%noahmpnew(t)%sneqv - snod(t) = NoahmpNew_struc(n)%noahmpnew(t)%snowh + swe(t) = Noahmp50_struc(n)%noahmp50(t)%sneqv + snod(t) = Noahmp50_struc(n)%noahmp50(t)%snowh enddo -end subroutine noahmpnew_getusafsivars +end subroutine noahmp50_getusafsivars diff --git a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_map_usafsi.F90 b/lis/surfacemodels/land/noahmp.5.0/da_usafsi/noahmp50_map_usafsi.F90 similarity index 82% rename from lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_map_usafsi.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_usafsi/noahmp50_map_usafsi.F90 index 1a2ca3c8f..60a32b80c 100755 --- a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_map_usafsi.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_usafsi/noahmp50_map_usafsi.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_map_usafsi -! \label{noahmpnew_map_usafsi} +! !ROUTINE: noahmp50_map_usafsi +! \label{noahmp50_map_usafsi} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -22,14 +22,14 @@ ! May 2023: Cenlin He, update to work with refactored NoahMP (v5.0 and newer) ! !INTERFACE: -subroutine noahmpnew_map_usafsi(n,k,OBS_State,LSM_Incr_State) +subroutine noahmp50_map_usafsi(n,k,OBS_State,LSM_Incr_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc, LIS_surface use LIS_constantsMod, only : LIS_CONST_TKFRZ use LIS_logMod, only : LIS_logunit, LIS_verify use LIS_lsmMod - use NoahMPnew_lsmMod + use NoahMP50_lsmMod implicit none ! !ARGUMENTS: @@ -62,12 +62,12 @@ subroutine noahmpnew_map_usafsi(n,k,OBS_State,LSM_Incr_State) integer :: obs_state_count integer :: st_id, en_id character*100,allocatable :: obs_state_objs(:) - real, allocatable :: noahmpnew_swe(:) - real, allocatable :: noahmpnew_snod(:) + real, allocatable :: noahmp50_swe(:) + real, allocatable :: noahmp50_snod(:) real, allocatable :: snod(:) - allocate(noahmpnew_swe(LIS_rc%npatch(n,LIS_rc%lsm_index))) - allocate(noahmpnew_snod(LIS_rc%npatch(n,LIS_rc%lsm_index))) + allocate(noahmp50_swe(LIS_rc%npatch(n,LIS_rc%lsm_index))) + allocate(noahmp50_snod(LIS_rc%npatch(n,LIS_rc%lsm_index))) allocate(snod(LIS_rc%npatch(n,LIS_rc%lsm_index))) call ESMF_StateGet(LSM_Incr_State,"SWE",sweIncrField,rc=status) @@ -96,8 +96,8 @@ subroutine noahmpnew_map_usafsi(n,k,OBS_State,LSM_Incr_State) call LIS_verify(status) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - noahmpnew_swe(t) = NoahmpNew_struc(n)%noahmpnew(t)%sneqv - noahmpnew_snod(t) = NoahmpNew_struc(n)%noahmpnew(t)%snowh + noahmp50_swe(t) = Noahmp50_struc(n)%noahmp50(t)%sneqv + noahmp50_snod(t) = Noahmp50_struc(n)%noahmp50(t)%snowh enddo do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) @@ -107,8 +107,8 @@ subroutine noahmpnew_map_usafsi(n,k,OBS_State,LSM_Incr_State) ! working with an model grid finer than the observation grid if(usafsiobs(st_id).ge.0) then - if(noahmpnew_snod(t).gt.1e-6) then - tmpsneqv = noahmpnew_swe(t)/noahmpnew_snod(t) + if(noahmp50_snod(t).gt.1e-6) then + tmpsneqv = noahmp50_swe(t)/noahmp50_snod(t) else tmpsneqv = 0.0 endif @@ -120,8 +120,8 @@ subroutine noahmpnew_map_usafsi(n,k,OBS_State,LSM_Incr_State) if(snod(t).ge.2.54E-3.and.tmpsneqv.lt.0.001) then tmpsneqv = 0.20 endif - sweincr(t) = tmpsneqv*snod(t) - noahmpnew_swe(t) - snodincr(t) = snod(t) - noahmpnew_snod(t) + sweincr(t) = tmpsneqv*snod(t) - noahmp50_swe(t) + snodincr(t) = snod(t) - noahmp50_snod(t) else sweincr(t) = 0 snodincr(t) = 0 @@ -129,9 +129,9 @@ subroutine noahmpnew_map_usafsi(n,k,OBS_State,LSM_Incr_State) enddo deallocate(obs_state_objs) - deallocate(noahmpnew_swe) - deallocate(noahmpnew_snod) + deallocate(noahmp50_swe) + deallocate(noahmp50_snod) deallocate(snod) -end subroutine noahmpnew_map_usafsi +end subroutine noahmp50_map_usafsi diff --git a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_qc_usafsiobs.F90 b/lis/surfacemodels/land/noahmp.5.0/da_usafsi/noahmp50_qc_usafsiobs.F90 similarity index 86% rename from lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_qc_usafsiobs.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_usafsi/noahmp50_qc_usafsiobs.F90 index 36c068ec3..89db60bbd 100755 --- a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_qc_usafsiobs.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_usafsi/noahmp50_qc_usafsiobs.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_qc_usafsiobs -! \label{noahmpnew_qc_usafsiobs} +! !ROUTINE: noahmp50_qc_usafsiobs +! \label{noahmp50_qc_usafsiobs} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -24,14 +24,14 @@ ! May 2023: Cenlin He; update to work with refactored NoahMP (v5.0 and newer) ! ! !INTERFACE: -subroutine noahmpnew_qc_usafsiobs(n,k,OBS_State) +subroutine noahmp50_qc_usafsiobs(n,k,OBS_State) ! !USES: use ESMF use LIS_coreMod use LIS_logMod, only : LIS_verify use LIS_constantsMod, only : LIS_CONST_TKFRZ use LIS_DAobservationsMod - use NoahMPnew_lsmMod + use NoahMP50_lsmMod implicit none ! !ARGUMENTS: @@ -68,21 +68,21 @@ subroutine noahmpnew_qc_usafsiobs(n,k,OBS_State) call ESMF_StateGet(OBS_State,"Observation01",obs_snow_field,rc=status) call LIS_verify(status,& - "ESMF_StateGet failed in noahmpnew_qc_usafsiobs") + "ESMF_StateGet failed in noahmp50_qc_usafsiobs") call ESMF_FieldGet(obs_snow_field,localDE=0,farrayPtr=snowobs,rc=status) call LIS_verify(status,& - "ESMF_FieldGet failed in noahmpnew_qc_usafsiobs") + "ESMF_FieldGet failed in noahmp50_qc_usafsiobs") do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) - !stc1(t) = NoahmpNew_struc(n)%noahmpnew(t)%sstc(1) ! get snow/veg temp. - stc1(t) = NoahmpNew_struc(n)%noahmpnew(t)%tslb(1) ! get snow/veg temp. + !stc1(t) = Noahmp50_struc(n)%noahmp50(t)%sstc(1) ! get snow/veg temp. + stc1(t) = Noahmp50_struc(n)%noahmp50(t)%tslb(1) ! get snow/veg temp. vegt(t) = LIS_surface(n,1)%tile(t)%vegt enddo call LIS_convertPatchSpaceToObsSpace(n,k,& - LIS_rc%lsm_index, NoahmpNew_struc(n)%noahmpnew(:)%tv,tv_obs) !tv: vegetation temperature. unit: K + LIS_rc%lsm_index, Noahmp50_struc(n)%noahmp50(:)%tv,tv_obs) !tv: vegetation temperature. unit: K call LIS_convertPatchSpaceToObsSpace(n,k,LIS_rc%lsm_index, & !fveg: green vegetation fraction. unit: - - NoahmpNew_struc(n)%noahmpnew(:)%fveg,fveg_obs) + Noahmp50_struc(n)%noahmp50(:)%fveg,fveg_obs) call LIS_convertPatchSpaceToObsSpace(n,k,& LIS_rc%lsm_index,stc1,stc1_obs) @@ -104,5 +104,5 @@ subroutine noahmpnew_qc_usafsiobs(n,k,OBS_State) ! endif ! enddo -end subroutine noahmpnew_qc_usafsiobs +end subroutine noahmp50_qc_usafsiobs diff --git a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_qcusafsi.F90 b/lis/surfacemodels/land/noahmp.5.0/da_usafsi/noahmp50_qcusafsi.F90 similarity index 89% rename from lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_qcusafsi.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_usafsi/noahmp50_qcusafsi.F90 index c0a599b9b..486d8090c 100755 --- a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_qcusafsi.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_usafsi/noahmp50_qcusafsi.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_qcusafsi -! \label{noahmpnew_qcsnow} +! !ROUTINE: noahmp50_qcusafsi +! \label{noahmp50_qcsnow} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -25,12 +25,12 @@ ! May 2023: Cenlin He; update to work with refactored NoahMP (v5.0 and newer) ! ! !INTERFACE: -subroutine noahmpnew_qcusafsi(n, LSM_State) +subroutine noahmp50_qcusafsi(n, LSM_State) ! !USES: use ESMF use LIS_coreMod - use NoahMPnew_lsmMod + use NoahMP50_lsmMod use LIS_logMod implicit none @@ -101,8 +101,8 @@ subroutine noahmpnew_qcusafsi(n, LSM_State) !Use the model's snow density from the previous timestep sndens = 0.0 - if(NoahmpNew_struc(n)%noahmpnew(t)%snowh.gt.0) then - sndens = NoahmpNew_struc(n)%noahmpnew(t)%sneqv/NoahmpNew_struc(n)%noahmpnew(t)%snowh + if(Noahmp50_struc(n)%noahmp50(t)%snowh.gt.0) then + sndens = Noahmp50_struc(n)%noahmp50(t)%sneqv/Noahmp50_struc(n)%noahmp50(t)%snowh endif !If the update is unphysical, do not update. @@ -110,8 +110,8 @@ subroutine noahmpnew_qcusafsi(n, LSM_State) snod(t) = snod(t) swe(t) = snod(t)*sndens else ! do not update - snod(t) = NoahmpNew_struc(n)%noahmpnew(t)%snowh - swe(t) = NoahmpNew_struc(n)%noahmpnew(t)%sneqv + snod(t) = Noahmp50_struc(n)%noahmp50(t)%snowh + swe(t) = Noahmp50_struc(n)%noahmp50(t)%sneqv end if if(swe(t).gt.swemax) then @@ -123,5 +123,5 @@ subroutine noahmpnew_qcusafsi(n, LSM_State) end do -end subroutine noahmpnew_qcusafsi +end subroutine noahmp50_qcusafsi diff --git a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_scale_usafsi.F90 b/lis/surfacemodels/land/noahmp.5.0/da_usafsi/noahmp50_scale_usafsi.F90 similarity index 92% rename from lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_scale_usafsi.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_usafsi/noahmp50_scale_usafsi.F90 index 848510f9c..6e835ac30 100755 --- a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_scale_usafsi.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_usafsi/noahmp50_scale_usafsi.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_scale_usafsi -! \label{noahmpnew_scale_usafsi} +! !ROUTINE: noahmp50_scale_usafsi +! \label{noahmp50_scale_usafsi} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -22,12 +22,12 @@ ! May 2023: Cenlin He; update to work with refactored NoahMP (v5.0 and newer) ! ! !INTERFACE: -subroutine noahmpnew_scale_usafsi(n, LSM_State) +subroutine noahmp50_scale_usafsi(n, LSM_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc - use NoahMPnew_lsmMod + use NoahMP50_lsmMod use LIS_logMod implicit none @@ -71,5 +71,5 @@ subroutine noahmpnew_scale_usafsi(n, LSM_State) enddo #endif -end subroutine noahmpnew_scale_usafsi +end subroutine noahmp50_scale_usafsi diff --git a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_setusafsivars.F90 b/lis/surfacemodels/land/noahmp.5.0/da_usafsi/noahmp50_setusafsivars.F90 similarity index 87% rename from lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_setusafsivars.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_usafsi/noahmp50_setusafsivars.F90 index a007eba46..9e7e435f5 100755 --- a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_setusafsivars.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_usafsi/noahmp50_setusafsivars.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_setusafsivars -! \label{noahmpnew_setusafsivars} +! !ROUTINE: noahmp50_setusafsivars +! \label{noahmp50_setusafsivars} ! ! !REVISION HISTORY: ! 15 Aug 2017: Sujay Kumar; Initial Specification @@ -27,13 +27,13 @@ ! May 2023: Cenlin He; update to work with refactored NoahMP (v5.0 and newer) ! ! !INTERFACE: -subroutine noahmpnew_setusafsivars(n, LSM_State) +subroutine noahmp50_setusafsivars(n, LSM_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc, LIS_domain, LIS_surface use LIS_logMod, only : LIS_logunit, LIS_verify, LIS_endrun use LIS_snowMod, only : LIS_snow_struc - use NoahMPnew_lsmMod + use NoahMP50_lsmMod implicit none ! !ARGUMENTS: @@ -70,11 +70,11 @@ subroutine noahmpnew_setusafsivars(n, LSM_State) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - dsneqv = swe(t) - NoahmpNew_struc(n)%noahmpnew(t)%sneqv !in mm - dsnowh = snod(t) - NoahmpNew_struc(n)%noahmpnew(t)%snowh !in m + dsneqv = swe(t) - Noahmp50_struc(n)%noahmp50(t)%sneqv !in mm + dsnowh = snod(t) - Noahmp50_struc(n)%noahmp50(t)%snowh !in m ! update - call noahmpnew_usafsi_update(n, t, dsneqv, dsnowh) + call noahmp50_usafsi_update(n, t, dsneqv, dsnowh) enddo @@ -88,7 +88,7 @@ subroutine noahmpnew_setusafsivars(n, LSM_State) do t = 1, LIS_rc%npatch(n, LIS_rc%lsm_index) tid = LIS_surface(n, LIS_rc%lsm_index)%tile(t)%tile_id LIS_snow_struc(n)%sneqv(tid) = LIS_snow_struc(n)%sneqv(tid) + & - NoahmpNew_struc(n)%noahmpnew(t)%sneqv + Noahmp50_struc(n)%noahmp50(t)%sneqv end do ! Collect mean snow depth at grid points @@ -96,7 +96,7 @@ subroutine noahmpnew_setusafsivars(n, LSM_State) gid = LIS_surface(n,LIS_rc%lsm_index)%tile(t)%index LIS_snow_struc(n)%snowdepth(gid) = & LIS_snow_struc(n)%snowdepth(gid) + & - NoahmpNew_struc(n)%noahmpnew(t)%snowh + Noahmp50_struc(n)%noahmp50(t)%snowh ncount(gid) = ncount(gid) + 1 end do do t = 1, LIS_rc%ngrid(n) @@ -109,4 +109,4 @@ subroutine noahmpnew_setusafsivars(n, LSM_State) end do end if -end subroutine noahmpnew_setusafsivars +end subroutine noahmp50_setusafsivars diff --git a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_transform_usafsi.F90 b/lis/surfacemodels/land/noahmp.5.0/da_usafsi/noahmp50_transform_usafsi.F90 similarity index 88% rename from lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_transform_usafsi.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_usafsi/noahmp50_transform_usafsi.F90 index fb35931a0..d322e474c 100755 --- a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_transform_usafsi.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_usafsi/noahmp50_transform_usafsi.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_transform_usafsi -! \label{noahmpnew_transform_usafsi} +! !ROUTINE: noahmp50_transform_usafsi +! \label{noahmp50_transform_usafsi} ! ! !REVISION HISTORY: ! 25Jun2006: Sujay Kumar: Initial Specification @@ -22,13 +22,13 @@ ! May 2023: Cenlin He; update to work with refactored NoahMP (v5.0 and newer) ! ! !INTERFACE: -subroutine noahmpnew_transform_usafsi(n,OBS_State) +subroutine noahmp50_transform_usafsi(n,OBS_State) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_verify - use NoahMPnew_lsmMod + use NoahMP50_lsmMod !EOP implicit none @@ -49,4 +49,4 @@ subroutine noahmpnew_transform_usafsi(n,OBS_State) ! Since USAFSI is already in meters, no work is needed here. -end subroutine noahmpnew_transform_usafsi +end subroutine noahmp50_transform_usafsi diff --git a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_updateusafsivars.F90 b/lis/surfacemodels/land/noahmp.5.0/da_usafsi/noahmp50_updateusafsivars.F90 similarity index 91% rename from lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_updateusafsivars.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_usafsi/noahmp50_updateusafsivars.F90 index dfc13f4a1..f854c8e91 100755 --- a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_updateusafsivars.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_usafsi/noahmp50_updateusafsivars.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_updateusafsivars -! \label{noahmpnew_updateusafsivars} +! !ROUTINE: noahmp50_updateusafsivars +! \label{noahmp50_updateusafsivars} ! ! !REVISION HISTORY: ! 27Feb2005: Sujay Kumar; Initial Specification @@ -22,11 +22,11 @@ ! May 2023: Cenlin He; update to work with refactored NoahMP (v5.0 and newer) ! ! !INTERFACE: -subroutine noahmpnew_updateusafsivars(n, LSM_State, LSM_Incr_State) +subroutine noahmp50_updateusafsivars(n, LSM_State, LSM_Incr_State) ! !USES: use ESMF use LIS_coreMod - use NoahMPnew_lsmMod + use NoahMP50_lsmMod use LIS_logMod, only : LIS_logunit, LIS_verify implicit none @@ -151,8 +151,8 @@ subroutine noahmpnew_updateusafsivars(n, LSM_State, LSM_Incr_State) !Use the model's snow density from the previous timestep sndens = 0.0 - if(NoahmpNew_struc(n)%noahmpnew(t)%snowh.gt.0) then - sndens = NoahmpNew_struc(n)%noahmpnew(t)%sneqv/NoahmpNew_struc(n)%noahmpnew(t)%snowh + if(Noahmp50_struc(n)%noahmp50(t)%snowh.gt.0) then + sndens = Noahmp50_struc(n)%noahmp50(t)%sneqv/Noahmp50_struc(n)%noahmp50(t)%snowh endif if(update_flag(gid)) then @@ -167,11 +167,11 @@ subroutine noahmpnew_updateusafsivars(n, LSM_State, LSM_Incr_State) swe(t) = swetmp endif else ! do not update - snod(t) = NoahmpNew_struc(n)%noahmpnew(t)%snowh - swe(t) = NoahmpNew_struc(n)%noahmpnew(t)%sneqv + snod(t) = Noahmp50_struc(n)%noahmp50(t)%snowh + swe(t) = Noahmp50_struc(n)%noahmp50(t)%sneqv end if enddo -end subroutine noahmpnew_updateusafsivars +end subroutine noahmp50_updateusafsivars diff --git a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_usafsi_update.F90 b/lis/surfacemodels/land/noahmp.5.0/da_usafsi/noahmp50_usafsi_update.F90 similarity index 78% rename from lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_usafsi_update.F90 rename to lis/surfacemodels/land/noahmp.5.0/da_usafsi/noahmp50_usafsi_update.F90 index a7fffd994..f8adc8d2b 100755 --- a/lis/surfacemodels/land/noahmp.new/da_usafsi/noahmpnew_usafsi_update.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_usafsi/noahmp50_usafsi_update.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_usafsi_update -! \label{noahmpnew_usafsi_update} +! !ROUTINE: noahmp50_usafsi_update +! \label{noahmp50_usafsi_update} ! ! !REVISION HISTORY: ! 13 Aug 2017: Sujay Kumar; Initial specification @@ -19,11 +19,11 @@ ! May 2023: Cenlin He; update to work with refactored NoahMP (v5.0 and newer) ! ! !INTERFACE -subroutine noahmpnew_usafsi_update(n, t, dsneqv, dsnowh) +subroutine noahmp50_usafsi_update(n, t, dsneqv, dsnowh) use LIS_coreMod - use NoahMPnew_lsmMod - use NoahMPnew_snowphys_updateMod + use NoahMP50_lsmMod + use NoahMP50_snowphys_updateMod implicit none ! @@ -73,9 +73,9 @@ subroutine noahmpnew_usafsi_update(n, t, dsneqv, dsnowh) ! local real :: SNOFLOW, BDSNOW - isnow = NoahmpNew_struc(n)%noahmpnew(t)%isnow - nsoil = NoahmpNew_struc(n)%nsoil - nsnow = NoahmpNew_struc(n)%nsnow + isnow = Noahmp50_struc(n)%noahmp50(t)%isnow + nsoil = Noahmp50_struc(n)%nsoil + nsnow = Noahmp50_struc(n)%nsnow allocate(ficeold(-nsnow+1:0)) allocate(snice(-nsnow+1:0)) @@ -104,17 +104,17 @@ subroutine noahmpnew_usafsi_update(n, t, dsneqv, dsnowh) enddo ! initialize the variables - soiltype = NoahmpNew_struc(n)%noahmpnew(t)%soiltype + soiltype = Noahmp50_struc(n)%noahmp50(t)%soiltype do isoil = 1, size(soiltype) - BEXP(isoil) = NoahmpNew_struc(n)%noahmpnew(t)%param%BEXP(isoil) - PSISAT(isoil) = NoahmpNew_struc(n)%noahmpnew(t)%param%PSISAT(isoil) - SMCMAX(isoil) = NoahmpNew_struc(n)%noahmpnew(t)%param%SMCMAX(isoil) + BEXP(isoil) = Noahmp50_struc(n)%noahmp50(t)%param%BEXP(isoil) + PSISAT(isoil) = Noahmp50_struc(n)%noahmp50(t)%param%PSISAT(isoil) + SMCMAX(isoil) = Noahmp50_struc(n)%noahmp50(t)%param%SMCMAX(isoil) end do - sneqv = NoahmpNew_struc(n)%noahmpnew(t)%sneqv - snowh = NoahmpNew_struc(n)%noahmpnew(t)%snowh + sneqv = Noahmp50_struc(n)%noahmp50(t)%sneqv + snowh = Noahmp50_struc(n)%noahmp50(t)%snowh - zsnso(-nsnow+1:nsoil) = NoahmpNew_struc(n)%noahmpnew(t)%zss(1:nsnow+nsoil) + zsnso(-nsnow+1:nsoil) = Noahmp50_struc(n)%noahmp50(t)%zss(1:nsnow+nsoil) ! snow/soil layer thickness (m) do iz = isnow+1, nsoil @@ -128,22 +128,22 @@ subroutine noahmpnew_usafsi_update(n, t, dsneqv, dsnowh) ! set ZSOIL allocate(zsoil(nsoil)) ! zsoil is negative. - zsoil(1) = -NoahmpNew_struc(n)%sldpth(1) + zsoil(1) = -Noahmp50_struc(n)%sldpth(1) do i = 2, nsoil - zsoil(i) = zsoil(i-1) - NoahmpNew_struc(n)%sldpth(i) + zsoil(i) = zsoil(i-1) - Noahmp50_struc(n)%sldpth(i) enddo ! state variables snice(-nsnow+1:0) = & - NoahmpNew_struc(n)%noahmpnew(t)%snowice(1:nsnow) + Noahmp50_struc(n)%noahmp50(t)%snowice(1:nsnow) snliq(-nsnow+1:0) = & - NoahmpNew_struc(n)%noahmpnew(t)%snowliq(1:nsnow) + Noahmp50_struc(n)%noahmp50(t)%snowliq(1:nsnow) stc(-nsnow+1:0) = & - NoahmpNew_struc(n)%noahmpnew(t)%tsno(1:nsnow) + Noahmp50_struc(n)%noahmp50(t)%tsno(1:nsnow) ! soil temperature stc(1:nsoil) = & - NoahmpNew_struc(n)%noahmpnew(t)%tslb(1:nsoil) + Noahmp50_struc(n)%noahmp50(t)%tslb(1:nsoil) ! from snowfall routine @@ -161,7 +161,7 @@ subroutine noahmpnew_usafsi_update(n, t, dsneqv, dsnowh) NEWNODE = 1 DZSNSO(0)= SNOWH SNOWH = 0. - STC(0) = MIN(273.16, NoahmpNew_struc(n)%noahmpnew(t)%sfctmp) ! temporary setup + STC(0) = MIN(273.16, Noahmp50_struc(n)%noahmp50(t)%sfctmp) ! temporary setup SNICE(0) = SNEQV SNLIQ(0) = 0. END IF @@ -206,8 +206,8 @@ subroutine noahmpnew_usafsi_update(n, t, dsneqv, dsnowh) endif enddo - sice(:) = max(0.0, NoahmpNew_struc(n)%noahmpnew(t)%smc(:)& - - NoahmpNew_struc(n)%noahmpnew(t)%sh2o(:)) + sice(:) = max(0.0, Noahmp50_struc(n)%noahmp50(t)%smc(:)& + - Noahmp50_struc(n)%noahmp50(t)%sh2o(:)) !imelt do j = -nsnow+1, nsoil @@ -220,9 +220,9 @@ subroutine noahmpnew_usafsi_update(n, t, dsneqv, dsnowh) end do do j = 1, nsoil ! soil - mliq(j) = NoahmpNew_struc(n)%noahmpnew(t)%sh2o(j) * dzsnso(j) * 1000. - mice(j) = (NoahmpNew_struc(n)%noahmpnew(t)%smc(j) - & - NoahmpNew_struc(n)%noahmpnew(t)%sh2o(j)) * dzsnso(j) * 1000. + mliq(j) = Noahmp50_struc(n)%noahmp50(t)%sh2o(j) * dzsnso(j) * 1000. + mice(j) = (Noahmp50_struc(n)%noahmp50(t)%smc(j) - & + Noahmp50_struc(n)%noahmp50(t)%sh2o(j)) * dzsnso(j) * 1000. end do do j = isnow+1,nsoil ! all layers @@ -240,9 +240,9 @@ subroutine noahmpnew_usafsi_update(n, t, dsneqv, dsnowh) ! end if ! if (opt_frz == 2) then ! call frh2o (supercool(j),& -! NoahmpNew_struc(n)%noahmpnew(t)%sstc(j),& -! NoahmpNew_struc(n)%noahmpnew(t)%smc(j),& -! NoahmpNew_struc(n)%noahmpnew(t)%sh2o(j)) +! Noahmp50_struc(n)%noahmp50(t)%sstc(j),& +! Noahmp50_struc(n)%noahmp50(t)%smc(j),& +! Noahmp50_struc(n)%noahmp50(t)%sh2o(j)) ! supercool(j) = supercool(j)*dzsnso(j)*1000. !(mm) ! end if enddo @@ -271,18 +271,18 @@ subroutine noahmpnew_usafsi_update(n, t, dsneqv, dsnowh) ! based on Noah-MP v4.5 physics if(isnow < 0) & - call compact (NoahmpNew_struc(n)%noahmpnew(t)%param, & - nsnow, nsoil, noahmpnew_struc(n)%ts, & !in + call compact (Noahmp50_struc(n)%noahmp50(t)%param, & + nsnow, nsoil, noahmp50_struc(n)%ts, & !in stc, snice, snliq, zsoil, imelt, ficeold, iloc, jloc, & !in isnow, dzsnso ,zsnso) !inout if(isnow < 0) & - call combine (NoahmpNew_struc(n)%noahmpnew(t)%param, & + call combine (Noahmp50_struc(n)%noahmp50(t)%param, & nsnow, nsoil ,iloc, jloc, & !in - isnow, noahmpnew_struc(n)%noahmpnew(t)%sh2o, & !inout + isnow, noahmp50_struc(n)%noahmp50(t)%sh2o, & !inout stc, snice, snliq, dzsnso, sice, snowh, sneqv, & !inout ponding1, ponding2) !out if(isnow < 0) & - call divide (NoahmpNew_struc(n)%noahmpnew(t)%param, nsnow, nsoil, & !in + call divide (Noahmp50_struc(n)%noahmp50(t)%param, nsnow, nsoil, & !in isnow, stc, snice, snliq, dzsnso) !inout !set empty snow layers to zero @@ -347,14 +347,14 @@ subroutine noahmpnew_usafsi_update(n, t, dsneqv, dsnowh) END IF ! update state vars - NoahmpNew_struc(n)%noahmpnew(t)%isnow = isnow - NoahmpNew_struc(n)%noahmpnew(t)%sneqv = sneqv - NoahmpNew_struc(n)%noahmpnew(t)%snowh = snowh - NoahmpNew_struc(n)%noahmpnew(t)%zss(1:nsnow+nsoil) = zsnso(-nsnow+1:nsoil) - NoahmpNew_struc(n)%noahmpnew(t)%snowice(1:nsnow) = snice(-nsnow+1:0) - NoahmpNew_struc(n)%noahmpnew(t)%snowliq(1:nsnow) = snliq(-nsnow+1:0) - NoahmpNew_struc(n)%noahmpnew(t)%tsno(1:nsnow) = stc(-nsnow+1:0) - NoahmpNew_struc(n)%noahmpnew(t)%tslb(1:nsoil) = stc(1:nsoil) + Noahmp50_struc(n)%noahmp50(t)%isnow = isnow + Noahmp50_struc(n)%noahmp50(t)%sneqv = sneqv + Noahmp50_struc(n)%noahmp50(t)%snowh = snowh + Noahmp50_struc(n)%noahmp50(t)%zss(1:nsnow+nsoil) = zsnso(-nsnow+1:nsoil) + Noahmp50_struc(n)%noahmp50(t)%snowice(1:nsnow) = snice(-nsnow+1:0) + Noahmp50_struc(n)%noahmp50(t)%snowliq(1:nsnow) = snliq(-nsnow+1:0) + Noahmp50_struc(n)%noahmp50(t)%tsno(1:nsnow) = stc(-nsnow+1:0) + Noahmp50_struc(n)%noahmp50(t)%tslb(1:nsoil) = stc(1:nsoil) deallocate(ficeold) deallocate(snice) @@ -371,5 +371,5 @@ subroutine noahmpnew_usafsi_update(n, t, dsneqv, dsnowh) deallocate(psisat) deallocate(smcmax) -end subroutine noahmpnew_usafsi_update +end subroutine noahmp50_usafsi_update diff --git a/lis/surfacemodels/land/noahmp.new/irrigation/noahmpnew_getirrigationstates.F90 b/lis/surfacemodels/land/noahmp.5.0/irrigation/noahmp50_getirrigationstates.F90 similarity index 91% rename from lis/surfacemodels/land/noahmp.new/irrigation/noahmpnew_getirrigationstates.F90 rename to lis/surfacemodels/land/noahmp.5.0/irrigation/noahmp50_getirrigationstates.F90 index 7891dfc28..b9bf95b31 100755 --- a/lis/surfacemodels/land/noahmp.new/irrigation/noahmpnew_getirrigationstates.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/irrigation/noahmp50_getirrigationstates.F90 @@ -11,16 +11,16 @@ !BOP ! -! !ROUTINE: noahmpnew_getirrigationstates -! \label{noahmpnew_getirrigationstates} +! !ROUTINE: noahmp50_getirrigationstates +! \label{noahmp50_getirrigationstates} ! ! !INTERFACE: -subroutine noahmpnew_getirrigationstates(n,irrigState) +subroutine noahmp50_getirrigationstates(n,irrigState) ! !USES: use ESMF use LIS_coreMod use LIS_logMod - use NoahMPnew_lsmMod + use NoahMP50_lsmMod use LIS_vegDataMod, only: LIS_read_shdmin, LIS_read_shdmax ! !DESCRIPTION: @@ -186,12 +186,12 @@ subroutine noahmpnew_getirrigationstates(n,irrigState) t=(i-1)*LIS_rc%nensem(n)+m - sfctemp_avg = sfctemp_avg + NoahmpNew_struc(n)%noahmpnew(t)%sfctmp - shdfac_avg = shdfac_avg + NoahmpNew_struc(n)%noahmpnew(t)%fveg + sfctemp_avg = sfctemp_avg + Noahmp50_struc(n)%noahmp50(t)%sfctmp + shdfac_avg = shdfac_avg + Noahmp50_struc(n)%noahmp50(t)%fveg do k=1,nsoil - smc_avg(k) = smc_avg(k) + NoahmpNew_struc(n)%noahmpnew(t)%smc(k) + smc_avg(k) = smc_avg(k) + Noahmp50_struc(n)%noahmp50(t)%smc(k) end do @@ -211,8 +211,8 @@ subroutine noahmpnew_getirrigationstates(n,irrigState) t = (i-1)*LIS_rc%nensem(n)+m - timestep = NoahmpNew_struc(n)%dt - soiltyp = NoahmpNew_struc(n)%noahmpnew(t)%soiltype + timestep = Noahmp50_struc(n)%dt + soiltyp = Noahmp50_struc(n)%noahmp50(t)%soiltype ! Adjust bounds by timestep to account for the fact that LIS_rc%hr, etc. @@ -243,11 +243,11 @@ subroutine noahmpnew_getirrigationstates(n,irrigState) zdpth(3) = sldpth(1) + sldpth(2) + sldpth(3) zdpth(4) = sldpth(1) + sldpth(2) + sldpth(3) + sldpth(4) - smcmax = NoahmpNew_struc(n)%noahmpnew(t)%param%SMCMAX(1) !SMCMAX_TABLE(soiltyp) - smcref = NoahmpNew_struc(n)%noahmpnew(t)%param%SMCREF(1) !SMCREF_TABLE(soiltyp) - smcwlt = NoahmpNew_struc(n)%noahmpnew(t)%param%SMCWLT(1) !SMCWLT_TABLE(soiltyp) + smcmax = Noahmp50_struc(n)%noahmp50(t)%param%SMCMAX(1) !SMCMAX_TABLE(soiltyp) + smcref = Noahmp50_struc(n)%noahmp50(t)%param%SMCREF(1) !SMCREF_TABLE(soiltyp) + smcwlt = Noahmp50_struc(n)%noahmp50(t)%param%SMCWLT(1) !SMCWLT_TABLE(soiltyp) - ! sfctemp = NoahmpNew_struc(n)%noahmpnew(t)%sfctmp + ! sfctemp = Noahmp50_struc(n)%noahmp50(t)%sfctmp tempcheck = 273.16 + 2.5 gid = LIS_surface(n,LIS_rc%lsm_index)%tile(t)%index @@ -261,13 +261,13 @@ subroutine noahmpnew_getirrigationstates(n,irrigState) ltime = real(lhr)+real(LIS_rc%mn)/60.0+real(LIS_rc%ss)/3600.0 - if((NoahmpNew_struc(n)%dveg_opt == 2 .OR. & - NoahmpNew_struc(n)%dveg_opt == 5 .OR. & - NoahmpNew_struc(n)%dveg_opt == 6) .AND. LIS_rc%irrigation_dveg == 1) then + if((Noahmp50_struc(n)%dveg_opt == 2 .OR. & + Noahmp50_struc(n)%dveg_opt == 5 .OR. & + Noahmp50_struc(n)%dveg_opt == 6) .AND. LIS_rc%irrigation_dveg == 1) then shdfac = shdfac_avg else - shdfac = NoahmpNew_struc(n)%noahmpnew(t)%shdfac_monthly(LIS_rc%mo) + shdfac = Noahmp50_struc(n)%noahmp50(t)%shdfac_monthly(LIS_rc%mo) end if @@ -312,8 +312,8 @@ subroutine noahmpnew_getirrigationstates(n,irrigState) if( IrrigScale(t).gt.0.0 ) then ! irrigated tile ! if(ippix.gt.0.0) then ! irrigated tile - !shdmin = minval(NoahmpNew_struc(n)%noahmpnew(t)%shdfac_monthly) - !shdmax = maxval(NoahmpNew_struc(n)%noahmpnew(t)%shdfac_monthly) + !shdmin = minval(Noahmp50_struc(n)%noahmp50(t)%shdfac_monthly) + !shdmax = maxval(Noahmp50_struc(n)%noahmp50(t)%shdfac_monthly) shdmin =placeshdmin(LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col, & LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) shdmax =placeshdmax(LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col, & @@ -425,8 +425,8 @@ subroutine noahmpnew_getirrigationstates(n,irrigState) ! Compute irrigation rate !----------------------------------------------------------------------------- irrigRate(t) = twater ! for drip calculation, twater is a rate [kg/m2/s] - NoahmpNew_struc(n)%noahmpnew(t)%smc(1) = & - NoahmpNew_struc(n)%noahmpnew(t)%smc(1) + (twater-twater2)/(sldpth(1)*1000.0) !! check this with Sujay + Noahmp50_struc(n)%noahmp50(t)%smc(1) = & + Noahmp50_struc(n)%noahmp50(t)%smc(1) + (twater-twater2)/(sldpth(1)*1000.0) !! check this with Sujay !!!!! FLOOD IRRIGATION elseif(LIS_rc%irrigation_type.eq."Flood") then @@ -436,7 +436,7 @@ subroutine noahmpnew_getirrigationstates(n,irrigState) !------------------------------------------------------------- if(lroot.gt.0) then do k=1,lroot - asmc = asmc + NoahmpNew_struc(n)%noahmpnew(t)%smc(k)*& + asmc = asmc + Noahmp50_struc(n)%noahmp50(t)%smc(k)*& rdpth(k)*1000.0 tsmcwlt = tsmcwlt + smcwlt * rdpth(k)*1000.0 tsmcref = tsmcref + smcref * rdpth(k)*1000.0 @@ -450,10 +450,10 @@ subroutine noahmpnew_getirrigationstates(n,irrigState) if( ma .le. LIS_rc%irrigation_thresh ) then do l = 1, LIS_rc%irrigation_mxsoildpth if( l == 1 ) then - twater = (SMCMAX - NoahmpNew_struc(n)%noahmpnew(t)%smc(l))*sldpth(l)*1000.0 + twater = (SMCMAX - Noahmp50_struc(n)%noahmp50(t)%smc(l))*sldpth(l)*1000.0 else ! BZ modification 4/2/2015 to saturate entire column and apply ippix - twater = twater + (smcmax - NoahmpNew_struc(n)%noahmpnew(t)%smc(l))*sldpth(l)*1000.0 + twater = twater + (smcmax - Noahmp50_struc(n)%noahmp50(t)%smc(l))*sldpth(l)*1000.0 endif end do @@ -478,8 +478,8 @@ subroutine noahmpnew_getirrigationstates(n,irrigState) ! BZ modification 4/2/2015 to account for ippix and all soil layers: do l = 1, LIS_rc%irrigation_mxsoildpth - NoahmpNew_struc(n)%noahmpnew(t)%smc(l) = IrrigScale(t)*smcmax + & - (1-IrrigScale(t))*NoahmpNew_struc(n)%noahmpnew(t)%smc(l) + Noahmp50_struc(n)%noahmp50(t)%smc(l) = IrrigScale(t)*smcmax + & + (1-IrrigScale(t))*Noahmp50_struc(n)%noahmp50(t)%smc(l) end do endif endif @@ -494,15 +494,15 @@ subroutine noahmpnew_getirrigationstates(n,irrigState) ! Remove irrigated water from groundwater !JE Add in flag to turn groundwater abstraction on/off if (LIS_rc%irrigation_GWabstraction.eq.1) then - AWS = NoahmpNew_struc(n)%noahmpnew(t)%wa - Dtime = NoahmpNew_struc(n)%ts + AWS = Noahmp50_struc(n)%noahmp50(t)%wa + Dtime = Noahmp50_struc(n)%ts if (LIS_rc%irrigation_SourcePartition.eq.1) then if(irriggwratio(t).gt.0) then - NoahmpNew_struc(n)%noahmpnew(t)%wa = AWS - irrigRate(t)*Dtime*irriggwratio(t)/100 + Noahmp50_struc(n)%noahmp50(t)%wa = AWS - irrigRate(t)*Dtime*irriggwratio(t)/100 end if else - NoahmpNew_struc(n)%noahmpnew(t)%wa = AWS - irrigRate(t)*Dtime + Noahmp50_struc(n)%noahmp50(t)%wa = AWS - irrigRate(t)*Dtime end if end if end if @@ -510,4 +510,4 @@ subroutine noahmpnew_getirrigationstates(n,irrigState) end do end do - end subroutine noahmpnew_getirrigationstates + end subroutine noahmp50_getirrigationstates diff --git a/lis/surfacemodels/land/noahmp.new/kwm_date_utilities_new.F90 b/lis/surfacemodels/land/noahmp.5.0/kwm_date_utilities_50.F90 similarity index 99% rename from lis/surfacemodels/land/noahmp.new/kwm_date_utilities_new.F90 rename to lis/surfacemodels/land/noahmp.5.0/kwm_date_utilities_50.F90 index 380dd0c8f..315b9247d 100644 --- a/lis/surfacemodels/land/noahmp.new/kwm_date_utilities_new.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/kwm_date_utilities_50.F90 @@ -7,7 +7,7 @@ ! Administrator of the National Aeronautics and Space Administration. ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- -module kwm_date_utilities_new +module kwm_date_utilities_50 contains subroutine geth_newdate (ndate, odate, idt) implicit none @@ -819,4 +819,4 @@ integer function nmdays(hdate) nmdays = ndays(month) endif end function nmdays -end module kwm_date_utilities_new +end module kwm_date_utilities_50 diff --git a/lis/surfacemodels/land/noahmp.new/noahmp_driver_new.F90 b/lis/surfacemodels/land/noahmp.5.0/noahmp_driver_50.F90 similarity index 98% rename from lis/surfacemodels/land/noahmp.new/noahmp_driver_new.F90 rename to lis/surfacemodels/land/noahmp.5.0/noahmp_driver_50.F90 index 3026b03df..f02acc1d7 100644 --- a/lis/surfacemodels/land/noahmp.new/noahmp_driver_new.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/noahmp_driver_50.F90 @@ -13,7 +13,7 @@ #undef LIS_NoahMP_TEST ! !INTERFACE -subroutine noahmp_driver_new(n, LISparam) +subroutine noahmp_driver_50(n, LISparam) use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_logunit, LIS_endrun @@ -150,7 +150,7 @@ subroutine noahmp_driver_new(n, LISparam) ! main NoahMP driver physics call NoahmpDriverMain(NoahmpIO,LISparam) -end subroutine noahmp_driver_new +end subroutine noahmp_driver_50 real function month_d_new(a12, nowdate) result (nowval) ! @@ -160,7 +160,7 @@ real function month_d_new(a12, nowdate) result (nowval) ! Return a value valid for the day given in , as an interpolation from the 12 ! monthly values. ! - use kwm_date_utilities_new + use kwm_date_utilities_50 implicit none real, dimension(12), intent(in) :: a12 ! 12 monthly values, taken to be valid on the 15th of ! ! the month @@ -198,7 +198,7 @@ real function month_d_new(a12, nowdate) result (nowval) end function month_d_new SUBROUTINE calc_declin ( nowdate, latitude, longitude, cosz, yearlen, julian) - use kwm_date_utilities_new + use kwm_date_utilities_50 !--------------------------------------------------------------------- IMPLICIT NONE !--------------------------------------------------------------------- diff --git a/lis/surfacemodels/land/noahmp.new/pe/NoahMPnew_peMod.F90 b/lis/surfacemodels/land/noahmp.5.0/pe/NoahMP50_peMod.F90 similarity index 62% rename from lis/surfacemodels/land/noahmp.new/pe/NoahMPnew_peMod.F90 rename to lis/surfacemodels/land/noahmp.5.0/pe/NoahMP50_peMod.F90 index 2fbf46a03..7b6e31f41 100755 --- a/lis/surfacemodels/land/noahmp.new/pe/NoahMPnew_peMod.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/pe/NoahMP50_peMod.F90 @@ -7,10 +7,10 @@ ! Administrator of the National Aeronautics and Space Administration. ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- -module NoahMPnew_peMod +module NoahMP50_peMod !BOP ! -! !MODULE: NoahMPnew_peMod +! !MODULE: NoahMP50_peMod ! ! !DESCRIPTION: ! This module contains the definitions of the NoahMP.4.0.1 model parameters @@ -31,40 +31,40 @@ module NoahMPnew_peMod !----------------------------------------------------------------------------- ! !PUBLIC MEMBER FUNCTIONS: !----------------------------------------------------------------------------- - public :: NoahMPnew_setup_pedecvars + public :: NoahMP50_setup_pedecvars !----------------------------------------------------------------------------- ! !PUBLIC TYPES: !----------------------------------------------------------------------------- - public :: NoahMPnew_pe_struc + public :: NoahMP50_pe_struc !EOP - type, public :: NoahMPnew_pe_dec + type, public :: NoahMP50_pe_dec integer :: nparams character*40, allocatable :: param_name(:) integer , allocatable :: param_select(:) real , allocatable :: param_min(:) real , allocatable :: param_max(:) - end type NoahMPnew_pe_dec + end type NoahMP50_pe_dec - type(NoahMPnew_pe_dec), allocatable :: NoahMPnew_pe_struc(:) + type(NoahMP50_pe_dec), allocatable :: NoahMP50_pe_struc(:) SAVE contains !BOP -! !ROUTINE: NoahMPnew_setup_pedecvars -! \label{NoahMPnew_setup_pedecvars} +! !ROUTINE: NoahMP50_setup_pedecvars +! \label{NoahMP50_setup_pedecvars} ! ! !REVISION HISTORY: ! 02 Feb 2018: Soni Yatheendradas; Initial Specification ! May 2023: Cenlin He, modified for refactored NoahMP v5 and later ! ! !INTERFACE: - subroutine NoahMPnew_setup_pedecvars(DEC_State, Feas_State) + subroutine NoahMP50_setup_pedecvars(DEC_State, Feas_State) ! !USES: use LIS_coreMod use LIS_logMod - use NoahMPnew_lsmMod, only : NoahMPnew_struc + use NoahMP50_lsmMod, only : NoahMP50_struc implicit none ! !ARGUMENTS: @@ -105,48 +105,48 @@ subroutine NoahMPnew_setup_pedecvars(DEC_State, Feas_State) label="LSM Decision space attributes file:",rc=status) call LIS_verify(status, "LSM Decision space attributes file: not defined") - allocate(NoahMPnew_pe_struc(LIS_rc%nnest)) + allocate(NoahMP50_pe_struc(LIS_rc%nnest)) n = 1 - NoahMPnew_pe_struc(n)%nparams = 76 + NoahMP50_pe_struc(n)%nparams = 76 - allocate(NoahMPnew_pe_struc(n)%param_name(NoahMPnew_pe_struc(n)%nparams)) - allocate(NoahMPnew_pe_struc(n)%param_select(NoahMPnew_pe_struc(n)%nparams)) - allocate(NoahMPnew_pe_struc(n)%param_min(NoahMPnew_pe_struc(n)%nparams)) - allocate(NoahMPnew_pe_struc(n)%param_max(NoahMPnew_pe_struc(n)%nparams)) + allocate(NoahMP50_pe_struc(n)%param_name(NoahMP50_pe_struc(n)%nparams)) + allocate(NoahMP50_pe_struc(n)%param_select(NoahMP50_pe_struc(n)%nparams)) + allocate(NoahMP50_pe_struc(n)%param_min(NoahMP50_pe_struc(n)%nparams)) + allocate(NoahMP50_pe_struc(n)%param_max(NoahMP50_pe_struc(n)%nparams)) ! read the attributes file. call LIS_readPEDecSpaceAttributes(decSpaceAttribsFile, & - NoahMPnew_pe_struc(n)%nparams, & - NoahMPnew_pe_struc(n)%param_name, & - NoahMPnew_pe_struc(n)%param_select, & - NoahMPnew_pe_struc(n)%param_min, & - NoahMPnew_pe_struc(n)%param_max) + NoahMP50_pe_struc(n)%nparams, & + NoahMP50_pe_struc(n)%param_name, & + NoahMP50_pe_struc(n)%param_select, & + NoahMP50_pe_struc(n)%param_min, & + NoahMP50_pe_struc(n)%param_max) call ESMF_ArraySpecSet(arrspec1,rank=1,typekind=ESMF_TYPEKIND_R4,& rc=status) call LIS_verify(status) - do i=1,NoahMPnew_pe_struc(n)%nparams - if(NoahMPnew_pe_struc(n)%param_select(i).eq.1) then - vname=trim(NoahMPnew_pe_struc(n)%param_name(i)) + do i=1,NoahMP50_pe_struc(n)%nparams + if(NoahMP50_pe_struc(n)%param_select(i).eq.1) then + vname=trim(NoahMP50_pe_struc(n)%param_name(i)) varField = ESMF_FieldCreate(arrayspec=arrspec1, & grid=LIS_vecPatch(n,LIS_rc%lsm_index),& name=vname,& rc=status) call LIS_verify(status, & - 'problem with fieldcreate in NoahMPnew_setup_pedecvars') + 'problem with fieldcreate in NoahMP50_setup_pedecvars') call ESMF_AttributeSet(varField,'MinRange',& - NoahMPnew_pe_struc(n)%param_min(i),rc=status) + NoahMP50_pe_struc(n)%param_min(i),rc=status) call LIS_verify(status, & - 'setting minrange to decspace obj in NoahMPnew_setup_devars') + 'setting minrange to decspace obj in NoahMP50_setup_devars') call ESMF_AttributeSet(varField,'MaxRange',& - NoahMPnew_pe_struc(n)%param_max(i),rc=status) + NoahMP50_pe_struc(n)%param_max(i),rc=status) call LIS_verify(status, & - 'setting maxrange to decspace obj in NoahMPnew_setup_devars') + 'setting maxrange to decspace obj in NoahMP50_setup_devars') call ESMF_StateAdd(DEC_State,(/varField/),rc=status) call LIS_verify(status,& - 'stateadd in NoahMPnew_setup_pedecvars') + 'stateadd in NoahMP50_setup_pedecvars') call ESMF_StateGet(DEC_State,vname,varField,rc=status) call LIS_verify(status) @@ -159,479 +159,479 @@ subroutine NoahMPnew_setup_pedecvars(DEC_State, Feas_State) NT=LIS_rc%npatch(n,LIS_rc%lsm_index) if(vname.eq."TOPT") then - do t=1,NT; vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%topt + do t=1,NT; vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%topt enddo endif if(vname.eq."RGL") then - do t=1,NT; vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%rgl + do t=1,NT; vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%rgl enddo endif if(vname.eq."RSMAX") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%rsmax + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%rsmax enddo endif if(vname.eq."RSMIN") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%rsmin + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%rsmin enddo endif if(vname.eq."HS") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%hs + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%hs enddo endif if(vname.eq."NROOT") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%nroot + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%nroot enddo endif if(vname.eq."CSOIL") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%csoil + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%csoil enddo endif if(vname.eq."BEXP") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%bexp(1) + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%bexp(1) enddo endif if(vname.eq."DKSAT") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%dksat(1) + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%dksat(1) enddo endif if(vname.eq."DWSAT") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%dwsat(1) + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%dwsat(1) enddo endif if(vname.eq."PSISAT") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%psisat(1) + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%psisat(1) enddo endif if(vname.eq."QUARTZ") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%quartz(1) + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%quartz(1) enddo endif if(vname.eq."SMCMAX") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%smcmax(1) + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%smcmax(1) enddo endif if(vname.eq."SMCREF") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%smcref(1) + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%smcref(1) enddo endif if(vname.eq."SMCWLT") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%smcwlt(1) + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%smcwlt(1) enddo endif if(vname.eq."CZIL") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%czil + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%czil enddo endif if(vname.eq."SLOPE") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%slope + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%slope enddo endif if(vname.eq."CH2OP") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%CH2OP + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%CH2OP enddo endif if(vname.eq."DLEAF") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%DLEAF + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%DLEAF enddo endif if(vname.eq."Z0MVT") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%Z0MVT + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%Z0MVT enddo endif if(vname.eq."HVT") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%HVT + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%HVT enddo endif if(vname.eq."HVB") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%HVB + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%HVB enddo endif if(vname.eq."RC") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%RC + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%RC enddo endif if(vname.eq."MFSNO") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%mfsno + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%mfsno enddo endif if(vname.eq."ALBSAT1") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%albsat(1) + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%albsat(1) enddo endif if(vname.eq."ALBSAT2") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%albsat(2) + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%albsat(2) enddo endif if(vname.eq."ALBDRY1") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%albdry(1) + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%albdry(1) enddo endif if(vname.eq."ALBDRY2") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%albdry(2) + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%albdry(2) enddo endif if(vname.eq."ALBICE1") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%albice(1) + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%albice(1) enddo endif if(vname.eq."ALBICE2") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%albice(2) + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%albice(2) enddo endif if(vname.eq."OMEGAS1") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%omegas(1) + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%omegas(1) enddo endif if(vname.eq."OMEGAS2") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%omegas(2) + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%omegas(2) enddo endif if(vname.eq."BETADS") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%betads + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%betads enddo endif if(vname.eq."BETAIS") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%betais + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%betais enddo endif if(vname.eq."EG1") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%eg(1) + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%eg(1) enddo endif if(vname.eq."EG2") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%eg(2) + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%eg(2) enddo endif if(vname.eq."EG2") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%eg(2) + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%eg(2) enddo endif if(vname.eq."Z0SNO") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%z0sno + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%z0sno enddo endif if(vname.eq."SSI") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%ssi + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%ssi enddo endif if(vname.eq."SWEMX") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%swemx + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%swemx enddo endif if(vname.eq."RSURF_SNOW") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%rsurf_snow + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%rsurf_snow enddo endif if(vname.eq."MNSNALB") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%mnsnalb + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%mnsnalb enddo endif if(vname.eq."MXSNALB") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%mxsnalb + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%mxsnalb enddo endif if(vname.eq."SNDECAYEXP") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%sndecayexp + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%sndecayexp enddo endif if(vname.eq."T_ULIMIT") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%t_ulimit + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%t_ulimit enddo endif if(vname.eq."T_LLIMIT") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%t_llimit + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%t_llimit enddo endif if(vname.eq."T_MLIMIT") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%t_mlimit + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%t_mlimit enddo endif if(vname.eq."SNOWF_SCALEF") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%snowf_scalef + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%snowf_scalef enddo endif if(vname.eq."RHOL1") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%RHOL(1) + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%RHOL(1) enddo endif if(vname.eq."RHOL2") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%RHOL(2) + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%RHOL(2) enddo endif if(vname.eq."RHOS1") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%RHOS(1) + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%RHOS(1) enddo endif if(vname.eq."RHOS2") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%RHOS(2) + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%RHOS(2) enddo endif if(vname.eq."TAUL1") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%TAUL(1) + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%TAUL(1) enddo endif if(vname.eq."TAUL2") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%TAUL(2) + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%TAUL(2) enddo endif if(vname.eq."TAUS1") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%TAUS(1) + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%TAUS(1) enddo endif if(vname.eq."TAUS2") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%TAUS(2) + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%TAUS(2) enddo endif if(vname.eq."XL") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%XL + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%XL enddo endif if(vname.eq."CWPVT") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%CWPVT + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%CWPVT enddo endif if(vname.eq."C3PSN") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%C3PSN + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%C3PSN enddo endif if(vname.eq."KC25") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%KC25 + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%KC25 enddo endif if(vname.eq."AKC") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%AKC + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%AKC enddo endif if(vname.eq."KO25") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%KO25 + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%KO25 enddo endif if(vname.eq."AKO") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%AKO + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%AKO enddo endif if(vname.eq."AVCMX") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%AVCMX + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%AVCMX enddo endif if(vname.eq."AQE") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%AQE + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%AQE enddo endif if(vname.eq."LTOVRC") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%LTOVRC + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%LTOVRC enddo endif if(vname.eq."DILEFC") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%DILEFC + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%DILEFC enddo endif if(vname.eq."DILEFW") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%DILEFW + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%DILEFW enddo endif if(vname.eq."RMF25") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%RMF25 + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%RMF25 enddo endif if(vname.eq."SLA") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%SLA + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%SLA enddo endif if(vname.eq."FRAGR") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%FRAGR + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%FRAGR enddo endif if(vname.eq."TMIN") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%TMIN + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%TMIN enddo endif if(vname.eq."VCMX25") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%VCMX25 + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%VCMX25 enddo endif if(vname.eq."TDLEF") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%TDLEF + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%TDLEF enddo endif if(vname.eq."BP") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%BP + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%BP enddo endif if(vname.eq."MP") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%MP + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%MP enddo endif if(vname.eq."QE25") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%QE25 + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%QE25 enddo endif if(vname.eq."RMS25") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%RMS25 + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%RMS25 enddo endif if(vname.eq."RMR25") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%RMR25 + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%RMR25 enddo endif if(vname.eq."ARM") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%ARM + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%ARM enddo endif if(vname.eq."FOLNMX") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%FOLNMX + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%FOLNMX enddo endif if(vname.eq."WDPOOL") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%WDPOOL + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%WDPOOL enddo endif if(vname.eq."WRRAT") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%WRRAT + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%WRRAT enddo endif if(vname.eq."MRP") then do t=1,NT - vardata(t) = NoahMPnew_struc(n)%noahmpnew(t)%param%MRP + vardata(t) = NoahMP50_struc(n)%noahmp50(t)%param%MRP enddo endif @@ -644,9 +644,9 @@ subroutine NoahMPnew_setup_pedecvars(DEC_State, Feas_State) .and. & (count.eq.0) & .and. & - ((vardata(gid) .lt. NoahMPnew_pe_struc(n)%param_min(i)) & + ((vardata(gid) .lt. NoahMP50_pe_struc(n)%param_min(i)) & .or. & - (vardata(gid) .gt. NoahMPnew_pe_struc(n)%param_max(i))) ) then + (vardata(gid) .gt. NoahMP50_pe_struc(n)%param_max(i))) ) then count=count+1 write(LIS_logunit,*) '*****************************************************************', ' ', & 'WARNING: noah default value is out of LIS-OPT/UE bounds ' , ' ', & @@ -654,27 +654,27 @@ subroutine NoahMPnew_setup_pedecvars(DEC_State, Feas_State) 'at ' , ' ', & 'col: ', LIS_surface(n,LIS_rc%lsm_index)%tile(gid)%col , ' ', & 'row: ', LIS_surface(n,LIS_rc%lsm_index)%tile(gid)%row , ' ', & - 'vegt class: ', NoahMPnew_struc(n)%noahmpnew(gid)%vegetype , ' ', & - 'soiltype: ', NoahMPnew_struc(n)%noahmpnew(gid)%soiltype , ' ', & + 'vegt class: ', NoahMP50_struc(n)%noahmp50(gid)%vegetype , ' ', & + 'soiltype: ', NoahMP50_struc(n)%noahmp50(gid)%soiltype , ' ', & 'default value: ', vardata(gid) , ' ', & - 'parameter min: ', NoahMPnew_pe_struc(n)%param_min(i) , ' ', & - 'parameter max: ', NoahMPnew_pe_struc(n)%param_max(i) , ' ', & + 'parameter min: ', NoahMP50_pe_struc(n)%param_min(i) , ' ', & + 'parameter max: ', NoahMP50_pe_struc(n)%param_max(i) , ' ', & '*****************************************************************' endif enddo enddo - endif ! if(NoahMPnew_pe_struc(n)%param_select(i).eq.1) then - enddo ! do i=1,NoahMPnew_pe_struc(n)%nparams + endif ! if(NoahMP50_pe_struc(n)%param_select(i).eq.1) then + enddo ! do i=1,NoahMP50_pe_struc(n)%nparams !random initialization if(LIS_rc%decSpaceInitMode.eq.1) then !random initialization seed=seed_base-LIS_localPet !seed must be negative number call LIS_rand_func(seed,rand) !initialize random seed with negative number - do i=1,NoahMPnew_pe_struc(n)%nparams - if(NoahMPnew_pe_struc(n)%param_select(i).eq.1) then - vname=trim(NoahMPnew_pe_struc(n)%param_name(i)) + do i=1,NoahMP50_pe_struc(n)%nparams + if(NoahMP50_pe_struc(n)%param_select(i).eq.1) then + vname=trim(NoahMP50_pe_struc(n)%param_name(i)) call ESMF_StateGet(DEC_State,vname,varField,rc=status) call LIS_verify(status) @@ -690,8 +690,8 @@ subroutine NoahMPnew_setup_pedecvars(DEC_State, Feas_State) else call LIS_rand_func(1,rand) vardata((t-1)*LIS_rc%nensem(n)+m) = & - NoahMPnew_pe_struc(n)%param_min(i) & - + rand * ( NoahMPnew_pe_struc(n)%param_max(i) - NoahMPnew_pe_struc(n)%param_min(i) ) + NoahMP50_pe_struc(n)%param_min(i) & + + rand * ( NoahMP50_pe_struc(n)%param_max(i) - NoahMP50_pe_struc(n)%param_min(i) ) endif enddo enddo @@ -709,7 +709,7 @@ subroutine NoahMPnew_setup_pedecvars(DEC_State, Feas_State) enddo endif - write(LIS_logunit,*) '[INFO] Finished setting up NoahMPnew decision space ' - end subroutine NoahMPnew_setup_pedecvars + write(LIS_logunit,*) '[INFO] Finished setting up NoahMP50 decision space ' + end subroutine NoahMP50_setup_pedecvars -end module NoahMPnew_peMod +end module NoahMP50_peMod diff --git a/lis/surfacemodels/land/noahmp.5.0/pe/NoahMP50_set_pedecvars.F90 b/lis/surfacemodels/land/noahmp.5.0/pe/NoahMP50_set_pedecvars.F90 new file mode 100755 index 000000000..7298c28b0 --- /dev/null +++ b/lis/surfacemodels/land/noahmp.5.0/pe/NoahMP50_set_pedecvars.F90 @@ -0,0 +1,524 @@ +!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- +! NASA Goddard Space Flight Center +! Land Information System Framework (LISF) +! Version 7.4 +! +! Copyright (c) 2022 United States Government as represented by the +! Administrator of the National Aeronautics and Space Administration. +! All Rights Reserved. +!-------------------------END NOTICE -- DO NOT EDIT----------------------- +!BOP +! !ROUTINE: NoahMP50_set_pedecvars +! \label{NoahMP50_set_pedecvars} +! +! !REVISION HISTORY: +! 02 Feb 2018: Soni Yatheendradas; Initial Specification +! May 2023: Cenlin He; modified for refactored NoahMP v5 and later +! + + +! !INTERFACE: +subroutine NoahMP50_set_pedecvars(DEC_State, Feas_State) +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc, LIS_surface + use LIS_logMod, only : LIS_logunit,LIS_verify + use NoahMP50_lsmMod, only : NoahMP50_struc + use NoahMP50_peMod, only : NoahMP50_pe_struc + + implicit none +! !ARGUMENTS: + type(ESMF_State) :: DEC_State + type(ESMF_State) :: Feas_State +! +! !DESCRIPTION: +! +! This routine assigns the decision space to NoahMP model variables. +! +!EOP + integer :: n + real, pointer :: vdata(:) + character*100 :: vname + integer, pointer :: mod_flag_NoahMP50(:) + integer :: i,t + integer :: status + + n = 1 + + allocate(mod_flag_NoahMP50(LIS_rc%npatch(n,LIS_rc%lsm_index))) + + mod_flag_NoahMP50 = 0 + + !set modflag based on bounds + allocate(vdata(LIS_rc%npatch(n,LIS_rc%lsm_index))) + do i=1,NoahMP50_pe_struc(n)%nparams + if(NoahMP50_pe_struc(n)%param_select(i).eq.1) then + vname=trim(NoahMP50_pe_struc(n)%param_name(i)) + call NoahMP50_getvardata(n,DEC_State,vname, vdata, status) + call LIS_verify(status) + call NoahMP50_checkBounds(n,DEC_State,vname, vdata, mod_flag_NoahMP50) + endif + enddo + deallocate(vdata) + + !update modflags based on constraints + call NoahMP50_checkConstraints(n,DEC_State, mod_flag_NoahMP50) + + !set variables given modflag; if flag set will leave values alone + call NoahMP50_setVars(n,DEC_State,mod_flag_NoahMP50) + + !send mod flag to ESMF state (feasibility flag) + call NoahMP50_setModFlag(n,DEC_State,Feas_State,mod_flag_NoahMP50) +end subroutine NoahMP50_set_pedecvars + +!BOP +! +! !ROUTINE: randArray +! \label{randArray} +! +! !INTERFACE: +subroutine NoahMP50_getvardata(n,DEC_State,vname, vdata, statusStateGet) +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc + use LIS_logMod, only : LIS_logunit,LIS_verify + + implicit none +! !ARGUMENTS: + integer :: n + type(ESMF_State) :: DEC_State + character*100 :: vname + real :: vdata(LIS_rc%npatch(n,LIS_rc%lsm_index)) +! +! !DESCRIPTION: +! +! This routine assigns the decision space to NoahMP model variables. +! +!EOP + real, pointer :: vardata(:) + type(ESMF_Field) :: varField + integer :: statusStateGet, statusFieldGet,i + + call ESMF_StateGet(DEC_State,vname,varField,rc=statusStateGet) +! call LIS_verify(status) + + if(statusStateGet.eq.0) then + call ESMF_FieldGet(varField,localDE=0,farrayPtr=vardata,& + rc=statusFieldGet) + call LIS_verify(statusFieldGet) + vdata=vardata + endif + +end subroutine NoahMP50_getvardata + +subroutine NoahMP50_checkBounds(n,DEC_State,vname, vardata, mod_flag_NoahMP50) +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc, LIS_surface + use LIS_logMod, only : LIS_logunit,LIS_verify + + implicit none +! !ARGUMENTS: + integer :: n + type(ESMF_State) :: DEC_State + character*100 :: vname + real :: vardata(LIS_rc%npatch(n,LIS_rc%lsm_index)) + integer :: mod_flag_NoahMP50(LIS_rc%npatch(n,LIS_rc%lsm_index)) +! +! !DESCRIPTION: +! +! This routine assigns the decision space to NoahMP model variables. +! +!EOP + type(ESMF_Field) :: varField + real :: vardata_min, vardata_max + integer :: status + integer :: t + + call ESMF_StateGet(DEC_State,vname,varField,rc=status) + call LIS_verify(status) + + call ESMF_AttributeGet(varField,'MinRange',vardata_min,rc=status) + call LIS_verify(status) + call ESMF_AttributeGet(varField,'MaxRange',vardata_max,rc=status) + call LIS_verify(status) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + if(vardata(t).lt.vardata_min) then + mod_flag_NoahMP50(t) = 1 + endif + if(vardata(t).gt.vardata_max) then + mod_flag_NoahMP50(t) = 1 + endif + enddo +end subroutine NoahMP50_checkBounds + +subroutine NoahMP50_checkConstraints(n,DEC_State,mod_flag_NoahMP50) +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc, LIS_surface + use NoahMP50_lsmMod, only : NoahMP50_struc + + implicit none +! !ARGUMENTS: + integer :: n + type(ESMF_State) :: DEC_State + integer :: mod_flag_NoahMP50(LIS_rc%npatch(n,LIS_rc%lsm_index)) +! +! !DESCRIPTION: +! +! This routine assigns the decision space to NoahMP model variables. +! +!EOP + type(ESMF_Field) :: varField + real :: vardata_min, vardata_max + character*100 :: vname + integer :: t + integer :: status1, status2 + real, allocatable :: vardata1(:) + real, allocatable :: vardata2(:) + real, allocatable :: vardata3(:) + + allocate(vardata1(LIS_rc%npatch(n,LIS_rc%lsm_index))) + allocate(vardata2(LIS_rc%npatch(n,LIS_rc%lsm_index))) + allocate(vardata3(LIS_rc%npatch(n,LIS_rc%lsm_index))) + + vname='SMCMAX' + call NoahMP50_getvardata(n,DEC_State,vname,vardata1, status1) + + if(status1.ne.0) vardata1=NoahMP50_struc(n)%noahmp50(:)%param%smcmax(1) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + if(vardata1(t).le.NoahMP50_struc(n)%noahmp50(t)%param%smcdry(1)) then + mod_flag_NoahMP50(t) = 1 + endif + enddo + + !SMCREF > SMCWLT + vname='SMCREF' + call NoahMP50_getvardata(n,DEC_State,vname,vardata1, status1) + vname='SMCWLT' + call NoahMP50_getvardata(n,DEC_State,vname,vardata2, status2) + if(status1.ne.0) vardata1=NoahMP50_struc(n)%noahmp50(:)%param%smcref(1) + if(status2.ne.0) vardata2=NoahMP50_struc(n)%noahmp50(:)%param%smcwlt(1) + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + if(vardata1(t).le.vardata2(t)) then + mod_flag_NoahMP50(t) = 1 + endif + enddo + + !SMCMAX > SMCREF + vname='SMCMAX' + call NoahMP50_getvardata(n,DEC_State,vname,vardata1, status1) + vname='SMCREF' + call NoahMP50_getvardata(n,DEC_State,vname,vardata2, status2) + if(status1.ne.0) vardata1=NoahMP50_struc(n)%noahmp50(:)%param%smcmax(1) + if(status2.ne.0) vardata2=NoahMP50_struc(n)%noahmp50(:)%param%smcref(1) + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + if(vardata1(t).le.vardata2(t)) then + mod_flag_NoahMP50(t) = 1 + endif + enddo + + !HVT > HVB + vname='HVT' + call NoahMP50_getvardata(n,DEC_State,vname,vardata1, status1) + vname='HVB' + call NoahMP50_getvardata(n,DEC_State,vname,vardata2, status2) + if(status1.ne.0) vardata1=NoahMP50_struc(n)%noahmp50(:)%param%HVT + if(status2.ne.0) vardata2=NoahMP50_struc(n)%noahmp50(:)%param%HVB + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + if(vardata1(t).lt.vardata2(t)) then ! SY: Note .lt. instead of .le., following some entries with HVT=HVB in MPTABLE_UMD.TBL + mod_flag_NoahMP50(t) = 1 + endif + enddo + + !HVT > Z0MVT + vname='HVT' + call NoahMP50_getvardata(n,DEC_State,vname,vardata1, status1) + vname='Z0MVT' + call NoahMP50_getvardata(n,DEC_State,vname,vardata2, status2) + if(status1.ne.0) vardata1=NoahMP50_struc(n)%noahmp50(:)%param%HVT + if(status2.ne.0) vardata2=NoahMP50_struc(n)%noahmp50(:)%param%Z0MVT + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + if(vardata1(t).le.vardata2(t)) then + mod_flag_NoahMP50(t) = 1 + endif + enddo + + + !HVT > Z0MVT + vname='MNSNALB' + call NoahMP50_getvardata(n,DEC_State,vname,vardata1, status1) + vname='MXSNALB' + call NoahMP50_getvardata(n,DEC_State,vname,vardata2, status2) + if(status1.ne.0) vardata1=NoahMP50_struc(n)%noahmp50(:)%param%MNSNALB + if(status2.ne.0) vardata2=NoahMP50_struc(n)%noahmp50(:)%param%MXSNALB + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + if(vardata1(t).ge.vardata2(t)) then + mod_flag_NoahMP50(t) = 1 + endif + enddo + + !HVT > Z0MVT + vname='T_ULIMIT' + call NoahMP50_getvardata(n,DEC_State,vname,vardata1, status1) + vname='T_MLIMIT' + call NoahMP50_getvardata(n,DEC_State,vname,vardata2, status2) + vname='T_LLIMIT' + call NoahMP50_getvardata(n,DEC_State,vname,vardata3, status2) + if(status1.ne.0) vardata1=NoahMP50_struc(n)%noahmp50(:)%param%T_ULIMIT + if(status2.ne.0) vardata2=NoahMP50_struc(n)%noahmp50(:)%param%T_MLIMIT + if(status2.ne.0) vardata3=NoahMP50_struc(n)%noahmp50(:)%param%T_LLIMIT + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + if((vardata3(t).gt.vardata2(t)).or.& + (vardata2(t).gt.vardata1(t)).or.& + (vardata3(t).gt.vardata1(t))) then + mod_flag_NoahMP50(t) = 1 + endif + enddo + + deallocate(vardata1) + deallocate(vardata2) + deallocate(vardata3) + +end subroutine NoahMP50_checkConstraints + +subroutine NoahMP50_setVars(n,DEC_State,mod_flag_NoahMP50) +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc, LIS_surface + use LIS_logMod, only : LIS_logunit,LIS_verify + use NoahMP50_lsmMod, only : NoahMP50_struc + use NoahMP50_peMod, only : NoahMP50_pe_struc + + implicit none +! !ARGUMENTS: + integer :: n + integer :: mod_flag_NoahMP50(LIS_rc%npatch(n,LIS_rc%lsm_index)) + type(ESMF_State) :: DEC_State +! +! !DESCRIPTION: +! +! This routine assigns the decision space to NoahMP model variables. +! Only does so if the proposed parameter set is feasible (meets bounds and constraints) +! +!EOP + real :: vardata(LIS_rc%npatch(n,LIS_rc%lsm_index)) + character*100 :: vname + integer :: i,t, status + + do i=1,NoahMP50_pe_struc(n)%nparams + if(NoahMP50_pe_struc(n)%param_select(i).eq.1) then + vname=trim(NoahMP50_pe_struc(n)%param_name(i)) + call NoahMP50_getvardata(n,DEC_State,vname,vardata, status) + call LIS_verify(status) + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + if(mod_flag_NoahMP50(t).eq.0) then + if(vname.eq."TOPT") & + NoahMP50_struc(n)%noahmp50(t)%param%topt = vardata(t) + if(vname.eq."RGL") & + NoahMP50_struc(n)%noahmp50(t)%param%rgl = vardata(t) + if(vname.eq."RSMAX") & + NoahMP50_struc(n)%noahmp50(t)%param%rsmax = vardata(t) + if(vname.eq."RSMIN") & + NoahMP50_struc(n)%noahmp50(t)%param%rsmin = vardata(t) + if(vname.eq."HS") & + NoahMP50_struc(n)%noahmp50(t)%param%hs = vardata(t) + if(vname.eq."NROOT") & + NoahMP50_struc(n)%noahmp50(t)%param%nroot = vardata(t) + if(vname.eq."CSOIL") & + NoahMP50_struc(n)%noahmp50(t)%param%csoil = vardata(t) + if(vname.eq."BEXP") & + NoahMP50_struc(n)%noahmp50(t)%param%bexp = vardata(t) + if(vname.eq."DKSAT") & + NoahMP50_struc(n)%noahmp50(t)%param%dksat = vardata(t) + if(vname.eq."DWSAT") & + NoahMP50_struc(n)%noahmp50(t)%param%dwsat = vardata(t) + if(vname.eq."PSISAT") & + NoahMP50_struc(n)%noahmp50(t)%param%psisat = vardata(t) + if(vname.eq."QUARTZ") & + NoahMP50_struc(n)%noahmp50(t)%param%quartz = vardata(t) + if(vname.eq."SMCMAX") & + NoahMP50_struc(n)%noahmp50(t)%param%smcmax = vardata(t) + if(vname.eq."SMCREF") & + NoahMP50_struc(n)%noahmp50(t)%param%smcref = vardata(t) + if(vname.eq."SMCWLT") & + NoahMP50_struc(n)%noahmp50(t)%param%smcwlt = vardata(t) + if(vname.eq."CZIL") & + NoahMP50_struc(n)%noahmp50(t)%param%czil = vardata(t) + if(vname.eq."SLOPE") & + NoahMP50_struc(n)%noahmp50(t)%param%slope = vardata(t) + if(vname.eq."CH2OP") & + NoahMP50_struc(n)%noahmp50(t)%param%CH2OP = vardata(t) + if(vname.eq."DLEAF") & + NoahMP50_struc(n)%noahmp50(t)%param%DLEAF = vardata(t) + if(vname.eq."Z0MVT") & + NoahMP50_struc(n)%noahmp50(t)%param%Z0MVT = vardata(t) + if(vname.eq."HVT") & + NoahMP50_struc(n)%noahmp50(t)%param%HVT = vardata(t) + if(vname.eq."HVB") & + NoahMP50_struc(n)%noahmp50(t)%param%HVB = vardata(t) + if(vname.eq."RC") & + NoahMP50_struc(n)%noahmp50(t)%param%RC = vardata(t) + if(vname.eq."MFSNO") & + NoahMP50_struc(n)%noahmp50(t)%param%MFSNO = vardata(t) + if(vname.eq."ALBSAT1") & + NoahMP50_struc(n)%noahmp50(t)%param%ALBSAT(1) = vardata(t) + if(vname.eq."ALBSAT2") & + NoahMP50_struc(n)%noahmp50(t)%param%ALBSAT(2) = vardata(t) + if(vname.eq."ALBDRY1") & + NoahMP50_struc(n)%noahmp50(t)%param%ALBDRY(1) = vardata(t) + if(vname.eq."ALBDRY2") & + NoahMP50_struc(n)%noahmp50(t)%param%ALBDRY(2) = vardata(t) + if(vname.eq."ALBICE1") & + NoahMP50_struc(n)%noahmp50(t)%param%ALBICE(1) = vardata(t) + if(vname.eq."ALBICE2") & + NoahMP50_struc(n)%noahmp50(t)%param%ALBICE(2) = vardata(t) + if(vname.eq."OMEGAS1") & + NoahMP50_struc(n)%noahmp50(t)%param%OMEGAS(1) = vardata(t) + if(vname.eq."OMEGAS2") & + NoahMP50_struc(n)%noahmp50(t)%param%OMEGAS(2) = vardata(t) + if(vname.eq."BETADS") & + NoahMP50_struc(n)%noahmp50(t)%param%BETADS = vardata(t) + if(vname.eq."BETAIS") & + NoahMP50_struc(n)%noahmp50(t)%param%BETAIS = vardata(t) + if(vname.eq."EG1") & + NoahMP50_struc(n)%noahmp50(t)%param%EG(1) = vardata(t) + if(vname.eq."EG2") & + NoahMP50_struc(n)%noahmp50(t)%param%EG(2) = vardata(t) + if(vname.eq."Z0SNO") & + NoahMP50_struc(n)%noahmp50(t)%param%Z0SNO = vardata(t) + if(vname.eq."SSI") & + NoahMP50_struc(n)%noahmp50(t)%param%SSI = vardata(t) + if(vname.eq."SWEMX") & + NoahMP50_struc(n)%noahmp50(t)%param%SWEMX = vardata(t) + if(vname.eq."RSURF_SNOW") & + NoahMP50_struc(n)%noahmp50(t)%param%RSURF_SNOW = vardata(t) + if(vname.eq."MNSNALB") & + NoahMP50_struc(n)%noahmp50(t)%param%MNSNALB = vardata(t) + if(vname.eq."MXSNALB") & + NoahMP50_struc(n)%noahmp50(t)%param%MXSNALB = vardata(t) + if(vname.eq."SNDECAYEXP") & + NoahMP50_struc(n)%noahmp50(t)%param%SNDECAYEXP = vardata(t) + if(vname.eq."T_ULIMIT") & + NoahMP50_struc(n)%noahmp50(t)%param%T_ULIMIT = vardata(t) + if(vname.eq."T_MLIMIT") & + NoahMP50_struc(n)%noahmp50(t)%param%T_MLIMIT = vardata(t) + if(vname.eq."T_LLIMIT") & + NoahMP50_struc(n)%noahmp50(t)%param%T_LLIMIT = vardata(t) + if(vname.eq."SNOWF_SCALEF") & + NoahMP50_struc(n)%noahmp50(t)%param%snowf_scalef = vardata(t) + if(vname.eq."RHOL1") & + NoahMP50_struc(n)%noahmp50(t)%param%RHOL(1) = vardata(t) + if(vname.eq."RHOL2") & + NoahMP50_struc(n)%noahmp50(t)%param%RHOL(2) = vardata(t) + if(vname.eq."RHOS1") & + NoahMP50_struc(n)%noahmp50(t)%param%RHOS(1) = vardata(t) + if(vname.eq."RHOS2") & + NoahMP50_struc(n)%noahmp50(t)%param%RHOS(2) = vardata(t) + if(vname.eq."TAUL1") & + NoahMP50_struc(n)%noahmp50(t)%param%TAUL(1) = vardata(t) + if(vname.eq."TAUL2") & + NoahMP50_struc(n)%noahmp50(t)%param%TAUL(2) = vardata(t) + if(vname.eq."TAUS1") & + NoahMP50_struc(n)%noahmp50(t)%param%TAUS(1) = vardata(t) + if(vname.eq."TAUS2") & + NoahMP50_struc(n)%noahmp50(t)%param%TAUS(2) = vardata(t) + if(vname.eq."XL") & + NoahMP50_struc(n)%noahmp50(t)%param%XL = vardata(t) + if(vname.eq."CWPVT") & + NoahMP50_struc(n)%noahmp50(t)%param%CWPVT = vardata(t) + if(vname.eq."C3PSN") & + NoahMP50_struc(n)%noahmp50(t)%param%C3PSN = vardata(t) + if(vname.eq."KC25") & + NoahMP50_struc(n)%noahmp50(t)%param%KC25 = vardata(t) + if(vname.eq."AKC") & + NoahMP50_struc(n)%noahmp50(t)%param%AKC = vardata(t) + if(vname.eq."KO25") & + NoahMP50_struc(n)%noahmp50(t)%param%KO25 = vardata(t) + if(vname.eq."AKO") & + NoahMP50_struc(n)%noahmp50(t)%param%AKO = vardata(t) + if(vname.eq."AVCMX") & + NoahMP50_struc(n)%noahmp50(t)%param%AVCMX = vardata(t) + if(vname.eq."AQE") & + NoahMP50_struc(n)%noahmp50(t)%param%AQE = vardata(t) + if(vname.eq."LTOVRC") & + NoahMP50_struc(n)%noahmp50(t)%param%LTOVRC = vardata(t) + if(vname.eq."DILEFC") & + NoahMP50_struc(n)%noahmp50(t)%param%DILEFC = vardata(t) + if(vname.eq."DILEFW") & + NoahMP50_struc(n)%noahmp50(t)%param%DILEFW = vardata(t) + if(vname.eq."RMF25") & + NoahMP50_struc(n)%noahmp50(t)%param%RMF25 = vardata(t) + if(vname.eq."SLA") & + NoahMP50_struc(n)%noahmp50(t)%param%SLA = vardata(t) + if(vname.eq."FRAGR") & + NoahMP50_struc(n)%noahmp50(t)%param%FRAGR = vardata(t) + if(vname.eq."TMIN") & + NoahMP50_struc(n)%noahmp50(t)%param%TMIN = vardata(t) + if(vname.eq."VCMX25") & + NoahMP50_struc(n)%noahmp50(t)%param%VCMX25 = vardata(t) + if(vname.eq."TDLEF") & + NoahMP50_struc(n)%noahmp50(t)%param%TDLEF = vardata(t) + if(vname.eq."BP") & + NoahMP50_struc(n)%noahmp50(t)%param%BP = vardata(t) + if(vname.eq."MP") & + NoahMP50_struc(n)%noahmp50(t)%param%MP = vardata(t) + if(vname.eq."QE25") & + NoahMP50_struc(n)%noahmp50(t)%param%QE25 = vardata(t) + if(vname.eq."RMS25") & + NoahMP50_struc(n)%noahmp50(t)%param%RMS25 = vardata(t) + if(vname.eq."RMR25") & + NoahMP50_struc(n)%noahmp50(t)%param%RMR25 = vardata(t) + if(vname.eq."ARM") & + NoahMP50_struc(n)%noahmp50(t)%param%ARM = vardata(t) + if(vname.eq."FOLNMX") & + NoahMP50_struc(n)%noahmp50(t)%param%FOLNMX = vardata(t) + if(vname.eq."WDPOOL") & + NoahMP50_struc(n)%noahmp50(t)%param%WDPOOL = vardata(t) + if(vname.eq."WRRAT") & + NoahMP50_struc(n)%noahmp50(t)%param%WRRAT = vardata(t) + if(vname.eq."MRP") & + NoahMP50_struc(n)%noahmp50(t)%param%MRP = vardata(t) + endif + enddo + endif + enddo +end subroutine NoahMP50_setVars + +subroutine NoahMP50_setModFlag(n,DEC_State,Feas_State,mod_flag_NoahMP50) +! !USES: + use ESMF + use LIS_coreMod, only : LIS_rc, LIS_surface + use LIS_logMod, only : LIS_logunit,LIS_verify + + implicit none +! !ARGUMENTS: + integer :: n + integer :: mod_flag_NoahMP50(LIS_rc%npatch(n,LIS_rc%lsm_index)) + type(ESMF_State) :: DEC_State + type(ESMF_State) :: Feas_State +! +! !DESCRIPTION: +! +! This routine sets the feasibility flag +! +!EOP + type(ESMF_Field) :: feasField + integer :: t + integer :: status + integer, pointer :: modflag(:) + + call ESMF_StateGet(Feas_State, "Feasibility Flag", feasField, rc=status) + call LIS_verify(status) + call ESMF_FieldGet(feasField,localDE=0,farrayPtr=modflag,rc=status) + call LIS_verify(status) + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + if(mod_flag_NoahMP50(t).eq.1) then + modflag(t)=1 + endif + enddo + +end subroutine NoahMP50_setModFlag diff --git a/lis/surfacemodels/land/noahmp.new/pe/obspred/UAsnow/NoahMPnew_getpeobspred_UAsnowobs.F90 b/lis/surfacemodels/land/noahmp.5.0/pe/obspred/UAsnow/NoahMP50_getpeobspred_UAsnowobs.F90 similarity index 81% rename from lis/surfacemodels/land/noahmp.new/pe/obspred/UAsnow/NoahMPnew_getpeobspred_UAsnowobs.F90 rename to lis/surfacemodels/land/noahmp.5.0/pe/obspred/UAsnow/NoahMP50_getpeobspred_UAsnowobs.F90 index 6f25251fe..a6dfbb69d 100644 --- a/lis/surfacemodels/land/noahmp.new/pe/obspred/UAsnow/NoahMPnew_getpeobspred_UAsnowobs.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/pe/obspred/UAsnow/NoahMP50_getpeobspred_UAsnowobs.F90 @@ -8,19 +8,19 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: NoahMPnew_getpeobspred_UAsnowobs -! \label{NoahMPnew_getpeobspred_UAsnowobs} +! !ROUTINE: NoahMP50_getpeobspred_UAsnowobs +! \label{NoahMP50_getpeobspred_UAsnowobs} ! ! !REVISION HISTORY: ! 02 May 2020: Sujay Kumar; Initial Specification ! ! !INTERFACE: -subroutine NoahMPnew_getpeobspred_UAsnowobs(Obj_Func) +subroutine NoahMP50_getpeobspred_UAsnowobs(Obj_Func) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc use LIS_soilsMod, only : LIS_soils - use NoahMPnew_lsmMod, only : NoahMPnew_struc + use NoahMP50_lsmMod, only : NoahMP50_struc use LIS_logMod, only : LIS_verify, LIS_logunit implicit none @@ -58,12 +58,12 @@ subroutine NoahMPnew_getpeobspred_UAsnowobs(Obj_Func) call LIS_verify(status) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - snod(t) = NoahMPnew_struc(n)%noahmpnew(t)%snowh*1000.0 !mm - swe(t) = NoahMPnew_struc(n)%noahmpnew(t)%sneqv + snod(t) = NoahMP50_struc(n)%noahmp50(t)%snowh*1000.0 !mm + swe(t) = NoahMP50_struc(n)%noahmp50(t)%sneqv enddo -end subroutine NoahMPnew_getpeobspred_UAsnowobs +end subroutine NoahMP50_getpeobspred_UAsnowobs diff --git a/lis/surfacemodels/land/noahmp.new/pe/obspred/UAsnow/NoahMPnew_setupobspred_UAsnowobs.F90 b/lis/surfacemodels/land/noahmp.5.0/pe/obspred/UAsnow/NoahMP50_setupobspred_UAsnowobs.F90 similarity index 89% rename from lis/surfacemodels/land/noahmp.new/pe/obspred/UAsnow/NoahMPnew_setupobspred_UAsnowobs.F90 rename to lis/surfacemodels/land/noahmp.5.0/pe/obspred/UAsnow/NoahMP50_setupobspred_UAsnowobs.F90 index 314018538..1e2d9f1fe 100644 --- a/lis/surfacemodels/land/noahmp.new/pe/obspred/UAsnow/NoahMPnew_setupobspred_UAsnowobs.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/pe/obspred/UAsnow/NoahMP50_setupobspred_UAsnowobs.F90 @@ -8,14 +8,14 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: NoahMPnew_setupobspred_UAsnowobs -! \label{NoahMPnew_setupobspred_UAsnowobs} +! !ROUTINE: NoahMP50_setupobspred_UAsnowobs +! \label{NoahMP50_setupobspred_UAsnowobs} ! ! !REVISION HISTORY: ! 2 May 2020: Sujay Kumar; Initial Specification ! ! !INTERFACE: -subroutine NoahMPnew_setupobspred_UAsnowobs(OBSPred) +subroutine NoahMP50_setupobspred_UAsnowobs(OBSPred) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc, LIS_vecPatch @@ -58,5 +58,5 @@ subroutine NoahMPnew_setupobspred_UAsnowobs(OBSPred) call ESMF_StateAdd(OBSPred,(/sweField/),rc=status) call LIS_verify(status) -end subroutine NoahMPnew_setupobspred_UAsnowobs +end subroutine NoahMP50_setupobspred_UAsnowobs diff --git a/lis/surfacemodels/land/noahmp.new/phys/noahmp b/lis/surfacemodels/land/noahmp.5.0/phys/noahmp similarity index 100% rename from lis/surfacemodels/land/noahmp.new/phys/noahmp rename to lis/surfacemodels/land/noahmp.5.0/phys/noahmp diff --git a/lis/surfacemodels/land/noahmp.new/routing/noahmpnew_getrunoffs.F90 b/lis/surfacemodels/land/noahmp.5.0/routing/noahmp50_getrunoffs.F90 similarity index 86% rename from lis/surfacemodels/land/noahmp.new/routing/noahmpnew_getrunoffs.F90 rename to lis/surfacemodels/land/noahmp.5.0/routing/noahmp50_getrunoffs.F90 index 2986b2152..5945405d3 100644 --- a/lis/surfacemodels/land/noahmp.new/routing/noahmpnew_getrunoffs.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/routing/noahmp50_getrunoffs.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_getrunoffs -! \label{noahmpnew_getrunoffs} +! !ROUTINE: noahmp50_getrunoffs +! \label{noahmp50_getrunoffs} ! ! !REVISION HISTORY: ! 6 May 2011: Sujay Kumar; Initial Specification @@ -17,7 +17,7 @@ ! May 2023: Cenlin He, modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmpnew_getrunoffs(n) +subroutine noahmp50_getrunoffs(n) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc, LIS_masterproc @@ -25,7 +25,7 @@ subroutine noahmpnew_getrunoffs(n) use LIS_logMod, only : LIS_verify use LIS_constantsMod use LIS_historyMod - use NoahMPnew_lsmMod, only : NoahMPnew_struc + use NoahMP50_lsmMod, only : NoahMP50_struc implicit none ! !ARGUMENTS: @@ -88,8 +88,8 @@ subroutine noahmpnew_getrunoffs(n) endif do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) - runoff1(t) = NoahMPnew_struc(n)%noahmpnew(t)%runsf/LIS_CONST_RHOFW - runoff2(t) = NoahMPnew_struc(n)%noahmpnew(t)%runsb/LIS_CONST_RHOFW + runoff1(t) = NoahMP50_struc(n)%noahmp50(t)%runsf/LIS_CONST_RHOFW + runoff2(t) = NoahMP50_struc(n)%noahmp50(t)%runsb/LIS_CONST_RHOFW enddo call LIS_patch2tile(n,1,runoff1_t, runoff1) @@ -123,15 +123,15 @@ subroutine noahmpnew_getrunoffs(n) if(LIS_masterproc) then call ESMF_StateGet(LIS_runoff_state(n),"Total Evapotranspiration",evapotranspiration_Field, rc=status) - call LIS_verify(status, "noahmpnew_getrunoffs: ESMF_StateGet failed for Total Evapotranspiration") + call LIS_verify(status, "noahmp50_getrunoffs: ESMF_StateGet failed for Total Evapotranspiration") call ESMF_FieldGet(evapotranspiration_Field,localDE=0,farrayPtr=evapotranspiration,rc=status) - call LIS_verify(status, "noahmpnew_getrunoffs: ESMF_FieldGet failed for Total Evapotranspiration") + call LIS_verify(status, "noahmp50_getrunoffs: ESMF_FieldGet failed for Total Evapotranspiration") endif do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) - evapotranspiration1(t) = NoahMPnew_struc(n)%noahmpnew(t)%ecan + NoahMPnew_struc(n)%noahmpnew(t)%etran + NoahMPnew_struc(n)%noahmpnew(t)%edir + evapotranspiration1(t) = NoahMP50_struc(n)%noahmp50(t)%ecan + NoahMP50_struc(n)%noahmp50(t)%etran + NoahMP50_struc(n)%noahmp50(t)%edir enddo call LIS_patch2tile(n,1,evapotranspiration1_t, evapotranspiration1) @@ -147,4 +147,4 @@ subroutine noahmpnew_getrunoffs(n) deallocate(evapotranspiration1_t) endif -end subroutine noahmpnew_getrunoffs +end subroutine noahmp50_getrunoffs diff --git a/lis/surfacemodels/land/noahmp.new/routing/noahmpnew_getrunoffs_hymap2.F90 b/lis/surfacemodels/land/noahmp.5.0/routing/noahmp50_getrunoffs_hymap2.F90 similarity index 84% rename from lis/surfacemodels/land/noahmp.new/routing/noahmpnew_getrunoffs_hymap2.F90 rename to lis/surfacemodels/land/noahmp.5.0/routing/noahmp50_getrunoffs_hymap2.F90 index f9344f790..df34e6dc1 100644 --- a/lis/surfacemodels/land/noahmp.new/routing/noahmpnew_getrunoffs_hymap2.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/routing/noahmp50_getrunoffs_hymap2.F90 @@ -8,22 +8,22 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_getrunoffs_hymap2 -! \label{noahmpnew_getrunoffs_hymap2} +! !ROUTINE: noahmp50_getrunoffs_hymap2 +! \label{noahmp50_getrunoffs_hymap2} ! ! !REVISION HISTORY: ! 6 May 2011: Sujay Kumar; Initial Specification ! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmpnew_getrunoffs_hymap2(n) +subroutine noahmp50_getrunoffs_hymap2(n) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc, LIS_masterproc use LIS_routingMod, only : LIS_runoff_state use LIS_logMod use LIS_historyMod - use NoahMPnew_lsmMod, only : NoahMPnew_struc + use NoahMP50_lsmMod, only : NoahMP50_struc implicit none ! !ARGUMENTS: @@ -83,8 +83,8 @@ subroutine noahmpnew_getrunoffs_hymap2(n) call LIS_verify(status,'ESMF_FieldGet failed for Subsurface Runoff') do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) !units? - runoff1(t) = NoahMPnew_struc(n)%noahmpnew(t)%runsf - runoff2(t) = NoahMPnew_struc(n)%noahmpnew(t)%runsb + runoff1(t) = NoahMP50_struc(n)%noahmp50(t)%runsf + runoff2(t) = NoahMP50_struc(n)%noahmp50(t)%runsb enddo runoff1_t = LIS_rc%udef @@ -109,17 +109,17 @@ subroutine noahmpnew_getrunoffs_hymap2(n) call ESMF_StateGet(LIS_runoff_state(n),"Total Evapotranspiration",& evapotranspiration_Field, rc=status) - call LIS_verify(status, "noahmpnew_getrunoffs_hymap2: ESMF_StateGet failed for Total Evapotranspiration") + call LIS_verify(status, "noahmp50_getrunoffs_hymap2: ESMF_StateGet failed for Total Evapotranspiration") call ESMF_FieldGet(evapotranspiration_Field,localDE=0,& farrayPtr=evapotranspiration,rc=status) - call LIS_verify(status, "noahmpnew_getrunoffs_hymap2: ESMF_FieldGet failed for Total Evapotranspiration") + call LIS_verify(status, "noahmp50_getrunoffs_hymap2: ESMF_FieldGet failed for Total Evapotranspiration") do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) evapotranspiration1(t) = & - NoahMPnew_struc(n)%noahmpnew(t)%ecan + & - NoahMPnew_struc(n)%noahmpnew(t)%etran + & - NoahMPnew_struc(n)%noahmpnew(t)%edir + NoahMP50_struc(n)%noahmp50(t)%ecan + & + NoahMP50_struc(n)%noahmp50(t)%etran + & + NoahMP50_struc(n)%noahmp50(t)%edir enddo call LIS_patch2tile(n,1,evapotranspiration1_t, evapotranspiration1) @@ -130,4 +130,4 @@ subroutine noahmpnew_getrunoffs_hymap2(n) deallocate(evapotranspiration1_t) endif -end subroutine noahmpnew_getrunoffs_hymap2 +end subroutine noahmp50_getrunoffs_hymap2 diff --git a/lis/surfacemodels/land/noahmp.new/routing/noahmpnew_getrunoffs_mm.F90 b/lis/surfacemodels/land/noahmp.5.0/routing/noahmp50_getrunoffs_mm.F90 similarity index 86% rename from lis/surfacemodels/land/noahmp.new/routing/noahmpnew_getrunoffs_mm.F90 rename to lis/surfacemodels/land/noahmp.5.0/routing/noahmp50_getrunoffs_mm.F90 index 333b43521..00bcfc5e4 100644 --- a/lis/surfacemodels/land/noahmp.new/routing/noahmpnew_getrunoffs_mm.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/routing/noahmp50_getrunoffs_mm.F90 @@ -8,8 +8,8 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_getrunoffs_mm -! \label{noahmpnew_getrunoffs_mm} +! !ROUTINE: noahmp50_getrunoffs_mm +! \label{noahmp50_getrunoffs_mm} ! ! !REVISION HISTORY: ! 6 May 2011: Sujay Kumar; Initial Specification @@ -17,14 +17,14 @@ ! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmpnew_getrunoffs_mm(n) +subroutine noahmp50_getrunoffs_mm(n) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc, LIS_masterproc use LIS_routingMod, only : LIS_runoff_state use LIS_logMod, only : LIS_verify use LIS_historyMod - use noahmpnew_lsmMod, only : noahmpnew_struc + use noahmp50_lsmMod, only : noahmp50_struc implicit none ! !ARGUMENTS: @@ -90,8 +90,8 @@ subroutine noahmpnew_getrunoffs_mm(n) endif do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) - runoff1(t) = NoahMPnew_struc(n)%noahmpnew(t)%runsf - runoff2(t) = NoahMPnew_struc(n)%noahmpnew(t)%runsb + runoff1(t) = NoahMP50_struc(n)%noahmp50(t)%runsf + runoff2(t) = NoahMP50_struc(n)%noahmp50(t)%runsb enddo call LIS_patch2tile(n,1,runoff1_t, runoff1) @@ -125,15 +125,15 @@ subroutine noahmpnew_getrunoffs_mm(n) if(LIS_masterproc) then call ESMF_StateGet(LIS_runoff_state(n),"Total Evapotranspiration",evapotranspiration_Field, rc=status) - call LIS_verify(status, "noahmpnew_getrunoffs_mm: ESMF_StateGet failed for Total Evapotranspiration") + call LIS_verify(status, "noahmp50_getrunoffs_mm: ESMF_StateGet failed for Total Evapotranspiration") call ESMF_FieldGet(evapotranspiration_Field,localDE=0,farrayPtr=evapotranspiration,rc=status) - call LIS_verify(status, "noahmpnew_getrunoffs_mm: ESMF_FieldGet failed for Total Evapotranspiration") + call LIS_verify(status, "noahmp50_getrunoffs_mm: ESMF_FieldGet failed for Total Evapotranspiration") endif do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) - evapotranspiration1(t) = NoahMPnew_struc(n)%noahmpnew(t)%ecan + NoahMPnew_struc(n)%noahmpnew(t)%etran + NoahMPnew_struc(n)%noahmpnew(t)%edir + evapotranspiration1(t) = NoahMP50_struc(n)%noahmp50(t)%ecan + NoahMP50_struc(n)%noahmp50(t)%etran + NoahMP50_struc(n)%noahmp50(t)%edir enddo call LIS_patch2tile(n,1,evapotranspiration1_t, evapotranspiration1) @@ -149,4 +149,4 @@ subroutine noahmpnew_getrunoffs_mm(n) deallocate(evapotranspiration1_t) endif -end subroutine noahmpnew_getrunoffs_mm +end subroutine noahmp50_getrunoffs_mm diff --git a/lis/surfacemodels/land/noahmp.new/routing/noahmpnew_getrunoffs_rapid.F90 b/lis/surfacemodels/land/noahmp.5.0/routing/noahmp50_getrunoffs_rapid.F90 similarity index 88% rename from lis/surfacemodels/land/noahmp.new/routing/noahmpnew_getrunoffs_rapid.F90 rename to lis/surfacemodels/land/noahmp.5.0/routing/noahmp50_getrunoffs_rapid.F90 index d304e4544..4b5d150ef 100644 --- a/lis/surfacemodels/land/noahmp.new/routing/noahmpnew_getrunoffs_rapid.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/routing/noahmp50_getrunoffs_rapid.F90 @@ -8,22 +8,22 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_getrunoffs_rapid -! \label{noahmpnew_getrunoffs_rapid} +! !ROUTINE: noahmp50_getrunoffs_rapid +! \label{noahmp50_getrunoffs_rapid} ! ! !REVISION HISTORY: ! 17 Mar 2021: Yeosang Yoon; Initial Specification ! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmpnew_getrunoffs_rapid(n) +subroutine noahmp50_getrunoffs_rapid(n) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc, LIS_masterproc use LIS_routingMod, only : LIS_runoff_state use LIS_logMod use LIS_historyMod - use noahmpnew_lsmMod, only : noahmpnew_struc + use noahmp50_lsmMod, only : noahmp50_struc implicit none ! !ARGUMENTS: @@ -69,8 +69,8 @@ subroutine noahmpnew_getrunoffs_rapid(n) call LIS_verify(status,'ESMF_FieldGet failed for Subsurface Runoff') do t=1, LIS_rc%npatch(n,LIS_rc%lsm_index) !units? - runoff1(t) = NoahMPnew_struc(n)%noahmpnew(t)%runsf - runoff2(t) = NoahMPnew_struc(n)%noahmpnew(t)%runsb + runoff1(t) = NoahMP50_struc(n)%noahmp50(t)%runsf + runoff2(t) = NoahMP50_struc(n)%noahmp50(t)%runsb enddo runoff1_t = LIS_rc%udef @@ -87,4 +87,4 @@ subroutine noahmpnew_getrunoffs_rapid(n) deallocate(runoff1_t) deallocate(runoff2_t) -end subroutine noahmpnew_getrunoffs_rapid +end subroutine noahmp50_getrunoffs_rapid diff --git a/lis/surfacemodels/land/noahmp.new/routing/noahmpnew_getsws_hymap2.F90 b/lis/surfacemodels/land/noahmp.5.0/routing/noahmp50_getsws_hymap2.F90 similarity index 86% rename from lis/surfacemodels/land/noahmp.new/routing/noahmpnew_getsws_hymap2.F90 rename to lis/surfacemodels/land/noahmp.5.0/routing/noahmp50_getsws_hymap2.F90 index 882274cdd..faa511b07 100644 --- a/lis/surfacemodels/land/noahmp.new/routing/noahmpnew_getsws_hymap2.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/routing/noahmp50_getsws_hymap2.F90 @@ -8,22 +8,22 @@ ! All Rights Reserved. !-------------------------END NOTICE -- DO NOT EDIT----------------------- !BOP -! !ROUTINE: noahmpnew_getsws_hymap2 -! \label{noahmpnew_getsws_hymap2} +! !ROUTINE: noahmp50_getsws_hymap2 +! \label{noahmp50_getsws_hymap2} ! ! !REVISION HISTORY: ! 12 Sep 2019: Augusto Getirana; implementation of two-way coupling ! May 2023: Cenlin He; modified for refactored NoahMP v5 and later ! ! !INTERFACE: -subroutine noahmpnew_getsws_hymap2(n) +subroutine noahmp50_getsws_hymap2(n) ! !USES: use ESMF use LIS_coreMod, only : LIS_rc, LIS_masterproc use LIS_routingMod, only : LIS_runoff_state use LIS_logMod use LIS_historyMod - use noahmpnew_lsmMod, only : noahmpnew_struc + use noahmp50_lsmMod, only : noahmp50_struc implicit none ! !ARGUMENTS: @@ -57,7 +57,7 @@ subroutine noahmpnew_getsws_hymap2(n) call ESMF_FieldGet(rivsto_field,localDE=0,farrayPtr=rivstotmp,rc=status) call LIS_verify(status,'ESMF_FieldGet failed for River Storage') where(rivstotmp/=LIS_rc%udef) & - NoahMPnew_struc(n)%noahmpnew(:)%rivsto=rivstotmp/NoahMPnew_struc(n)%ts + NoahMP50_struc(n)%noahmp50(:)%rivsto=rivstotmp/NoahMP50_struc(n)%ts ! Flood Storage call ESMF_StateGet(LIS_runoff_state(n),"Flood Storage",fldsto_field,rc=status) @@ -66,7 +66,7 @@ subroutine noahmpnew_getsws_hymap2(n) call ESMF_FieldGet(fldsto_field,localDE=0,farrayPtr=fldstotmp,rc=status) call LIS_verify(status,'ESMF_FieldGet failed for Flood Storage') where(fldstotmp/=LIS_rc%udef)& - NoahMPnew_struc(n)%noahmpnew(:)%fldsto=fldstotmp/NoahMPnew_struc(n)%ts + NoahMP50_struc(n)%noahmp50(:)%fldsto=fldstotmp/NoahMP50_struc(n)%ts ! Flooded Fraction Flag call ESMF_StateGet(LIS_runoff_state(n),"Flooded Fraction",fldfrc_field,rc=status) @@ -74,6 +74,6 @@ subroutine noahmpnew_getsws_hymap2(n) call ESMF_FieldGet(fldfrc_field,localDE=0,farrayPtr=fldfrctmp,rc=status) call LIS_verify(status,'ESMF_FieldGet failed for Flooded Fraction') - NoahMPnew_struc(n)%noahmpnew(:)%fldfrc=fldfrctmp + NoahMP50_struc(n)%noahmp50(:)%fldfrc=fldfrctmp endif -end subroutine noahmpnew_getsws_hymap2 +end subroutine noahmp50_getsws_hymap2 diff --git a/lis/surfacemodels/land/noahmp.new/wrf_debug.F90 b/lis/surfacemodels/land/noahmp.5.0/wrf_debug.F90 similarity index 100% rename from lis/surfacemodels/land/noahmp.new/wrf_debug.F90 rename to lis/surfacemodels/land/noahmp.5.0/wrf_debug.F90 diff --git a/lis/surfacemodels/land/noahmp.new/NoahMPnew_readcrd.F90 b/lis/surfacemodels/land/noahmp.new/NoahMPnew_readcrd.F90 deleted file mode 100644 index c9ea6735c..000000000 --- a/lis/surfacemodels/land/noahmp.new/NoahMPnew_readcrd.F90 +++ /dev/null @@ -1,621 +0,0 @@ -!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- -! NASA Goddard Space Flight Center -! Land Information System Framework (LISF) -! Version 7.4 -! -! Copyright (c) 2022 United States Government as represented by the -! Administrator of the National Aeronautics and Space Administration. -! All Rights Reserved. -!-------------------------END NOTICE -- DO NOT EDIT----------------------- - -!BOP -! -! !ROUTINE: NoahMPnew_readcrd -! \label{NoahMPnew\_readcrd} -! -! !REVISION HISTORY: -! This subroutine is generated with the Model Implementation Toolkit developed -! by Shugong Wang for the NASA Land Information System Version 7. The initial -! specification of the subroutine is defined by Sujay Kumar. -! 10/25/18 : Shugong Wang, Zhuo Wang, initial implementation for LIS 7 and NoahMP401 -! May 2023: Cenlin He; update to work with refactored NoahMP (v5.0 and newer) -! -! !INTERFACE: - -subroutine NoahMPnew_readcrd() -! !USES: - use ESMF - use LIS_coreMod, only : LIS_rc , LIS_config - use LIS_timeMgrMod, only : LIS_parseTimeString - use LIS_logMod, only : LIS_logunit, LIS_verify, LIS_endrun - use NoahMPnew_lsmMod, only : NoahmpNew_struc - use netcdf -! -! !DESCRIPTION: -! -! This routine reads the options specific to NoahMPnew model from -! the LIS configuration file. -! -!EOP - implicit none - - integer :: rc - integer :: n, i - character*10 :: time - character*6 :: str_i - integer :: ios - integer, allocatable :: nids(:) - character*32 :: soil_scheme_name, landuse_scheme_name - - allocate(nids(LIS_rc%nnest)) - - write(LIS_logunit,*) & - "[INFO] Start reading LIS configuration file for Noah-MP.New (v5.0 or newer)" - - ! open NetCDF parameter file for reading global attributes - do n=1,LIS_rc%nnest - ios = nf90_open(path=trim(LIS_rc%paramfile(n)), mode=NF90_NOWRITE,ncid=nids(n)) - call LIS_verify(ios,'Error in nf90_open in '//trim(LIS_rc%paramfile(n))//' in NoahMPnew_readcrd') - enddo - - ! main Noah-MP model timestep - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New model timestep:", rc = rc) - do n=1,LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, Time, rc = rc) - call LIS_verify(rc, "Noah-MP.New model timestep: not defined") - call LIS_parseTimeString(time, NoahmpNew_struc(n)%ts) - enddo - - ! Noah-MP soil process timestep - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New soil timestep:", rc = rc) - do n=1,LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, Time, rc = rc) - call LIS_verify(rc, "Noah-MP.New soil timestep: not defined") - call LIS_parseTimeString(time, NoahmpNew_struc(n)%ts_soil) - enddo - - ! restart timestep - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New restart output interval:", rc = rc) - do n=1,LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, Time, rc = rc) - call LIS_verify(rc, & - "Noah-MP.New restart output interval: not defined") - call LIS_parseTimeString(time, NoahmpNew_struc(n)%rstInterval) - enddo - - !---------------------------! - ! Constant Parameters ! - !---------------------------! - ! number of soil layers - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New number of soil layers:", rc = rc) - do n=1, LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%nsoil, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New number of soil layers: not defined") - enddo - - ! allocate memory for sldpth using nsoil as dimension - do n=1, LIS_rc%nnest - allocate(NoahmpNew_struc(n)%sldpth(NoahmpNew_struc(n)%nsoil)) - enddo - ! allocate memory for init_smc using nsoil as dimension - do n=1, LIS_rc%nnest - allocate(NoahmpNew_struc(n)%init_smc(NoahmpNew_struc(n)%nsoil)) - enddo - ! allocate memory for init_tslb using nsoil as dimension - do n=1, LIS_rc%nnest - allocate(NoahmpNew_struc(n)%init_tslb(NoahmpNew_struc(n)%nsoil)) - enddo - - ! maximum number of snow layers (e.g., 3) - do n=1, LIS_rc%nnest - NoahmpNew_struc(n)%nsnow = 3 - enddo - - ! thickness of atmospheric layers - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New reference height of temperature and humidity:", rc = rc) - do n=1, LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%dz8w, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New reference height of temperature and "//& - "humidity: not defined") - enddo - - ! thickness of soil layers - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New thickness of soil layers:", rc = rc) - do n=1, LIS_rc%nnest - do i = 1, NoahmpNew_struc(n)%nsoil - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%sldpth(i), rc=rc) - call LIS_verify(rc, & - 'Noah-MP.New thickness of soil layers: not defined') - enddo - enddo - - ! Landuse classification scheme - do n=1, LIS_rc%nnest - ios = nf90_get_att(nids(n), NF90_GLOBAL, 'LANDCOVER_SCHEME', landuse_scheme_name) - call LIS_verify(ios, 'Error in nf90_get_att: LANDCOVER_SCHEME') - if (trim(landuse_scheme_name) .eq. "USGS") then - NoahmpNew_struc(n)%landuse_scheme_name = "USGS" - elseif (trim(landuse_scheme_name) .eq. "IGBPNCEP") then - NoahmpNew_struc(n)%landuse_scheme_name = & - "MODIFIED_IGBP_MODIS_NOAH" - elseif (trim(landuse_scheme_name) .eq. "NALCMS_SM_IGBPNCEP" ) then - NoahmpNew_struc(n)%landuse_scheme_name = & - "MODIFIED_IGBP_MODIS_NOAH" - elseif (trim(landuse_scheme_name) .eq. "UMD") then - NoahmpNew_struc(n)%landuse_scheme_name = "UMD" - else - write(LIS_logunit,*) & - "[ERR] Currently, only USGS, IGBPNCEP, and UMD" - write(LIS_logunit,*) "[ERR] are supported by Noah-MP-New LSM" - write(LIS_logunit,*) "[ERR] program stopping ..." - call LIS_endrun() - endif - enddo - - ! NoahMP.New parameter table (merged SOILPARM.TBL,GENPARM.TBL,MPTABLE.TBL) - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New parameter table:", rc = rc) - do n=1, LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%noahmp_tbl_name, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New parameter table: not defined") - enddo - - write(LIS_logunit,*) & - "[INFO] Setting Noah-MP.New physics options:" - - ! dynamic vegetation - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New dynamic vegetation option:", rc = rc) - do n=1, LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%dveg_opt, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New dynamic vegetation option: not defined") - write(LIS_logunit,33) "dynamic vegetation:", & - NoahmpNew_struc(n)%dveg_opt - enddo - - ! canopy stomatal resistance (1->Ball-Berry; 2->Jarvis) - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New canopy stomatal resistance option:", rc = rc) - do n=1, LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%crs_opt, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New canopy stomatal resistance option: not defined") - write(LIS_logunit,33) "canopy stomatal resistance:", & - NoahmpNew_struc(n)%crs_opt - enddo - - ! soil moisture factor for stomatal resistance(1->Noah;2->CLM;3->SSiB) - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New soil moisture factor for stomatal resistance:", rc = rc) - do n=1, LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%btr_opt, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New soil moisture factor for stomatal resistance:"//& - " not defined") - write(LIS_logunit,33) "soil moisture factor for stomatal "//& - "resistance:",NoahmpNew_struc(n)%btr_opt - enddo - - ! surface runoff (1->SIMGM; 2->SIMTOP; 3->Schaake96; 4->BATS; 5->MMF; 6->VIC; 7->XAJ; 8->DynVIC) - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New surface runoff option:", rc = rc) - do n=1, LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%runsfc_opt, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New surface runoff option: not defined") - write(LIS_logunit,33) "surface runoff:", & - NoahmpNew_struc(n)%runsfc_opt - enddo - - ! subsurface runoff and groundwater (1->SIMGM; 2->SIMTOP; 3->Schaake96; 4->BATS; 5->MMF; 6->VIC; 7->XAJ; 8->DynVIC) - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New subsurface runoff and groundwater option:", rc = rc) - do n=1, LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%runsub_opt, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New subsurface runoff and groundwater option: not defined") - write(LIS_logunit,33) "subsurface runoff and groundwater:", & - NoahmpNew_struc(n)%runsub_opt - enddo - - ! infiltration options for dynamic VIC (1->Philip; 2-> Green-Ampt;3->Smith-Parlange) - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New dynamic VIC infiltration option:", rc = rc) - do n=1, LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%infdv_opt, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New dynamic VIC infiltration option: not defined") - write(LIS_logunit,33) "dynamic VIC infiltration:", & - NoahmpNew_struc(n)%infdv_opt - enddo - - ! surface layer drag coeff (CH & CM) (1->M-O; 2->Chen97) - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New surface layer drag coefficient option:", rc = rc) - do n=1, LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%sfc_opt, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New surface layer drag coefficient option:"//& - " not defined") - write(LIS_logunit,33) "surface layer drag coefficient:", & - NoahmpNew_struc(n)%sfc_opt - enddo - - ! supercooled liquid water (1->NY06; 2->Koren99) - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New supercooled liquid water option:", rc = rc) - do n=1, LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%frz_opt, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New supercooled liquid water option: not defined") - write(LIS_logunit,33) "supercooled liquid water:", & - NoahmpNew_struc(n)%frz_opt - enddo - - ! frozen soil permeability (1->NY06; 2->Koren99) - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New frozen soil permeability option:", rc = rc) - do n=1, LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%inf_opt, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New frozen soil permeability option: not defined") - write(LIS_logunit,33) "frozen soil permeability:", & - NoahmpNew_struc(n)%inf_opt - enddo - - ! radiation transfer (1->gap=F(3D,cosz); 2->gap=0; 3->gap=1-Fveg) - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New canopy radiative transfer option:", rc = rc) - do n=1, LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%rad_opt, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New canopy radiative transfer option: not defined") - write(LIS_logunit,33) "canopy radiative transfer:", & - NoahmpNew_struc(n)%rad_opt - enddo - - ! snow surface albedo (1->BATS; 2->CLASS) - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New snow surface albedo option:", rc = rc) - do n=1, LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%alb_opt, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New snow surface albedo option: not defined") - write(LIS_logunit,33) "snow surface albedo:", & - NoahmpNew_struc(n)%alb_opt - enddo - - ! rainfall & snowfall (1->Jordan91; 2->BATS; 3->Noah; 4->WRF; 5->Wet-bulb) - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New rain-snow partition option:", rc = rc) - do n=1, LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%snf_opt, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New rain-snow partition option: not defined") - write(LIS_logunit,33) "rain-snow partition:", & - NoahmpNew_struc(n)%snf_opt - enddo - - ! lower boundary of soil temperature - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New lower boundary of soil temperature option:", rc = rc) - do n=1, LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%tbot_opt, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New lower boundary of soil temperature option:"//& - " not defined") - write(LIS_logunit,33) "lower boundary of soil temperature:", & - NoahmpNew_struc(n)%tbot_opt - enddo - - ! snow/soil temperature time scheme - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New snow&soil temperature time scheme option:", rc = rc) - do n=1, LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%stc_opt, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New snow&soil temperature time scheme option:"//& - " not defined") - write(LIS_logunit,33) "snow&soil temperature time scheme:", & - NoahmpNew_struc(n)%stc_opt - enddo - - ! glacier option (1->phase change; 2->simple) - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New glacier ice option:", rc = rc) - do n=1, LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%gla_opt, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New glacier ice option: not defined") - write(LIS_logunit,33) "glacier ice:",NoahmpNew_struc(n)%gla_opt - enddo - - ! Custom snowpack depth for glacier model (in mm) - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New snow depth glacier model option:", rc = rc) - if(rc /= 0) then - write(LIS_logunit,33) "[WARN] Max snow depth not defined." - write(LIS_logunit,33) "[WARN] Setting to default value of 5000." - do n=1, LIS_rc%nnest - NoahmpNew_struc(n)%sndpth_gla_opt = 5000 - write(LIS_logunit,33) "snow depth for glacier model: ",NoahmpNew_struc(n)%sndpth_gla_opt - enddo - else - do n=1, LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%sndpth_gla_opt, rc=rc) - write(LIS_logunit,33) "snow depth for glacier model: ",NoahmpNew_struc(n)%sndpth_gla_opt - enddo - endif - - ! surface resistance (1->Sakaguchi/Zeng;2->Seller;3->mod Sellers;4->1+snow) - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New surface resistance option:", rc = rc) - do n=1, LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%rsf_opt, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New surface resistance option: not defined") - write(LIS_logunit,33) "surface resistance:", & - NoahmpNew_struc(n)%rsf_opt - enddo - - ! soil configuration option - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New soil configuration option:", rc = rc) - do n=1, LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%soil_opt, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New soil configuration option: not defined") - write(LIS_logunit,33) "soil configuration:", & - NoahmpNew_struc(n)%soil_opt - enddo - - ! soil pedotransfer function option - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New soil pedotransfer function option:", rc = rc) - do n=1, LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%pedo_opt, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New soil pedotransfer function option: not defined") - write(LIS_logunit,33) "soil pedotransfer function:", & - NoahmpNew_struc(n)%pedo_opt - enddo - - ! crop model option (0->none; 1->Liu2016) - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New crop model option:", rc = rc) - do n=1, LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%crop_opt, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New crop model option: not defined") - write(LIS_logunit,33) "crop model:", & - NoahmpNew_struc(n)%crop_opt - enddo - - ! urban physics option - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New urban physics option:", rc = rc) - do n=1, LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%urban_opt, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New urban physics option: not defined") - write(LIS_logunit,33) "urban physics:", & - NoahmpNew_struc(n)%urban_opt - enddo - - ! snow thermal conductivity option (1->Yen1965; 2->Anderson1976; 3->Constant; 4->Verseghy1991; 5->Yen1981) - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New snow thermal conductivity option:", rc = rc) - do n=1, LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%tksno_opt, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New snow thermal conductivity option: not defined") - write(LIS_logunit,33) "snow thermal conductivity:",NoahmpNew_struc(n)%tksno_opt - enddo - - ! irrigation option (0->none; 1->always on; 2->trigger by planting/harvest dates; 3->trigger by LAI) - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New irrigation trigger option:", rc = rc) - do n=1, LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%irr_opt, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New irrigation trigger option: not defined") - write(LIS_logunit,33) "irrigation trigger:",NoahmpNew_struc(n)%irr_opt - enddo - - ! irrigation method option (0->fraction from input; 1->sprinkler; 2->micro/drip; 3->flood) - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New irrigation method option:", rc = rc) - do n=1, LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%irrm_opt, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New irrigation method option: not defined") - write(LIS_logunit,33) "irrigation method:",NoahmpNew_struc(n)%irrm_opt - enddo - - ! tile drainage option (0->none; 1->simple drainage; 2->Hooghoudt's scheme) - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New tile drainage option:", rc = rc) - do n=1, LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%tdrn_opt, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New tile drainage option: not defined") - write(LIS_logunit,33) "tile drainage:",NoahmpNew_struc(n)%tdrn_opt - enddo - - - ! The following lines hard code the LDT NetCDF variable names. - ! Modified by Zhuo Wang on 11/08/2018 - ! Setting some values to PLANTING, HARVEST, SEASON_GDD, SOILCOMP, SOILCL1-->SOILCL4 in NoahMPnew_main.F90 - do n=1, LIS_rc%nnest - ! NoahmpNew_struc(n)%LDT_ncvar_vegetype = ' ! Edit here if hard code name - ! NoahmpNew_struc(n)%LDT_ncvar_soiltype = ' ! Edit here if hard code name - NoahmpNew_struc(n)%LDT_ncvar_tbot = 'TBOT' !'NOAHMPnew_TBOT' - NoahmpNew_struc(n)%LDT_ncvar_shdfac_monthly = 'GREENNESS' !'NOAHMPnew_SHDFAC_MONTHLY' - NoahmpNew_struc(n)%LDT_ncvar_planting = 'PLANTING' !'NOAHMPnew_PLANTING' - NoahmpNew_struc(n)%LDT_ncvar_harvest = 'HARVEST' !'NOAHMPnew_HARVEST' - NoahmpNew_struc(n)%LDT_ncvar_season_gdd = 'SEASON_GDD' !'NOAHMPnew_SEASON_GDD' - NoahmpNew_struc(n)%LDT_ncvar_soilcomp = 'SOILCOMP' !'NOAHMPnew_SOILCOMP' - NoahmpNew_struc(n)%LDT_ncvar_soilcL1 = 'SOILCL1' !'NOAHMPnew_SOILCL1' - NoahmpNew_struc(n)%LDT_ncvar_soilcL2 = 'SOILCL2' !'NOAHMPnew_SOILCL2' - NoahmpNew_struc(n)%LDT_ncvar_soilcL3 = 'SOILCL3' !'NOAHMPnew_SOILCL3' - NoahmpNew_struc(n)%LDT_ncvar_soilcL4 = 'SOILCL4' !'NOAHMPnew_SOILCL4' - NoahmpNew_struc(n)%LDT_ncvar_irfract = 'IRFRACT' - NoahmpNew_struc(n)%LDT_ncvar_sifract = 'SIFRACT' - NoahmpNew_struc(n)%LDT_ncvar_mifract = 'MIFRACT' - NoahmpNew_struc(n)%LDT_ncvar_fifract = 'FIFRACT' - NoahmpNew_struc(n)%LDT_ncvar_tdfract = 'TD_FRACTION' - NoahmpNew_struc(n)%LDT_ncvar_fdepth = 'FDEPTH' - NoahmpNew_struc(n)%LDT_ncvar_eqzwt = 'EQZWT' - NoahmpNew_struc(n)%LDT_ncvar_rechclim = 'RECHCLIM' - NoahmpNew_struc(n)%LDT_ncvar_riverbed = 'RIVERBED' - enddo - -!------------------------------------------------------------------------------------------ - ! set default restart format to netcdf - do n=1,LIS_rc%nnest - NoahmpNew_struc(n)%rformat = "netcdf" - enddo - ! restart run, read restart file - if (trim(LIS_rc%startcode) == "restart") then - Call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New restart file:", rc=rc) - do n=1,LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%rfile, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New restart file: not defined") - enddo - - Call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New restart file format:", rc=rc) - do n=1,LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%rformat, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New restart file format: not defined") - enddo - - ! coldstart run, read initial state variables - else - ! skin temperature - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New initial surface skin temperature:", rc = rc) - do n=1, LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%init_tskin, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New initial surface skin temperature:"//& - " not defined") - enddo - - ! snow water equivalent - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New initial snow water equivalent:", rc = rc) - do n=1,LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%init_sneqv, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New initial snow water equivalent:"//& - " not defined") - enddo - - ! physical snow depth - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New initial snow depth:", rc = rc) - do n=1,LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%init_snowh, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New initial snow depth:"//& - " not defined") - enddo - - ! total canopy water + ice - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New initial total canopy surface water:", rc = rc) - do n=1,LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%init_canwat, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New initial total canopy surface water:"//& - " not defined") - enddo - - ! soil temperature - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New initial soil temperatures:", rc = rc) - do n=1,LIS_rc%nnest - do i=1, NoahmpNew_struc(n)%nsoil - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%init_tslb(i), rc=rc) - end do - call LIS_verify(rc, & - "Noah-MP.New initial soil temperatures:"//& - " not defined") - enddo - - ! volumetric soil moisture - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New initial total soil moistures:", rc = rc) - do n=1,LIS_rc%nnest - do i=1, NoahmpNew_struc(n)%nsoil - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%init_smc(i), rc=rc) - end do - call LIS_verify(rc, & - "Noah-MP.New initial total soil moistures:"//& - " not defined") - enddo - - ! water table depth - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New initial water table depth:", rc = rc) - do n=1,LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%init_zwt, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New initial water table depth:"//& - " not defined") - enddo - - ! water in the "aquifer" - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New initial water in the aquifer:", rc = rc) - do n=1,LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%init_wa, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New initial water in the aquifer:"//& - " not defined") - enddo - - ! water in aquifer and saturated soil - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New initial water in aquifer and saturated soil:", rc = rc) - do n=1,LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%init_wt, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New initial water in aquifer and saturated soil:"//& - " not defined") - enddo - - ! leaf area index - call ESMF_ConfigFindLabel(LIS_config, & - "Noah-MP.New initial leaf area index:", rc = rc) - do n=1,LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, NoahmpNew_struc(n)%init_lai, rc=rc) - call LIS_verify(rc, & - "Noah-MP.New initial leaf area index:"//& - " not defined") - enddo - - endif - - deallocate(nids) - - 33 format(a47,i4) - - write(LIS_logunit, *) & - "[INFO] Finish reading LIS configuration file for Noah-MP.New" - -end subroutine NoahMPnew_readcrd diff --git a/lis/surfacemodels/land/noahmp.new/pe/NoahMPnew_set_pedecvars.F90 b/lis/surfacemodels/land/noahmp.new/pe/NoahMPnew_set_pedecvars.F90 deleted file mode 100755 index 96ec023b1..000000000 --- a/lis/surfacemodels/land/noahmp.new/pe/NoahMPnew_set_pedecvars.F90 +++ /dev/null @@ -1,524 +0,0 @@ -!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- -! NASA Goddard Space Flight Center -! Land Information System Framework (LISF) -! Version 7.4 -! -! Copyright (c) 2022 United States Government as represented by the -! Administrator of the National Aeronautics and Space Administration. -! All Rights Reserved. -!-------------------------END NOTICE -- DO NOT EDIT----------------------- -!BOP -! !ROUTINE: NoahMPnew_set_pedecvars -! \label{NoahMPnew_set_pedecvars} -! -! !REVISION HISTORY: -! 02 Feb 2018: Soni Yatheendradas; Initial Specification -! May 2023: Cenlin He; modified for refactored NoahMP v5 and later -! - - -! !INTERFACE: -subroutine NoahMPnew_set_pedecvars(DEC_State, Feas_State) -! !USES: - use ESMF - use LIS_coreMod, only : LIS_rc, LIS_surface - use LIS_logMod, only : LIS_logunit,LIS_verify - use NoahMPnew_lsmMod, only : NoahMPnew_struc - use NoahMPnew_peMod, only : NoahMPnew_pe_struc - - implicit none -! !ARGUMENTS: - type(ESMF_State) :: DEC_State - type(ESMF_State) :: Feas_State -! -! !DESCRIPTION: -! -! This routine assigns the decision space to NoahMP model variables. -! -!EOP - integer :: n - real, pointer :: vdata(:) - character*100 :: vname - integer, pointer :: mod_flag_NoahMPnew(:) - integer :: i,t - integer :: status - - n = 1 - - allocate(mod_flag_NoahMPnew(LIS_rc%npatch(n,LIS_rc%lsm_index))) - - mod_flag_NoahMPnew = 0 - - !set modflag based on bounds - allocate(vdata(LIS_rc%npatch(n,LIS_rc%lsm_index))) - do i=1,NoahMPnew_pe_struc(n)%nparams - if(NoahMPnew_pe_struc(n)%param_select(i).eq.1) then - vname=trim(NoahMPnew_pe_struc(n)%param_name(i)) - call NoahMPnew_getvardata(n,DEC_State,vname, vdata, status) - call LIS_verify(status) - call NoahMPnew_checkBounds(n,DEC_State,vname, vdata, mod_flag_NoahMPnew) - endif - enddo - deallocate(vdata) - - !update modflags based on constraints - call NoahMPnew_checkConstraints(n,DEC_State, mod_flag_NoahMPnew) - - !set variables given modflag; if flag set will leave values alone - call NoahMPnew_setVars(n,DEC_State,mod_flag_NoahMPnew) - - !send mod flag to ESMF state (feasibility flag) - call NoahMPnew_setModFlag(n,DEC_State,Feas_State,mod_flag_NoahMPnew) -end subroutine NoahMPnew_set_pedecvars - -!BOP -! -! !ROUTINE: randArray -! \label{randArray} -! -! !INTERFACE: -subroutine NoahMPnew_getvardata(n,DEC_State,vname, vdata, statusStateGet) -! !USES: - use ESMF - use LIS_coreMod, only : LIS_rc - use LIS_logMod, only : LIS_logunit,LIS_verify - - implicit none -! !ARGUMENTS: - integer :: n - type(ESMF_State) :: DEC_State - character*100 :: vname - real :: vdata(LIS_rc%npatch(n,LIS_rc%lsm_index)) -! -! !DESCRIPTION: -! -! This routine assigns the decision space to NoahMP model variables. -! -!EOP - real, pointer :: vardata(:) - type(ESMF_Field) :: varField - integer :: statusStateGet, statusFieldGet,i - - call ESMF_StateGet(DEC_State,vname,varField,rc=statusStateGet) -! call LIS_verify(status) - - if(statusStateGet.eq.0) then - call ESMF_FieldGet(varField,localDE=0,farrayPtr=vardata,& - rc=statusFieldGet) - call LIS_verify(statusFieldGet) - vdata=vardata - endif - -end subroutine NoahMPnew_getvardata - -subroutine NoahMPnew_checkBounds(n,DEC_State,vname, vardata, mod_flag_NoahMPnew) -! !USES: - use ESMF - use LIS_coreMod, only : LIS_rc, LIS_surface - use LIS_logMod, only : LIS_logunit,LIS_verify - - implicit none -! !ARGUMENTS: - integer :: n - type(ESMF_State) :: DEC_State - character*100 :: vname - real :: vardata(LIS_rc%npatch(n,LIS_rc%lsm_index)) - integer :: mod_flag_NoahMPnew(LIS_rc%npatch(n,LIS_rc%lsm_index)) -! -! !DESCRIPTION: -! -! This routine assigns the decision space to NoahMP model variables. -! -!EOP - type(ESMF_Field) :: varField - real :: vardata_min, vardata_max - integer :: status - integer :: t - - call ESMF_StateGet(DEC_State,vname,varField,rc=status) - call LIS_verify(status) - - call ESMF_AttributeGet(varField,'MinRange',vardata_min,rc=status) - call LIS_verify(status) - call ESMF_AttributeGet(varField,'MaxRange',vardata_max,rc=status) - call LIS_verify(status) - - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - if(vardata(t).lt.vardata_min) then - mod_flag_NoahMPnew(t) = 1 - endif - if(vardata(t).gt.vardata_max) then - mod_flag_NoahMPnew(t) = 1 - endif - enddo -end subroutine NoahMPnew_checkBounds - -subroutine NoahMPnew_checkConstraints(n,DEC_State,mod_flag_NoahMPnew) -! !USES: - use ESMF - use LIS_coreMod, only : LIS_rc, LIS_surface - use NoahMPnew_lsmMod, only : NoahMPnew_struc - - implicit none -! !ARGUMENTS: - integer :: n - type(ESMF_State) :: DEC_State - integer :: mod_flag_NoahMPnew(LIS_rc%npatch(n,LIS_rc%lsm_index)) -! -! !DESCRIPTION: -! -! This routine assigns the decision space to NoahMP model variables. -! -!EOP - type(ESMF_Field) :: varField - real :: vardata_min, vardata_max - character*100 :: vname - integer :: t - integer :: status1, status2 - real, allocatable :: vardata1(:) - real, allocatable :: vardata2(:) - real, allocatable :: vardata3(:) - - allocate(vardata1(LIS_rc%npatch(n,LIS_rc%lsm_index))) - allocate(vardata2(LIS_rc%npatch(n,LIS_rc%lsm_index))) - allocate(vardata3(LIS_rc%npatch(n,LIS_rc%lsm_index))) - - vname='SMCMAX' - call NoahMPnew_getvardata(n,DEC_State,vname,vardata1, status1) - - if(status1.ne.0) vardata1=NoahMPnew_struc(n)%noahmpnew(:)%param%smcmax(1) - - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - if(vardata1(t).le.NoahMPnew_struc(n)%noahmpnew(t)%param%smcdry(1)) then - mod_flag_NoahMPnew(t) = 1 - endif - enddo - - !SMCREF > SMCWLT - vname='SMCREF' - call NoahMPnew_getvardata(n,DEC_State,vname,vardata1, status1) - vname='SMCWLT' - call NoahMPnew_getvardata(n,DEC_State,vname,vardata2, status2) - if(status1.ne.0) vardata1=NoahMPnew_struc(n)%noahmpnew(:)%param%smcref(1) - if(status2.ne.0) vardata2=NoahMPnew_struc(n)%noahmpnew(:)%param%smcwlt(1) - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - if(vardata1(t).le.vardata2(t)) then - mod_flag_NoahMPnew(t) = 1 - endif - enddo - - !SMCMAX > SMCREF - vname='SMCMAX' - call NoahMPnew_getvardata(n,DEC_State,vname,vardata1, status1) - vname='SMCREF' - call NoahMPnew_getvardata(n,DEC_State,vname,vardata2, status2) - if(status1.ne.0) vardata1=NoahMPnew_struc(n)%noahmpnew(:)%param%smcmax(1) - if(status2.ne.0) vardata2=NoahMPnew_struc(n)%noahmpnew(:)%param%smcref(1) - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - if(vardata1(t).le.vardata2(t)) then - mod_flag_NoahMPnew(t) = 1 - endif - enddo - - !HVT > HVB - vname='HVT' - call NoahMPnew_getvardata(n,DEC_State,vname,vardata1, status1) - vname='HVB' - call NoahMPnew_getvardata(n,DEC_State,vname,vardata2, status2) - if(status1.ne.0) vardata1=NoahMPnew_struc(n)%noahmpnew(:)%param%HVT - if(status2.ne.0) vardata2=NoahMPnew_struc(n)%noahmpnew(:)%param%HVB - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - if(vardata1(t).lt.vardata2(t)) then ! SY: Note .lt. instead of .le., following some entries with HVT=HVB in MPTABLE_UMD.TBL - mod_flag_NoahMPnew(t) = 1 - endif - enddo - - !HVT > Z0MVT - vname='HVT' - call NoahMPnew_getvardata(n,DEC_State,vname,vardata1, status1) - vname='Z0MVT' - call NoahMPnew_getvardata(n,DEC_State,vname,vardata2, status2) - if(status1.ne.0) vardata1=NoahMPnew_struc(n)%noahmpnew(:)%param%HVT - if(status2.ne.0) vardata2=NoahMPnew_struc(n)%noahmpnew(:)%param%Z0MVT - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - if(vardata1(t).le.vardata2(t)) then - mod_flag_NoahMPnew(t) = 1 - endif - enddo - - - !HVT > Z0MVT - vname='MNSNALB' - call NoahMPnew_getvardata(n,DEC_State,vname,vardata1, status1) - vname='MXSNALB' - call NoahMPnew_getvardata(n,DEC_State,vname,vardata2, status2) - if(status1.ne.0) vardata1=NoahMPnew_struc(n)%noahmpnew(:)%param%MNSNALB - if(status2.ne.0) vardata2=NoahMPnew_struc(n)%noahmpnew(:)%param%MXSNALB - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - if(vardata1(t).ge.vardata2(t)) then - mod_flag_NoahMPnew(t) = 1 - endif - enddo - - !HVT > Z0MVT - vname='T_ULIMIT' - call NoahMPnew_getvardata(n,DEC_State,vname,vardata1, status1) - vname='T_MLIMIT' - call NoahMPnew_getvardata(n,DEC_State,vname,vardata2, status2) - vname='T_LLIMIT' - call NoahMPnew_getvardata(n,DEC_State,vname,vardata3, status2) - if(status1.ne.0) vardata1=NoahMPnew_struc(n)%noahmpnew(:)%param%T_ULIMIT - if(status2.ne.0) vardata2=NoahMPnew_struc(n)%noahmpnew(:)%param%T_MLIMIT - if(status2.ne.0) vardata3=NoahMPnew_struc(n)%noahmpnew(:)%param%T_LLIMIT - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - if((vardata3(t).gt.vardata2(t)).or.& - (vardata2(t).gt.vardata1(t)).or.& - (vardata3(t).gt.vardata1(t))) then - mod_flag_NoahMPnew(t) = 1 - endif - enddo - - deallocate(vardata1) - deallocate(vardata2) - deallocate(vardata3) - -end subroutine NoahMPnew_checkConstraints - -subroutine NoahMPnew_setVars(n,DEC_State,mod_flag_NoahMPnew) -! !USES: - use ESMF - use LIS_coreMod, only : LIS_rc, LIS_surface - use LIS_logMod, only : LIS_logunit,LIS_verify - use NoahMPnew_lsmMod, only : NoahMPnew_struc - use NoahMPnew_peMod, only : NoahMPnew_pe_struc - - implicit none -! !ARGUMENTS: - integer :: n - integer :: mod_flag_NoahMPnew(LIS_rc%npatch(n,LIS_rc%lsm_index)) - type(ESMF_State) :: DEC_State -! -! !DESCRIPTION: -! -! This routine assigns the decision space to NoahMP model variables. -! Only does so if the proposed parameter set is feasible (meets bounds and constraints) -! -!EOP - real :: vardata(LIS_rc%npatch(n,LIS_rc%lsm_index)) - character*100 :: vname - integer :: i,t, status - - do i=1,NoahMPnew_pe_struc(n)%nparams - if(NoahMPnew_pe_struc(n)%param_select(i).eq.1) then - vname=trim(NoahMPnew_pe_struc(n)%param_name(i)) - call NoahMPnew_getvardata(n,DEC_State,vname,vardata, status) - call LIS_verify(status) - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - if(mod_flag_NoahMPnew(t).eq.0) then - if(vname.eq."TOPT") & - NoahMPnew_struc(n)%noahmpnew(t)%param%topt = vardata(t) - if(vname.eq."RGL") & - NoahMPnew_struc(n)%noahmpnew(t)%param%rgl = vardata(t) - if(vname.eq."RSMAX") & - NoahMPnew_struc(n)%noahmpnew(t)%param%rsmax = vardata(t) - if(vname.eq."RSMIN") & - NoahMPnew_struc(n)%noahmpnew(t)%param%rsmin = vardata(t) - if(vname.eq."HS") & - NoahMPnew_struc(n)%noahmpnew(t)%param%hs = vardata(t) - if(vname.eq."NROOT") & - NoahMPnew_struc(n)%noahmpnew(t)%param%nroot = vardata(t) - if(vname.eq."CSOIL") & - NoahMPnew_struc(n)%noahmpnew(t)%param%csoil = vardata(t) - if(vname.eq."BEXP") & - NoahMPnew_struc(n)%noahmpnew(t)%param%bexp = vardata(t) - if(vname.eq."DKSAT") & - NoahMPnew_struc(n)%noahmpnew(t)%param%dksat = vardata(t) - if(vname.eq."DWSAT") & - NoahMPnew_struc(n)%noahmpnew(t)%param%dwsat = vardata(t) - if(vname.eq."PSISAT") & - NoahMPnew_struc(n)%noahmpnew(t)%param%psisat = vardata(t) - if(vname.eq."QUARTZ") & - NoahMPnew_struc(n)%noahmpnew(t)%param%quartz = vardata(t) - if(vname.eq."SMCMAX") & - NoahMPnew_struc(n)%noahmpnew(t)%param%smcmax = vardata(t) - if(vname.eq."SMCREF") & - NoahMPnew_struc(n)%noahmpnew(t)%param%smcref = vardata(t) - if(vname.eq."SMCWLT") & - NoahMPnew_struc(n)%noahmpnew(t)%param%smcwlt = vardata(t) - if(vname.eq."CZIL") & - NoahMPnew_struc(n)%noahmpnew(t)%param%czil = vardata(t) - if(vname.eq."SLOPE") & - NoahMPnew_struc(n)%noahmpnew(t)%param%slope = vardata(t) - if(vname.eq."CH2OP") & - NoahMPnew_struc(n)%noahmpnew(t)%param%CH2OP = vardata(t) - if(vname.eq."DLEAF") & - NoahMPnew_struc(n)%noahmpnew(t)%param%DLEAF = vardata(t) - if(vname.eq."Z0MVT") & - NoahMPnew_struc(n)%noahmpnew(t)%param%Z0MVT = vardata(t) - if(vname.eq."HVT") & - NoahMPnew_struc(n)%noahmpnew(t)%param%HVT = vardata(t) - if(vname.eq."HVB") & - NoahMPnew_struc(n)%noahmpnew(t)%param%HVB = vardata(t) - if(vname.eq."RC") & - NoahMPnew_struc(n)%noahmpnew(t)%param%RC = vardata(t) - if(vname.eq."MFSNO") & - NoahMPnew_struc(n)%noahmpnew(t)%param%MFSNO = vardata(t) - if(vname.eq."ALBSAT1") & - NoahMPnew_struc(n)%noahmpnew(t)%param%ALBSAT(1) = vardata(t) - if(vname.eq."ALBSAT2") & - NoahMPnew_struc(n)%noahmpnew(t)%param%ALBSAT(2) = vardata(t) - if(vname.eq."ALBDRY1") & - NoahMPnew_struc(n)%noahmpnew(t)%param%ALBDRY(1) = vardata(t) - if(vname.eq."ALBDRY2") & - NoahMPnew_struc(n)%noahmpnew(t)%param%ALBDRY(2) = vardata(t) - if(vname.eq."ALBICE1") & - NoahMPnew_struc(n)%noahmpnew(t)%param%ALBICE(1) = vardata(t) - if(vname.eq."ALBICE2") & - NoahMPnew_struc(n)%noahmpnew(t)%param%ALBICE(2) = vardata(t) - if(vname.eq."OMEGAS1") & - NoahMPnew_struc(n)%noahmpnew(t)%param%OMEGAS(1) = vardata(t) - if(vname.eq."OMEGAS2") & - NoahMPnew_struc(n)%noahmpnew(t)%param%OMEGAS(2) = vardata(t) - if(vname.eq."BETADS") & - NoahMPnew_struc(n)%noahmpnew(t)%param%BETADS = vardata(t) - if(vname.eq."BETAIS") & - NoahMPnew_struc(n)%noahmpnew(t)%param%BETAIS = vardata(t) - if(vname.eq."EG1") & - NoahMPnew_struc(n)%noahmpnew(t)%param%EG(1) = vardata(t) - if(vname.eq."EG2") & - NoahMPnew_struc(n)%noahmpnew(t)%param%EG(2) = vardata(t) - if(vname.eq."Z0SNO") & - NoahMPnew_struc(n)%noahmpnew(t)%param%Z0SNO = vardata(t) - if(vname.eq."SSI") & - NoahMPnew_struc(n)%noahmpnew(t)%param%SSI = vardata(t) - if(vname.eq."SWEMX") & - NoahMPnew_struc(n)%noahmpnew(t)%param%SWEMX = vardata(t) - if(vname.eq."RSURF_SNOW") & - NoahMPnew_struc(n)%noahmpnew(t)%param%RSURF_SNOW = vardata(t) - if(vname.eq."MNSNALB") & - NoahMPnew_struc(n)%noahmpnew(t)%param%MNSNALB = vardata(t) - if(vname.eq."MXSNALB") & - NoahMPnew_struc(n)%noahmpnew(t)%param%MXSNALB = vardata(t) - if(vname.eq."SNDECAYEXP") & - NoahMPnew_struc(n)%noahmpnew(t)%param%SNDECAYEXP = vardata(t) - if(vname.eq."T_ULIMIT") & - NoahMPnew_struc(n)%noahmpnew(t)%param%T_ULIMIT = vardata(t) - if(vname.eq."T_MLIMIT") & - NoahMPnew_struc(n)%noahmpnew(t)%param%T_MLIMIT = vardata(t) - if(vname.eq."T_LLIMIT") & - NoahMPnew_struc(n)%noahmpnew(t)%param%T_LLIMIT = vardata(t) - if(vname.eq."SNOWF_SCALEF") & - NoahMPnew_struc(n)%noahmpnew(t)%param%snowf_scalef = vardata(t) - if(vname.eq."RHOL1") & - NoahMPnew_struc(n)%noahmpnew(t)%param%RHOL(1) = vardata(t) - if(vname.eq."RHOL2") & - NoahMPnew_struc(n)%noahmpnew(t)%param%RHOL(2) = vardata(t) - if(vname.eq."RHOS1") & - NoahMPnew_struc(n)%noahmpnew(t)%param%RHOS(1) = vardata(t) - if(vname.eq."RHOS2") & - NoahMPnew_struc(n)%noahmpnew(t)%param%RHOS(2) = vardata(t) - if(vname.eq."TAUL1") & - NoahMPnew_struc(n)%noahmpnew(t)%param%TAUL(1) = vardata(t) - if(vname.eq."TAUL2") & - NoahMPnew_struc(n)%noahmpnew(t)%param%TAUL(2) = vardata(t) - if(vname.eq."TAUS1") & - NoahMPnew_struc(n)%noahmpnew(t)%param%TAUS(1) = vardata(t) - if(vname.eq."TAUS2") & - NoahMPnew_struc(n)%noahmpnew(t)%param%TAUS(2) = vardata(t) - if(vname.eq."XL") & - NoahMPnew_struc(n)%noahmpnew(t)%param%XL = vardata(t) - if(vname.eq."CWPVT") & - NoahMPnew_struc(n)%noahmpnew(t)%param%CWPVT = vardata(t) - if(vname.eq."C3PSN") & - NoahMPnew_struc(n)%noahmpnew(t)%param%C3PSN = vardata(t) - if(vname.eq."KC25") & - NoahMPnew_struc(n)%noahmpnew(t)%param%KC25 = vardata(t) - if(vname.eq."AKC") & - NoahMPnew_struc(n)%noahmpnew(t)%param%AKC = vardata(t) - if(vname.eq."KO25") & - NoahMPnew_struc(n)%noahmpnew(t)%param%KO25 = vardata(t) - if(vname.eq."AKO") & - NoahMPnew_struc(n)%noahmpnew(t)%param%AKO = vardata(t) - if(vname.eq."AVCMX") & - NoahMPnew_struc(n)%noahmpnew(t)%param%AVCMX = vardata(t) - if(vname.eq."AQE") & - NoahMPnew_struc(n)%noahmpnew(t)%param%AQE = vardata(t) - if(vname.eq."LTOVRC") & - NoahMPnew_struc(n)%noahmpnew(t)%param%LTOVRC = vardata(t) - if(vname.eq."DILEFC") & - NoahMPnew_struc(n)%noahmpnew(t)%param%DILEFC = vardata(t) - if(vname.eq."DILEFW") & - NoahMPnew_struc(n)%noahmpnew(t)%param%DILEFW = vardata(t) - if(vname.eq."RMF25") & - NoahMPnew_struc(n)%noahmpnew(t)%param%RMF25 = vardata(t) - if(vname.eq."SLA") & - NoahMPnew_struc(n)%noahmpnew(t)%param%SLA = vardata(t) - if(vname.eq."FRAGR") & - NoahMPnew_struc(n)%noahmpnew(t)%param%FRAGR = vardata(t) - if(vname.eq."TMIN") & - NoahMPnew_struc(n)%noahmpnew(t)%param%TMIN = vardata(t) - if(vname.eq."VCMX25") & - NoahMPnew_struc(n)%noahmpnew(t)%param%VCMX25 = vardata(t) - if(vname.eq."TDLEF") & - NoahMPnew_struc(n)%noahmpnew(t)%param%TDLEF = vardata(t) - if(vname.eq."BP") & - NoahMPnew_struc(n)%noahmpnew(t)%param%BP = vardata(t) - if(vname.eq."MP") & - NoahMPnew_struc(n)%noahmpnew(t)%param%MP = vardata(t) - if(vname.eq."QE25") & - NoahMPnew_struc(n)%noahmpnew(t)%param%QE25 = vardata(t) - if(vname.eq."RMS25") & - NoahMPnew_struc(n)%noahmpnew(t)%param%RMS25 = vardata(t) - if(vname.eq."RMR25") & - NoahMPnew_struc(n)%noahmpnew(t)%param%RMR25 = vardata(t) - if(vname.eq."ARM") & - NoahMPnew_struc(n)%noahmpnew(t)%param%ARM = vardata(t) - if(vname.eq."FOLNMX") & - NoahMPnew_struc(n)%noahmpnew(t)%param%FOLNMX = vardata(t) - if(vname.eq."WDPOOL") & - NoahMPnew_struc(n)%noahmpnew(t)%param%WDPOOL = vardata(t) - if(vname.eq."WRRAT") & - NoahMPnew_struc(n)%noahmpnew(t)%param%WRRAT = vardata(t) - if(vname.eq."MRP") & - NoahMPnew_struc(n)%noahmpnew(t)%param%MRP = vardata(t) - endif - enddo - endif - enddo -end subroutine NoahMPnew_setVars - -subroutine NoahMPnew_setModFlag(n,DEC_State,Feas_State,mod_flag_NoahMPnew) -! !USES: - use ESMF - use LIS_coreMod, only : LIS_rc, LIS_surface - use LIS_logMod, only : LIS_logunit,LIS_verify - - implicit none -! !ARGUMENTS: - integer :: n - integer :: mod_flag_NoahMPnew(LIS_rc%npatch(n,LIS_rc%lsm_index)) - type(ESMF_State) :: DEC_State - type(ESMF_State) :: Feas_State -! -! !DESCRIPTION: -! -! This routine sets the feasibility flag -! -!EOP - type(ESMF_Field) :: feasField - integer :: t - integer :: status - integer, pointer :: modflag(:) - - call ESMF_StateGet(Feas_State, "Feasibility Flag", feasField, rc=status) - call LIS_verify(status) - call ESMF_FieldGet(feasField,localDE=0,farrayPtr=modflag,rc=status) - call LIS_verify(status) - - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - if(mod_flag_NoahMPnew(t).eq.1) then - modflag(t)=1 - endif - enddo - -end subroutine NoahMPnew_setModFlag From e4950e611de14bbe8253962da194397c373c6d6d Mon Sep 17 00:00:00 2001 From: cenlinhe Date: Fri, 17 Nov 2023 20:17:06 -0700 Subject: [PATCH 15/27] change NoahMP.New in info message --- lis/configs/lis.config_noahmp5_NLDAS | 90 +++++++++---------- .../land/noahmp.5.0/NoahMP50_coldstart.F90 | 2 +- .../land/noahmp.5.0/NoahMP50_readrst.F90 | 2 +- .../land/noahmp.5.0/NoahMP50_reset.F90 | 2 +- .../land/noahmp.5.0/NoahMP50_setup.F90 | 52 +++++------ .../land/noahmp.5.0/NoahMP50_writerst.F90 | 2 +- .../da_soilm/noahmp50_dasoilm_Mod.F90 | 4 +- .../land/noahmp.5.0/wrf_debug.F90 | 2 +- 8 files changed, 78 insertions(+), 78 deletions(-) diff --git a/lis/configs/lis.config_noahmp5_NLDAS b/lis/configs/lis.config_noahmp5_NLDAS index 69b1fd680..98eb42270 100644 --- a/lis/configs/lis.config_noahmp5_NLDAS +++ b/lis/configs/lis.config_noahmp5_NLDAS @@ -5,7 +5,7 @@ Number of nests: 1 Number of surface model types: 1 Surface model types: LSM Surface model output interval: 1hr -Land surface model: "Noah-MP.New" +Land surface model: "Noah-MP.5.0" Number of met forcing sources: 1 Blending method for forcings: overlay Met forcing sources: "NLDAS2" @@ -163,50 +163,50 @@ NLDAS2 use model based precip: 0 NLDAS2 use model based pressure: 0 #-----------------------LAND SURFACE MODELS-------------------------- -Noah-MP.New model timestep: 30mn -Noah-MP.New soil timestep: 30mn -Noah-MP.New restart output interval: 6hr -Noah-MP.New restart file: none -Noah-MP.New restart file format: netcdf -Noah-MP.New parameter table: ./input/NoahmpTable.TBL -Noah-MP.New number of soil layers: 4 -Noah-MP.New thickness of soil layers: 0.1 0.3 0.6 1.0 -Noah-MP.New dynamic vegetation option: 4 # Up to 9 different options -Noah-MP.New canopy stomatal resistance option: 1 # 1=Ball-Berry; 2=Jarvis -Noah-MP.New soil moisture factor for stomatal resistance: 1 # 1=Noah; 2=CLM; 3=SSiB -Noah-MP.New surface runoff option: 3 # 1=SIMGM; 2=SIMTOP; 3=Schaake96; 4=BATS; 5=Miguez-Macho&Fan; 6=VIC; 7=XinAnJiang; 8=Dynamic VIC -Noah-MP.New subsurface runoff and groundwater option: 3 # 1=SIMGM; 2=SIMTOP; 3=Schaake96; 4=BATS; 5=Miguez-Macho&Fan; 6=VIC; 7=XinAnJiang; 8=Dynamic VIC -Noah-MP.New dynamic VIC infiltration option: 1 # 1=Philip; 2=Green-Ampt; 3=Smith-Parlange (only works with surface runoff=8) -Noah-MP.New surface layer drag coefficient option: 1 # 1=M-O; 2=Chen97 -Noah-MP.New supercooled liquid water option: 1 # 1=NY06; 2=Koren99 -Noah-MP.New frozen soil permeability option: 1 # 1=NY06; 2=Koren99 -Noah-MP.New canopy radiative transfer option: 3 # 1=gap=F(3D;cosz); 2=gap=0; 3=gap=1-Fveg -Noah-MP.New snow surface albedo option: 2 # 1=BATS; 2=CLASS -Noah-MP.New rain-snow partition option: 1 # 1=Jordan91; 2=BATS; 3=Noah; 4=WRF couple; 5=Wet-Bulb -Noah-MP.New snow thermal conductivity option: 1 # 1=Yen1965; 2=Anderson1976; 3=constant; 4=Verseghy1991; 5=Yen1981 -Noah-MP.New lower boundary of soil temperature option: 1 # 1=zero-flux; 2=Noah -Noah-MP.New snow&soil temperature time scheme option: 1 # 1=semi-implicit; 2=fully implicit; 3=FSNO for TS -Noah-MP.New glacier ice option: 1 # 1=include phase change; 2=slab ice (Noah) -Noah-MP.New surface resistance option: 1 # 1=Sakaguchi and Zeng 2009; 2=Sellers (1992); 3=adjusted Sellers; 4=option1 for non-snow and rsurf_snow for snow -Noah-MP.New soil configuration option: 1 # 1=input dominant soil texture; 2=input soil texture varies that varies with depth; 3=soil composition and pedotransfer; 4=input soil properties -Noah-MP.New soil pedotransfer function option: 1 # 1=Saxton and Rawls (2006) (used when soil_opt=3) -Noah-MP.New crop model option: 0 # 0=No crop model; 1=Liu et al. 2016; -Noah-MP.New irrigation trigger option: 0 # 0=No irrigation; 1=Irrigation ON; 2=Trigger by plant/harvest date; 3=Trigger by LAI -Noah-MP.New irrigation method option: 0 # 0=method based on input map; 1=sprinkler; 2=micro/drip; 3=flooding -Noah-MP.New tile drainage option: 0 # 0=No tile drainage; 1=Simple drainage; 2=Hooghoudt's scheme -Noah-MP.New urban physics option: 0 # 0=No; 1=Single-layer; 2=Multi-layer BEP scheme; 3=Multi-layer BEM scheme -Noah-MP.New reference height of temperature and humidity: 10.0 -Noah-MP.New initial surface skin temperature: 273.7 -Noah-MP.New initial snow water equivalent: 0.0 -Noah-MP.New initial snow depth: 0.0 -Noah-MP.New initial total canopy surface water: 0.0 -Noah-MP.New initial soil temperatures: 290.0 290.0 290.0 290.0 -#Noah-MP.New initial soil temperatures: 274.0 274.0 274.0 274.0 #TML: start with low soil temp to permit snow DA -Noah-MP.New initial total soil moistures: 0.20 0.20 0.20 0.20 -Noah-MP.New initial leaf area index: 0.5 -Noah-MP.New initial water table depth: 2.5 -Noah-MP.New initial water in the aquifer: 6900.0 -Noah-MP.New initial water in aquifer and saturated soil: 6900.0 +NoahMP.5.0 model timestep: 30mn +NoahMP.5.0 soil timestep: 30mn +NoahMP.5.0 restart output interval: 6hr +NoahMP.5.0 restart file: none +NoahMP.5.0 restart file format: netcdf +NoahMP.5.0 parameter table: ./input/NoahmpTable.TBL +NoahMP.5.0 number of soil layers: 4 +NoahMP.5.0 thickness of soil layers: 0.1 0.3 0.6 1.0 +NoahMP.5.0 dynamic vegetation option: 4 # Up to 9 different options +NoahMP.5.0 canopy stomatal resistance option: 1 # 1=Ball-Berry; 2=Jarvis +NoahMP.5.0 soil moisture factor for stomatal resistance: 1 # 1=Noah; 2=CLM; 3=SSiB +NoahMP.5.0 surface runoff option: 3 # 1=SIMGM; 2=SIMTOP; 3=Schaake96; 4=BATS; 5=Miguez-Macho&Fan; 6=VIC; 7=XinAnJiang; 8=Dynamic VIC +NoahMP.5.0 subsurface runoff and groundwater option: 3 # 1=SIMGM; 2=SIMTOP; 3=Schaake96; 4=BATS; 5=Miguez-Macho&Fan; 6=VIC; 7=XinAnJiang; 8=Dynamic VIC +NoahMP.5.0 dynamic VIC infiltration option: 1 # 1=Philip; 2=Green-Ampt; 3=Smith-Parlange (only works with surface runoff=8) +NoahMP.5.0 surface layer drag coefficient option: 1 # 1=M-O; 2=Chen97 +NoahMP.5.0 supercooled liquid water option: 1 # 1=NY06; 2=Koren99 +NoahMP.5.0 frozen soil permeability option: 1 # 1=NY06; 2=Koren99 +NoahMP.5.0 canopy radiative transfer option: 3 # 1=gap=F(3D;cosz); 2=gap=0; 3=gap=1-Fveg +NoahMP.5.0 snow surface albedo option: 2 # 1=BATS; 2=CLASS +NoahMP.5.0 rain-snow partition option: 1 # 1=Jordan91; 2=BATS; 3=Noah; 4=WRF couple; 5=Wet-Bulb +NoahMP.5.0 snow thermal conductivity option: 1 # 1=Yen1965; 2=Anderson1976; 3=constant; 4=Verseghy1991; 5=Yen1981 +NoahMP.5.0 lower boundary of soil temperature option: 1 # 1=zero-flux; 2=Noah +NoahMP.5.0 snow&soil temperature time scheme option: 1 # 1=semi-implicit; 2=fully implicit; 3=FSNO for TS +NoahMP.5.0 glacier ice option: 1 # 1=include phase change; 2=slab ice (Noah) +NoahMP.5.0 surface resistance option: 1 # 1=Sakaguchi and Zeng 2009; 2=Sellers (1992); 3=adjusted Sellers; 4=option1 for non-snow and rsurf_snow for snow +NoahMP.5.0 soil configuration option: 1 # 1=input dominant soil texture; 2=input soil texture varies that varies with depth; 3=soil composition and pedotransfer; 4=input soil properties +NoahMP.5.0 soil pedotransfer function option: 1 # 1=Saxton and Rawls (2006) (used when soil_opt=3) +NoahMP.5.0 crop model option: 0 # 0=No crop model; 1=Liu et al. 2016; +NoahMP.5.0 irrigation trigger option: 0 # 0=No irrigation; 1=Irrigation ON; 2=Trigger by plant/harvest date; 3=Trigger by LAI +NoahMP.5.0 irrigation method option: 0 # 0=method based on input map; 1=sprinkler; 2=micro/drip; 3=flooding +NoahMP.5.0 tile drainage option: 0 # 0=No tile drainage; 1=Simple drainage; 2=Hooghoudt's scheme +NoahMP.5.0 urban physics option: 0 # 0=No; 1=Single-layer; 2=Multi-layer BEP scheme; 3=Multi-layer BEM scheme +NoahMP.5.0 reference height of temperature and humidity: 10.0 +NoahMP.5.0 initial surface skin temperature: 273.7 +NoahMP.5.0 initial snow water equivalent: 0.0 +NoahMP.5.0 initial snow depth: 0.0 +NoahMP.5.0 initial total canopy surface water: 0.0 +NoahMP.5.0 initial soil temperatures: 290.0 290.0 290.0 290.0 +#NoahMP.5.0 initial soil temperatures: 274.0 274.0 274.0 274.0 #TML: start with low soil temp to permit snow DA +NoahMP.5.0 initial total soil moistures: 0.20 0.20 0.20 0.20 +NoahMP.5.0 initial leaf area index: 0.5 +NoahMP.5.0 initial water table depth: 2.5 +NoahMP.5.0 initial water in the aquifer: 6900.0 +NoahMP.5.0 initial water in aquifer and saturated soil: 6900.0 #---------------------------MODEL OUTPUT CONFIGURATION----------------------- diff --git a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_coldstart.F90 b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_coldstart.F90 index b112c234a..0976fe2b3 100644 --- a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_coldstart.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_coldstart.F90 @@ -89,7 +89,7 @@ subroutine NoahMP50_coldstart(mtype) if (trim(LIS_rc%startcode) .eq. "coldstart") then write(LIS_logunit,*) & - "[INFO] NoahMP50_coldstart -- cold-starting Noah-MP.New" + "[INFO] NoahMP50_coldstart -- cold-starting NoahMP.5.0" do t=1, LIS_rc%npatch(n,mtype) diff --git a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_readrst.F90 b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_readrst.F90 index 1d7ee6288..fad0681f0 100644 --- a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_readrst.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_readrst.F90 @@ -168,7 +168,7 @@ subroutine NoahMP50_readrst() call LIS_endrun endif write(LIS_logunit,*) & - "[INFO] Noah-MP.New restart file used: ",trim(NoahMP50_struc(n)%rfile) + "[INFO] NoahMP.5.0 restart file used: ",trim(NoahMP50_struc(n)%rfile) ! open restart file if(wformat .eq. "binary") then diff --git a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_reset.F90 b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_reset.F90 index 5a5ec486f..a2800b581 100644 --- a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_reset.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_reset.F90 @@ -38,7 +38,7 @@ subroutine NoahMP50_reset() do n=1,LIS_rc%nnest - write(LIS_logunit,*) "Noah-MP.New resetting" + write(LIS_logunit,*) "NoahMP.5.0 resetting" ! initialize forcing variables to zeros do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) diff --git a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_setup.F90 b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_setup.F90 index ae8278a3e..2ba0ba4d3 100644 --- a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_setup.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_setup.F90 @@ -81,14 +81,14 @@ subroutine NoahMP50_setup() !TODO: convert vegetation data source into vegetation types if(LIS_rc%uselcmap(n) .ne. 'none') then write(LIS_logunit,*) & - "[INFO] Noah-MP.New retrieve parameter VEGETYPE from LIS" + "[INFO] NoahMP.5.0 retrieve parameter VEGETYPE from LIS" do t=1, LIS_rc%npatch(n, mtype) NoahMP50_struc(n)%noahmp50(t)%vegetype= LIS_surface(n, mtype)%tile(t)%vegt enddo else ! read: vegetype write(LIS_logunit,*) & - "[INFO] Noah-MP.New reading parameter VEGETYPE from ", & + "[INFO] NoahMP.5.0 reading parameter VEGETYPE from ", & trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_vegetype), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -101,14 +101,14 @@ subroutine NoahMP50_setup() !TODO: convert soil texture into soil types according to scheme if(LIS_rc%usetexturemap(n) .ne. 'none') then write(LIS_logunit,*) & - "[INFO] Noah-MP.New retrieve parameter SOILTYPE from LIS" + "[INFO] NoahMP.5.0 retrieve parameter SOILTYPE from LIS" do t=1, LIS_rc%npatch(n, mtype) NoahMP50_struc(n)%noahmp50(t)%soiltype= LIS_surface(n, mtype)%tile(t)%soilt enddo else ! read: soiltype write(LIS_logunit,*) & - "[INFO] Noah-MP.New reading parameter SOILTYPE from ", & + "[INFO] NoahMP.5.0 reading parameter SOILTYPE from ", & trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_soiltype), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -119,7 +119,7 @@ subroutine NoahMP50_setup() endif ! read: tbot write(LIS_logunit,*) & - "[INFO] Noah-MP.New reading parameter TBOT from ", & + "[INFO] NoahMP.5.0 reading parameter TBOT from ", & trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_tbot), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -132,7 +132,7 @@ subroutine NoahMP50_setup() if(NoahMP50_struc(n)%crop_opt > 0) then ! read: planting write(LIS_logunit,*) & - "[INFO] Noah-MP.New reading parameter PLANTING from ", & + "[INFO] NoahMP.5.0 reading parameter PLANTING from ", & trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_planting), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -142,7 +142,7 @@ subroutine NoahMP50_setup() enddo ! read: harvest - write(LIS_logunit,*) "[INFO] Noah-MP.New reading parameter HARVEST from ",& + write(LIS_logunit,*) "[INFO] NoahMP.5.0 reading parameter HARVEST from ",& trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_harvest), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -152,7 +152,7 @@ subroutine NoahMP50_setup() enddo ! read: season_gdd - write(LIS_logunit,*) "[INFO] Noah-MP.New reading parameter SEASON_GDD from ", & + write(LIS_logunit,*) "[INFO] NoahMP.5.0 reading parameter SEASON_GDD from ", & trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_season_gdd), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -166,7 +166,7 @@ subroutine NoahMP50_setup() if(NoahMP50_struc(n)%irr_opt > 0) then ! read: total irrigation fraction write(LIS_logunit,*) & - "[INFO] Noah-MP.New reading parameter IRFRACT from ", & + "[INFO] NoahMP.5.0 reading parameter IRFRACT from ", & trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_irfract), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -177,7 +177,7 @@ subroutine NoahMP50_setup() ! read: sprinkler irrigation fraction write(LIS_logunit,*) & - "[INFO] Noah-MP.New reading parameter SIFRACT from ", & + "[INFO] NoahMP.5.0 reading parameter SIFRACT from ", & trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_sifract), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -188,7 +188,7 @@ subroutine NoahMP50_setup() ! read: micro/drip irrigation fraction write(LIS_logunit,*) & - "[INFO] Noah-MP.New reading parameter MIFRACT from ", & + "[INFO] NoahMP.5.0 reading parameter MIFRACT from ", & trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_mifract), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -199,7 +199,7 @@ subroutine NoahMP50_setup() ! read: flood irrigation fraction write(LIS_logunit,*) & - "[INFO] Noah-MP.New reading parameter FIFRACT from ", & + "[INFO] NoahMP.5.0 reading parameter FIFRACT from ", & trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_fifract), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -213,7 +213,7 @@ subroutine NoahMP50_setup() if(NoahMP50_struc(n)%tdrn_opt > 0) then ! read: tile drainage fraction write(LIS_logunit,*) & - "[INFO] Noah-MP.New reading parameter TDFRACT from ", & + "[INFO] NoahMP.5.0 reading parameter TDFRACT from ", & trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_tdfract), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -226,7 +226,7 @@ subroutine NoahMP50_setup() !!! SW 11/06/2018 if(NoahMP50_struc(n)%soil_opt .eq. 2) then ! read: soilcL1 - write(LIS_logunit,*) "[INFO] Noah-MP.New reading parameter SOILCL1 from ", & + write(LIS_logunit,*) "[INFO] NoahMP.5.0 reading parameter SOILCL1 from ", & trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_soilcL1), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -236,7 +236,7 @@ subroutine NoahMP50_setup() enddo ! read: soilcL2 - write(LIS_logunit,*) "[INFO] Noah-MP.New reading parameter SOILCL2 from ", & + write(LIS_logunit,*) "[INFO] NoahMP.5.0 reading parameter SOILCL2 from ", & trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_soilcL2), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -246,7 +246,7 @@ subroutine NoahMP50_setup() enddo ! read: soilcL3 - write(LIS_logunit,*) "[INFO] Noah-MP.New reading parameter SOILCL3 from ", & + write(LIS_logunit,*) "[INFO] NoahMP.5.0 reading parameter SOILCL3 from ", & trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_soilcL3), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -256,7 +256,7 @@ subroutine NoahMP50_setup() enddo ! read: soilcL4 - write(LIS_logunit,*) "[INFO] Noah-MP.New reading parameter SOILCL4 from ", & + write(LIS_logunit,*) "[INFO] NoahMP.5.0 reading parameter SOILCL4 from ", & trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_soilcL4), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -270,7 +270,7 @@ subroutine NoahMP50_setup() if(NoahMP50_struc(n)%runsub_opt == 5) then ! read: efolding depth for transmissivity (m) write(LIS_logunit,*) & - "[INFO] Noah-MP.New reading parameter FDEPTH from ", & + "[INFO] NoahMP.5.0 reading parameter FDEPTH from ", & trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_fdepth), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -281,7 +281,7 @@ subroutine NoahMP50_setup() ! read: equilibrium water table depth (m) write(LIS_logunit,*) & - "[INFO] Noah-MP.New reading parameter EQZWT from ", & + "[INFO] NoahMP.5.0 reading parameter EQZWT from ", & trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_eqzwt), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -292,7 +292,7 @@ subroutine NoahMP50_setup() ! read: riverbed depth (m) write(LIS_logunit,*) & - "[INFO] Noah-MP.New reading parameter RIVERBED from ", & + "[INFO] NoahMP.5.0 reading parameter RIVERBED from ", & trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_riverbed), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -303,7 +303,7 @@ subroutine NoahMP50_setup() ! read: climatology recharge write(LIS_logunit,*) & - "[INFO] Noah-MP.New reading parameter RECHCLIM from ", & + "[INFO] NoahMP.5.0 reading parameter RECHCLIM from ", & trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_rechclim), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -316,7 +316,7 @@ subroutine NoahMP50_setup() !----------------------------------------------! ! MULTILEVEL reading spatial spatial parameters ! !----------------------------------------------! - write(LIS_logunit,*) "[INFO] Noah-MP.New reading parameter SHDFAC_MONTHLY from ",& + write(LIS_logunit,*) "[INFO] NoahMP.5.0 reading parameter SHDFAC_MONTHLY from ",& trim(LIS_rc%paramfile(n)) do k = 1, 12 call NoahMP50_read_MULTILEVEL_param(n, NoahMP50_struc(n)%LDT_ncvar_shdfac_monthly, k, placeholder) @@ -329,7 +329,7 @@ subroutine NoahMP50_setup() if(NoahMP50_struc(n)%soil_opt .eq. 3) then ! read: soilcomp - write(LIS_logunit,*) "[INFO] Noah-MP.New reading parameter SOILCOMP from ", & + write(LIS_logunit,*) "[INFO] NoahMP.5.0 reading parameter SOILCOMP from ", & trim(LIS_rc%paramfile(n)) do k = 1, 8 call NoahMP50_read_MULTILEVEL_param(n, NoahMP50_struc(n)%LDT_ncvar_soilcomp, k, placeholder) @@ -343,11 +343,11 @@ subroutine NoahMP50_setup() deallocate(placeholder) !!!! read Noah-MP parameter tables - write(LIS_logunit,*) "[INFO] Noah-MP.New parameter table (veg, soil, general): ", & + write(LIS_logunit,*) "[INFO] NoahMP.5.0 parameter table (veg, soil, general): ", & trim(NoahMP50_struc(n)%noahmp_tbl_name) - write(LIS_logunit,*) "[INFO] Noah-MP.New Landuse classification scheme: ", & + write(LIS_logunit,*) "[INFO] NoahMP.5.0 Landuse classification scheme: ", & trim(NoahMP50_struc(n)%landuse_scheme_name) - write(LIS_logunit,*) "[INFO] Noah-MP.New Soil classification scheme: ", & + write(LIS_logunit,*) "[INFO] NoahMP.5.0 Soil classification scheme: ", & "STAS (default, cannot change)" call NoahmpReadTable(trim(NoahMP50_struc(n)%landuse_scheme_name), & trim(NoahMP50_struc(n)%noahmp_tbl_name)) diff --git a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_writerst.F90 b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_writerst.F90 index 05ed7e607..077633689 100644 --- a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_writerst.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_writerst.F90 @@ -103,7 +103,7 @@ subroutine NoahMP50_writerst(n) #endif endif write(LIS_logunit, *)& - "[INFO] Noah-MP.New archive restart written: ",trim(filen) + "[INFO] NoahMP.5.0 archive restart written: ",trim(filen) endif endif end subroutine NoahMP50_writerst diff --git a/lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_dasoilm_Mod.F90 b/lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_dasoilm_Mod.F90 index 59f027505..ea078689a 100644 --- a/lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_dasoilm_Mod.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_dasoilm_Mod.F90 @@ -80,11 +80,11 @@ subroutine NoahMP50_dasoilm_init(k) !TBD: SVK #if 0 if(LIS_rc%dascaloption(k).eq."Linear scaling") then - call ESMF_ConfigFindLabel(LIS_config,"Noah-MP.New soil moisture CDF file:",& + call ESMF_ConfigFindLabel(LIS_config,"NoahMP.5.0 soil moisture CDF file:",& rc=status) do n=1,LIS_rc%nnest call ESMF_ConfigGetAttribute(LIS_config,modelcdffile(n),rc=status) - call LIS_verify(status, 'Noah-MP.New soil moisture CDF file: not defined') + call LIS_verify(status, 'NoahMP.5.0 soil moisture CDF file: not defined') enddo do n=1,LIS_rc%nnest diff --git a/lis/surfacemodels/land/noahmp.5.0/wrf_debug.F90 b/lis/surfacemodels/land/noahmp.5.0/wrf_debug.F90 index a2325afd5..0f4de42fa 100644 --- a/lis/surfacemodels/land/noahmp.5.0/wrf_debug.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/wrf_debug.F90 @@ -14,6 +14,6 @@ subroutine wrf_debug(unit_number, message) implicit none integer :: unit_number character(len=*) :: message - write(LIS_logunit, *) "Noah-MP new refactored version (wrf_debug): ", message + write(LIS_logunit, *) "NoahMP.5.0 refactored version (wrf_debug): ", message end subroutine wrf_debug From 8edb8923ccc7b38977fb77b7d08378977f40f8b2 Mon Sep 17 00:00:00 2001 From: cenlinhe Date: Thu, 30 Nov 2023 09:53:20 -0700 Subject: [PATCH 16/27] Fix Noah-MPv5 restart and model alarms for multiple nests following v4.0.1 --- lis/surfacemodels/land/noahmp.5.0/NoahMP50_lsmMod.F90 | 8 ++++---- lis/surfacemodels/land/noahmp.5.0/NoahMP50_main.F90 | 4 ++-- lis/surfacemodels/land/noahmp.5.0/NoahMP50_writerst.F90 | 6 ++++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_lsmMod.F90 b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_lsmMod.F90 index bdfe5fdb8..b70219c8d 100644 --- a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_lsmMod.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_lsmMod.F90 @@ -368,23 +368,23 @@ subroutine NoahMP50_ini() call LIS_update_timestep(LIS_rc, n, Noahmp50_struc(n)%ts) - call LIS_registerAlarm("NoahMP50 model alarm",& + write(fnest,'(i3.3)') n + call LIS_registerAlarm("NoahMP50 model alarm "//trim(fnest),& Noahmp50_struc(n)%ts, & Noahmp50_struc(n)%ts) ! CH2023: add soil timestep that is allowed to be different from main timestep - call LIS_registerAlarm("NoahMP50 model alarm",& + call LIS_registerAlarm("NoahMP50 model alarm "//trim(fnest),& Noahmp50_struc(n)%ts, & Noahmp50_struc(n)%ts_soil) - call LIS_registerAlarm("NoahMP50 restart alarm", & + call LIS_registerAlarm("NoahMP50 restart alarm "//trim(fnest),& Noahmp50_struc(n)%ts,& Noahmp50_struc(n)%rstInterval) ! EMK Add alarm to reset tair_agl_min for RHMin. This should ! match the output interval, since that is used for calculating ! Tair_F_min. - write(fnest,'(i3.3)') n call LIS_registerAlarm("NoahMP50 RHMin alarm "//trim(fnest),& Noahmp50_struc(n)%ts,& LIS_sfmodel_struc(n)%outInterval) diff --git a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_main.F90 b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_main.F90 index f77040185..2c76afcba 100644 --- a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_main.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_main.F90 @@ -81,7 +81,8 @@ subroutine NoahMP50_main(n) ! check NoahMP50 alarm. If alarm is ring, run model. - alarmCheck = LIS_isAlarmRinging(LIS_rc, "NoahMP50 model alarm") + write(fnest,'(i3.3)') n + alarmCheck = LIS_isAlarmRinging(LIS_rc, "NoahMP50 model alarm "//trim(fnest)) if (alarmCheck) Then do t = 1, LIS_rc%npatch(n, LIS_rc%lsm_index) @@ -1143,7 +1144,6 @@ subroutine NoahMP50_main(n) ! EMK...See if noahmp50_struc(n)%noahmp50(t)%tair_agl_min needs to be ! reset for calculating RHMin. - write(fnest,'(i3.3)') n alarmCheck = LIS_isAlarmRinging(LIS_rc, & "NoahMP50 RHMin alarm "//trim(fnest)) if (alarmCheck) then diff --git a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_writerst.F90 b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_writerst.F90 index 077633689..e39a28867 100644 --- a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_writerst.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_writerst.F90 @@ -61,9 +61,11 @@ subroutine NoahMP50_writerst(n) logical :: alarmCheck integer :: ftn integer :: status - + character*3 :: fnest + ! set restart alarm - alarmCheck = LIS_isAlarmRinging(LIS_rc, "NoahMP50 restart alarm") + write(fnest,'(i3.3)') n + alarmCheck = LIS_isAlarmRinging(LIS_rc, "NoahMP50 restart alarm "//trim(fnest)) ! set restart file format (read from LIS configration file_ wformat = trim(NoahMP50_struc(n)%rformat) From bb3694bf60d212317cd3aaaaa095ab871ddfb9b9 Mon Sep 17 00:00:00 2001 From: cenlinhe Date: Thu, 30 Nov 2023 10:44:25 -0700 Subject: [PATCH 17/27] update DA TWS following NoahMPv4.0.1 --- .../noahmp.5.0/da_tws/noahmp50_datws_Mod.F90 | 2 - .../da_tws/noahmp50_descale_tws.F90 | 138 +----------- .../noahmp.5.0/da_tws/noahmp50_gettws.F90 | 5 - .../land/noahmp.5.0/da_tws/noahmp50_qctws.F90 | 52 +---- .../noahmp.5.0/da_tws/noahmp50_scale_tws.F90 | 67 +----- .../noahmp.5.0/da_tws/noahmp50_settws.F90 | 210 ++++++++++++++---- .../noahmp.5.0/da_tws/noahmp50_updatetws.F90 | 97 +------- 7 files changed, 174 insertions(+), 397 deletions(-) diff --git a/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_datws_Mod.F90 b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_datws_Mod.F90 index 07390f7a3..e95f18c03 100755 --- a/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_datws_Mod.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_datws_Mod.F90 @@ -65,11 +65,9 @@ subroutine noahmp50_datws_init(k) ! !EOP - use LIS_constantsMod, only : LIS_CONST_PATH_LEN implicit none integer :: k integer :: n - character(len=LIS_CONST_PATH_LEN) :: modelcdffile(LIS_rc%nnest) integer :: status integer :: ngrid diff --git a/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_descale_tws.F90 b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_descale_tws.F90 index 406fc09b2..405310fc2 100755 --- a/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_descale_tws.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_descale_tws.F90 @@ -21,10 +21,6 @@ subroutine noahmp50_descale_tws(n, LSM_State, LSM_Incr_State) ! !USES: use ESMF - use LIS_coreMod, only : LIS_rc - use LIS_logMod, only : LIS_verify - use noahmp50_lsmMod - use LIS_constantsMod, only : LIS_CONST_RHOFW ! Natt implicit none ! !ARGUMENTS: @@ -34,7 +30,7 @@ subroutine noahmp50_descale_tws(n, LSM_State, LSM_Incr_State) ! ! !DESCRIPTION: ! -! Descales twsoisture related state prognostic variables for +! Descales tws related state prognostic variables for ! data assimilation ! ! The arguments are: @@ -44,136 +40,4 @@ subroutine noahmp50_descale_tws(n, LSM_State, LSM_Incr_State) ! \end{description} !EOP -!Wanshu - - type(ESMF_Field) :: gwField - real, pointer :: gws(:) - type(ESMF_Field) :: gwIncrField - real, pointer :: gwsIncr(:) - integer :: t - integer :: status - -! Natt - type(ESMF_Field) :: sm1Field - type(ESMF_Field) :: sm2Field - type(ESMF_Field) :: sm3Field - type(ESMF_Field) :: sm4Field - type(ESMF_Field) :: sweField - type(ESMF_Field) :: snodField - type(ESMF_Field) :: sm1IncrField - type(ESMF_Field) :: sm2IncrField - type(ESMF_Field) :: sm3IncrField - type(ESMF_Field) :: sm4IncrField - type(ESMF_Field) :: sweIncrField - type(ESMF_Field) :: snodIncrField - real, pointer :: soilm1(:) - real, pointer :: soilm2(:) - real, pointer :: soilm3(:) - real, pointer :: soilm4(:) - real, pointer :: swe(:) - real, pointer :: snod(:) - real, pointer :: soilmIncr1(:) - real, pointer :: soilmIncr2(:) - real, pointer :: soilmIncr3(:) - real, pointer :: soilmIncr4(:) - real, pointer :: sweincr(:) - real, pointer :: snodincr(:) - integer :: SOILTYP ! soil type index [-] - real :: MAX_THRESHOLD , MIN_THRESHOLD - -#if 0 - ! Natt - ! Descale TWS states - call ESMF_StateGet(LSM_State,"Soil Moisture Layer 1",sm1Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm1 in noahmp50_descale_tws') - call ESMF_StateGet(LSM_State,"Soil Moisture Layer 2",sm2Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm2 in noahmp50_descale_tws') - call ESMF_StateGet(LSM_State,"Soil Moisture Layer 3",sm3Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm3 in noahmp50_descale_tws') - call ESMF_StateGet(LSM_State,"Soil Moisture Layer 4",sm4Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm4 in noahmp50_descale_tws') - call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for SWE in noahmp50_descale_tws') - call ESMF_StateGet(LSM_State,"Snowdepth",snodField,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for Snowdepth in noahmp50_descale_tws') - - call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm1,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm1 in noahmp50_descale_tws') - call ESMF_FieldGet(sm2Field,localDE=0,farrayPtr=soilm2,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm2 in noahmp50_descale_tws') - call ESMF_FieldGet(sm3Field,localDE=0,farrayPtr=soilm3,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm3 in noahmp50_descale_tws') - call ESMF_FieldGet(sm4Field,localDE=0,farrayPtr=soilm4,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm4 in noahmp50_descale_tws') - call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for SWE in noahmp50_descale_tws') - call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for Snowdepth in noahmp50_descale_tws') - - ! Natt - ! Descale TWS state increment - call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 1",sm1IncrField,rc=status) - call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 1 failed in noahmp50_descale_tws") - call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 2",sm2IncrField,rc=status) - call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 2 failed in noahmp50_descale_tws") - call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 3",sm3IncrField,rc=status) - call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 3 failed in noahmp50_descale_tws") - call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 4",sm4IncrField,rc=status) - call LIS_verify(status,& - "ESMF_StateGet: Soil Moisture Layer 4 failed in noahmp50_descale_tws") - call ESMF_StateGet(LSM_Incr_State,"SWE",sweIncrField,rc=status) - call LIS_verify(status) - call ESMF_StateGet(LSM_Incr_State,"Snowdepth",snodIncrField,rc=status) - call LIS_verify(status) - - call ESMF_FieldGet(sm1IncrField,localDE=0,farrayPtr=soilmIncr1,rc=status) - call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 1 failed in noahmp50_descale_tws") - call ESMF_FieldGet(sm2IncrField,localDE=0,farrayPtr=soilmIncr2,rc=status) - call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 2 failed in noahmp50_descale_tws") - call ESMF_FieldGet(sm3IncrField,localDE=0,farrayPtr=soilmIncr3,rc=status) - call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 3 failed in noahmp50_descale_tws") - call ESMF_FieldGet(sm4IncrField,localDE=0,farrayPtr=soilmIncr4,rc=status) - call LIS_verify(status,& - "ESMF_FieldGet: Soil Moisture Layer 4 failed in noahmp50_descale_tws") - call ESMF_FieldGet(sweIncrField,localDE=0,farrayPtr=sweincr,rc=status) - call LIS_verify(status) - call ESMF_FieldGet(snodIncrField,localDE=0,farrayPtr=snodincr,rc=status) - call LIS_verify(status) - - - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - !SOILTYP = NoahMP50_struc(n)%noahmp50(t)%soiltype - !MAX_THRESHOLD = NoahMP50_struc(n)%noahmp50(t)%param%SMCMAX(1) - !MIN_THRESHOLD = NoahMP50_struc(n)%noahmp50(t)%param%SMCWLT(1) - soilm1(t) = soilm1(t) / (NoahMP50_struc(n)%sldpth(1)*1000.0) ! mm -> m3m-3 - soilm2(t) = soilm2(t) / (NoahMP50_struc(n)%sldpth(2)*1000.0) ! mm -> m3m-3 - soilm3(t) = soilm3(t) / (NoahMP50_struc(n)%sldpth(3)*1000.0) ! mm -> m3m-3 - soilm4(t) = soilm4(t) / (NoahMP50_struc(n)%sldpth(4)*1000.0) ! mm -> m3m-3 - !if (soilm1(t) .lt. MIN_THRESHOLD) soilm1(t) = MIN_THRESHOLD - !if (soilm2(t) .lt. MIN_THRESHOLD) soilm2(t) = MIN_THRESHOLD - !if (soilm3(t) .lt. MIN_THRESHOLD) soilm3(t) = MIN_THRESHOLD - !if (soilm4(t) .lt. MIN_THRESHOLD) soilm4(t) = MIN_THRESHOLD - !if (soilm1(t) .gt. MAX_THRESHOLD) soilm1(t) = MAX_THRESHOLD - !if (soilm2(t) .gt. MAX_THRESHOLD) soilm2(t) = MAX_THRESHOLD - !if (soilm3(t) .gt. MAX_THRESHOLD) soilm3(t) = MAX_THRESHOLD - !if (soilm4(t) .gt. MAX_THRESHOLD) soilm4(t) = MAX_THRESHOLD - swe(t) = swe(t) / 1000.0 ! mm -> m - snod(t) = snod(t) / 1000.0 ! mm -> m - - soilmIncr1(t) = soilmIncr1(t) / (NoahMP50_struc(n)%sldpth(1)*1000.0) ! mm -> m3m-3 - soilmIncr2(t) = soilmIncr2(t) / (NoahMP50_struc(n)%sldpth(2)*1000.0) ! mm -> m3m-3 - soilmIncr3(t) = soilmIncr3(t) / (NoahMP50_struc(n)%sldpth(3)*1000.0) ! mm -> m3m-3 - soilmIncr4(t) = soilmIncr4(t) / (NoahMP50_struc(n)%sldpth(4)*1000.0) ! mm -> m3m-3 - sweincr(t) = sweincr(t) / 1000.0 ! mm -> m - snodincr(t) = snodincr(t) / 1000.0 ! mm -> m - - enddo -#endif - end subroutine noahmp50_descale_tws diff --git a/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_gettws.F90 b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_gettws.F90 index 39ff075d6..fbcd94a70 100755 --- a/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_gettws.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_gettws.F90 @@ -71,8 +71,6 @@ subroutine noahmp50_gettws(n, LSM_State) call LIS_verify(status,'ESMF_StateGet failed for gw in noahmp50_gettws') call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) call LIS_verify(status,'ESMF_StateGet failed for SWE in noahmp50_gettws') - call ESMF_StateGet(LSM_State,"Snowdepth",snodField,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for Snowdepth in noahmp50_gettws') call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm1,rc=status) call LIS_verify(status,'ESMF_FieldGet failed for sm1 in noahmp50_gettws') @@ -86,8 +84,6 @@ subroutine noahmp50_gettws(n, LSM_State) call LIS_verify(status,'ESMF_FieldGet failed for gw in noahmp50_gettws') call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) call LIS_verify(status,'ESMF_FieldGet failed for SWE in noahmp50_gettws') - call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for Snowdepth in noahmp50_gettws') do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) !to mm @@ -97,7 +93,6 @@ subroutine noahmp50_gettws(n, LSM_State) soilm4(t) = NoahMP50_struc(n)%noahmp50(t)%smc(4) gws(t) = NoahMP50_struc(n)%noahmp50(t)%wa swe(t) = NoahMP50_struc(n)%noahmp50(t)%sneqv - snod(t) = NoahMP50_struc(n)%noahmp50(t)%snowh enddo end subroutine noahmp50_gettws diff --git a/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_qctws.F90 b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_qctws.F90 index 5e7818db4..ef92243c5 100755 --- a/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_qctws.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_qctws.F90 @@ -121,22 +121,14 @@ subroutine noahmp50_qctws(n, LSM_State) call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) call LIS_verify(status) - call ESMF_StateGet(LSM_State,"Snowdepth",snodField,rc=status) - call LIS_verify(status) call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) call LIS_verify(status) - call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) - call LIS_verify(status) call ESMF_AttributeGet(sweField,"Max Value",swemax,rc=status) call LIS_verify(status) call ESMF_AttributeGet(sweField,"Min Value",swemin,rc=status) call LIS_verify(status) - call ESMF_AttributeGet(snodField,"Max Value",snodmax,rc=status) - call LIS_verify(status) - call ESMF_AttributeGet(snodField,"Min Value",snodmin,rc=status) - call LIS_verify(status) !------- @@ -184,50 +176,12 @@ subroutine noahmp50_qctws(n, LSM_State) if(gws(t).lt.gwsmin) then gws(t) = gwsmin endif - !------ - enddo - - - update_flag = .true. - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - gid = LIS_domain(n)%gindex(& - LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col,& - LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) - - if((snod(t).lt.snodmin) .or. swe(t).lt.swemin) then - update_flag(gid) = .false. + if(swe(t).lt.swemin) then + swe(t) = swemin endif + !------ enddo - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - gid = LIS_domain(n)%gindex(& - LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col,& - LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) - -!Use the model's snow density from the previous timestep - sndens = 0.0 - if(NoahMP50_struc(n)%noahmp50(t)%snowh.gt.0) then - sndens = NoahMP50_struc(n)%noahmp50(t)%sneqv/NoahMP50_struc(n)%noahmp50(t)%snowh - endif - -!If the update is unphysical, do not update. - if(update_flag(gid)) then - snod(t) = snod(t) - swe(t) = snod(t)*sndens - else ! do not update - snod(t) = NoahMP50_struc(n)%noahmp50(t)%snowh - swe(t) = NoahMP50_struc(n)%noahmp50(t)%sneqv - end if - - if(swe(t).gt.swemax) then - swe(t) = swemax - endif - if(snod(t).gt.snodmax) then - snod(t) = snodmax - endif - - end do - end subroutine noahmp50_qctws diff --git a/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_scale_tws.F90 b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_scale_tws.F90 index e9dfd243a..0f5518f3e 100755 --- a/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_scale_tws.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_scale_tws.F90 @@ -21,10 +21,6 @@ subroutine noahmp50_scale_tws(n, LSM_State) ! !USES: use ESMF - use LIS_coreMod, only : LIS_rc - use LIS_logMod, only : LIS_verify - use noahmp50_lsmMod - use LIS_constantsMod, only : LIS_CONST_RHOFW ! Natt implicit none ! !ARGUMENTS: @@ -33,7 +29,7 @@ subroutine noahmp50_scale_tws(n, LSM_State) ! ! !DESCRIPTION: ! -! Scales twsoisture related state prognostic variables for +! Scales tws related state prognostic variables for ! data assimilation ! ! The arguments are: @@ -43,65 +39,4 @@ subroutine noahmp50_scale_tws(n, LSM_State) ! \end{description} !EOP -!Wanshu - - type(ESMF_Field) :: gwField - real, pointer :: gws(:) - integer :: t - integer :: status - -! Natt - type(ESMF_Field) :: sm1Field - type(ESMF_Field) :: sm2Field - type(ESMF_Field) :: sm3Field - type(ESMF_Field) :: sm4Field - type(ESMF_Field) :: sweField - type(ESMF_Field) :: snodField - real, pointer :: soilm1(:) - real, pointer :: soilm2(:) - real, pointer :: soilm3(:) - real, pointer :: soilm4(:) - real, pointer :: swe(:) - real, pointer :: snod(:) - - -#if 0 - ! Natt - ! Scale TWS states to mm (Note, GWS is already in mm) - call ESMF_StateGet(LSM_State,"Soil Moisture Layer 1",sm1Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm1 in noahmp50_scale_tws') - call ESMF_StateGet(LSM_State,"Soil Moisture Layer 2",sm2Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm2 in noahmp50_scale_tws') - call ESMF_StateGet(LSM_State,"Soil Moisture Layer 3",sm3Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm3 in noahmp50_scale_tws') - call ESMF_StateGet(LSM_State,"Soil Moisture Layer 4",sm4Field,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for sm4 in noahmp50_scale_tws') - call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for SWE in noahmp50_scale_tws') - call ESMF_StateGet(LSM_State,"Snowdepth",snodField,rc=status) - call LIS_verify(status,'ESMF_StateGet failed for Snowdepth in noahmp50_scale_tws') - - call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm1,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm1 in noahmp50_scale_tws') - call ESMF_FieldGet(sm2Field,localDE=0,farrayPtr=soilm2,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm2 in noahmp50_scale_tws') - call ESMF_FieldGet(sm3Field,localDE=0,farrayPtr=soilm3,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm3 in noahmp50_scale_tws') - call ESMF_FieldGet(sm4Field,localDE=0,farrayPtr=soilm4,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for sm4 in noahmp50_scale_tws') - call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for SWE in noahmp50_scale_tws') - call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) - call LIS_verify(status,'ESMF_FieldGet failed for Snowdepth in noahmp50_scale_tws') - - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - soilm1(t) = soilm1(t) * NoahMP50_struc(n)%sldpth(1)*1000.0 ! m3m-3 -> mm - soilm2(t) = soilm2(t) * NoahMP50_struc(n)%sldpth(2)*1000.0 ! m3m-3 -> mm - soilm3(t) = soilm3(t) * NoahMP50_struc(n)%sldpth(3)*1000.0 ! m3m-3 -> mm - soilm4(t) = soilm4(t) * NoahMP50_struc(n)%sldpth(4)*1000.0 ! m3m-3 -> mm - swe(t) = swe(t) * 1000.0 ! m -> mm - snod(t) = snod(t) * 1000.0 ! m -> mm - enddo -#endif - end subroutine noahmp50_scale_tws diff --git a/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_settws.F90 b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_settws.F90 index 826b751a9..c59d46151 100755 --- a/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_settws.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_settws.F90 @@ -21,6 +21,7 @@ subroutine noahmp50_settws(n, LSM_State) ! !USES: use ESMF use LIS_coreMod + use LIS_constantsMod use LIS_logMod use NoahMP50_lsmMod @@ -65,11 +66,14 @@ subroutine noahmp50_settws(n, LSM_State) logical :: diffCheck(LIS_rc%ngrid(n)) logical :: ensCheck(LIS_rc%ngrid(n)) logical :: largeSM(LIS_rc%ngrid(n)) - integer :: i, c,r,t,m + real :: snodens(LIS_rc%npatch(n,LIS_rc%lsm_index)) + integer :: i, c,r,t,m,gid integer :: SOILTYP ! soil type index [-] real :: sh2o_tmp, sh2o_rnd - real :: dsneqv,dsnowh,swe_old, snowh_old + real :: dsneqv,dsnowh,snowh_new + real :: TWS1, TWS2, TWSd,delta1 integer :: status + logical :: update_flag(LIS_rc%ngrid(n)) logical :: rc1,rc2,rc3,rc4,rc5 @@ -91,9 +95,6 @@ subroutine noahmp50_settws(n, LSM_State) call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) call LIS_verify(status,& "ESMF_StateSet: SWE failed in noahmp50_settws") - call ESMF_StateGet(LSM_State,"Snowdepth",snodField,rc=status) - call LIS_verify(status,& - "ESMF_StateSet: Snowdepth failed in noahmp50_settws") call ESMF_FieldGet(sm1Field,localDE=0,farrayPtr=soilm1,rc=status) @@ -114,9 +115,6 @@ subroutine noahmp50_settws(n, LSM_State) call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) call LIS_verify(status,& "ESMF_FieldGet: SWE failed in noahmp50_settws") - call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) - call LIS_verify(status,& - "ESMF_FieldGet: Snowdepth failed in noahmp50_settws") ensCheck = .true. @@ -138,6 +136,14 @@ subroutine noahmp50_settws(n, LSM_State) NoahMP50_struc(n)%noahmp50(t)%smc(1).gt.0.50) then largeSM(i) = .true. endif + + if(NoahMP50_struc(n)%noahmp50(t)%snowh.gt.0) then + snodens(t) = NoahMP50_struc(n)%noahmp50(t)%sneqv/& + NoahMP50_struc(n)%noahmp50(t)%snowh + else + snodens(t) = 0.0 + endif + enddo do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) @@ -151,7 +157,6 @@ subroutine noahmp50_settws(n, LSM_State) soilm3(t) = NoahMP50_struc(n)%noahmp50(t)%smc(3) soilm4(t) = NoahMP50_struc(n)%noahmp50(t)%smc(4) gws(t) = NoahMP50_struc(n)%noahmp50(t)%wa - snod(t) = NoahMP50_struc(n)%noahmp50(t)%snowh swe(t) = NoahMP50_struc(n)%noahmp50(t)%sneqv endif enddo @@ -230,54 +235,175 @@ subroutine noahmp50_settws(n, LSM_State) soilm3(t) = NoahMP50_struc(n)%noahmp50(t)%smc(3) soilm4(t) = NoahMP50_struc(n)%noahmp50(t)%smc(4) gws(t) = NoahMP50_struc(n)%noahmp50(t)%wa - snod(t) = NoahMP50_struc(n)%noahmp50(t)%snowh swe(t) = NoahMP50_struc(n)%noahmp50(t)%sneqv enddo endif enddo - + update_flag = .true. + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - delta = soilm1(t) - NoahMP50_struc(n)%noahmp50(t)%smc(1) - NoahMP50_struc(n)%noahmp50(t)%smc(1) = soilm1(t) - NoahMP50_struc(n)%noahmp50(t)%sh2o(1) = & - NoahMP50_struc(n)%noahmp50(t)%sh2o(1) + delta - - delta = soilm2(t) - NoahMP50_struc(n)%noahmp50(t)%smc(2) - NoahMP50_struc(n)%noahmp50(t)%smc(2) = soilm2(t) - NoahMP50_struc(n)%noahmp50(t)%sh2o(2) = & - NoahMP50_struc(n)%noahmp50(t)%sh2o(2) + delta - - delta = soilm3(t) - NoahMP50_struc(n)%noahmp50(t)%smc(3) - NoahMP50_struc(n)%noahmp50(t)%smc(3) = soilm3(t) - NoahMP50_struc(n)%noahmp50(t)%sh2o(3) = & - NoahMP50_struc(n)%noahmp50(t)%sh2o(3) + delta - - delta = soilm4(t) - NoahMP50_struc(n)%noahmp50(t)%smc(4) - NoahMP50_struc(n)%noahmp50(t)%smc(4) = soilm4(t) - NoahMP50_struc(n)%noahmp50(t)%sh2o(4) = & - NoahMP50_struc(n)%noahmp50(t)%sh2o(4) + delta - - NoahMP50_struc(n)%noahmp50(t)%wa=gws(t) + + SOILTYP = NoahMP50_struc(n)%noahmp50(t)%soiltype + MAX_THRESHOLD = NoahMP50_struc(n)%noahmp50(t)%param%SMCMAX(1) ! MAXSMC (SOILTYP) + sm_threshold = NoahMP50_struc(n)%noahmp50(t)%param%SMCMAX(1) - 0.02 ! MAXSMC (SOILTYP) - 0.02 + + gid = LIS_domain(n)%gindex(& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col,& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) + + delta1 = soilm1(t)-NoahMP50_struc(n)%noahmp50(t)%smc(1) + + if(NoahMP50_struc(n)%noahmp50(t)%sh2o(1)+delta1.gt.MIN_THRESHOLD .and.& + MIN_THRESHOLD_struc(n)%noahmp50(t)%sh2o(1)+delta1.lt.& + sm_threshold) then + update_flag(gid) = update_flag(gid).and.(.true.) + else + update_flag(gid) = update_flag(gid).and.(.false.) + endif + delta1 = soilm2(t)-NoahMP50_struc(n)%noahmp50(t)%smc(2) + + if(NoahMP50_struc(n)%noahmp50(t)%sh2o(2)+delta1.gt.MIN_THRESHOLD .and.& + NoahMP50_struc(n)%noahmp50(t)%sh2o(2)+delta1.lt.& + sm_threshold) then + update_flag(gid) = update_flag(gid).and.(.true.) + else + update_flag(gid) = update_flag(gid).and.(.false.) + endif + + delta1 = soilm3(t)-NoahMP50_struc(n)%noahmp50(t)%smc(3) + + if(NoahMP50_struc(n)%noahmp50(t)%sh2o(3)+delta1.gt.MIN_THRESHOLD .and.& + NoahMP50_struc(n)%noahmp50(t)%sh2o(3)+delta1.lt.& + sm_threshold) then + update_flag(gid) = update_flag(gid).and.(.true.) + else + update_flag(gid) = update_flag(gid).and.(.false.) + endif + + delta1 = soilm4(t)-NoahMP50_struc(n)%noahmp50(t)%smc(4) + + if(NoahMP50_struc(n)%noahmp50(t)%sh2o(4)+delta1.gt.MIN_THRESHOLD .and.& + NoahMP50_struc(n)%noahmp50(t)%sh2o(4)+delta1.lt.& + sm_threshold) then + update_flag(gid) = update_flag(gid).and.(.true.) + else + update_flag(gid) = update_flag(gid).and.(.false.) + endif + enddo + +! if(LIS_localPet.eq.387) then +! gid = LIS_domain(n)%gindex(& +! LIS_surface(n,LIS_rc%lsm_index)%tile(16068)%col,& +! LIS_surface(n,LIS_rc%lsm_index)%tile(16068)%row) +! print*, 'tw1 ',NoahMP50_struc(n)%noahmp50(16068)%smc,& +! NoahMP50_struc(n)%noahmp50(16068)%sh2o,& +! NoahMP50_struc(n)%noahmp50(16068)%sneqv,& +! update_flag(gid) +! endif do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - swe_old = NoahMP50_struc(n)%noahmp50(t)%sneqv - snowh_old = NoahMP50_struc(n)%noahmp50(t)%snowh - dsneqv = swe(t) - NoahMP50_struc(n)%noahmp50(t)%sneqv !in mm - dsnowh = snod(t) - NoahMP50_struc(n)%noahmp50(t)%snowh !in m + gid = LIS_domain(n)%gindex(& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col,& + LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) - !alternate option - call noahmp50_snow_update(n, t, dsneqv, dsnowh) + if(update_flag(gid)) then + delta = soilm1(t) - NoahMP50_struc(n)%noahmp50(t)%smc(1) + NoahMP50_struc(n)%noahmp50(t)%smc(1) = soilm1(t) + NoahMP50_struc(n)%noahmp50(t)%sh2o(1) = & + NoahMP50_struc(n)%noahmp50(t)%sh2o(1) + delta + + delta = soilm2(t) - NoahMP50_struc(n)%noahmp50(t)%smc(2) + NoahMP50_struc(n)%noahmp50(t)%smc(2) = soilm2(t) + NoahMP50_struc(n)%noahmp50(t)%sh2o(2) = & + NoahMP50_struc(n)%noahmp50(t)%sh2o(2) + delta + + delta = soilm3(t) - NoahMP50_struc(n)%noahmp50(t)%smc(3) + NoahMP50_struc(n)%noahmp50(t)%smc(3) = soilm3(t) + NoahMP50_struc(n)%noahmp50(t)%sh2o(3) = & + NoahMP50_struc(n)%noahmp50(t)%sh2o(3) + delta + + delta = soilm4(t) - NoahMP50_struc(n)%noahmp50(t)%smc(4) + NoahMP50_struc(n)%noahmp50(t)%smc(4) = soilm4(t) + NoahMP50_struc(n)%noahmp50(t)%sh2o(4) = & + NoahMP50_struc(n)%noahmp50(t)%sh2o(4) + delta + + else + + TWS2 =(soilm1(t)*NoahMP50_struc(n)%sldpth(1)*& + soilm2(t)*NoahMP50_struc(n)%sldpth(2)*& + soilm3(t)*NoahMP50_struc(n)%sldpth(3)*& + soilm4(t)*NoahMP50_struc(n)%sldpth(4))*& + LIS_CONST_RHOFW + + + TWS1 =(NoahMP50_struc(n)%noahmp50(t)%smc(1)*& + NoahMP50_struc(n)%sldpth(1)*& + NoahMP50_struc(n)%noahmp50(t)%smc(2)*& + NoahMP50_struc(n)%sldpth(2)*& + NoahMP50_struc(n)%noahmp50(t)%smc(3)*& + NoahMP50_struc(n)%sldpth(3)*& + NoahMP50_struc(n)%noahmp50(t)%smc(4)*& + NoahMP50_struc(n)%sldpth(4))*& + LIS_CONST_RHOFW + + TWSd = TWS1 - TWS2 + + if(NoahMP50_struc(n)%noahmp50(t)%sneqv > 5.and.& + swe(t)+TWSd.gt.0) then +!only add snow if the increment is small + if(TWSd/NoahMP50_struc(n)%noahmp50(t)%sneqv < 0.10) then + swe(t) = swe(t)+TWSd + endif + else + swe(t) = 0.0 + endif + +! if(LIS_localPet.eq.387.and.t.eq.16068) then +! print*, 'swe ',LIS_localPet, t, swe(t), TWSd +! !since soil moisture update is not accepted, add this to snow +! endif - if(NoahMP50_struc(n)%noahmp50(t)%sneqv.eq.0.or.& - NoahMP50_struc(n)%noahmp50(t)%snowh.eq.0) then - NoahMP50_struc(n)%noahmp50(t)%sneqv = 0 - NoahMP50_struc(n)%noahmp50(t)%snowh = 0 endif + + NoahMP50_struc(n)%noahmp50(t)%wa=gws(t) + enddo +! if(LIS_localPet.eq.387) then +! gid = LIS_domain(n)%gindex(& +! LIS_surface(n,LIS_rc%lsm_index)%tile(16068)%col,& +! LIS_surface(n,LIS_rc%lsm_index)%tile(16068)%row) +! print*, 'tw2 ',NoahMP50_struc(n)%noahmp50(16068)%smc,& +! NoahMP50_struc(n)%noahmp50(16068)%sh2o,& +! NoahMP50_struc(n)%noahmp50(16068)%sneqv,& +! update_flag(gid) +! endif + + do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) + if(snodens(t).eq.0) then + swe(t) = 0.0 + endif + dsneqv = swe(t) - NoahMP50_struc(n)%noahmp50(t)%sneqv + + snowh_new = 0 + if(snodens(t).gt.0) then + snowh_new = swe(t)/snodens(t) + endif + + dsnowh = snowh_new - NoahMP50_struc(n)%noahmp50(t)%sneqv + + call noahmp50_snow_update(n, t, dsneqv, dsnowh) + enddo + + + +! write(101,fmt='(I4.4, 1x, I2.2, 1x, I2.2, 1x, I2.2, 1x, I2.2,1x,10E14.6)') & +! LIS_rc%yr, LIS_rc%mo, LIS_rc%da, LIS_rc%hr,LIS_rc%mn,& +! NoahMP50_struc(n)%noahmp50(991:1000)%sneqv + end subroutine noahmp50_settws diff --git a/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_updatetws.F90 b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_updatetws.F90 index 8719e5c99..5a30818b6 100755 --- a/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_updatetws.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_updatetws.F90 @@ -93,8 +93,6 @@ subroutine noahmp50_updatetws(n, LSM_State, LSM_Incr_State) call ESMF_StateGet(LSM_State,"SWE",sweField,rc=status) call LIS_verify(status) - call ESMF_StateGet(LSM_State,"Snowdepth",snodField,rc=status) - call LIS_verify(status) call ESMF_StateGet(LSM_Incr_State,"Soil Moisture Layer 1",sm1IncrField,rc=status) @@ -115,8 +113,6 @@ subroutine noahmp50_updatetws(n, LSM_State, LSM_Incr_State) "ESMF_StateSet: Groundwater Storage failed in noahmp50_updatetws") call ESMF_StateGet(LSM_Incr_State,"SWE",sweIncrField,rc=status) call LIS_verify(status) - call ESMF_StateGet(LSM_Incr_State,"Snowdepth",snodIncrField,rc=status) - call LIS_verify(status) !------------------- @@ -137,8 +133,6 @@ subroutine noahmp50_updatetws(n, LSM_State, LSM_Incr_State) "ESMF_FieldGet: Groundwater Storage failed in noahmp50_updatetws") call ESMF_FieldGet(sweField,localDE=0,farrayPtr=swe,rc=status) call LIS_verify(status) - call ESMF_FieldGet(snodField,localDE=0,farrayPtr=snod,rc=status) - call LIS_verify(status) call ESMF_FieldGet(sm1IncrField,localDE=0,farrayPtr=soilmIncr1,rc=status) @@ -158,8 +152,6 @@ subroutine noahmp50_updatetws(n, LSM_State, LSM_Incr_State) "ESMF_StateSet: Groundwater Storage failed in noahmp50_updatetws") call ESMF_FieldGet(sweIncrField,localDE=0,farrayPtr=sweincr,rc=status) call LIS_verify(status) - call ESMF_FieldGet(snodIncrField,localDE=0,farrayPtr=snodincr,rc=status) - call LIS_verify(status) do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) @@ -169,94 +161,7 @@ subroutine noahmp50_updatetws(n, LSM_State, LSM_Incr_State) soilm3(t) = soilm3(t) + soilmIncr3(t) soilm4(t) = soilm4(t) + soilmIncr4(t) gws(t) = gws(t) + gwsIncr(t) - enddo - - - update_flag = .true. - perc_violation = 0.0 - snodmean = 0.0 - nsnodmean = 0 - - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - gid = LIS_domain(n)%gindex(& - LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col,& - LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) - - swetmp = swe(t) + sweincr(t) - snodtmp = snod(t) + snodincr(t) - - if((snodtmp.lt.0 .or. swetmp.lt.0)) then - update_flag(gid) = .false. - perc_violation(gid) = perc_violation(gid) +1 - endif - - enddo - - do gid=1,LIS_rc%ngrid(n) - perc_violation(gid) = perc_violation(gid) / real(LIS_rc%nensem(n)) - enddo - -! For ensembles that are unphysical, compute the ensemble average after excluding them. This -! is done only if the majority of the ensemble members are good (>80%) - - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - - gid = LIS_domain(n)%gindex(& - LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col,& - LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) - - if(.not.update_flag(gid)) then ! false - if(perc_violation(gid).lt.0.2) then - if(snod(t)+snodincr(t).ge.0) then - snodmean(gid) = snodmean(gid) + snod(t)+snodincr(t) - nsnodmean(gid) = nsnodmean(gid) + 1 - else - snodmean(gid) = 0.0 - endif - endif - endif - enddo - - do gid=1,LIS_rc%ngrid(n) - if(nsnodmean(gid).gt.0) then - snodmean(gid) = snodmean(gid) / real(nsnodmean(gid)) - endif - enddo - -! If the update is unphysical, simply set to the average of -! the good ensemble members. If all else fails, do not update. - - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - gid = LIS_domain(n)%gindex(& - LIS_surface(n,LIS_rc%lsm_index)%tile(t)%col,& - LIS_surface(n,LIS_rc%lsm_index)%tile(t)%row) - - - snodtmp = snod(t) + snodincr(t) - swetmp = swe(t) + sweincr(t) - -!Use the model's snow density from the previous timestep - sndens = 0.0 - if(NoahMP50_struc(n)%noahmp50(t)%snowh.gt.0) then - sndens = NoahMP50_struc(n)%noahmp50(t)%sneqv/NoahMP50_struc(n)%noahmp50(t)%snowh - endif - - if(update_flag(gid)) then - snod(t) = snodtmp - swe(t) = swetmp - elseif(perc_violation(gid).lt.0.2) then - if(snodtmp.lt.0.0) then ! average of the good ensemble members - snod(t) = snodmean(gid) - swe(t) = snodmean(gid)*sndens - else - snod(t) = snodtmp - swe(t) = swetmp - endif - else ! do not update - snod(t) = NoahMP50_struc(n)%noahmp50(t)%snowh - swe(t) = NoahMP50_struc(n)%noahmp50(t)%sneqv - end if - + swe(t) = swe(t) + sweIncr(t) enddo end subroutine noahmp50_updatetws From 7ddc550d36352024408494ca630047a237b820a5 Mon Sep 17 00:00:00 2001 From: cenlinhe Date: Thu, 30 Nov 2023 11:06:44 -0700 Subject: [PATCH 18/27] remove redundancy in da_tws for snow depth variables --- .../land/noahmp.5.0/da_tws/noahmp50_gettws.F90 | 2 -- .../land/noahmp.5.0/da_tws/noahmp50_qctws.F90 | 7 +++---- .../land/noahmp.5.0/da_tws/noahmp50_settws.F90 | 2 -- .../land/noahmp.5.0/da_tws/noahmp50_updatetws.F90 | 7 +------ 4 files changed, 4 insertions(+), 14 deletions(-) diff --git a/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_gettws.F90 b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_gettws.F90 index fbcd94a70..7ed7e4e8d 100755 --- a/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_gettws.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_gettws.F90 @@ -47,7 +47,6 @@ subroutine noahmp50_gettws(n, LSM_State) type(ESMF_Field) :: sm4Field type(ESMF_Field) :: gwField type(ESMF_Field) :: sweField - type(ESMF_Field) :: snodField integer :: t integer :: status real, pointer :: soilm1(:) @@ -56,7 +55,6 @@ subroutine noahmp50_gettws(n, LSM_State) real, pointer :: soilm4(:) real, pointer :: gws(:) real, pointer :: swe(:) - real, pointer :: snod(:) character*100 :: lsm_state_objs(4) call ESMF_StateGet(LSM_State,"Soil Moisture Layer 1",sm1Field,rc=status) diff --git a/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_qctws.F90 b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_qctws.F90 index ef92243c5..dc0d5c693 100755 --- a/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_qctws.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_qctws.F90 @@ -56,17 +56,16 @@ subroutine noahmp50_qctws(n, LSM_State) type(ESMF_Field) :: sm4Field !Wanshu - type(ESMF_Field) :: gwField, sweField, snodField + type(ESMF_Field) :: gwField, sweField real, pointer :: gws(:) real :: gwsmax, gwsmin real :: MIN_THRESHOLD,MAX_threshold,sm_threshold integer :: SOILTYP real, pointer :: swe(:) - real, pointer :: snod(:) - real :: swemax,snodmax - real :: swemin,snodmin + real :: swemax + real :: swemin real :: sndens logical :: update_flag(LIS_rc%ngrid(n)) diff --git a/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_settws.F90 b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_settws.F90 index c59d46151..2c1f80cb3 100755 --- a/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_settws.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_settws.F90 @@ -52,7 +52,6 @@ subroutine noahmp50_settws(n, LSM_State) type(ESMF_Field) :: sm4Field type(ESMF_Field) :: gwField type(ESMF_Field) :: sweField - type(ESMF_Field) :: snodField real, pointer :: soilm1(:) real, pointer :: soilm2(:) @@ -60,7 +59,6 @@ subroutine noahmp50_settws(n, LSM_State) real, pointer :: soilm4(:) real, pointer :: gws(:) real, pointer :: swe(:) - real, pointer :: snod(:) real :: delta logical :: diffCheck(LIS_rc%ngrid(n)) diff --git a/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_updatetws.F90 b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_updatetws.F90 index 5a30818b6..c21d07839 100755 --- a/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_updatetws.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_updatetws.F90 @@ -46,7 +46,6 @@ subroutine noahmp50_updatetws(n, LSM_State, LSM_Incr_State) type(ESMF_Field) :: sm3IncrField type(ESMF_Field) :: sm4IncrField type(ESMF_Field) :: sweField, sweIncrField - type(ESMF_Field) :: snodField, snodIncrField !Wanshu type(ESMF_Field) :: gwField @@ -63,16 +62,12 @@ subroutine noahmp50_updatetws(n, LSM_State, LSM_Incr_State) real, pointer :: soilmIncr3(:) real, pointer :: soilmIncr4(:) real, pointer :: swe(:), sweincr(:) - real, pointer :: snod(:), snodincr(:) integer :: t,i,m,gid integer :: status - real :: swetmp, snodtmp,sndens + real :: swetmp, sndens logical :: update_flag(LIS_rc%ngrid(n)) real :: perc_violation(LIS_rc%ngrid(n)) - real :: snodmean(LIS_rc%ngrid(n)) - integer :: nsnodmean(LIS_rc%ngrid(n)) - call ESMF_StateGet(LSM_State,"Soil Moisture Layer 1",sm1Field,rc=status) call LIS_verify(status,& From 9e1639f1e179b39940e5b869b3f4510eb1f7ee2e Mon Sep 17 00:00:00 2001 From: cenlinhe Date: Thu, 30 Nov 2023 12:10:53 -0700 Subject: [PATCH 19/27] sync with latest noahmp github & bug fix --- lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_settws.F90 | 2 +- lis/surfacemodels/land/noahmp.5.0/phys/noahmp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_settws.F90 b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_settws.F90 index 2c1f80cb3..1434ccb97 100755 --- a/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_settws.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_tws/noahmp50_settws.F90 @@ -253,7 +253,7 @@ subroutine noahmp50_settws(n, LSM_State) delta1 = soilm1(t)-NoahMP50_struc(n)%noahmp50(t)%smc(1) if(NoahMP50_struc(n)%noahmp50(t)%sh2o(1)+delta1.gt.MIN_THRESHOLD .and.& - MIN_THRESHOLD_struc(n)%noahmp50(t)%sh2o(1)+delta1.lt.& + NoahMP50_struc(n)%noahmp50(t)%sh2o(1)+delta1.lt.& sm_threshold) then update_flag(gid) = update_flag(gid).and.(.true.) else diff --git a/lis/surfacemodels/land/noahmp.5.0/phys/noahmp b/lis/surfacemodels/land/noahmp.5.0/phys/noahmp index 743dba804..be5e9d088 160000 --- a/lis/surfacemodels/land/noahmp.5.0/phys/noahmp +++ b/lis/surfacemodels/land/noahmp.5.0/phys/noahmp @@ -1 +1 @@ -Subproject commit 743dba80467766b1ac531016de9de9f386bae078 +Subproject commit be5e9d088f9738131aeed2f891d820b75b2f9f32 From ab7d60295a311b741a3613d30d96920c45d10a1e Mon Sep 17 00:00:00 2001 From: cenlinhe Date: Thu, 30 Nov 2023 13:55:03 -0700 Subject: [PATCH 20/27] update lis.config for noahmp v5 --- lis/configs/lis.config_noahmp5_NLDAS | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/lis/configs/lis.config_noahmp5_NLDAS b/lis/configs/lis.config_noahmp5_NLDAS index 98eb42270..e6272718a 100644 --- a/lis/configs/lis.config_noahmp5_NLDAS +++ b/lis/configs/lis.config_noahmp5_NLDAS @@ -17,26 +17,26 @@ Temporal interpolation method (met forcing): "linear" #Runtime options Forcing variables list file: ./input/forcing_variables.txt -Output forcing: 0 #1-yes +Output forcing: 1 #1-yes Output parameters: 0 #0- no Output methodology: "2d gridspace" Output model restart files: 1 Output data format: "netcdf" Output naming style: "3 level hierarchy" -Start mode: coldstart -Starting year: 2010 +Start mode: coldstart #coldstart, restart +Starting year: 2013 Starting month: 1 Starting day: 1 # 30 Starting hour: 0 Starting minute: 0 Starting second: 0 -Ending year: 2010 +Ending year: 2013 Ending month: 1 -Ending day: 5 +Ending day: 30 Ending hour: 0 Ending minute: 0 Ending second: 0 -Undefined value: -9999 +Undefined value: -99999 Output directory: './OUTPUT' Diagnostic output file: './logfiles/lislog' Number of ensembles per tile: 1 @@ -165,8 +165,8 @@ NLDAS2 use model based pressure: 0 #-----------------------LAND SURFACE MODELS-------------------------- NoahMP.5.0 model timestep: 30mn NoahMP.5.0 soil timestep: 30mn -NoahMP.5.0 restart output interval: 6hr -NoahMP.5.0 restart file: none +NoahMP.5.0 restart output interval: 1da +NoahMP.5.0 restart file: none #./OUTPUT/SURFACEMODEL/201001/LIS_RST_NOAHMPnew_201001100000.d01.nc NoahMP.5.0 restart file format: netcdf NoahMP.5.0 parameter table: ./input/NoahmpTable.TBL NoahMP.5.0 number of soil layers: 4 @@ -181,7 +181,7 @@ NoahMP.5.0 surface layer drag coefficient option: 1 # 1=M-O; 2=Chen97 NoahMP.5.0 supercooled liquid water option: 1 # 1=NY06; 2=Koren99 NoahMP.5.0 frozen soil permeability option: 1 # 1=NY06; 2=Koren99 NoahMP.5.0 canopy radiative transfer option: 3 # 1=gap=F(3D;cosz); 2=gap=0; 3=gap=1-Fveg -NoahMP.5.0 snow surface albedo option: 2 # 1=BATS; 2=CLASS +NoahMP.5.0 snow surface albedo option: 1 # 1=BATS; 2=CLASS NoahMP.5.0 rain-snow partition option: 1 # 1=Jordan91; 2=BATS; 3=Noah; 4=WRF couple; 5=Wet-Bulb NoahMP.5.0 snow thermal conductivity option: 1 # 1=Yen1965; 2=Anderson1976; 3=constant; 4=Verseghy1991; 5=Yen1981 NoahMP.5.0 lower boundary of soil temperature option: 1 # 1=zero-flux; 2=Noah @@ -196,11 +196,11 @@ NoahMP.5.0 irrigation method option: 0 # 0=method based o NoahMP.5.0 tile drainage option: 0 # 0=No tile drainage; 1=Simple drainage; 2=Hooghoudt's scheme NoahMP.5.0 urban physics option: 0 # 0=No; 1=Single-layer; 2=Multi-layer BEP scheme; 3=Multi-layer BEM scheme NoahMP.5.0 reference height of temperature and humidity: 10.0 -NoahMP.5.0 initial surface skin temperature: 273.7 +NoahMP.5.0 initial surface skin temperature: 273.15 NoahMP.5.0 initial snow water equivalent: 0.0 NoahMP.5.0 initial snow depth: 0.0 NoahMP.5.0 initial total canopy surface water: 0.0 -NoahMP.5.0 initial soil temperatures: 290.0 290.0 290.0 290.0 +NoahMP.5.0 initial soil temperatures: 280.0 280.0 280.0 280.0 #NoahMP.5.0 initial soil temperatures: 274.0 274.0 274.0 274.0 #TML: start with low soil temp to permit snow DA NoahMP.5.0 initial total soil moistures: 0.20 0.20 0.20 0.20 NoahMP.5.0 initial leaf area index: 0.5 From 1f82d43de64523015a0ef40a6cc2c9d91ffdaede Mon Sep 17 00:00:00 2001 From: cenlinhe Date: Thu, 4 Jan 2024 21:36:32 -0700 Subject: [PATCH 21/27] bug fix for noahmp albedo & leafmass init & remove redundancy --- .../land/noahmp.5.0/NoahMP50_lsmMod.F90 | 2 +- .../land/noahmp.5.0/NoahMP50_main.F90 | 1 - .../land/noahmp.5.0/NoahMP50_readcrd.F90 | 31 ++++++++++--------- lis/surfacemodels/land/noahmp.5.0/phys/noahmp | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_lsmMod.F90 b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_lsmMod.F90 index b70219c8d..11d63862a 100644 --- a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_lsmMod.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_lsmMod.F90 @@ -234,7 +234,6 @@ module NoahMP50_lsmMod integer :: tbot_opt integer :: stc_opt integer :: gla_opt - integer :: sndpth_gla_opt integer :: rsf_opt integer :: soil_opt integer :: pedo_opt @@ -244,6 +243,7 @@ module NoahMP50_lsmMod integer :: tdrn_opt integer :: infdv_opt integer :: urban_opt + !integer :: sndpth_gla_opt type(NoahMP50dec), pointer :: noahmp50(:) end type NoahMP50_type_dec diff --git a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_main.F90 b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_main.F90 index 2c76afcba..54208698f 100644 --- a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_main.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_main.F90 @@ -242,7 +242,6 @@ subroutine NoahMP50_main(n) NoahmpIO%IOPT_TBOT = NoahMP50_struc(n)%tbot_opt NoahmpIO%IOPT_STC = NoahMP50_struc(n)%stc_opt NoahmpIO%IOPT_GLA = NoahMP50_struc(n)%gla_opt - NoahmpIO%IOPT_sndpth_gla = NoahMP50_struc(n)%sndpth_gla_opt NoahmpIO%IOPT_RSF = NoahMP50_struc(n)%rsf_opt NoahmpIO%IOPT_SOIL = NoahMP50_struc(n)%soil_opt NoahmpIO%IOPT_PEDO = NoahMP50_struc(n)%pedo_opt diff --git a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_readcrd.F90 b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_readcrd.F90 index 93e4bc7c7..77b39c5bf 100644 --- a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_readcrd.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_readcrd.F90 @@ -341,21 +341,22 @@ subroutine NoahMP50_readcrd() enddo ! Custom snowpack depth for glacier model (in mm) - call ESMF_ConfigFindLabel(LIS_config, & - "NoahMP.5.0 snow depth glacier model option:", rc = rc) - if(rc /= 0) then - write(LIS_logunit,33) "[WARN] Max snow depth not defined." - write(LIS_logunit,33) "[WARN] Setting to default value of 5000." - do n=1, LIS_rc%nnest - Noahmp50_struc(n)%sndpth_gla_opt = 5000 - write(LIS_logunit,33) "snow depth for glacier model: ",Noahmp50_struc(n)%sndpth_gla_opt - enddo - else - do n=1, LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%sndpth_gla_opt, rc=rc) - write(LIS_logunit,33) "snow depth for glacier model: ",Noahmp50_struc(n)%sndpth_gla_opt - enddo - endif + !=== Now this parameter is set in the NoahmpTable.TBL ("SWEMAXGLA", default=5000mm) + !call ESMF_ConfigFindLabel(LIS_config, & + ! "NoahMP.5.0 snow depth glacier model option:", rc = rc) + !if(rc /= 0) then + ! write(LIS_logunit,33) "[WARN] Max snow depth not defined." + ! write(LIS_logunit,33) "[WARN] Setting to default value of 5000." + ! do n=1, LIS_rc%nnest + ! Noahmp50_struc(n)%sndpth_gla_opt = 5000 + ! write(LIS_logunit,33) "snow depth for glacier model: ",Noahmp50_struc(n)%sndpth_gla_opt + ! enddo + !else + ! do n=1, LIS_rc%nnest + ! call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%sndpth_gla_opt, rc=rc) + ! write(LIS_logunit,33) "snow depth for glacier model: ",Noahmp50_struc(n)%sndpth_gla_opt + ! enddo + !endif ! surface resistance (1->Sakaguchi/Zeng;2->Seller;3->mod Sellers;4->1+snow) call ESMF_ConfigFindLabel(LIS_config, & diff --git a/lis/surfacemodels/land/noahmp.5.0/phys/noahmp b/lis/surfacemodels/land/noahmp.5.0/phys/noahmp index be5e9d088..e1cfe423a 160000 --- a/lis/surfacemodels/land/noahmp.5.0/phys/noahmp +++ b/lis/surfacemodels/land/noahmp.5.0/phys/noahmp @@ -1 +1 @@ -Subproject commit be5e9d088f9738131aeed2f891d820b75b2f9f32 +Subproject commit e1cfe423ade749dd61f38b1b7bb3bad2def7f886 From ac2977958f4e3d17c208d3adc93235b6fedb57bf Mon Sep 17 00:00:00 2001 From: cenlinhe Date: Thu, 4 Jan 2024 21:46:43 -0700 Subject: [PATCH 22/27] update lis.config for noahmp5 --- lis/configs/lis.config_noahmp5_AGRMET_global | 423 +++++++++++++++++++ lis/configs/lis.config_noahmp5_NLDAS | 2 +- 2 files changed, 424 insertions(+), 1 deletion(-) create mode 100644 lis/configs/lis.config_noahmp5_AGRMET_global diff --git a/lis/configs/lis.config_noahmp5_AGRMET_global b/lis/configs/lis.config_noahmp5_AGRMET_global new file mode 100644 index 000000000..3356311c8 --- /dev/null +++ b/lis/configs/lis.config_noahmp5_AGRMET_global @@ -0,0 +1,423 @@ +#Overall driver options +Running mode: "retrospective" +Map projection of the LIS domain: latlon +Number of nests: 1 +Number of surface model types: 2 +Surface model types: "LSM" "Openwater" +Surface model output interval: 1da +Land surface model: "Noah-MP.5.0" +Open water model: "template open water" +Number of met forcing sources: 1 +Blending method for forcings: overlay +Met forcing sources: "AGRMET" +Met forcing chosen ensemble member: 1 +Topographic correction method (met forcing): "none" +Enable spatial downscaling of precipitation: 0 +Spatial upscaling method (met forcing): average +Spatial interpolation method (met forcing): bilinear +Temporal interpolation method (met forcing): linear + +#Runtime options +Forcing variables list file: ./lis.config.global/forcing_variables.txt +Output methodology: "2d gridspace" +Output model restart files: 1 +Output data format: netcdf +Output naming style: "3 level hierarchy" +Enable output statistics: .false. +Start mode: coldstart +Starting year: 2023 +Starting month: 7 +Starting day: 1 +Starting hour: 0 +Starting minute: 0 +Starting second: 0 +Ending year: 2023 +Ending month: 8 +Ending day: 1 +Ending hour: 0 +Ending minute: 0 +Ending second: 0 +Undefined value: -9999 +Output directory: ./global_AGRMET_noahmp5 +Diagnostic output file: ./global_AGRMET_noahmp5/logs/lislog +Number of ensembles per tile: 1 + +#The following options are used for subgrid tiling based on vegetation +Maximum number of surface type tiles per grid: 1 +Minimum cutoff percentage (surface type tiles): 0.05 +Maximum number of soil texture tiles per grid: 1 +Minimum cutoff percentage (soil texture tiles): 0.05 +Maximum number of soil fraction tiles per grid: 1 +Minimum cutoff percentage (soil fraction tiles): 0.05 +Maximum number of elevation bands per grid: 1 +Minimum cutoff percentage (elevation bands): 0.05 +Maximum number of slope bands per grid: 1 +Minimum cutoff percentage (slope bands): 0.05 +Maximum number of aspect bands per grid: 1 +Minimum cutoff percentage (aspect bands): 0.05 + +#Processor layout +#Should match the total number of processors used +Number of processors along x: 256 +Number of processors along y: 1 +Decompose by processes: .true. +Halo size along x: 0 +Halo size along y: 0 + +#Sub-models +Routing model: none +Radiative transfer model: none +Number of application models: 0 + +#---------------------DATA ASSIMILATION ---------------------------------- +#Data assimilation options +Number of data assimilation instances: 0 +Data assimilation algorithm: none none none +Data assimilation set: "SNODEP" "SMOPS-ASCAT soil moisture" "SMAP(NASA) soil moisture" +Data assimilation exclude analysis increments: 0 0 0 +Data assimilation number of observation types: 1 1 1 +Data assimilation output interval for diagnostics: 1mo 1mo 1mo +Data assimilation output processed observations: 0 0 0 +Data assimilation output innovations: 0 0 0 +Data assimilation output ensemble spread: 0 0 0 + +Data assimilation observation domain file: ./lis_input.global.noahmp401.merit.nc ./lis_input.global.noahmp401.merit.nc ./lis_input.global.noahmp401.merit.nc +Data assimilation scaling strategy: "none" "CDF matching" "CDF matching" + +Data assimilation use a trained forward model: 0 0 0 +Data assimilation trained forward model output file: none none none + +#Bias estimation options +Bias estimation algorithm: none none none +Bias estimation attributes file: none none none +Bias estimation restart output frequency: 1da 1da 1da +Bias estimation start mode: none none none +Bias estimation restart file: none none none + +#Perturbation options +Perturbations start mode: coldstart coldstart coldstart +Perturbations restart output interval: 1mo 1mo 1mo +Perturbations restart filename: none none none +Apply perturbation bias correction: 1 1 1 + +Forcing perturbation algorithm: none none none +Forcing perturbation frequency: 1hr 1hr 1hr +Forcing attributes file: ./attribs/forcing_attribs.txt ./attribs/forcing_attribs.txt ./attribs/forcing_attribs.txt +Forcing perturbation attributes file: ./attribs/forcing_pertattribs.txt ./attribs/forcing_pertattribs.txt ./attribs/forcing_pertattribs.txt + +State perturbation algorithm: none none none +State perturbation frequency: 6hr 6hr 6hr +State attributes file: ./attribs/noahmp_snow_attribs.txt ./attribs/noahmp_sm_attribs.txt ./attribs/noahmp_sm_attribs.txt +State perturbation attributes file: ./attribs/noahmp_snow_pertattribs.txt ./attribs/noahmp_sm_pertattribs.txt ./attribs/noahmp_sm_pertattribs.txt + +Observation perturbation algorithm: none none none +Observation perturbation frequency: 6hr 6hr 6hr +Observation attributes file: ./attribs/snodep_attribs.txt ./attribs/smops_attribs.txt ./attribs/smap_attribs.txt +Observation perturbation attributes file: ./attribs/snodep_pertattribs.txt ./attribs/smops_pertattribs.txt ./attribs/smap_pertattribs.txt + +SNODEP data directory: ./usaf_lis/MET_FORCING/SNODEP +SNODEP mesh resolution: 16 +SNODEP naming convention: LIS + +SMOPS ASCAT soil moisture data directory: ./usaf_lis/MET_FORCING/SMOPS +SMOPS ASCAT naming convention: "AGRMET ops" +SMOPS ASCAT version: "date-based" +SMOPS ASCAT model CDF file: ./cdf/noahmp401_cdf_200obs.nc +SMOPS ASCAT observation CDF file: ./cdf/ASCAT_cdf_10km_100obs.nc +SMOPS ASCAT soil moisture number of bins in the CDF: 100 +SMOPS ASCAT use realtime data: 1 +SMOPS ASCAT soil moisture use scaled standard deviation model: 0 +SMOPS ASCAT CDF read option: 1 + +SMAP(NASA) soil moisture data directory: ./input/RS_DATA/SMAP/SPL3SMP.007 +SMAP(NASA) soil moisture data designation: SPL3SMP +SMAP(NASA) soil moisture Composite Release ID: R17 +SMAP(NASA) model CDF file: ./cdf/noahmp401_cdf_200obs.nc +SMAP(NASA) observation CDF file: ./cdf/SMAP_cdf_10km_30obs.nc +SMAP(NASA) soil moisture number of bins in the CDF: 100 +SMAP(NASA) soil moisture use scaled standard deviation model: 0 +SMAP(NASA) CDF read option: 1 + +#------------------------DOMAIN SPECIFICATION-------------------------- +#The following options list the choice of parameter maps to be used +LIS domain and parameter data file: ./lis.config.global/lis_input.global.noahmp5.merit.nc # can also use noahmp401 file +Landmask data source: LDT +Landcover data source: LDT +Soil texture data source: LDT +Soil fraction data source: none +Soil color data source: none +Elevation data source: LDT +Slope data source: LDT +Aspect data source: LDT +Curvature data source: none +LAI data source: none +SAI data source: none +Albedo data source: LDT +Max snow albedo data source: LDT +Greenness data source: LDT +Roughness data source: none +Porosity data source: none +Ksat data source: none +B parameter data source: none +Quartz data source: none +Emissivity data source: none + +TBOT lag skin temperature update option: 0 +TBOT skin temperature lag days: 0 + +#--------------------------------FORCINGS---------------------------------- +# 10-km global domain +AGRMET forcing map projection: latlon +AGRMET forcing domain lower left lat: -89.9531250 +AGRMET forcing domain lower left lon: -179.9296875 +AGRMET forcing domain upper right lat: 89.9531250 +AGRMET forcing domain upper right lon: 179.9296875 +AGRMET forcing domain resolution (dx): 0.1406250 +AGRMET forcing domain resolution (dy): 0.0937500 + +# Input settings +AGRMET forcing directory: ./lis.forcing.global.202307/usaf_lis/MET_FORCING/usaf_lis75s2s_gfs2galwem +AGRMET retrospective root filename: "/PS.AFWA_SC.U_DI.C_DC.ANLYS_GP.LIS_GR.C0P09DEG_AR.GLOBAL_PA.03-HR-SUM_DD." + +# Output settings +AGRMET analysis directory: Analysis_UMFG_1 # Change as appropriate +AGRMET surface fields directory: SFCALC # Legacy, will eventually remove +AGRMET merged precip directory: PRECIP # Legacy, will eventually remove +AGRMET security classification: U +AGRMET distribution classification: C +AGRMET data category: ANLYS +AGRMET area of data: GLOBAL + +# NWP data. Use GFS until 2017100100, then switch to GALWEM. +# (GFS will still be used as on-the-fly emergency backup, +# if GALWEM files are missing.) +AGRMET first guess source: GALWEM # GALWEM or GFS, but not both +AGRMET use GFS precip: 0 # Set to 1 if *not* using GALWEM as primary +AGRMET GFS data directory: GFS # Always GFS +AGRMET GFS filename version: 1 # 1 for legacy, 2 for new 557WW filename convention +AGRMET use timestamp on gfs: 1 # Always 1 +AGRMET use GALWEM precip: 1 # Set to 1 if using GALWEM as primary +AGRMET GALWEM data directory: GALWEM # Always GALWEM +AGRMET GALWEM nominal resolution (km): 17 # 17 or 10 +AGRMET nogaps wind weight: 1.0 # Applied for all NWP sources, keep at 1.0 + +# Rain gauge data. Use JMOBS until 2012032700, use NONE from +# 2012032700 until 2012040912, use CDMS beginning 2012040912. +AGRMET use precip observations: 1 # Always set to 1 +AGRMET JMOBS data directory: CDMS # JMOBS, NONE, or CDMS +AGRMET use timestamp on directories: 1 + +# Do not use SSMI rainfall data -- use IMERG instead. +AGRMET use SSMI data: 0 # 0 = Do not use +AGRMET SSMI zero use switch: 0 # 0 = do not use SSMI zeros +AGRMET SSMI data directory: SSMI # SSMI_LE, NONE, or SSMI +AGRMET SSMI imax: 1024 # For 16th mesh polar stereographic +AGRMET SSMI jmax: 1024 # For 16th mesh polar stereographic + +# Do not use GEOPRECIP rainfall data -- use IMERG instead. +AGRMET use GEOPRECIP estimate: 0 # 0 = Do not use +AGRMET GEOPRECIP data directory: GEO # GEO_LE, NONE, or GEO +AGRMET GEOPRECIP imax: 1024 # For 16th mesh polar stereographic +AGRMET GEOPRECIP jmax: 1024 # For 16th mesh polar stereographic +AGRMET GEO_PRECIP maximum temperature threshold: 278 +AGRMET GEO_PRECIP minimum temperature threshold: 273 + +# Do not use CMORPH rainfall data -- use IMERG instead. +AGRMET use CMORPH data: 0 # 0 = Do not use +AGRMET CMORPH data directory: CMORPH # Always CMORPH +AGRMET CMORPH imax: 4948 +AGRMET CMORPH jmax: 1649 +AGRMET CMORPH min lat: -59.963614 +AGRMET CMORPH max lat: 59.963614 +AGRMET CMORPH min lon: -179.963622 +AGRMET CMORPH max lon: 179.963622 +AGRMET CMORPH dx: 0.072771377 +AGRMET CMORPH dy: 0.072756669 +AGRMET CMORPH maximum temperature threshold: 278 +AGRMET CMORPH minimum temperature threshold: 273 + +# Use IMERG rainfall data +AGRMET use IMERG data: 1 # 1 = Use +AGRMET IMERG temperature threshold: 278 +AGRMET IMERG data directory: ./IMERG/Early_V06B +AGRMET IMERG product: 3B-HHR-E # Early Run +AGRMET IMERG version: V06B # V06B released in 2019 +AGRMET IMERG Probability Liquid Precip Threshold: 100 + +# Bratseth runtime settings +AGRMET maximum precip obs: 2000000 # Max observations to store in memory +AGRMET minimum wind speed: 0.25 # Sanity minimum value for winds +AGRMET output OBA data: 0 # 0 = do not output diagnostic data from Bratseth +AGRMET skip backQC: 0 # 0 = do not skip backQC check in Bratseth +AGRMET skip superstatQC: 0 # 0 = do not skip superstatQC check in Bratseth +AGRMET 3hr maximum precip ceiling: 200.0 +AGRMET PPT Background bias correction option: 0 # 0 = turn off (not ready yet) + +# EMK...New recommended settings based on sample NWP and observations +# for 2 Feb - 7 Mar 2020 and no Box-Cox transformation. + +# Bratseth error covariance settings for GALWEM-17km background field. +# Replace with commented entries below when GALWEM switches to 10-km. +AGRMET GALWEM Precip background error scale length (m): 102000. +AGRMET GALWEM Precip background error variance: 0.83 +AGRMET GALWEM Precip Gauge observation error variance: 0.86 +AGRMET GALWEM Precip GEOPRECIP observation error scale length (m): 132000. +AGRMET GALWEM Precip GEOPRECIP observation error variance: 1.24 +AGRMET GALWEM Precip SSMI observation error scale length (m): 133000. +AGRMET GALWEM Precip SSMI observation error variance: 2.58 +AGRMET GALWEM Precip CMORPH observation error scale length (m): 89000. +AGRMET GALWEM Precip CMORPH observation error variance: 1.15 +AGRMET GALWEM Precip IMERG observation error scale length (m): 101000. +AGRMET GALWEM Precip IMERG observation error variance: 1.93 +AGRMET GALWEM T2M background error scale length (m): 110000. +AGRMET GALWEM T2M background error variance: 1.48 +AGRMET GALWEM T2M station observation error variance: 2.30 +AGRMET GALWEM RH2M background error scale length (m): 119000. +AGRMET GALWEM RH2M background error variance: 30.7 +AGRMET GALWEM RH2M station observation error variance: 65.8 +AGRMET GALWEM SPD10M background error scale length (m): 53000. +AGRMET GALWEM SPD10M background error variance: 0.62 +AGRMET GALWEM SPD10M station observation error variance: 2.37 + +# Bratseth error covariance settings for GALWEM-10km background field. +# AGRMET GALWEM Precip background error scale length (m): 110000. +# AGRMET GALWEM Precip background error variance: 0.81 +# AGRMET GALWEM Precip Gauge observation error variance: 1.22 +# AGRMET GALWEM Precip GEOPRECIP observation error scale length (m): 139000. +# AGRMET GALWEM Precip GEOPRECIP observation error variance: 1.45 +# AGRMET GALWEM Precip SSMI observation error scale length (m): 135000. +# AGRMET GALWEM Precip SSMI observation error variance: 2.68 +# AGRMET GALWEM Precip CMORPH observation error scale length (m): 88000. +# AGRMET GALWEM Precip CMORPH observation error variance: 1.38 +# AGRMET GALWEM Precip IMERG observation error scale length (m): 102000. +# AGRMET GALWEM Precip IMERG observation error variance: 2.52 +# AGRMET GALWEM T2M background error scale length (m): 115000. +# AGRMET GALWEM T2M background error variance: 1.29 +# AGRMET GALWEM T2M station observation error variance: 2.42 +# AGRMET GALWEM RH2M background error scale length (m): 129000. +# AGRMET GALWEM RH2M background error variance: 27.2 +# AGRMET GALWEM RH2M station observation error variance: 68.6 +# AGRMET GALWEM SPD10M background error scale length (m): 56000. +# AGRMET GALWEM SPD10M background error variance: 0.48 +# AGRMET GALWEM SPD10M station observation error variance: 2.43 + +# GFSFV3 Bratseth error covariance settings. Used if GALWEM is unavailable. +AGRMET GFS Precip background error scale length (m): 93000. +AGRMET GFS Precip background error variance: 0.47 +AGRMET GFS Precip Gauge observation error variance: 0.70 +AGRMET GFS Precip GEOPRECIP observation error scale length (m): 131000. +AGRMET GFS Precip GEOPRECIP observation error variance: 1.06 +AGRMET GFS Precip SSMI observation error scale length (m): 131000. +AGRMET GFS Precip SSMI observation error variance: 2.10 +AGRMET GFS Precip CMORPH observation error scale length (m): 91000. +AGRMET GFS Precip CMORPH observation error variance: 0.92 +AGRMET GFS Precip IMERG observation error scale length (m): 100000. +AGRMET GFS Precip IMERG observation error variance: 1.62 +AGRMET GFS T2M background error scale length (m): 125000. +AGRMET GFS T2M background error variance: 1.36 +AGRMET GFS T2M station observation error variance: 2.38 +AGRMET GFS RH2M background error scale length (m): 197000. +AGRMET GFS RH2M background error variance: 51.3 +AGRMET GFS RH2M station observation error variance: 66.8 +AGRMET GFS SPD10M background error scale length (m): 86000. +AGRMET GFS SPD10M background error variance: 0.57 +AGRMET GFS SPD10M station observation error variance: 2.48 + +# Radiation settings. Uses WWMCA cloud data. Use WWMCA_LE from +# 20071101 to 2012032700, use NONE from 2012032700 to 2012040912, +# use WWMCA beginning 2012040912. Use WWMCA_GRIB for operations. +AGRMET cloud data directory: WWMCA # WWMCA_LE, NONE, WWMCA, or WWMCA_GRIB +# Use WWMCA GRIB1 files beginning 12Z 4 Jul 2020 +AGRMET WWMCA GRIB1 read option: 1 +AGRMET snow distribution shape parameter: 2.6 + +# Legacy AGRMET settings. Eventually these will be removed, +# but for now keep these settings. +AGRMET latlon mask file: legacy/global_0p25/mask_25KM.1gd4r +AGRMET mask file: legacy/all_16/point_switches +AGRMET terrain file: legacy/pst_16/terrain +# EMK...8th polar files are missing, but are not read anyway. +# Just leave these settings here. +AGRMET 8th polar mask file: legacy/all_8/point_switches +AGRMET 8th polar terrain file: legacy/pst_8/terrain +AGRMET 16th polar mask file: legacy/all_16/point_switches +AGRMET 16th polar terrain file: legacy/pst_16/terrain +AGRMET 64th polar mask file: legacy/pst_16/point_switches +AGRMET 64th polar terrain file: legacy/pst_16/terrain +AGRMET native imax: 1024 # 16th polar stereographic +AGRMET native jmax: 1024 # 16th polar stereographic +AGRMET sfcalc cntm file: legacy/global_0p25/spread_radii.1gd4r +AGRMET precip climatology: legacy/global_0p25/ +AGRMET use present/past weather estimate: 0 # 0 = do not use BOGUS data +AGRMET use CDFSII-based estimate: 0 # 0 = do not use CDFSII estimates +AGRMET CDFSII time interval: 6 +AGRMET use precip climatology: 0 # 0 = do not use climatology +AGRMET alternate monthly weighting factor: 1.0 +AGRMET minimum 3hr climo value: 0.025 +AGRMET maximum 3hr climo value: 0.375 +AGRMET minimum precip-per-precip day multiplier: 0.0 +AGRMET maximum precip-per-precip day multiplier: 1.1 +AGRMET cloud threshold to generate CDFSII estimate: 85.0 +AGRMET median cloud cover percentage1: 15.0 +AGRMET median cloud cover percentage2: 0.60 +AGRMET overcast percentage: 0.30 + +#-----------------------LAND SURFACE MODELS-------------------------- +NoahMP.5.0 model timestep: 15mn +NoahMP.5.0 soil timestep: 15mn +NoahMP.5.0 restart output interval: 1mo +NoahMP.5.0 restart file: none +NoahMP.5.0 restart file format: netcdf +NoahMP.5.0 parameter table: ./NoahmpTable.TBL +NoahMP.5.0 number of soil layers: 4 +NoahMP.5.0 thickness of soil layers: 0.1 0.3 0.6 1.0 +NoahMP.5.0 dynamic vegetation option: 4 # 9 options available +NoahMP.5.0 canopy stomatal resistance option: 1 # 1=Ball-Berry; 2=Jarvis +NoahMP.5.0 soil moisture factor for stomatal resistance: 1 # 1=Noah; 2=CLM; 3=SSiB +NoahMP.5.0 surface runoff option: 1 # 1=SIMGM; 2=SIMTOP; 3=Schaake96; 4=BATS; 5=Miguez-Macho&Fan; 6=VIC; 7=XinAnJiang; 8=Dynamic VIC +NoahMP.5.0 subsurface runoff and groundwater option: 1 # 1=SIMGM; 2=SIMTOP; 3=Schaake96; 4=BATS; 5=Miguez-Macho&Fan; 6=VIC; 7=XinAnJiang; 8=Dynamic VIC +NoahMP.5.0 dynamic VIC infiltration option: 1 # 1=Philip; 2=Green-Ampt; 3=Smith-Parlange (only works with surface runoff=8) +NoahMP.5.0 surface layer drag coefficient option: 1 # 1=M-O; 2=Chen97 +NoahMP.5.0 supercooled liquid water option: 1 # 1=NY06; 2=Koren99 +NoahMP.5.0 frozen soil permeability option: 1 # 1=NY06; 2=Koren99 +NoahMP.5.0 canopy radiative transfer option: 3 # 1=gap=F(3D;cosz); 2=gap=0; 3=gap=1-Fveg +NoahMP.5.0 snow surface albedo option: 2 # 1=BATS; 2=CLASS +NoahMP.5.0 rain-snow partition option: 1 # 1=Jordan91; 2=BATS; 3=Noah +NoahMP.5.0 snow thermal conductivity option: 1 # 1=Yen1965; 2=Anderson1976; 3=constant; 4=Verseghy1991; 5=Yen1981 +NoahMP.5.0 lower boundary of soil temperature option: 2 # 1=zero-flux; 2=Noah +NoahMP.5.0 snow&soil temperature time scheme option: 1 # 1=semi-implicit; 2=fully implicit +NoahMP.5.0 glacier ice option: 1 # 1=include phase change; 2=slab ice (Noah) +NoahMP.5.0 surface resistance option: 1 # 1=Sakaguchi and Zeng 2009; 2=Sellers (1992); 3=adjusted Sellers; 4=option1 for non-snow and rsurf_snow for snow +NoahMP.5.0 soil configuration option: 1 # 1=input dominant soil texture; 2=input soil texture varies that varies with depth; 3=soil composition and pedotransfer functions +NoahMP.5.0 soil pedotransfer function option: 1 # 1=Saxton and Rawls (2006) (used when soil_opt=3) +NoahMP.5.0 crop model option: 0 # 0=No crop model; 1=Liu et al. 2016; 2=Gecros +NoahMP.5.0 irrigation trigger option: 0 # 0=No irrigation; 1=Irrigation ON; 2=Trigger by plant/harvest date; 3=Trigger by LAI +NoahMP.5.0 irrigation method option: 0 # 0=method based on input map; 1=sprinkler; 2=micro/drip; 3=flooding +NoahMP.5.0 tile drainage option: 0 # 0=No tile drainage; 1=Simple drainage; 2=Hooghoudt's scheme +NoahMP.5.0 urban physics option: 0 # 0=No; 1=Single-layer; 2=Multi-layer BEP scheme; 3=Multi-layer BEM scheme +NoahMP.5.0 initial surface skin temperature: 288.0 +NoahMP.5.0 initial soil temperatures: 288.0 288.0 288.0 288.0 +NoahMP.5.0 initial total soil moistures: 0.20 0.20 0.20 0.20 +NoahMP.5.0 initial snow water equivalent: 0.0 +NoahMP.5.0 initial snow depth: 0.0 +NoahMP.5.0 initial total canopy surface water: 0.0 +NoahMP.5.0 initial leaf area index: 0.5 +NoahMP.5.0 initial water table depth: 2.5 +NoahMP.5.0 initial water in the aquifer: 4900.0 +NoahMP.5.0 initial water in aquifer and saturated soil: 4900.0 +NoahMP.5.0 reference height of temperature and humidity: 10.0 + +Template open water timestep: 15mn + +#---------------------------MODEL OUTPUT CONFIGURATION----------------------- +#Specify the list of ALMA variables that need to be featured in the +#LSM model output +Output start year: +Output start month: +Output start day: +Output start hour: +Output start minutes: +Output start seconds: + +Model output attributes file: ./lis.config.global/tables/MODEL_OUTPUT_LIST.TBL + diff --git a/lis/configs/lis.config_noahmp5_NLDAS b/lis/configs/lis.config_noahmp5_NLDAS index e6272718a..96be7b44a 100644 --- a/lis/configs/lis.config_noahmp5_NLDAS +++ b/lis/configs/lis.config_noahmp5_NLDAS @@ -36,7 +36,7 @@ Ending day: 30 Ending hour: 0 Ending minute: 0 Ending second: 0 -Undefined value: -99999 +Undefined value: -9999 Output directory: './OUTPUT' Diagnostic output file: './logfiles/lislog' Number of ensembles per tile: 1 From cb80970dfa6a5c482e91d86c4ddf413ce8390983 Mon Sep 17 00:00:00 2001 From: cenlinhe Date: Fri, 5 Jan 2024 21:17:08 -0700 Subject: [PATCH 23/27] update lis.config noahmp5 for AGRMET namelist updates --- lis/configs/lis.config_noahmp5_AGRMET_global | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lis/configs/lis.config_noahmp5_AGRMET_global b/lis/configs/lis.config_noahmp5_AGRMET_global index 3356311c8..a589614ba 100644 --- a/lis/configs/lis.config_noahmp5_AGRMET_global +++ b/lis/configs/lis.config_noahmp5_AGRMET_global @@ -178,6 +178,8 @@ AGRMET forcing domain resolution (dy): 0.0937500 # Input settings AGRMET forcing directory: ./lis.forcing.global.202307/usaf_lis/MET_FORCING/usaf_lis75s2s_gfs2galwem AGRMET retrospective root filename: "/PS.AFWA_SC.U_DI.C_DC.ANLYS_GP.LIS_GR.C0P09DEG_AR.GLOBAL_PA.03-HR-SUM_DD." +AGRMET precip obs file format: 1 +AGRMET sfc obs file format: 1 # Output settings AGRMET analysis directory: Analysis_UMFG_1 # Change as appropriate From d9e9f95c74b64fddb87ef3eeaf1dd4b62a7d32b6 Mon Sep 17 00:00:00 2001 From: cenlinhe Date: Tue, 23 Apr 2024 17:00:04 -0600 Subject: [PATCH 24/27] bug fix for domain size dx dy input --- lis/configs/lis.config_noahmp5_AGRMET_global | 2 ++ lis/configs/lis.config_noahmp5_NLDAS | 2 ++ .../land/noahmp.5.0/NoahMP50_coldstart.F90 | 6 +----- .../land/noahmp.5.0/NoahMP50_lsmMod.F90 | 2 ++ .../land/noahmp.5.0/NoahMP50_main.F90 | 6 ++++-- .../land/noahmp.5.0/NoahMP50_readcrd.F90 | 20 ++++++++++++++++++- .../land/noahmp.5.0/noahmp_driver_50.F90 | 4 ---- lis/surfacemodels/land/noahmp.5.0/phys/noahmp | 2 +- 8 files changed, 31 insertions(+), 13 deletions(-) diff --git a/lis/configs/lis.config_noahmp5_AGRMET_global b/lis/configs/lis.config_noahmp5_AGRMET_global index a589614ba..2f61adbff 100644 --- a/lis/configs/lis.config_noahmp5_AGRMET_global +++ b/lis/configs/lis.config_noahmp5_AGRMET_global @@ -373,6 +373,8 @@ NoahMP.5.0 restart file format: netcdf NoahMP.5.0 parameter table: ./NoahmpTable.TBL NoahMP.5.0 number of soil layers: 4 NoahMP.5.0 thickness of soil layers: 0.1 0.3 0.6 1.0 +NoahMP.5.0 domain resolution dx: 15634.3275 # unit of meter (=0.1406250deg for AGRMET) +NoahMP.5.0 domain resolution dy: 10422.885 # unit of meter (=0.0937500deg for AGRMET) NoahMP.5.0 dynamic vegetation option: 4 # 9 options available NoahMP.5.0 canopy stomatal resistance option: 1 # 1=Ball-Berry; 2=Jarvis NoahMP.5.0 soil moisture factor for stomatal resistance: 1 # 1=Noah; 2=CLM; 3=SSiB diff --git a/lis/configs/lis.config_noahmp5_NLDAS b/lis/configs/lis.config_noahmp5_NLDAS index 96be7b44a..3d9259f18 100644 --- a/lis/configs/lis.config_noahmp5_NLDAS +++ b/lis/configs/lis.config_noahmp5_NLDAS @@ -171,6 +171,8 @@ NoahMP.5.0 restart file format: netcdf NoahMP.5.0 parameter table: ./input/NoahmpTable.TBL NoahMP.5.0 number of soil layers: 4 NoahMP.5.0 thickness of soil layers: 0.1 0.3 0.6 1.0 +NoahMP.5.0 domain resolution dx: 13897.18 # unit of meter (=0.125deg for NLDAS2) +NoahMP.5.0 domain resolution dy: 13897.18 # unit of meter (=0.125deg for NLDAS2) NoahMP.5.0 dynamic vegetation option: 4 # Up to 9 different options NoahMP.5.0 canopy stomatal resistance option: 1 # 1=Ball-Berry; 2=Jarvis NoahMP.5.0 soil moisture factor for stomatal resistance: 1 # 1=Noah; 2=CLM; 3=SSiB diff --git a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_coldstart.F90 b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_coldstart.F90 index 0976fe2b3..defbb4d2e 100644 --- a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_coldstart.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_coldstart.F90 @@ -102,7 +102,7 @@ subroutine NoahMP50_coldstart(mtype) do l=1, Noahmp50_struc(n)%nsoil NoahmpIO%TSLB(1,l,1) = Noahmp50_struc(n)%init_tslb(l) NoahmpIO%SMOIS(1,l,1) = Noahmp50_struc(n)%init_smc(l) - NoahmpIO%SH2O(1,l,1) = 0.0 + NoahmpIO%SH2O(1,l,1) = Noahmp50_struc(n)%init_smc(l) NoahmpIO%DZS(l) = Noahmp50_struc(n)%sldpth(l) enddo @@ -162,10 +162,6 @@ subroutine NoahMP50_coldstart(mtype) NoahmpIO%rechxy(1,1) = 0.0 NoahmpIO%deeprechxy(1,1) = 0.0 NoahmpIO%areaxy(1,1) = 100.0 - NoahmpIO%dx = 10.0 - NoahmpIO%dy = 10.0 - NoahmpIO%msftx(1,1) = 0.0 - NoahmpIO%msfty(1,1) = 0.0 NoahmpIO%wtddt = 30.0 NoahmpIO%stepwtd = 0 NoahmpIO%dtbl = NoahMP50_struc(n)%ts diff --git a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_lsmMod.F90 b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_lsmMod.F90 index 11d63862a..87836bbb6 100644 --- a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_lsmMod.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_lsmMod.F90 @@ -214,6 +214,8 @@ module NoahMP50_lsmMod real :: dz8w real :: dt real :: dt_soil + real :: dx + real :: dy real, pointer :: sldpth(:) integer :: nsoil integer :: nsnow diff --git a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_main.F90 b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_main.F90 index 54208698f..18619876b 100644 --- a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_main.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_main.F90 @@ -208,6 +208,8 @@ subroutine NoahMP50_main(n) ! get parameters NoahmpIO%xlat(1,1) = lat NoahmpIO%xlon(1,1) = lon + NoahmpIO%msftx(1,1) = 1.0 + NoahmpIO%msfty(1,1) = 1.0 NoahmpIO%year = LIS_rc%yr NoahmpIO%month = LIS_rc%mo NoahmpIO%day = LIS_rc%da @@ -220,6 +222,8 @@ subroutine NoahMP50_main(n) NoahmpIO%dzs(:) = NoahMP50_struc(n)%sldpth(:) NoahmpIO%nsoil = NoahMP50_struc(n)%nsoil NoahmpIO%nsnow = NoahMP50_struc(n)%nsnow + NoahmpIO%dx = NoahMP50_struc(n)%dx + NoahmpIO%dy = NoahMP50_struc(n)%dy NoahmpIO%ivgtyp(1,1) = NoahMP50_struc(n)%noahmp50(t)%vegetype NoahmpIO%isltyp(1,1) = NoahMP50_struc(n)%noahmp50(t)%soiltype ! Multiply shdfac by 100.0 because noahmpdrv.f90, expects it in units of percentage, not fraction. @@ -312,8 +316,6 @@ subroutine NoahMP50_main(n) ! for MMF groundwater if (NoahmpIO%IOPT_RUNSUB == 5) then NoahmpIO%fdepthxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%fdepth - NoahmpIO%msftx(1,1) = 1.0 - NoahmpIO%msfty(1,1) = 1.0 NoahmpIO%eqzwt(1,1) = NoahMP50_struc(n)%noahmp50(t)%eqzwt NoahmpIO%riverbedxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%riverbed NoahmpIO%rivercondxy(1,1) = NoahMP50_struc(n)%noahmp50(t)%rivercond diff --git a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_readcrd.F90 b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_readcrd.F90 index 77b39c5bf..cb4bdbbf2 100644 --- a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_readcrd.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_readcrd.F90 @@ -85,7 +85,25 @@ subroutine NoahMP50_readcrd() "NoahMP.5.0 restart output interval: not defined") call LIS_parseTimeString(time, Noahmp50_struc(n)%rstInterval) enddo - + + ! model domain size dx (meter) + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 domain resolution dx:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%dx, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 domain resolution dx: not defined") + enddo + + ! model domain size dy (meter) + call ESMF_ConfigFindLabel(LIS_config, & + "NoahMP.5.0 domain resolution dy:", rc = rc) + do n=1, LIS_rc%nnest + call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%dy, rc=rc) + call LIS_verify(rc, & + "NoahMP.5.0 domain resolution dy: not defined") + enddo + !---------------------------! ! Constant Parameters ! !---------------------------! diff --git a/lis/surfacemodels/land/noahmp.5.0/noahmp_driver_50.F90 b/lis/surfacemodels/land/noahmp.5.0/noahmp_driver_50.F90 index f02acc1d7..5ecc59277 100644 --- a/lis/surfacemodels/land/noahmp.5.0/noahmp_driver_50.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/noahmp_driver_50.F90 @@ -60,10 +60,6 @@ subroutine noahmp_driver_50(n, LISparam) call LIS_endrun endif - ! dx is horizontal grid spacing. dx is not used past this point, - ! but is used earlier when run_opt=5 (new groundwater scheme). - NoahmpIO%dx = 0.0 - !!!!! print all the options not supported in offline mode if (NoahmpIO%IOPT_SFC > 2) then stop "(opt_sfc == 3) and (opt_sfc == 4) are not for offline use" diff --git a/lis/surfacemodels/land/noahmp.5.0/phys/noahmp b/lis/surfacemodels/land/noahmp.5.0/phys/noahmp index e1cfe423a..bc5f7bf70 160000 --- a/lis/surfacemodels/land/noahmp.5.0/phys/noahmp +++ b/lis/surfacemodels/land/noahmp.5.0/phys/noahmp @@ -1 +1 @@ -Subproject commit e1cfe423ade749dd61f38b1b7bb3bad2def7f886 +Subproject commit bc5f7bf70bf72a6a980bb9223cc45e8136cd7c4f From 750da6edd1958483f81c2a4fe700f8d856ee5868 Mon Sep 17 00:00:00 2001 From: cenlinhe Date: Tue, 23 Apr 2024 17:19:46 -0600 Subject: [PATCH 25/27] sync with latest noahmp bug fix --- lis/surfacemodels/land/noahmp.5.0/phys/noahmp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lis/surfacemodels/land/noahmp.5.0/phys/noahmp b/lis/surfacemodels/land/noahmp.5.0/phys/noahmp index bc5f7bf70..ef703ae85 160000 --- a/lis/surfacemodels/land/noahmp.5.0/phys/noahmp +++ b/lis/surfacemodels/land/noahmp.5.0/phys/noahmp @@ -1 +1 @@ -Subproject commit bc5f7bf70bf72a6a980bb9223cc45e8136cd7c4f +Subproject commit ef703ae85a6f005c6d0bb42c6842f67426133149 From ce1405a1914620a60d9d3c0570b6392407bedeeb Mon Sep 17 00:00:00 2001 From: cenlinhe Date: Sat, 28 Dec 2024 15:19:31 -0700 Subject: [PATCH 26/27] improve Noah-MPv5.0 naming convention and documentation --- .../Noah-MPv5.0/MODEL_OUTPUT_LIST_noahmp5.TBL | 145 +++++ lis/configs/Noah-MPv5.0/forcing_variables.txt | 22 + .../lis.config_noahmp5_NLDAS2} | 103 ++-- .../lis.config_noahmp5_USAF_global} | 108 ++-- lis/configs/lis.config.adoc | 541 ++++++++++++++++++ .../land/noahmp.5.0/NoahMP50_coldstart.F90 | 2 +- .../land/noahmp.5.0/NoahMP50_main.F90 | 22 +- .../land/noahmp.5.0/NoahMP50_readcrd.F90 | 192 +++---- .../land/noahmp.5.0/NoahMP50_readrst.F90 | 4 +- .../land/noahmp.5.0/NoahMP50_reset.F90 | 2 +- .../land/noahmp.5.0/NoahMP50_setup.F90 | 52 +- .../land/noahmp.5.0/NoahMP50_writerst.F90 | 2 +- .../da_soilm/noahmp50_dasoilm_Mod.F90 | 4 +- .../land/noahmp.5.0/pe/NoahMP50_peMod.F90 | 2 +- .../land/noahmp.5.0/wrf_debug.F90 | 2 +- 15 files changed, 957 insertions(+), 246 deletions(-) create mode 100644 lis/configs/Noah-MPv5.0/MODEL_OUTPUT_LIST_noahmp5.TBL create mode 100644 lis/configs/Noah-MPv5.0/forcing_variables.txt rename lis/configs/{lis.config_noahmp5_NLDAS => Noah-MPv5.0/lis.config_noahmp5_NLDAS2} (58%) rename lis/configs/{lis.config_noahmp5_AGRMET_global => Noah-MPv5.0/lis.config_noahmp5_USAF_global} (83%) diff --git a/lis/configs/Noah-MPv5.0/MODEL_OUTPUT_LIST_noahmp5.TBL b/lis/configs/Noah-MPv5.0/MODEL_OUTPUT_LIST_noahmp5.TBL new file mode 100644 index 000000000..53e475b14 --- /dev/null +++ b/lis/configs/Noah-MPv5.0/MODEL_OUTPUT_LIST_noahmp5.TBL @@ -0,0 +1,145 @@ +#short_name select? units signconv timeavg? min/max? std? vert.levels grib_id grib_scalefactor longname +#Energy balance components +Swnet: 1 W/m2 DN 0 0 0 1 111 10 # Net Shortwave Radiation (W/m2) +Lwnet: 1 W/m2 DN 0 0 0 1 112 10 # Net Longwave Radiation (W/m2) +Qle: 1 W/m2 UP 0 0 0 1 121 10 # Latent Heat Flux (W/m2) +Qh: 1 W/m2 UP 0 0 0 1 122 10 # Sensible Heat Flux (W/m2) +Qg: 1 W/m2 DN 0 0 0 1 155 10 # Ground Heat Flux (W/m2) +Qf: 0 W/m2 S2L 0 0 0 1 229 10 # Energy of fusion (W/m2) +Qv: 0 W/m2 S2V 0 0 0 1 134 10 # Energy of sublimation (W/m2) +Qa: 0 W/m2 DN 0 0 0 1 136 10 # Advective Energy (W/m2) +Qtau: 0 N/m2 DN 0 0 0 1 135 10 # Momentum flux (N/m2) +DelSurfHeat: 0 J/m2 INC 0 0 0 1 137 10 # Change in surface heat storage (J/m2) +DelColdCont: 0 J/m2 INC 0 0 0 1 138 10 # Change in snow cold content (J/m2) +BR: 0 - - 0 0 1 1 256 10 # Bowen ratio +EF: 0 - - 0 0 1 1 256 10 # Evaporative fraction + +#Water balance components +Snowf: 1 kg/m2s DN 0 0 0 1 161 10000 # Snowfall rate (kg/m2s) +Rainf: 1 kg/m2s DN 0 0 0 1 162 10000 # Rainfall rate (kg/m2s) +RainfConv: 0 kg/m2s DN 0 0 0 1 163 10000 # Convective Rainfall rate (kg/m2s) +TotalPrecip: 0 kg/m2s DN 0 0 0 1 164 10000 # Total Precipitation rate (kg/m2s) +Evap: 1 kg/m2s UP 0 0 0 1 57 10000 # Total Evapotranspiration (kg/m2s) +Qs: 1 kg/m2s OUT 0 0 0 1 235 10000 # Surface runoff (kg/m2s) +Qrec: 0 kg/m2s IN 0 0 0 1 143 10000 # Recharge (kg/m2s) +Qsb: 1 kg/m2s OUT 0 0 0 1 254 10000 # Subsurface runoff (kg/m2s) +Qsm: 0 kg/m2s S2L 0 0 0 1 99 10000 # Snowmelt (kg/m2s) +Qfz: 0 kg/m2s L2S 0 0 0 1 146 10000 # Refreezing of water in the snowpack (kg/m2s) +Qst: 0 kg/m2s - 0 0 0 1 147 10000 # Snow throughfall (kg/m2s) +DelSoilMoist: 0 kg/m2 INC 0 0 0 1 148 10000 # Change in soil moisture (kg/m2) +DelSWE: 0 kg/m2 INC 0 0 0 1 149 1000 # Change in snow water equivalent (kg/m2) +DelSurfStor: 0 kg/m2 INC 0 0 0 1 150 1000 # Change in surface water storage (kg/m2) +DelIntercept: 0 kg/m2 INC 0 0 0 1 151 1000 # Change in interception storage (kg/m2) +RHMin: 0 - - 0 0 0 1 51 10 # Minimum 2 meter relative humidity (-) + +#Surface state variables +SnowT: 0 K - 0 0 0 1 152 10 # Snow surface temperature (K) +VegT: 1 K - 0 0 0 1 153 10 # Vegetation canopy temperature (K) +BareSoilT: 1 K - 0 0 0 1 154 10 # Temperature of bare soil (K) +AvgSurfT: 0 K - 0 0 0 1 148 10 # Average surface temperature (K) +RadT: 1 K - 0 0 0 1 156 10 # Surface Radiative Temperature (K) +Albedo: 1 - - 0 0 0 1 84 100 # Surface Albedo (-) +SWE: 1 kg/m2 - 0 0 0 1 65 1000 # Snow Water Equivalent (kg/m2) +SWEVeg: 0 kg/m2 - 0 0 0 1 159 1000 # SWE intercepted by vegetation (kg/m2) +SurfStor: 0 kg/m2 - 0 0 0 1 160 1000 # Surface water storage (kg/m2) +TWS: 1 mm - 0 0 0 1 160 1000 # Terrestrial water storage (mm) +GWS: 0 mm - 0 0 0 1 176 100 # Ground water storage (mm) +WaterTableD: 0 m - 0 0 0 1 174 1 # Water table depth (m) +SWS: 0 mm - 0 0 0 1 333 10 # Surface water storage + +#Subsurface state variables +SoilMoist: 1 m3/m3 - 0 0 0 4 86 1000 # Average layer soil moisture (kg/m2) +SoilTemp: 1 K - 0 0 0 4 85 1000 # Average layer soil temperature (K) +SmLiqFrac: 1 m3/m3 - 0 0 0 4 85 100 # Average layer fraction of liquid moisture (-) +SmFrozFrac: 0 - - 0 0 0 4 85 100 # Average layer fraction of frozen moisture (-) +SoilWet: 0 - - 0 0 0 1 85 100 # Total soil wetness (-) +RelSMC: 0 m3/m3 - 0 0 0 1 86 1000 # Relative soil moisture +RootTemp: 0 K - 0 0 0 1 85 1000 # Rootzone temperature (K) + +#Evaporation components +PotEvap: 0 kg/m2s UP 0 0 0 1 166 1 # Potential Evapotranspiration (kg/m2s) +ECanop: 1 kg/m2s UP 0 0 0 1 200 1 # Interception evaporation (kg/m2s) +TVeg: 1 kg/m2s UP 0 0 0 1 210 1 # Vegetation transpiration (kg/m2s) +ESoil: 1 kg/m2s UP 0 0 0 1 199 1 # Bare soil evaporation (kg/m2s) +EWater: 0 kg/m2s UP 0 0 0 1 170 1 # Open water evaporation (kg/m2s) +RootMoist: 0 kg/m2 - 0 0 0 1 171 1 # Root zone soil moisture (kg/m2) +CanopInt: 1 kg/m2 - 0 0 0 1 223 1000 # Total canopy water storage (kg/m2) +EvapSnow: 0 kg/m2s - 0 0 0 1 173 1000 # Snow evaporation (kg/m2s) +SubSnow: 1 kg/m2s - 0 0 0 1 198 1000 # Snow sublimation (kg/m2s) +SubSurf: 0 kg/m2s - 0 0 0 1 175 1000 # Sublimation of the snow free area (kg/m2s) + +#Cold season processes +Snowcover: 1 - - 0 0 0 1 66 100 # Snow Cover (-) +SnowDepth: 1 m - 0 0 0 1 66 1000 # Snow Depth (m) +SLiqFrac: 0 - - 0 0 0 1 65 1000 # Fraction of SWE in the liquid phase +SnowTProf: 1 K - 0 0 0 3 239 1000 # Temperature of the snow pack (K) + +#Forcings +Wind_f: 1 m/s - 0 0 0 1 177 10 # Near Surface Wind (m/s) +Rainf_f: 1 kg/m2s DN 0 0 0 1 162 1000 # Average rainfall rate +Snowf_f: 0 kg/m2s DN 0 0 0 1 161 1000 # Average snowfall rate +Tair_f: 1 K - 0 0 0 1 11 10 # Near surface air temperature +Qair_f: 1 kg/kg - 0 0 0 1 51 1000 # Near surface specific humidity +Psurf_f: 1 Pa - 0 0 0 1 1 10 # Surface pressure +SWdown_f: 1 W/m2 DN 0 0 0 1 204 10 # Surface incident shortwave radiation +LWdown_f: 1 W/m2 DN 0 0 0 1 205 10 # Surface incident longwave radiation + +#Additional forcings +DirectSW_f: 0 W/m2 - 0 0 0 1 256 10 # Surface direct incident shortwave radiation +DiffuseSW_f: 0 W/m2 - 0 0 0 1 256 10 # Surface diffuse incident shortwave radiation +NWind_f: 0 m/s N 0 0 0 1 256 10 # Northward wind +EWind_f: 0 m/s E 0 0 0 1 256 10 # Eastward wind +FHeight_f: 0 m - 0 0 0 1 256 10 # Height of forcing variables +CH_f: 0 - - 0 0 0 1 256 10 # Surface exchange coefficient for heat +CM_f: 0 - - 0 0 0 1 256 10 # Surface Exchange Coefficient for momentum +Emiss_f: 1 - - 0 0 0 1 256 10 # Surface emissivity +MixRatio_f: 0 kg/kg - 0 0 0 1 256 10 # Surface mixing ration +CosZenith_f: 0 - - 0 0 0 1 256 10 # Cosine of zenith angle +Albedo_f: 0 - - 0 0 0 1 256 10 # Surface albedo + +#Parameters +Landmask: 0 - - 0 0 0 1 81 1 # Land Mask (0 - Water, 1- Land) +Landcover: 1 - - 0 0 0 1 186 1 # Land cover +Soiltype: 0 - - 0 0 0 1 187 1 # Soil type +SandFrac: 0 - - 0 0 0 1 999 1 # Sand fraction +ClayFrac: 0 - - 0 0 0 1 999 1 # Clay fraction +SiltFrac: 0 - - 0 0 0 1 999 1 # Silt fraction +Porosity: 0 - - 0 0 0 1 999 1 # Porosity +Soilcolor: 0 - - 0 0 0 1 188 1 # Soil color +Elevation: 0 m - 0 0 0 1 189 10 # Elevation +Slope: 0 - - 0 0 0 1 999 10 # Slope +LAI: 1 - - 0 0 0 1 190 100 # LAI +SAI: 1 - - 0 0 0 1 191 100 # SAI +Snfralbedo: 0 - - 0 0 0 1 192 100 # Snow fraction albedo +Mxsnalbedo: 0 - - 0 0 0 1 192 100 # Maximum snow albedo +Greenness: 1 - - 0 0 0 1 87 100 # Greenness +Tempbot: 0 - - 0 0 0 1 194 10 # Bottom soil temperature + +#Routing +Streamflow: 0 m3/s - 2 0 0 1 333 10 #Streamflow +RiverStor: 0 m3 - 0 0 0 1 333 10 #RiverStorage +RiverDepth: 0 m - 0 0 0 1 333 10 #RiverDepth +RiverVelocity: 0 m/s - 0 0 0 1 333 10 #RiverVelocity +FloodQ: 0 m3/s - 0 0 0 1 333 10 #FloodDischarge +FloodEvap: 0 m3 - 0 0 0 1 333 10 #FloodEvap +FloodStor: 0 m3 - 0 0 0 1 333 10 #FloodStorage +FloodDepth: 0 m - 0 0 0 1 333 10 #FloodDepth +FloodVelocity: 0 m/s - 0 0 0 1 333 10 #FloodVelocity +FloodedFrac: 0 - - 2 0 0 1 333 10 #FloodedFrac +FloodedArea: 0 m2 - 2 0 0 1 333 10 #FloodedArea +SurfElev: 0 m - 0 0 0 1 333 10 #SurfElev + +#Carbon variables +GPP: 0 kg/m2s2 DN 1 0 0 1 256 1 # Gross Primary Production +NPP: 0 kg/m2s2 DN 1 0 0 1 256 1 # Net Primary Production +NEE: 0 kg/m2s2 UP 1 0 0 1 256 1 # Net Ecosystem Exchange + +#Irrigation +Irrigated water: 0 kg/m2s - 0 0 0 1 333 10 #Irrigation amount + +#Temperature +VegGrndT: 0 K - 0 0 0 1 152 10 #vegetated_ground_surface_temperature +VegCanopT: 1 K - 0 0 0 1 152 10 #canopy_air_temperature +AvgGrndT: 1 K - 0 0 0 1 152 10 #average_ground_surface_temperature +VegT2m: 1 K - 0 0 0 1 152 10 #2-m_air_temperature_over_vegetated_part +BARE2MT: 1 K - 0 0 0 1 152 10 #2-m_air_temperature_over_bareground_part diff --git a/lis/configs/Noah-MPv5.0/forcing_variables.txt b/lis/configs/Noah-MPv5.0/forcing_variables.txt new file mode 100644 index 000000000..ad27ce185 --- /dev/null +++ b/lis/configs/Noah-MPv5.0/forcing_variables.txt @@ -0,0 +1,22 @@ +#ALMA Name select vlevels units +Tair: 1 1 K # Near Surface Air Temperature +Qair: 1 1 kg/kg # Near Surface Specific Humidity +SWdown: 1 1 W/m2 # Incident Shortwave Radiation +SWdirect: 0 1 W/m2 # Incident Shortwave Radiation +SWdiffuse: 0 1 W/m2 # Incident Shortwave Radiation +LWdown: 1 1 W/m2 # Incident Longwave Radiation +Wind_E: 1 1 W/m2 # Eastward Wind +Wind_N: 1 1 m/s # Northward Wind +Psurf: 1 1 Pa # Surface Pressure +Rainf: 1 1 kg/m2s # Rainfall Rate +Snowf: 0 1 kg/m2s # Snowfall Rate +CRainf: 1 1 kg/m2s # Convective Rainfall Rate +Forc_Hgt: 0 1 m # Height of Forcing Variables +Ch: 0 1 - # Surface Exchange Coefficient for Heat +Cm: 0 1 - # Surface Exchange Coefficient for Momentum +Q2sat: 0 1 - # Saturated Mixing Ratio +Emiss: 0 1 - # Surface Emissivity +Cosz: 0 1 - # Cosine of Zenith Angle +Albedo: 0 1 - # Surface Albedo +LPressure: 0 1 Pa # Level pressure +O3: 0 1 - # Ozone concentration diff --git a/lis/configs/lis.config_noahmp5_NLDAS b/lis/configs/Noah-MPv5.0/lis.config_noahmp5_NLDAS2 similarity index 58% rename from lis/configs/lis.config_noahmp5_NLDAS rename to lis/configs/Noah-MPv5.0/lis.config_noahmp5_NLDAS2 index 3d9259f18..6fd1be7de 100644 --- a/lis/configs/lis.config_noahmp5_NLDAS +++ b/lis/configs/Noah-MPv5.0/lis.config_noahmp5_NLDAS2 @@ -3,9 +3,10 @@ Running mode: retrospective Map projection of the LIS domain: latlon Number of nests: 1 Number of surface model types: 1 -Surface model types: LSM +Surface model types: "LSM" "Openwater" Surface model output interval: 1hr Land surface model: "Noah-MP.5.0" +Open water model: "template open water" Number of met forcing sources: 1 Blending method for forcings: overlay Met forcing sources: "NLDAS2" @@ -26,7 +27,7 @@ Output naming style: "3 level hierarchy" Start mode: coldstart #coldstart, restart Starting year: 2013 Starting month: 1 -Starting day: 1 # 30 +Starting day: 1 Starting hour: 0 Starting minute: 0 Starting second: 0 @@ -153,7 +154,7 @@ TBOT lag skin temperature update option: 0 TBOT skin temperature lag days: 0 #--------------------------------FORCINGS---------------------------------- -NLDAS2 forcing directory: ../testLIS_default/input/forc/ +NLDAS2 forcing directory: ./input/forc/ NLDAS2 data center source: "GES-DISC" NLDAS2 domain x-dimension size: 464 NLDAS2 domain y-dimension size: 224 @@ -163,56 +164,58 @@ NLDAS2 use model based precip: 0 NLDAS2 use model based pressure: 0 #-----------------------LAND SURFACE MODELS-------------------------- -NoahMP.5.0 model timestep: 30mn -NoahMP.5.0 soil timestep: 30mn -NoahMP.5.0 restart output interval: 1da -NoahMP.5.0 restart file: none #./OUTPUT/SURFACEMODEL/201001/LIS_RST_NOAHMPnew_201001100000.d01.nc -NoahMP.5.0 restart file format: netcdf -NoahMP.5.0 parameter table: ./input/NoahmpTable.TBL -NoahMP.5.0 number of soil layers: 4 -NoahMP.5.0 thickness of soil layers: 0.1 0.3 0.6 1.0 -NoahMP.5.0 domain resolution dx: 13897.18 # unit of meter (=0.125deg for NLDAS2) -NoahMP.5.0 domain resolution dy: 13897.18 # unit of meter (=0.125deg for NLDAS2) -NoahMP.5.0 dynamic vegetation option: 4 # Up to 9 different options -NoahMP.5.0 canopy stomatal resistance option: 1 # 1=Ball-Berry; 2=Jarvis -NoahMP.5.0 soil moisture factor for stomatal resistance: 1 # 1=Noah; 2=CLM; 3=SSiB -NoahMP.5.0 surface runoff option: 3 # 1=SIMGM; 2=SIMTOP; 3=Schaake96; 4=BATS; 5=Miguez-Macho&Fan; 6=VIC; 7=XinAnJiang; 8=Dynamic VIC -NoahMP.5.0 subsurface runoff and groundwater option: 3 # 1=SIMGM; 2=SIMTOP; 3=Schaake96; 4=BATS; 5=Miguez-Macho&Fan; 6=VIC; 7=XinAnJiang; 8=Dynamic VIC -NoahMP.5.0 dynamic VIC infiltration option: 1 # 1=Philip; 2=Green-Ampt; 3=Smith-Parlange (only works with surface runoff=8) -NoahMP.5.0 surface layer drag coefficient option: 1 # 1=M-O; 2=Chen97 -NoahMP.5.0 supercooled liquid water option: 1 # 1=NY06; 2=Koren99 -NoahMP.5.0 frozen soil permeability option: 1 # 1=NY06; 2=Koren99 -NoahMP.5.0 canopy radiative transfer option: 3 # 1=gap=F(3D;cosz); 2=gap=0; 3=gap=1-Fveg -NoahMP.5.0 snow surface albedo option: 1 # 1=BATS; 2=CLASS -NoahMP.5.0 rain-snow partition option: 1 # 1=Jordan91; 2=BATS; 3=Noah; 4=WRF couple; 5=Wet-Bulb -NoahMP.5.0 snow thermal conductivity option: 1 # 1=Yen1965; 2=Anderson1976; 3=constant; 4=Verseghy1991; 5=Yen1981 -NoahMP.5.0 lower boundary of soil temperature option: 1 # 1=zero-flux; 2=Noah -NoahMP.5.0 snow&soil temperature time scheme option: 1 # 1=semi-implicit; 2=fully implicit; 3=FSNO for TS -NoahMP.5.0 glacier ice option: 1 # 1=include phase change; 2=slab ice (Noah) -NoahMP.5.0 surface resistance option: 1 # 1=Sakaguchi and Zeng 2009; 2=Sellers (1992); 3=adjusted Sellers; 4=option1 for non-snow and rsurf_snow for snow -NoahMP.5.0 soil configuration option: 1 # 1=input dominant soil texture; 2=input soil texture varies that varies with depth; 3=soil composition and pedotransfer; 4=input soil properties -NoahMP.5.0 soil pedotransfer function option: 1 # 1=Saxton and Rawls (2006) (used when soil_opt=3) -NoahMP.5.0 crop model option: 0 # 0=No crop model; 1=Liu et al. 2016; -NoahMP.5.0 irrigation trigger option: 0 # 0=No irrigation; 1=Irrigation ON; 2=Trigger by plant/harvest date; 3=Trigger by LAI -NoahMP.5.0 irrigation method option: 0 # 0=method based on input map; 1=sprinkler; 2=micro/drip; 3=flooding -NoahMP.5.0 tile drainage option: 0 # 0=No tile drainage; 1=Simple drainage; 2=Hooghoudt's scheme -NoahMP.5.0 urban physics option: 0 # 0=No; 1=Single-layer; 2=Multi-layer BEP scheme; 3=Multi-layer BEM scheme -NoahMP.5.0 reference height of temperature and humidity: 10.0 -NoahMP.5.0 initial surface skin temperature: 273.15 -NoahMP.5.0 initial snow water equivalent: 0.0 -NoahMP.5.0 initial snow depth: 0.0 -NoahMP.5.0 initial total canopy surface water: 0.0 -NoahMP.5.0 initial soil temperatures: 280.0 280.0 280.0 280.0 -#NoahMP.5.0 initial soil temperatures: 274.0 274.0 274.0 274.0 #TML: start with low soil temp to permit snow DA -NoahMP.5.0 initial total soil moistures: 0.20 0.20 0.20 0.20 -NoahMP.5.0 initial leaf area index: 0.5 -NoahMP.5.0 initial water table depth: 2.5 -NoahMP.5.0 initial water in the aquifer: 6900.0 -NoahMP.5.0 initial water in aquifer and saturated soil: 6900.0 +Noah-MP.5.0 model timestep: 30mn +Noah-MP.5.0 soil timestep: 30mn +Noah-MP.5.0 restart output interval: 1da +Noah-MP.5.0 restart file: none #./OUTPUT/SURFACEMODEL/201001/LIS_RST_NOAHMPnew_201001100000.d01.nc +Noah-MP.5.0 restart file format: netcdf +Noah-MP.5.0 parameter table: ./input/NoahmpTable.TBL # this file is stored at: noahmp.5.0/phys/noahmp/parameters/NoahmpTable.TBL +Noah-MP.5.0 number of soil layers: 4 +Noah-MP.5.0 thickness of soil layers: 0.1 0.3 0.6 1.0 +Noah-MP.5.0 domain resolution dx: 13897.18 # unit of meter (=0.125deg for NLDAS2) +Noah-MP.5.0 domain resolution dy: 13897.18 # unit of meter (=0.125deg for NLDAS2) +Noah-MP.5.0 dynamic vegetation option: 4 # Up to 9 different options +Noah-MP.5.0 canopy stomatal resistance option: 1 # 1=Ball-Berry; 2=Jarvis +Noah-MP.5.0 soil moisture factor for stomatal resistance: 1 # 1=Noah; 2=CLM; 3=SSiB +Noah-MP.5.0 surface runoff option: 3 # 1=SIMGM; 2=SIMTOP; 3=Schaake96; 4=BATS; 5=Miguez-Macho&Fan; 6=VIC; 7=XinAnJiang; 8=Dynamic VIC +Noah-MP.5.0 subsurface runoff and groundwater option: 3 # 1=SIMGM; 2=SIMTOP; 3=Schaake96; 4=BATS; 5=Miguez-Macho&Fan; 6=VIC; 7=XinAnJiang; 8=Dynamic VIC +Noah-MP.5.0 dynamic VIC infiltration option: 1 # 1=Philip; 2=Green-Ampt; 3=Smith-Parlange (only works with surface runoff=8) +Noah-MP.5.0 surface layer drag coefficient option: 1 # 1=M-O; 2=Chen97 +Noah-MP.5.0 supercooled liquid water option: 1 # 1=NY06; 2=Koren99 +Noah-MP.5.0 frozen soil permeability option: 1 # 1=NY06; 2=Koren99 +Noah-MP.5.0 canopy radiative transfer option: 3 # 1=gap=F(3D;cosz); 2=gap=0; 3=gap=1-Fveg +Noah-MP.5.0 snow surface albedo option: 1 # 1=BATS; 2=CLASS +Noah-MP.5.0 rain-snow partition option: 1 # 1=Jordan91; 2=BATS; 3=Noah; 4=WRF couple; 5=Wet-Bulb +Noah-MP.5.0 snow thermal conductivity option: 1 # 1=Yen1965; 2=Anderson1976; 3=constant; 4=Verseghy1991; 5=Yen1981 +Noah-MP.5.0 lower boundary of soil temperature option: 2 # 1=zero-flux; 2=Noah +Noah-MP.5.0 snow&soil temperature time scheme option: 1 # 1=semi-implicit; 2=fully implicit; 3=FSNO for TS +Noah-MP.5.0 glacier ice option: 1 # 1=include phase change; 2=slab ice (Noah) +Noah-MP.5.0 surface resistance option: 1 # 1=Sakaguchi and Zeng 2009; 2=Sellers (1992); 3=adjusted Sellers; 4=option1 for non-snow and rsurf_snow for snow +Noah-MP.5.0 soil configuration option: 1 # 1=input dominant soil texture; 2=input soil texture varies that varies with depth; 3=soil composition and pedotransfer; 4=input soil properties +Noah-MP.5.0 soil pedotransfer function option: 1 # 1=Saxton and Rawls (2006) (used when soil_opt=3) +Noah-MP.5.0 crop model option: 0 # 0=No crop model; 1=Liu et al. 2016; +Noah-MP.5.0 irrigation trigger option: 0 # 0=No irrigation; 1=Irrigation ON; 2=Trigger by plant/harvest date; 3=Trigger by LAI +Noah-MP.5.0 irrigation method option: 0 # 0=method based on input map; 1=sprinkler; 2=micro/drip; 3=flooding +Noah-MP.5.0 tile drainage option: 0 # 0=No tile drainage; 1=Simple drainage; 2=Hooghoudt's scheme +Noah-MP.5.0 urban physics option: 0 # 0=No; 1=Single-layer; 2=Multi-layer BEP scheme; 3=Multi-layer BEM scheme +Noah-MP.5.0 reference height of temperature and humidity: 10.0 +Noah-MP.5.0 initial surface skin temperature: 273.15 +Noah-MP.5.0 initial snow water equivalent: 0.0 +Noah-MP.5.0 initial snow depth: 0.0 +Noah-MP.5.0 initial total canopy surface water: 0.0 +Noah-MP.5.0 initial soil temperatures: 280.0 280.0 280.0 280.0 +#Noah-MP.5.0 initial soil temperatures: 274.0 274.0 274.0 274.0 #TML: start with low soil temp to permit snow DA +Noah-MP.5.0 initial total soil moistures: 0.20 0.20 0.20 0.20 +Noah-MP.5.0 initial leaf area index: 0.5 +Noah-MP.5.0 initial water table depth: 2.5 +Noah-MP.5.0 initial water in the aquifer: 4900.0 +Noah-MP.5.0 initial water in aquifer and saturated soil: 4900.0 + +Template open water timestep: 30mn #---------------------------MODEL OUTPUT CONFIGURATION----------------------- #Specify the list of ALMA variables that need to be featured in the #LSM model output -Model output attributes file: './MODEL_OUTPUT_LIST_noahmp5_NLDAS.TBL' +Model output attributes file: './MODEL_OUTPUT_LIST_noahmp5.TBL' diff --git a/lis/configs/lis.config_noahmp5_AGRMET_global b/lis/configs/Noah-MPv5.0/lis.config_noahmp5_USAF_global similarity index 83% rename from lis/configs/lis.config_noahmp5_AGRMET_global rename to lis/configs/Noah-MPv5.0/lis.config_noahmp5_USAF_global index 2f61adbff..d1671f8af 100644 --- a/lis/configs/lis.config_noahmp5_AGRMET_global +++ b/lis/configs/Noah-MPv5.0/lis.config_noahmp5_USAF_global @@ -4,7 +4,7 @@ Map projection of the LIS domain: latlon Number of nests: 1 Number of surface model types: 2 Surface model types: "LSM" "Openwater" -Surface model output interval: 1da +Surface model output interval: 3hr Land surface model: "Noah-MP.5.0" Open water model: "template open water" Number of met forcing sources: 1 @@ -24,7 +24,7 @@ Output model restart files: 1 Output data format: netcdf Output naming style: "3 level hierarchy" Enable output statistics: .false. -Start mode: coldstart +Start mode: coldstart #coldstart, restart Starting year: 2023 Starting month: 7 Starting day: 1 @@ -38,8 +38,8 @@ Ending hour: 0 Ending minute: 0 Ending second: 0 Undefined value: -9999 -Output directory: ./global_AGRMET_noahmp5 -Diagnostic output file: ./global_AGRMET_noahmp5/logs/lislog +Output directory: './OUTPUT' +Diagnostic output file: './logfiles/lislog' Number of ensembles per tile: 1 #The following options are used for subgrid tiling based on vegetation @@ -58,7 +58,7 @@ Minimum cutoff percentage (aspect bands): 0.05 #Processor layout #Should match the total number of processors used -Number of processors along x: 256 +Number of processors along x: 560 Number of processors along y: 1 Decompose by processes: .true. Halo size along x: 0 @@ -81,7 +81,7 @@ Data assimilation output processed observations: 0 Data assimilation output innovations: 0 0 0 Data assimilation output ensemble spread: 0 0 0 -Data assimilation observation domain file: ./lis_input.global.noahmp401.merit.nc ./lis_input.global.noahmp401.merit.nc ./lis_input.global.noahmp401.merit.nc +Data assimilation observation domain file: ./lis_input.global.noahmp5.merit.nc ./lis_input.global.noahmp5.merit.nc ./lis_input.global.noahmp5.merit.nc Data assimilation scaling strategy: "none" "CDF matching" "CDF matching" Data assimilation use a trained forward model: 0 0 0 @@ -365,53 +365,53 @@ AGRMET median cloud cover percentage2: 0.60 AGRMET overcast percentage: 0.30 #-----------------------LAND SURFACE MODELS-------------------------- -NoahMP.5.0 model timestep: 15mn -NoahMP.5.0 soil timestep: 15mn -NoahMP.5.0 restart output interval: 1mo -NoahMP.5.0 restart file: none -NoahMP.5.0 restart file format: netcdf -NoahMP.5.0 parameter table: ./NoahmpTable.TBL -NoahMP.5.0 number of soil layers: 4 -NoahMP.5.0 thickness of soil layers: 0.1 0.3 0.6 1.0 -NoahMP.5.0 domain resolution dx: 15634.3275 # unit of meter (=0.1406250deg for AGRMET) -NoahMP.5.0 domain resolution dy: 10422.885 # unit of meter (=0.0937500deg for AGRMET) -NoahMP.5.0 dynamic vegetation option: 4 # 9 options available -NoahMP.5.0 canopy stomatal resistance option: 1 # 1=Ball-Berry; 2=Jarvis -NoahMP.5.0 soil moisture factor for stomatal resistance: 1 # 1=Noah; 2=CLM; 3=SSiB -NoahMP.5.0 surface runoff option: 1 # 1=SIMGM; 2=SIMTOP; 3=Schaake96; 4=BATS; 5=Miguez-Macho&Fan; 6=VIC; 7=XinAnJiang; 8=Dynamic VIC -NoahMP.5.0 subsurface runoff and groundwater option: 1 # 1=SIMGM; 2=SIMTOP; 3=Schaake96; 4=BATS; 5=Miguez-Macho&Fan; 6=VIC; 7=XinAnJiang; 8=Dynamic VIC -NoahMP.5.0 dynamic VIC infiltration option: 1 # 1=Philip; 2=Green-Ampt; 3=Smith-Parlange (only works with surface runoff=8) -NoahMP.5.0 surface layer drag coefficient option: 1 # 1=M-O; 2=Chen97 -NoahMP.5.0 supercooled liquid water option: 1 # 1=NY06; 2=Koren99 -NoahMP.5.0 frozen soil permeability option: 1 # 1=NY06; 2=Koren99 -NoahMP.5.0 canopy radiative transfer option: 3 # 1=gap=F(3D;cosz); 2=gap=0; 3=gap=1-Fveg -NoahMP.5.0 snow surface albedo option: 2 # 1=BATS; 2=CLASS -NoahMP.5.0 rain-snow partition option: 1 # 1=Jordan91; 2=BATS; 3=Noah -NoahMP.5.0 snow thermal conductivity option: 1 # 1=Yen1965; 2=Anderson1976; 3=constant; 4=Verseghy1991; 5=Yen1981 -NoahMP.5.0 lower boundary of soil temperature option: 2 # 1=zero-flux; 2=Noah -NoahMP.5.0 snow&soil temperature time scheme option: 1 # 1=semi-implicit; 2=fully implicit -NoahMP.5.0 glacier ice option: 1 # 1=include phase change; 2=slab ice (Noah) -NoahMP.5.0 surface resistance option: 1 # 1=Sakaguchi and Zeng 2009; 2=Sellers (1992); 3=adjusted Sellers; 4=option1 for non-snow and rsurf_snow for snow -NoahMP.5.0 soil configuration option: 1 # 1=input dominant soil texture; 2=input soil texture varies that varies with depth; 3=soil composition and pedotransfer functions -NoahMP.5.0 soil pedotransfer function option: 1 # 1=Saxton and Rawls (2006) (used when soil_opt=3) -NoahMP.5.0 crop model option: 0 # 0=No crop model; 1=Liu et al. 2016; 2=Gecros -NoahMP.5.0 irrigation trigger option: 0 # 0=No irrigation; 1=Irrigation ON; 2=Trigger by plant/harvest date; 3=Trigger by LAI -NoahMP.5.0 irrigation method option: 0 # 0=method based on input map; 1=sprinkler; 2=micro/drip; 3=flooding -NoahMP.5.0 tile drainage option: 0 # 0=No tile drainage; 1=Simple drainage; 2=Hooghoudt's scheme -NoahMP.5.0 urban physics option: 0 # 0=No; 1=Single-layer; 2=Multi-layer BEP scheme; 3=Multi-layer BEM scheme -NoahMP.5.0 initial surface skin temperature: 288.0 -NoahMP.5.0 initial soil temperatures: 288.0 288.0 288.0 288.0 -NoahMP.5.0 initial total soil moistures: 0.20 0.20 0.20 0.20 -NoahMP.5.0 initial snow water equivalent: 0.0 -NoahMP.5.0 initial snow depth: 0.0 -NoahMP.5.0 initial total canopy surface water: 0.0 -NoahMP.5.0 initial leaf area index: 0.5 -NoahMP.5.0 initial water table depth: 2.5 -NoahMP.5.0 initial water in the aquifer: 4900.0 -NoahMP.5.0 initial water in aquifer and saturated soil: 4900.0 -NoahMP.5.0 reference height of temperature and humidity: 10.0 - -Template open water timestep: 15mn +Noah-MP.5.0 model timestep: 30mn +Noah-MP.5.0 soil timestep: 30mn +Noah-MP.5.0 restart output interval: 1mo +Noah-MP.5.0 restart file: none +Noah-MP.5.0 restart file format: netcdf +Noah-MP.5.0 parameter table: ./NoahmpTable.TBL # this file is stored at: noahmp.5.0/phys/noahmp/parameters/NoahmpTable.TBL +Noah-MP.5.0 number of soil layers: 4 +Noah-MP.5.0 thickness of soil layers: 0.1 0.3 0.6 1.0 +Noah-MP.5.0 domain resolution dx: 15634.3275 # unit of meter (=0.1406250deg for AGRMET) +Noah-MP.5.0 domain resolution dy: 10422.885 # unit of meter (=0.0937500deg for AGRMET) +Noah-MP.5.0 dynamic vegetation option: 4 # 9 options available +Noah-MP.5.0 canopy stomatal resistance option: 1 # 1=Ball-Berry; 2=Jarvis +Noah-MP.5.0 soil moisture factor for stomatal resistance: 1 # 1=Noah; 2=CLM; 3=SSiB +Noah-MP.5.0 surface runoff option: 3 # 1=SIMGM; 2=SIMTOP; 3=Schaake96; 4=BATS; 5=Miguez-Macho&Fan; 6=VIC; 7=XinAnJiang; 8=Dynamic VIC +Noah-MP.5.0 subsurface runoff and groundwater option: 3 # 1=SIMGM; 2=SIMTOP; 3=Schaake96; 4=BATS; 5=Miguez-Macho&Fan; 6=VIC; 7=XinAnJiang; 8=Dynamic VIC +Noah-MP.5.0 dynamic VIC infiltration option: 1 # 1=Philip; 2=Green-Ampt; 3=Smith-Parlange (only works with surface runoff=8) +Noah-MP.5.0 surface layer drag coefficient option: 1 # 1=M-O; 2=Chen97 +Noah-MP.5.0 supercooled liquid water option: 1 # 1=NY06; 2=Koren99 +Noah-MP.5.0 frozen soil permeability option: 1 # 1=NY06; 2=Koren99 +Noah-MP.5.0 canopy radiative transfer option: 3 # 1=gap=F(3D;cosz); 2=gap=0; 3=gap=1-Fveg +Noah-MP.5.0 snow surface albedo option: 1 # 1=BATS; 2=CLASS +Noah-MP.5.0 rain-snow partition option: 1 # 1=Jordan91; 2=BATS; 3=Noah +Noah-MP.5.0 snow thermal conductivity option: 1 # 1=Yen1965; 2=Anderson1976; 3=constant; 4=Verseghy1991; 5=Yen1981 +Noah-MP.5.0 lower boundary of soil temperature option: 2 # 1=zero-flux; 2=Noah +Noah-MP.5.0 snow&soil temperature time scheme option: 1 # 1=semi-implicit; 2=fully implicit +Noah-MP.5.0 glacier ice option: 1 # 1=include phase change; 2=slab ice (Noah) +Noah-MP.5.0 surface resistance option: 1 # 1=Sakaguchi and Zeng 2009; 2=Sellers (1992); 3=adjusted Sellers; 4=option1 for non-snow and rsurf_snow for snow +Noah-MP.5.0 soil configuration option: 1 # 1=input dominant soil texture; 2=input soil texture varies that varies with depth; 3=soil composition and pedotransfer functions +Noah-MP.5.0 soil pedotransfer function option: 1 # 1=Saxton and Rawls (2006) (used when soil_opt=3) +Noah-MP.5.0 crop model option: 0 # 0=No crop model; 1=Liu et al. 2016; 2=Gecros +Noah-MP.5.0 irrigation trigger option: 0 # 0=No irrigation; 1=Irrigation ON; 2=Trigger by plant/harvest date; 3=Trigger by LAI +Noah-MP.5.0 irrigation method option: 0 # 0=method based on input map; 1=sprinkler; 2=micro/drip; 3=flooding +Noah-MP.5.0 tile drainage option: 0 # 0=No tile drainage; 1=Simple drainage; 2=Hooghoudt's scheme +Noah-MP.5.0 urban physics option: 0 # 0=No; 1=Single-layer; 2=Multi-layer BEP scheme; 3=Multi-layer BEM scheme +Noah-MP.5.0 initial surface skin temperature: 288.0 +Noah-MP.5.0 initial soil temperatures: 288.0 288.0 288.0 288.0 +Noah-MP.5.0 initial total soil moistures: 0.20 0.20 0.20 0.20 +Noah-MP.5.0 initial snow water equivalent: 0.0 +Noah-MP.5.0 initial snow depth: 0.0 +Noah-MP.5.0 initial total canopy surface water: 0.0 +Noah-MP.5.0 initial leaf area index: 0.5 +Noah-MP.5.0 initial water table depth: 2.5 +Noah-MP.5.0 initial water in the aquifer: 4900.0 +Noah-MP.5.0 initial water in aquifer and saturated soil: 4900.0 +Noah-MP.5.0 reference height of temperature and humidity: 10.0 + +Template open water timestep: 30mn #---------------------------MODEL OUTPUT CONFIGURATION----------------------- #Specify the list of ALMA variables that need to be featured in the @@ -423,5 +423,5 @@ Output start hour: Output start minutes: Output start seconds: -Model output attributes file: ./lis.config.global/tables/MODEL_OUTPUT_LIST.TBL +Model output attributes file: ./MODEL_OUTPUT_LIST_noahmp5.TBL diff --git a/lis/configs/lis.config.adoc b/lis/configs/lis.config.adoc index 271accd18..211090973 100644 --- a/lis/configs/lis.config.adoc +++ b/lis/configs/lis.config.adoc @@ -166,6 +166,7 @@ Acceptable values are: |Noah.3.9 | Noah version 3.9 |Noah-MP.3.6 | Noah-MP version 3.6 |Noah-MP.4.0.1 | Noah-MP version 4.0.1 +|Noah-MP.5.0 | Noah-MP version 5.0 |RUC.3.7 | RUC version 3.7 |CLM.2 | CLM version 2.0 |VIC.4.1.1 | VIC version 4.1.1 @@ -8386,6 +8387,546 @@ Noah-MP.4.0.1 snow depth glacier model option: 2000 .... +[[sssec_lsm_noahmp50,Noah-MP-5.0]] +==== Noah-MP-5.0 + +`Noah-MP.5.0 model timestep:` specifies the main model (except soil process) +timestep for the Noah-MP.5.0 LSM. + +See Section <> for a description +of how to specify a time interval. + +`Noah-MP.5.0 soil timestep:` specifies the soil process (heat and water) +timestep for the Noah-MP.5.0 LSM. + +See Section <> for a description +of how to specify a time interval. + +`Noah-MP.5.0 restart output interval:` specifies the restart output +interval for the Noah-MP.5.0 LSM. + +See Section <> for a description +of how to specify a time interval. + +`Noah-MP.5.0 restart file:` specifies the Noah-MP.5.0 LSM restart file. + +`Noah-MP.5.0 restart file format:` specifies the Noah-MP.5.0 restart +file format (default = netcdf). + +`Noah-MP.5.0 parameter table:` specifies the filename of the +Noah-MP.5.0 parameter table (all parameters in one new table file) + +`Noah-MP.5.0 number of soil layers:` specifies the number of soil layers +for Noah-MP.5.0 soil moisture/temperature. + +`Noah-MP.5.0 thickness of soil layers:` specifies the thicknesses of the +individual Noah-MP.5.0 LSM layers. The first number is the thickness +of the top soil layer, and the following numbers are the thicknesses of +each soil layer going down. If the number of soil layers and thicknesses +change from the typical 4 layers with thicknesses of 0.1, 0.3, 0.6, and +1.0 meters, users should change the values of NROOT for each vegetation +type to map the number of layers with roots for transpiration in their +own custom MPTABLE.TBL parameter file. + +`Noah-MP.5.0 domain resolution dx:` specifies the length (unit: meter) of +the longitude-direction of spatial resolution. + +`Noah-MP.5.0 domain resolution dy:` specifies the length (unit: meter) of +the latitude-direction of spatial resolution. + +`Noah-MP.5.0 dynamic vegetation option:` specifies the dynamic vegetation +model option for Noah-MP.5.0 LSM. Options generally recommended for use +by the model developers are indicated with [**]. See Sect.3.3 in Noah-MPv5 +technote (He et al. 2023: http://dx.doi.org/10.5065/ew8g-yr95). +Options not yet supported in the LIS implementation are indicated with [NS]. +Acceptable values are: + +|==== +|Value | Note | Description + +| 1 | | off (use table LAI/SAI; use input GVF) +| 2 | | on (dynamic vegetation; GVF is a function of LAI/SAI) +| 3 | | off (use table LAI/SAI; GVF is a function of LAI/SAI) +| 4 | ** | off (use table LAI/SAI; GVF is the maximum value) +| 5 | ** | on (dynamic vegetation; GVF is the maximum value) +| 6 | | on (dynamic vegetation; use input GVF) +| 7 | | off (use input LAI/SAI; use input GVF) +| 8 | | off (use input LAI/SAI; GVF is a function of LAI/SAI) +| 9 | | off (use input LAI/SAI; GVF is the maximum value) +|==== + +When using options 1 through 6, users should set `LAI data source:` to +"`none`". For options 1, 3, or 4, the LAI value will be read from the +`Noah-MP.5.0 MP parameter table:` file (typically, "`NoahmpTable.TBL`") +based on the vegetation class of the tile and the current month. For +options 2, 5, or 6, the LAI is a prognostic variable as a function of +the LeafMass calculated from the dynamic vegetation scheme. When using +options 7 through 9, users should set `LAI data source:` to "`LDT`", +after running LDT to include an LAI dataset as one of the parameters +in the `LIS domain and parameter data file:`. + +When using options 1 through 6, users should set `SAI data source:` to +"`none`". For options 1, 3, or 4, the SAI value will be read from the +`Noah-MP.5.0 MP parameter table:` file (typically, "`NoahmpTable.TBL`") +based on the vegetation class of the tile and the current month. For +options 2, 5, or 6, the SAI is a prognostic variable as a function of +the StemMass calculated from the dynamic vegetation scheme. When using +options 7 through 9, users can set `SAI data source:` to "`LDT`", after +running LDT to include an SAI dataset as one of the parameters in the +`LIS domain and parameter data file:`. Alternatively, for these options +(7, 8, or 9), users can choose to not use an input SAI dataset by setting +`SAI data source:` to "`none`", in which case the SAI value will be set +from the `Noah-MP.5.0 parameter table:` file. + +When using options 1, 4, 5, 6, 7, or 9, users should set `Greenness data +source:` to "`LDT`", after running LDT to include a greenness dataset as +one of the parameters in the `LIS domain and parameter data file:`. The +greenness parameter variable name can be referred to as GVF (greenness +vegetation fraction), FVEG, or SHDFAC in the Noah-MP.5.0 physics code. +When using options 1, 6, or 7, the greenness value is set to the monthly +climatology value for each tile (unless "`CONSTANT`" was chosen when LDT +was run for the `Greenness data source:`). When using options 4, 5, or 9, +the greenness value for each tile is set to the maximum value of all months +from the monthly climatology at that tile. When using options 2, 3, or 8, +the greenness is a function of LAI and SAI at each tile for each timestep. + +Note that when using dynamic vegetation option 2, 5, or 6, the Ball-Berry +canopy stomatal resistance option must be selected for the following config. + +`Noah-MP.5.0 canopy stomatal resistance option:` specifies the canopy +stomatal resistance option for Noah-MP.5.0 LSM. See Sect.3.6.11 in Noah-MPv5 +technote (He et al. 2023: http://dx.doi.org/10.5065/ew8g-yr95). Options generally +recommended for use by the model developers are indicated with [**]. +Acceptable values are: + +|==== +|Value | Note | Description + +| 1 | ** | Ball-Berry +| 2 | | Jarvis +|==== + +`Noah-MP.5.0 soil moisture factor for stomatal resistance:` +specifies the soil moisture factor for stomatal resistance option +for Noah-MP.5.0 LSM. See Sect.3.6.8 in Noah-MPv5 +technote (He et al. 2023: http://dx.doi.org/10.5065/ew8g-yr95). +Options generally recommended for use by the +model developers are indicated with [**]. Acceptable values are: + +|==== +|Value | Note | Description + +| 1 | ** | Noah (soil moisture) +| 2 | | CLM (matric potential) +| 3 | | SSiB (matric potential) +|==== + +`Noah-MP.5.0 surface runoff option:` specifies the surface runoff +option for Noah-MP.5.0 LSM. See Sect.3.7.8 in Noah-MPv5 +technote (He et al. 2023: http://dx.doi.org/10.5065/ew8g-yr95). + Options generally recommended +for use by the model developers are indicated with [**]. Options not yet +supported in the LIS implementation are indicated with [NS]. Acceptable +values are: + +|==== +|Value | Note | Description + +| 1 | | SIMGM: TOPMODEL with groundwater (Niu et al. 2007 JGR) +| 2 | | SIMTOP: TOPMODEL with an equilibrium water table (Niu et al. 2005 JGR) +| 3 | ** | Noah original surface and subsurface runoff (free drainage) (Schaake 1996) +| 4 | | BATS surface and subsurface runoff (free drainage) +| 5 | NS | Miguez-Macho&Fan groundwater scheme (Miguez-Macho et al. 2007 JGR; Fan et al. 2007 JGR) +| 6 | | Variable Infiltration Capacity (VIC) Model surface runoff scheme (Wood et al., 1992, JGR) +| 7 | | Xinanjiang Infiltration and surface runoff scheme (Jayawardena and Zhou, 2000) +| 8 | | Dynamic Variable Infiltration Capacity (VIC) surface runoff scheme (Liang and Xie, 2001) +|==== + +`Noah-MP.5.0 subsurface runoff and groundwater option:` specifies the subsurface runoff +and groundwater option for Noah-MP.5.0 LSM. Currently only the same surface and subsurface +runoff options are well tested and recommended. See Sect.3.7.8 in Noah-MPv5 +technote (He et al. 2023: http://dx.doi.org/10.5065/ew8g-yr95). Options generally recommended +for use by the model developers are indicated with [**]. Options not yet +supported in the LIS implementation are indicated with [NS]. Acceptable +values are: + +|==== +|Value | Note | Description + +| 1 | | SIMGM: TOPMODEL with groundwater (Niu et al. 2007 JGR) +| 2 | | SIMTOP: TOPMODEL with an equilibrium water table (Niu et al. 2005 JGR) +| 3 | ** | Noah original surface and subsurface runoff (free drainage) (Schaake 1996) +| 4 | | BATS surface and subsurface runoff (free drainage) +| 5 | NS | Miguez-Macho&Fan groundwater scheme (Miguez-Macho et al. 2007 JGR; Fan et al. 2007 JGR) +| 6 | | Variable Infiltration Capacity (VIC) Model surface runoff scheme (Wood et al., 1992, JGR) +| 7 | | Xinanjiang Infiltration and surface runoff scheme (Jayawardena and Zhou, 2000) +| 8 | | Dynamic Variable Infiltration Capacity (VIC) surface runoff scheme (Liang and Xie, 2001) +|==== + +`Noah-MP.5.0 dynamic VIC infiltration option:` specifies the dynamic +Variable Infiltration Capacity (VIC) infiltration option for Noah-MP.5.0 LSM. +Currently only works when surface and subsurface runoff option=8. See Sect.3.7.8 in Noah-MPv5 +technote (He et al. 2023: http://dx.doi.org/10.5065/ew8g-yr95). +Options generally recommended for use by the model developers are indicated with [**]. +Acceptable values are: + +|==== +|Value | Note | Description + +| 1 | ** | Philip scheme +| 2 | | Green-Ampt scheme +| 3 | | Smith-Parlange scheme +|==== + +`Noah-MP.5.0 surface layer drag coefficient option:` specifies the +surface layer drag coefficient option for Noah-MP.5.0 LSM. See Sect.3.6.13 in Noah-MPv5 +technote (He et al. 2023: http://dx.doi.org/10.5065/ew8g-yr95). Options +generally recommended for use by the model developers are indicated +with [**]. Acceptable values are: + +|==== +|Value | Note | Description + +| 1 | ** | Monin-Obukhov +| 2 | | original Noah (Chen 1997) +|==== + +`Noah-MP.5.0 supercooled liquid water option:` specifies the supercooled +liquid water option for Noah-MP.5.0 LSM. See Sect.3.6.19 in Noah-MPv5 +technote (He et al. 2023: http://dx.doi.org/10.5065/ew8g-yr95). +Options generally recommended for use by the model developers are +indicated with [**]. Acceptable values are: + +|==== +|Value | Note | Description + +| 1 | ** | no iteration (Niu and Yang, 2006 JHM) +| 2 | | Koren`'s iteration (1999) +|==== + +`Noah-MP.5.0 frozen soil permeability option:` specifies the frozen soil +permeability option for Noah-MP.5.0 LSM. See Sect.3.7.4 in Noah-MPv5 +technote (He et al. 2023: http://dx.doi.org/10.5065/ew8g-yr95). Options generally recommended +for use by the model developers are indicated with [**]. Acceptable values +are: + +|==== +|Value | Note | Description + +| 1 | ** | linear effects, more permeable (Niu and Yang, 2006, JHM) +| 2 | | nonlinear effects, less permeable (Koren 1999) +|==== + +`Noah-MP.5.0 canopy radiation transfer option:` specifies the canopy radiation +transfer option for Noah-MP.5.0 LSM. See 3.6.5 in Noah-MPv5 +technote (He et al. 2023: http://dx.doi.org/10.5065/ew8g-yr95). Options generally recommended +for use by the model developers are indicated with [**]. Acceptable +values are: + +|==== +|Value | Note | Description + +| 1 | | modified two-stream (gap = F(solar angle, 3D structure ...)<1-FVEG) +| 2 | | two-stream applied to grid-cell (gap = 0) +| 3 | ** | two-stream applied to vegetated fraction (gap=1-FVEG) +|==== + +`Noah-MP.5.0 snow surface albedo option:` specifies the snow surface +albedo option for Noah-MP.5.0 LSM. See Sect.3.6.5 in Noah-MPv5 +technote (He et al. 2023: http://dx.doi.org/10.5065/ew8g-yr95). Options generally recommended +for use by the model developers are indicated with [**]. Acceptable +values are: + +|==== +|Value | Note | Description + +| 1 | ** | BATS +| 2 | | CLASS +|==== + +`Noah-MP.5.0 rainfall & snowfall option:` specifies the option for +partitioning precipitation into rainfall and snowfall for Noah-MP.5.0 +LSM. See Sect.3.1 in Noah-MPv5 technote (He et al. 2023: http://dx.doi.org/10.5065/ew8g-yr95). + Options generally recommended for use by the model developers are +indicated with [**]. Options not yet supported in the LIS implementation +are indicated with [NS]. Acceptable values are: + +|==== +|Value | Note | Description + +| 1 | ** | Jordan (1991) +| 2 | | BATS: when SFCTMPBall-Berry; 2->Jarvis) call ESMF_ConfigFindLabel(LIS_config, & - "NoahMP.5.0 canopy stomatal resistance option:", rc = rc) + "Noah-MP.5.0 canopy stomatal resistance option:", rc = rc) do n=1, LIS_rc%nnest call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%crs_opt, rc=rc) call LIS_verify(rc, & - "NoahMP.5.0 canopy stomatal resistance option: not defined") + "Noah-MP.5.0 canopy stomatal resistance option: not defined") write(LIS_logunit,33) "canopy stomatal resistance:", & Noahmp50_struc(n)%crs_opt enddo ! soil moisture factor for stomatal resistance(1->Noah;2->CLM;3->SSiB) call ESMF_ConfigFindLabel(LIS_config, & - "NoahMP.5.0 soil moisture factor for stomatal resistance:", rc = rc) + "Noah-MP.5.0 soil moisture factor for stomatal resistance:", rc = rc) do n=1, LIS_rc%nnest call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%btr_opt, rc=rc) call LIS_verify(rc, & - "NoahMP.5.0 soil moisture factor for stomatal resistance:"//& + "Noah-MP.5.0 soil moisture factor for stomatal resistance:"//& " not defined") write(LIS_logunit,33) "soil moisture factor for stomatal "//& "resistance:",Noahmp50_struc(n)%btr_opt @@ -226,44 +226,44 @@ subroutine NoahMP50_readcrd() ! surface runoff (1->SIMGM; 2->SIMTOP; 3->Schaake96; 4->BATS; 5->MMF; 6->VIC; 7->XAJ; 8->DynVIC) call ESMF_ConfigFindLabel(LIS_config, & - "NoahMP.5.0 surface runoff option:", rc = rc) + "Noah-MP.5.0 surface runoff option:", rc = rc) do n=1, LIS_rc%nnest call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%runsfc_opt, rc=rc) call LIS_verify(rc, & - "NoahMP.5.0 surface runoff option: not defined") + "Noah-MP.5.0 surface runoff option: not defined") write(LIS_logunit,33) "surface runoff:", & Noahmp50_struc(n)%runsfc_opt enddo ! subsurface runoff and groundwater (1->SIMGM; 2->SIMTOP; 3->Schaake96; 4->BATS; 5->MMF; 6->VIC; 7->XAJ; 8->DynVIC) call ESMF_ConfigFindLabel(LIS_config, & - "NoahMP.5.0 subsurface runoff and groundwater option:", rc = rc) + "Noah-MP.5.0 subsurface runoff and groundwater option:", rc = rc) do n=1, LIS_rc%nnest call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%runsub_opt, rc=rc) call LIS_verify(rc, & - "NoahMP.5.0 subsurface runoff and groundwater option: not defined") + "Noah-MP.5.0 subsurface runoff and groundwater option: not defined") write(LIS_logunit,33) "subsurface runoff and groundwater:", & Noahmp50_struc(n)%runsub_opt enddo ! infiltration options for dynamic VIC (1->Philip; 2-> Green-Ampt;3->Smith-Parlange) call ESMF_ConfigFindLabel(LIS_config, & - "NoahMP.5.0 dynamic VIC infiltration option:", rc = rc) + "Noah-MP.5.0 dynamic VIC infiltration option:", rc = rc) do n=1, LIS_rc%nnest call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%infdv_opt, rc=rc) call LIS_verify(rc, & - "NoahMP.5.0 dynamic VIC infiltration option: not defined") + "Noah-MP.5.0 dynamic VIC infiltration option: not defined") write(LIS_logunit,33) "dynamic VIC infiltration:", & Noahmp50_struc(n)%infdv_opt enddo ! surface layer drag coeff (CH & CM) (1->M-O; 2->Chen97) call ESMF_ConfigFindLabel(LIS_config, & - "NoahMP.5.0 surface layer drag coefficient option:", rc = rc) + "Noah-MP.5.0 surface layer drag coefficient option:", rc = rc) do n=1, LIS_rc%nnest call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%sfc_opt, rc=rc) call LIS_verify(rc, & - "NoahMP.5.0 surface layer drag coefficient option:"//& + "Noah-MP.5.0 surface layer drag coefficient option:"//& " not defined") write(LIS_logunit,33) "surface layer drag coefficient:", & Noahmp50_struc(n)%sfc_opt @@ -271,66 +271,66 @@ subroutine NoahMP50_readcrd() ! supercooled liquid water (1->NY06; 2->Koren99) call ESMF_ConfigFindLabel(LIS_config, & - "NoahMP.5.0 supercooled liquid water option:", rc = rc) + "Noah-MP.5.0 supercooled liquid water option:", rc = rc) do n=1, LIS_rc%nnest call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%frz_opt, rc=rc) call LIS_verify(rc, & - "NoahMP.5.0 supercooled liquid water option: not defined") + "Noah-MP.5.0 supercooled liquid water option: not defined") write(LIS_logunit,33) "supercooled liquid water:", & Noahmp50_struc(n)%frz_opt enddo ! frozen soil permeability (1->NY06; 2->Koren99) call ESMF_ConfigFindLabel(LIS_config, & - "NoahMP.5.0 frozen soil permeability option:", rc = rc) + "Noah-MP.5.0 frozen soil permeability option:", rc = rc) do n=1, LIS_rc%nnest call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%inf_opt, rc=rc) call LIS_verify(rc, & - "NoahMP.5.0 frozen soil permeability option: not defined") + "Noah-MP.5.0 frozen soil permeability option: not defined") write(LIS_logunit,33) "frozen soil permeability:", & Noahmp50_struc(n)%inf_opt enddo ! radiation transfer (1->gap=F(3D,cosz); 2->gap=0; 3->gap=1-Fveg) call ESMF_ConfigFindLabel(LIS_config, & - "NoahMP.5.0 canopy radiative transfer option:", rc = rc) + "Noah-MP.5.0 canopy radiative transfer option:", rc = rc) do n=1, LIS_rc%nnest call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%rad_opt, rc=rc) call LIS_verify(rc, & - "NoahMP.5.0 canopy radiative transfer option: not defined") + "Noah-MP.5.0 canopy radiative transfer option: not defined") write(LIS_logunit,33) "canopy radiative transfer:", & Noahmp50_struc(n)%rad_opt enddo ! snow surface albedo (1->BATS; 2->CLASS) call ESMF_ConfigFindLabel(LIS_config, & - "NoahMP.5.0 snow surface albedo option:", rc = rc) + "Noah-MP.5.0 snow surface albedo option:", rc = rc) do n=1, LIS_rc%nnest call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%alb_opt, rc=rc) call LIS_verify(rc, & - "NoahMP.5.0 snow surface albedo option: not defined") + "Noah-MP.5.0 snow surface albedo option: not defined") write(LIS_logunit,33) "snow surface albedo:", & Noahmp50_struc(n)%alb_opt enddo ! rainfall & snowfall (1->Jordan91; 2->BATS; 3->Noah; 4->WRF; 5->Wet-bulb) call ESMF_ConfigFindLabel(LIS_config, & - "NoahMP.5.0 rain-snow partition option:", rc = rc) + "Noah-MP.5.0 rain-snow partition option:", rc = rc) do n=1, LIS_rc%nnest call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%snf_opt, rc=rc) call LIS_verify(rc, & - "NoahMP.5.0 rain-snow partition option: not defined") + "Noah-MP.5.0 rain-snow partition option: not defined") write(LIS_logunit,33) "rain-snow partition:", & Noahmp50_struc(n)%snf_opt enddo ! lower boundary of soil temperature call ESMF_ConfigFindLabel(LIS_config, & - "NoahMP.5.0 lower boundary of soil temperature option:", rc = rc) + "Noah-MP.5.0 lower boundary of soil temperature option:", rc = rc) do n=1, LIS_rc%nnest call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%tbot_opt, rc=rc) call LIS_verify(rc, & - "NoahMP.5.0 lower boundary of soil temperature option:"//& + "Noah-MP.5.0 lower boundary of soil temperature option:"//& " not defined") write(LIS_logunit,33) "lower boundary of soil temperature:", & Noahmp50_struc(n)%tbot_opt @@ -338,11 +338,11 @@ subroutine NoahMP50_readcrd() ! snow/soil temperature time scheme call ESMF_ConfigFindLabel(LIS_config, & - "NoahMP.5.0 snow&soil temperature time scheme option:", rc = rc) + "Noah-MP.5.0 snow&soil temperature time scheme option:", rc = rc) do n=1, LIS_rc%nnest call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%stc_opt, rc=rc) call LIS_verify(rc, & - "NoahMP.5.0 snow&soil temperature time scheme option:"//& + "Noah-MP.5.0 snow&soil temperature time scheme option:"//& " not defined") write(LIS_logunit,33) "snow&soil temperature time scheme:", & Noahmp50_struc(n)%stc_opt @@ -350,18 +350,18 @@ subroutine NoahMP50_readcrd() ! glacier option (1->phase change; 2->simple) call ESMF_ConfigFindLabel(LIS_config, & - "NoahMP.5.0 glacier ice option:", rc = rc) + "Noah-MP.5.0 glacier ice option:", rc = rc) do n=1, LIS_rc%nnest call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%gla_opt, rc=rc) call LIS_verify(rc, & - "NoahMP.5.0 glacier ice option: not defined") + "Noah-MP.5.0 glacier ice option: not defined") write(LIS_logunit,33) "glacier ice:",Noahmp50_struc(n)%gla_opt enddo ! Custom snowpack depth for glacier model (in mm) !=== Now this parameter is set in the NoahmpTable.TBL ("SWEMAXGLA", default=5000mm) !call ESMF_ConfigFindLabel(LIS_config, & - ! "NoahMP.5.0 snow depth glacier model option:", rc = rc) + ! "Noah-MP.5.0 snow depth glacier model option:", rc = rc) !if(rc /= 0) then ! write(LIS_logunit,33) "[WARN] Max snow depth not defined." ! write(LIS_logunit,33) "[WARN] Setting to default value of 5000." @@ -378,96 +378,96 @@ subroutine NoahMP50_readcrd() ! surface resistance (1->Sakaguchi/Zeng;2->Seller;3->mod Sellers;4->1+snow) call ESMF_ConfigFindLabel(LIS_config, & - "NoahMP.5.0 surface resistance option:", rc = rc) + "Noah-MP.5.0 surface resistance option:", rc = rc) do n=1, LIS_rc%nnest call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%rsf_opt, rc=rc) call LIS_verify(rc, & - "NoahMP.5.0 surface resistance option: not defined") + "Noah-MP.5.0 surface resistance option: not defined") write(LIS_logunit,33) "surface resistance:", & Noahmp50_struc(n)%rsf_opt enddo ! soil configuration option call ESMF_ConfigFindLabel(LIS_config, & - "NoahMP.5.0 soil configuration option:", rc = rc) + "Noah-MP.5.0 soil configuration option:", rc = rc) do n=1, LIS_rc%nnest call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%soil_opt, rc=rc) call LIS_verify(rc, & - "NoahMP.5.0 soil configuration option: not defined") + "Noah-MP.5.0 soil configuration option: not defined") write(LIS_logunit,33) "soil configuration:", & Noahmp50_struc(n)%soil_opt enddo ! soil pedotransfer function option call ESMF_ConfigFindLabel(LIS_config, & - "NoahMP.5.0 soil pedotransfer function option:", rc = rc) + "Noah-MP.5.0 soil pedotransfer function option:", rc = rc) do n=1, LIS_rc%nnest call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%pedo_opt, rc=rc) call LIS_verify(rc, & - "NoahMP.5.0 soil pedotransfer function option: not defined") + "Noah-MP.5.0 soil pedotransfer function option: not defined") write(LIS_logunit,33) "soil pedotransfer function:", & Noahmp50_struc(n)%pedo_opt enddo ! crop model option (0->none; 1->Liu2016) call ESMF_ConfigFindLabel(LIS_config, & - "NoahMP.5.0 crop model option:", rc = rc) + "Noah-MP.5.0 crop model option:", rc = rc) do n=1, LIS_rc%nnest call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%crop_opt, rc=rc) call LIS_verify(rc, & - "NoahMP.5.0 crop model option: not defined") + "Noah-MP.5.0 crop model option: not defined") write(LIS_logunit,33) "crop model:", & Noahmp50_struc(n)%crop_opt enddo ! urban physics option call ESMF_ConfigFindLabel(LIS_config, & - "NoahMP.5.0 urban physics option:", rc = rc) + "Noah-MP.5.0 urban physics option:", rc = rc) do n=1, LIS_rc%nnest call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%urban_opt, rc=rc) call LIS_verify(rc, & - "NoahMP.5.0 urban physics option: not defined") + "Noah-MP.5.0 urban physics option: not defined") write(LIS_logunit,33) "urban physics:", & Noahmp50_struc(n)%urban_opt enddo ! snow thermal conductivity option (1->Yen1965; 2->Anderson1976; 3->Constant; 4->Verseghy1991; 5->Yen1981) call ESMF_ConfigFindLabel(LIS_config, & - "NoahMP.5.0 snow thermal conductivity option:", rc = rc) + "Noah-MP.5.0 snow thermal conductivity option:", rc = rc) do n=1, LIS_rc%nnest call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%tksno_opt, rc=rc) call LIS_verify(rc, & - "NoahMP.5.0 snow thermal conductivity option: not defined") + "Noah-MP.5.0 snow thermal conductivity option: not defined") write(LIS_logunit,33) "snow thermal conductivity:",Noahmp50_struc(n)%tksno_opt enddo ! irrigation option (0->none; 1->always on; 2->trigger by planting/harvest dates; 3->trigger by LAI) call ESMF_ConfigFindLabel(LIS_config, & - "NoahMP.5.0 irrigation trigger option:", rc = rc) + "Noah-MP.5.0 irrigation trigger option:", rc = rc) do n=1, LIS_rc%nnest call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%irr_opt, rc=rc) call LIS_verify(rc, & - "NoahMP.5.0 irrigation trigger option: not defined") + "Noah-MP.5.0 irrigation trigger option: not defined") write(LIS_logunit,33) "irrigation trigger:",Noahmp50_struc(n)%irr_opt enddo ! irrigation method option (0->fraction from input; 1->sprinkler; 2->micro/drip; 3->flood) call ESMF_ConfigFindLabel(LIS_config, & - "NoahMP.5.0 irrigation method option:", rc = rc) + "Noah-MP.5.0 irrigation method option:", rc = rc) do n=1, LIS_rc%nnest call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%irrm_opt, rc=rc) call LIS_verify(rc, & - "NoahMP.5.0 irrigation method option: not defined") + "Noah-MP.5.0 irrigation method option: not defined") write(LIS_logunit,33) "irrigation method:",Noahmp50_struc(n)%irrm_opt enddo ! tile drainage option (0->none; 1->simple drainage; 2->Hooghoudt's scheme) call ESMF_ConfigFindLabel(LIS_config, & - "NoahMP.5.0 tile drainage option:", rc = rc) + "Noah-MP.5.0 tile drainage option:", rc = rc) do n=1, LIS_rc%nnest call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%tdrn_opt, rc=rc) call LIS_verify(rc, & - "NoahMP.5.0 tile drainage option: not defined") + "Noah-MP.5.0 tile drainage option: not defined") write(LIS_logunit,33) "tile drainage:",Noahmp50_struc(n)%tdrn_opt enddo @@ -507,124 +507,124 @@ subroutine NoahMP50_readcrd() ! restart run, read restart file if (trim(LIS_rc%startcode) == "restart") then Call ESMF_ConfigFindLabel(LIS_config, & - "NoahMP.5.0 restart file:", rc=rc) + "Noah-MP.5.0 restart file:", rc=rc) do n=1,LIS_rc%nnest call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%rfile, rc=rc) call LIS_verify(rc, & - "NoahMP.5.0 restart file: not defined") + "Noah-MP.5.0 restart file: not defined") enddo Call ESMF_ConfigFindLabel(LIS_config, & - "NoahMP.5.0 restart file format:", rc=rc) + "Noah-MP.5.0 restart file format:", rc=rc) do n=1,LIS_rc%nnest call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%rformat, rc=rc) call LIS_verify(rc, & - "NoahMP.5.0 restart file format: not defined") + "Noah-MP.5.0 restart file format: not defined") enddo ! coldstart run, read initial state variables else ! skin temperature call ESMF_ConfigFindLabel(LIS_config, & - "NoahMP.5.0 initial surface skin temperature:", rc = rc) + "Noah-MP.5.0 initial surface skin temperature:", rc = rc) do n=1, LIS_rc%nnest call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%init_tskin, rc=rc) call LIS_verify(rc, & - "NoahMP.5.0 initial surface skin temperature:"//& + "Noah-MP.5.0 initial surface skin temperature:"//& " not defined") enddo ! snow water equivalent call ESMF_ConfigFindLabel(LIS_config, & - "NoahMP.5.0 initial snow water equivalent:", rc = rc) + "Noah-MP.5.0 initial snow water equivalent:", rc = rc) do n=1,LIS_rc%nnest call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%init_sneqv, rc=rc) call LIS_verify(rc, & - "NoahMP.5.0 initial snow water equivalent:"//& + "Noah-MP.5.0 initial snow water equivalent:"//& " not defined") enddo ! physical snow depth call ESMF_ConfigFindLabel(LIS_config, & - "NoahMP.5.0 initial snow depth:", rc = rc) + "Noah-MP.5.0 initial snow depth:", rc = rc) do n=1,LIS_rc%nnest call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%init_snowh, rc=rc) call LIS_verify(rc, & - "NoahMP.5.0 initial snow depth:"//& + "Noah-MP.5.0 initial snow depth:"//& " not defined") enddo ! total canopy water + ice call ESMF_ConfigFindLabel(LIS_config, & - "NoahMP.5.0 initial total canopy surface water:", rc = rc) + "Noah-MP.5.0 initial total canopy surface water:", rc = rc) do n=1,LIS_rc%nnest call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%init_canwat, rc=rc) call LIS_verify(rc, & - "NoahMP.5.0 initial total canopy surface water:"//& + "Noah-MP.5.0 initial total canopy surface water:"//& " not defined") enddo ! soil temperature call ESMF_ConfigFindLabel(LIS_config, & - "NoahMP.5.0 initial soil temperatures:", rc = rc) + "Noah-MP.5.0 initial soil temperatures:", rc = rc) do n=1,LIS_rc%nnest do i=1, Noahmp50_struc(n)%nsoil call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%init_tslb(i), rc=rc) end do call LIS_verify(rc, & - "NoahMP.5.0 initial soil temperatures:"//& + "Noah-MP.5.0 initial soil temperatures:"//& " not defined") enddo ! volumetric soil moisture call ESMF_ConfigFindLabel(LIS_config, & - "NoahMP.5.0 initial total soil moistures:", rc = rc) + "Noah-MP.5.0 initial total soil moistures:", rc = rc) do n=1,LIS_rc%nnest do i=1, Noahmp50_struc(n)%nsoil call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%init_smc(i), rc=rc) end do call LIS_verify(rc, & - "NoahMP.5.0 initial total soil moistures:"//& + "Noah-MP.5.0 initial total soil moistures:"//& " not defined") enddo ! water table depth call ESMF_ConfigFindLabel(LIS_config, & - "NoahMP.5.0 initial water table depth:", rc = rc) + "Noah-MP.5.0 initial water table depth:", rc = rc) do n=1,LIS_rc%nnest call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%init_zwt, rc=rc) call LIS_verify(rc, & - "NoahMP.5.0 initial water table depth:"//& + "Noah-MP.5.0 initial water table depth:"//& " not defined") enddo ! water in the "aquifer" call ESMF_ConfigFindLabel(LIS_config, & - "NoahMP.5.0 initial water in the aquifer:", rc = rc) + "Noah-MP.5.0 initial water in the aquifer:", rc = rc) do n=1,LIS_rc%nnest call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%init_wa, rc=rc) call LIS_verify(rc, & - "NoahMP.5.0 initial water in the aquifer:"//& + "Noah-MP.5.0 initial water in the aquifer:"//& " not defined") enddo ! water in aquifer and saturated soil call ESMF_ConfigFindLabel(LIS_config, & - "NoahMP.5.0 initial water in aquifer and saturated soil:", rc = rc) + "Noah-MP.5.0 initial water in aquifer and saturated soil:", rc = rc) do n=1,LIS_rc%nnest call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%init_wt, rc=rc) call LIS_verify(rc, & - "NoahMP.5.0 initial water in aquifer and saturated soil:"//& + "Noah-MP.5.0 initial water in aquifer and saturated soil:"//& " not defined") enddo ! leaf area index call ESMF_ConfigFindLabel(LIS_config, & - "NoahMP.5.0 initial leaf area index:", rc = rc) + "Noah-MP.5.0 initial leaf area index:", rc = rc) do n=1,LIS_rc%nnest call ESMF_ConfigGetAttribute(LIS_config, Noahmp50_struc(n)%init_lai, rc=rc) call LIS_verify(rc, & - "NoahMP.5.0 initial leaf area index:"//& + "Noah-MP.5.0 initial leaf area index:"//& " not defined") enddo @@ -635,6 +635,6 @@ subroutine NoahMP50_readcrd() 33 format(a47,i4) write(LIS_logunit, *) & - "[INFO] Finish reading LIS configuration file for NoahMP.5.0" + "[INFO] Finish reading LIS configuration file for Noah-MP.5.0" end subroutine NoahMP50_readcrd diff --git a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_readrst.F90 b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_readrst.F90 index fad0681f0..bcc48af5a 100644 --- a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_readrst.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_readrst.F90 @@ -161,14 +161,14 @@ subroutine NoahMP50_readrst() ! check the existance of restart file inquire(file=NoahMP50_struc(n)%rfile, exist=file_exists) If (.not. file_exists) then - write(LIS_logunit,*) "[ERR] NoahMP50 restart file: ", & + write(LIS_logunit,*) "[ERR] Noah-MP.5.0 restart file: ", & trim(NoahMP50_struc(n)%rfile) write(LIS_logunit,*) "[ERR] does not exist." write(LIS_logunit,*) "[ERR] Program stopping ..." call LIS_endrun endif write(LIS_logunit,*) & - "[INFO] NoahMP.5.0 restart file used: ",trim(NoahMP50_struc(n)%rfile) + "[INFO] Noah-MP.5.0 restart file used: ",trim(NoahMP50_struc(n)%rfile) ! open restart file if(wformat .eq. "binary") then diff --git a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_reset.F90 b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_reset.F90 index a2800b581..f701ecd26 100644 --- a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_reset.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_reset.F90 @@ -38,7 +38,7 @@ subroutine NoahMP50_reset() do n=1,LIS_rc%nnest - write(LIS_logunit,*) "NoahMP.5.0 resetting" + write(LIS_logunit,*) "Noah-MP.5.0 resetting" ! initialize forcing variables to zeros do t=1, LIS_rc%npatch(n, LIS_rc%lsm_index) diff --git a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_setup.F90 b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_setup.F90 index 2ba0ba4d3..106a5be9a 100644 --- a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_setup.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_setup.F90 @@ -81,14 +81,14 @@ subroutine NoahMP50_setup() !TODO: convert vegetation data source into vegetation types if(LIS_rc%uselcmap(n) .ne. 'none') then write(LIS_logunit,*) & - "[INFO] NoahMP.5.0 retrieve parameter VEGETYPE from LIS" + "[INFO] Noah-MP.5.0 retrieve parameter VEGETYPE from LIS" do t=1, LIS_rc%npatch(n, mtype) NoahMP50_struc(n)%noahmp50(t)%vegetype= LIS_surface(n, mtype)%tile(t)%vegt enddo else ! read: vegetype write(LIS_logunit,*) & - "[INFO] NoahMP.5.0 reading parameter VEGETYPE from ", & + "[INFO] Noah-MP.5.0 reading parameter VEGETYPE from ", & trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_vegetype), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -101,14 +101,14 @@ subroutine NoahMP50_setup() !TODO: convert soil texture into soil types according to scheme if(LIS_rc%usetexturemap(n) .ne. 'none') then write(LIS_logunit,*) & - "[INFO] NoahMP.5.0 retrieve parameter SOILTYPE from LIS" + "[INFO] Noah-MP.5.0 retrieve parameter SOILTYPE from LIS" do t=1, LIS_rc%npatch(n, mtype) NoahMP50_struc(n)%noahmp50(t)%soiltype= LIS_surface(n, mtype)%tile(t)%soilt enddo else ! read: soiltype write(LIS_logunit,*) & - "[INFO] NoahMP.5.0 reading parameter SOILTYPE from ", & + "[INFO] Noah-MP.5.0 reading parameter SOILTYPE from ", & trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_soiltype), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -119,7 +119,7 @@ subroutine NoahMP50_setup() endif ! read: tbot write(LIS_logunit,*) & - "[INFO] NoahMP.5.0 reading parameter TBOT from ", & + "[INFO] Noah-MP.5.0 reading parameter TBOT from ", & trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_tbot), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -132,7 +132,7 @@ subroutine NoahMP50_setup() if(NoahMP50_struc(n)%crop_opt > 0) then ! read: planting write(LIS_logunit,*) & - "[INFO] NoahMP.5.0 reading parameter PLANTING from ", & + "[INFO] Noah-MP.5.0 reading parameter PLANTING from ", & trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_planting), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -142,7 +142,7 @@ subroutine NoahMP50_setup() enddo ! read: harvest - write(LIS_logunit,*) "[INFO] NoahMP.5.0 reading parameter HARVEST from ",& + write(LIS_logunit,*) "[INFO] Noah-MP.5.0 reading parameter HARVEST from ",& trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_harvest), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -152,7 +152,7 @@ subroutine NoahMP50_setup() enddo ! read: season_gdd - write(LIS_logunit,*) "[INFO] NoahMP.5.0 reading parameter SEASON_GDD from ", & + write(LIS_logunit,*) "[INFO] Noah-MP.5.0 reading parameter SEASON_GDD from ", & trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_season_gdd), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -166,7 +166,7 @@ subroutine NoahMP50_setup() if(NoahMP50_struc(n)%irr_opt > 0) then ! read: total irrigation fraction write(LIS_logunit,*) & - "[INFO] NoahMP.5.0 reading parameter IRFRACT from ", & + "[INFO] Noah-MP.5.0 reading parameter IRFRACT from ", & trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_irfract), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -177,7 +177,7 @@ subroutine NoahMP50_setup() ! read: sprinkler irrigation fraction write(LIS_logunit,*) & - "[INFO] NoahMP.5.0 reading parameter SIFRACT from ", & + "[INFO] Noah-MP.5.0 reading parameter SIFRACT from ", & trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_sifract), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -188,7 +188,7 @@ subroutine NoahMP50_setup() ! read: micro/drip irrigation fraction write(LIS_logunit,*) & - "[INFO] NoahMP.5.0 reading parameter MIFRACT from ", & + "[INFO] Noah-MP.5.0 reading parameter MIFRACT from ", & trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_mifract), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -199,7 +199,7 @@ subroutine NoahMP50_setup() ! read: flood irrigation fraction write(LIS_logunit,*) & - "[INFO] NoahMP.5.0 reading parameter FIFRACT from ", & + "[INFO] Noah-MP.5.0 reading parameter FIFRACT from ", & trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_fifract), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -213,7 +213,7 @@ subroutine NoahMP50_setup() if(NoahMP50_struc(n)%tdrn_opt > 0) then ! read: tile drainage fraction write(LIS_logunit,*) & - "[INFO] NoahMP.5.0 reading parameter TDFRACT from ", & + "[INFO] Noah-MP.5.0 reading parameter TDFRACT from ", & trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_tdfract), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -226,7 +226,7 @@ subroutine NoahMP50_setup() !!! SW 11/06/2018 if(NoahMP50_struc(n)%soil_opt .eq. 2) then ! read: soilcL1 - write(LIS_logunit,*) "[INFO] NoahMP.5.0 reading parameter SOILCL1 from ", & + write(LIS_logunit,*) "[INFO] Noah-MP.5.0 reading parameter SOILCL1 from ", & trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_soilcL1), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -236,7 +236,7 @@ subroutine NoahMP50_setup() enddo ! read: soilcL2 - write(LIS_logunit,*) "[INFO] NoahMP.5.0 reading parameter SOILCL2 from ", & + write(LIS_logunit,*) "[INFO] Noah-MP.5.0 reading parameter SOILCL2 from ", & trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_soilcL2), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -246,7 +246,7 @@ subroutine NoahMP50_setup() enddo ! read: soilcL3 - write(LIS_logunit,*) "[INFO] NoahMP.5.0 reading parameter SOILCL3 from ", & + write(LIS_logunit,*) "[INFO] Noah-MP.5.0 reading parameter SOILCL3 from ", & trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_soilcL3), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -256,7 +256,7 @@ subroutine NoahMP50_setup() enddo ! read: soilcL4 - write(LIS_logunit,*) "[INFO] NoahMP.5.0 reading parameter SOILCL4 from ", & + write(LIS_logunit,*) "[INFO] Noah-MP.5.0 reading parameter SOILCL4 from ", & trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_soilcL4), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -270,7 +270,7 @@ subroutine NoahMP50_setup() if(NoahMP50_struc(n)%runsub_opt == 5) then ! read: efolding depth for transmissivity (m) write(LIS_logunit,*) & - "[INFO] NoahMP.5.0 reading parameter FDEPTH from ", & + "[INFO] Noah-MP.5.0 reading parameter FDEPTH from ", & trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_fdepth), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -281,7 +281,7 @@ subroutine NoahMP50_setup() ! read: equilibrium water table depth (m) write(LIS_logunit,*) & - "[INFO] NoahMP.5.0 reading parameter EQZWT from ", & + "[INFO] Noah-MP.5.0 reading parameter EQZWT from ", & trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_eqzwt), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -292,7 +292,7 @@ subroutine NoahMP50_setup() ! read: riverbed depth (m) write(LIS_logunit,*) & - "[INFO] NoahMP.5.0 reading parameter RIVERBED from ", & + "[INFO] Noah-MP.5.0 reading parameter RIVERBED from ", & trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_riverbed), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -303,7 +303,7 @@ subroutine NoahMP50_setup() ! read: climatology recharge write(LIS_logunit,*) & - "[INFO] NoahMP.5.0 reading parameter RECHCLIM from ", & + "[INFO] Noah-MP.5.0 reading parameter RECHCLIM from ", & trim(LIS_rc%paramfile(n)) call LIS_read_param(n, trim(NoahMP50_struc(n)%LDT_ncvar_rechclim), placeholder) do t = 1, LIS_rc%npatch(n, mtype) @@ -316,7 +316,7 @@ subroutine NoahMP50_setup() !----------------------------------------------! ! MULTILEVEL reading spatial spatial parameters ! !----------------------------------------------! - write(LIS_logunit,*) "[INFO] NoahMP.5.0 reading parameter SHDFAC_MONTHLY from ",& + write(LIS_logunit,*) "[INFO] Noah-MP.5.0 reading parameter SHDFAC_MONTHLY from ",& trim(LIS_rc%paramfile(n)) do k = 1, 12 call NoahMP50_read_MULTILEVEL_param(n, NoahMP50_struc(n)%LDT_ncvar_shdfac_monthly, k, placeholder) @@ -329,7 +329,7 @@ subroutine NoahMP50_setup() if(NoahMP50_struc(n)%soil_opt .eq. 3) then ! read: soilcomp - write(LIS_logunit,*) "[INFO] NoahMP.5.0 reading parameter SOILCOMP from ", & + write(LIS_logunit,*) "[INFO] Noah-MP.5.0 reading parameter SOILCOMP from ", & trim(LIS_rc%paramfile(n)) do k = 1, 8 call NoahMP50_read_MULTILEVEL_param(n, NoahMP50_struc(n)%LDT_ncvar_soilcomp, k, placeholder) @@ -343,11 +343,11 @@ subroutine NoahMP50_setup() deallocate(placeholder) !!!! read Noah-MP parameter tables - write(LIS_logunit,*) "[INFO] NoahMP.5.0 parameter table (veg, soil, general): ", & + write(LIS_logunit,*) "[INFO] Noah-MP.5.0 parameter table (veg, soil, general): ", & trim(NoahMP50_struc(n)%noahmp_tbl_name) - write(LIS_logunit,*) "[INFO] NoahMP.5.0 Landuse classification scheme: ", & + write(LIS_logunit,*) "[INFO] Noah-MP.5.0 Landuse classification scheme: ", & trim(NoahMP50_struc(n)%landuse_scheme_name) - write(LIS_logunit,*) "[INFO] NoahMP.5.0 Soil classification scheme: ", & + write(LIS_logunit,*) "[INFO] Noah-MP.5.0 Soil classification scheme: ", & "STAS (default, cannot change)" call NoahmpReadTable(trim(NoahMP50_struc(n)%landuse_scheme_name), & trim(NoahMP50_struc(n)%noahmp_tbl_name)) diff --git a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_writerst.F90 b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_writerst.F90 index e39a28867..1d8289326 100644 --- a/lis/surfacemodels/land/noahmp.5.0/NoahMP50_writerst.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/NoahMP50_writerst.F90 @@ -105,7 +105,7 @@ subroutine NoahMP50_writerst(n) #endif endif write(LIS_logunit, *)& - "[INFO] NoahMP.5.0 archive restart written: ",trim(filen) + "[INFO] Noah-MP.5.0 archive restart written: ",trim(filen) endif endif end subroutine NoahMP50_writerst diff --git a/lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_dasoilm_Mod.F90 b/lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_dasoilm_Mod.F90 index ea078689a..ca68a0565 100644 --- a/lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_dasoilm_Mod.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/da_soilm/noahmp50_dasoilm_Mod.F90 @@ -80,11 +80,11 @@ subroutine NoahMP50_dasoilm_init(k) !TBD: SVK #if 0 if(LIS_rc%dascaloption(k).eq."Linear scaling") then - call ESMF_ConfigFindLabel(LIS_config,"NoahMP.5.0 soil moisture CDF file:",& + call ESMF_ConfigFindLabel(LIS_config,"Noah-MP.5.0 soil moisture CDF file:",& rc=status) do n=1,LIS_rc%nnest call ESMF_ConfigGetAttribute(LIS_config,modelcdffile(n),rc=status) - call LIS_verify(status, 'NoahMP.5.0 soil moisture CDF file: not defined') + call LIS_verify(status, 'Noah-MP.5.0 soil moisture CDF file: not defined') enddo do n=1,LIS_rc%nnest diff --git a/lis/surfacemodels/land/noahmp.5.0/pe/NoahMP50_peMod.F90 b/lis/surfacemodels/land/noahmp.5.0/pe/NoahMP50_peMod.F90 index 7b6e31f41..e6531c539 100755 --- a/lis/surfacemodels/land/noahmp.5.0/pe/NoahMP50_peMod.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/pe/NoahMP50_peMod.F90 @@ -709,7 +709,7 @@ subroutine NoahMP50_setup_pedecvars(DEC_State, Feas_State) enddo endif - write(LIS_logunit,*) '[INFO] Finished setting up NoahMP50 decision space ' + write(LIS_logunit,*) '[INFO] Finished setting up Noah-MP.5.0 decision space ' end subroutine NoahMP50_setup_pedecvars end module NoahMP50_peMod diff --git a/lis/surfacemodels/land/noahmp.5.0/wrf_debug.F90 b/lis/surfacemodels/land/noahmp.5.0/wrf_debug.F90 index 0f4de42fa..a45b4f251 100644 --- a/lis/surfacemodels/land/noahmp.5.0/wrf_debug.F90 +++ b/lis/surfacemodels/land/noahmp.5.0/wrf_debug.F90 @@ -14,6 +14,6 @@ subroutine wrf_debug(unit_number, message) implicit none integer :: unit_number character(len=*) :: message - write(LIS_logunit, *) "NoahMP.5.0 refactored version (wrf_debug): ", message + write(LIS_logunit, *) "Noah-MP.5.0 refactored version (wrf_debug): ", message end subroutine wrf_debug From 4dffcc7fa9add4ae3f3e4f4a8178b257b8eda3ff Mon Sep 17 00:00:00 2001 From: cenlinhe Date: Sat, 28 Dec 2024 15:25:14 -0700 Subject: [PATCH 27/27] update noahmp submodule link to official NCAR github --- .gitmodules | 2 +- lis/surfacemodels/land/noahmp.5.0/phys/noahmp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index fca30a023..781809bdf 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "lis/surfacemodels/land/noahmp.5.0/phys/noahmp"] path = lis/surfacemodels/land/noahmp.5.0/phys/noahmp - url = https://github.com/cenlinhe/noahmp + url = https://github.com/NCAR/noahmp branch = release-v5.0-LIS diff --git a/lis/surfacemodels/land/noahmp.5.0/phys/noahmp b/lis/surfacemodels/land/noahmp.5.0/phys/noahmp index ef703ae85..0cd33858d 160000 --- a/lis/surfacemodels/land/noahmp.5.0/phys/noahmp +++ b/lis/surfacemodels/land/noahmp.5.0/phys/noahmp @@ -1 +1 @@ -Subproject commit ef703ae85a6f005c6d0bb42c6842f67426133149 +Subproject commit 0cd33858d6ed373d558f64757ffc385e925d4ee8