@@ -75,10 +75,10 @@ subroutine surface_params_to_wrap_state(statePtr, scf, rc)
7575 !
7676 ! Over *land*, use derivatives of exchange coeffs w.r.t. temp. & humidity.
7777 !
78- ! 0 : none Default for Helfand
79- ! 1 : analytical derivs Default for Louis; *not* available for Helfand
80- ! 2 : numerical derivs
81- ! 3 : numerical derivs via virtual temp.; *not* available for Helfand
78+ ! 0 : None, default for Helfand.
79+ ! 1 : Analytical derivs, default for Louis, *not* available for Helfand.
80+ ! 2 : Numerical derivs.
81+ ! 3 : Numerical derivs, via virtual temp., *not* available for Helfand, same as 2 but faster than 2.
8282 !
8383 ! Runtimes: Helfand takes ~10 times longer than Louis. In offline mode, Helfand consumes
8484 ! about as much CPU as Catchment. Option 2 triples the runtime of the MOSFC scheme.
@@ -96,7 +96,7 @@ subroutine surface_params_to_wrap_state(statePtr, scf, rc)
9696
9797 ! Louis
9898 call MAPL_GetResource( SCF, statePtr% MOSFC_EXTRA_DERIVS_LAND, label= ' MOSFC_EXTRA_DERIVS_LAND:' , DEFAULT= 1 , __RC__ )
99- ! make sure parameter values is allowed
99+ ! make sure parameter value is allowed
100100 ii = statePtr% MOSFC_EXTRA_DERIVS_LAND ; _ASSERT(ii>= 0 .and. ii<= 3 , ' unknown MOSFC_EXTRA_DERIVS_LAND for Louis ' )
101101
102102 elseif (statePtr% CHOOSEMOSFC== 1 ) then
@@ -113,14 +113,17 @@ subroutine surface_params_to_wrap_state(statePtr, scf, rc)
113113 end if
114114
115115 end if
116+
117+ ! for CatchCN, must have MOSFC_EXTRA_DERIVS_LAND<=1 (numerical derivatives not yet implemented for CatchCN)
118+
119+ select type (statePtr)
120+ type is (T_CATCHCN_STATE) ! CATCHCN
116121
117- ! ==================================================================================================================================
118- !
119- ! STILL NEED TO ASSERT THE FOLLOWING:
120- !
121- ! if LSM_CHOICE>1, must have MOSFC_EXTRA_DERIVS_LAND<=1 (numerical derivatives not yet implemented for CatchCN)
122- !
123- ! =============================================================================================================================
122+ _ASSERT( statePtr% MOSFC_EXTRA_DERIVS_LAND<= 1 , ' selected choice for MOSFC_EXTRA_DERIVS_LAND not yet implemented for CatchCN' )
123+
124+ end select
125+
126+ ! -------------------------
124127
125128 call MAPL_GetResource( SCF, statePtr% USE_FWET_FOR_RUNOFF, label= ' USE_FWET_FOR_RUNOFF:' , DEFAULT= .FALSE. , __RC__ )
126129 call MAPL_GetResource( SCF, statePtr% Z0_FORMULATION, label= ' Z0_FORMULATION:' , DEFAULT= 4 , __RC__ )
0 commit comments