Changeset 10055 for branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc_v3/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90
- Timestamp:
- 2018-08-20T15:17:09+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc_v3/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90
r8400 r10055 44 44 #endif 45 45 USE sbc_oce ! Surface boundary condition variables. 46 USE asmbgc ! Biogeochemistry assimilation 46 47 47 48 IMPLICIT NONE … … 54 55 PUBLIC ssh_asm_inc !: Apply the SSH increment 55 56 PUBLIC seaice_asm_inc !: Apply the seaice increment 57 PUBLIC bgc_asm_inc !: Apply the biogeochemistry increments 56 58 57 59 #if defined key_asminc … … 67 69 LOGICAL, PUBLIC :: ln_sshinc = .FALSE. !: No sea surface height assimilation increment 68 70 LOGICAL, PUBLIC :: ln_seaiceinc !: No sea ice concentration increment 71 LOGICAL, PUBLIC :: lk_bgcinc = .FALSE. !: No biogeochemistry increments 69 72 LOGICAL, PUBLIC :: ln_salfix = .FALSE. !: Apply minimum salinity check 70 73 LOGICAL, PUBLIC :: ln_temnofreeze = .FALSE. !: Don't allow the temperature to drop below freezing … … 133 136 REAL(wp), POINTER, DIMENSION(:,:) :: hdiv ! 2D workspace 134 137 !! 135 NAMELIST/nam_asminc/ ln_bkgwri, 138 NAMELIST/nam_asminc/ ln_bkgwri, ln_balwri, & 136 139 & ln_trainc, ln_dyninc, ln_sshinc, & 140 & ln_phytobal, ln_slchltotinc, ln_slchldiainc, & 141 & ln_slchlnoninc, ln_schltotinc, ln_slphytotinc, & 142 & ln_slphydiainc, ln_slphynoninc, ln_spco2inc, & 143 & ln_sfco2inc, ln_plchltotinc, ln_pchltotinc, & 144 & ln_pno3inc, ln_psi4inc, ln_pdicinc, ln_palkinc, & 145 & ln_pphinc, ln_po2inc, & 137 146 & ln_asmdin, ln_asmiau, & 138 147 & nitbkg, nitdin, nitiaustr, nitiaufin, niaufn, & 139 148 & ln_salfix, salfixmin, nn_divdmp, & 140 & ln_seaiceinc, ln_temnofreeze 149 & ln_seaiceinc, ln_temnofreeze, & 150 & mld_choice_bgc, rn_maxchlinc 141 151 !!---------------------------------------------------------------------- 142 152 … … 161 171 WRITE(numout,*) 'asm_inc_init : Assimilation increment initialization :' 162 172 WRITE(numout,*) '~~~~~~~~~~~~' 163 WRITE(numout,*) ' Namelist nam asm: set assimilation increment parameters'173 WRITE(numout,*) ' Namelist nam_asminc : set assimilation increment parameters' 164 174 WRITE(numout,*) ' Logical switch for writing out background state ln_bkgwri = ', ln_bkgwri 175 WRITE(numout,*) ' Logical switch for writing out balancing increments ln_balwri = ', ln_balwri 165 176 WRITE(numout,*) ' Logical switch for applying tracer increments ln_trainc = ', ln_trainc 166 177 WRITE(numout,*) ' Logical switch for applying velocity increments ln_dyninc = ', ln_dyninc … … 168 179 WRITE(numout,*) ' Logical switch for Direct Initialization (DI) ln_asmdin = ', ln_asmdin 169 180 WRITE(numout,*) ' Logical switch for applying sea ice increments ln_seaiceinc = ', ln_seaiceinc 181 WRITE(numout,*) ' Logical switch for phytoplankton balancing ln_phytobal = ', ln_phytobal 182 WRITE(numout,*) ' Logical switch for applying slchltot increments ln_slchltotinc = ', ln_slchltotinc 183 WRITE(numout,*) ' Logical switch for applying slchldia increments ln_slchldiainc = ', ln_slchldiainc 184 WRITE(numout,*) ' Logical switch for applying slchlnon increments ln_slchlnoninc = ', ln_slchlnoninc 185 WRITE(numout,*) ' Logical switch for applying schltot increments ln_schltotinc = ', ln_schltotinc 186 WRITE(numout,*) ' Logical switch for applying slphytot increments ln_slphytotinc = ', ln_slphytotinc 187 WRITE(numout,*) ' Logical switch for applying slphydia increments ln_slphydiainc = ', ln_slphydiainc 188 WRITE(numout,*) ' Logical switch for applying slphynon increments ln_slphynoninc = ', ln_slphynoninc 189 WRITE(numout,*) ' Logical switch for applying spco2 increments ln_spco2inc = ', ln_spco2inc 190 WRITE(numout,*) ' Logical switch for applying sfco2 increments ln_sfco2inc = ', ln_sfco2inc 191 WRITE(numout,*) ' Logical switch for applying plchltot increments ln_plchltotinc = ', ln_plchltotinc 192 WRITE(numout,*) ' Logical switch for applying pchltot increments ln_pchltotinc = ', ln_pchltotinc 193 WRITE(numout,*) ' Logical switch for applying pno3 increments ln_pno3inc = ', ln_pno3inc 194 WRITE(numout,*) ' Logical switch for applying psi4 increments ln_psi4inc = ', ln_psi4inc 195 WRITE(numout,*) ' Logical switch for applying pdic increments ln_pdicinc = ', ln_pdicinc 196 WRITE(numout,*) ' Logical switch for applying palk increments ln_palkinc = ', ln_palkinc 197 WRITE(numout,*) ' Logical switch for applying pph increments ln_pphinc = ', ln_pphinc 198 WRITE(numout,*) ' Logical switch for applying po2 increments ln_po2inc = ', ln_po2inc 170 199 WRITE(numout,*) ' Logical switch for Incremental Analysis Updating (IAU) ln_asmiau = ', ln_asmiau 171 200 WRITE(numout,*) ' Timestep of background in [0,nitend-nit000-1] nitbkg = ', nitbkg … … 176 205 WRITE(numout,*) ' Logical switch for ensuring that the sa > salfixmin ln_salfix = ', ln_salfix 177 206 WRITE(numout,*) ' Minimum salinity after applying the increments salfixmin = ', salfixmin 207 WRITE(numout,*) ' Choice of MLD for BGC assimilation mld_choice_bgc = ', mld_choice_bgc 208 WRITE(numout,*) ' Maximum absolute chlorophyll increment (<=0 = off) rn_maxchlinc = ', rn_maxchlinc 178 209 ENDIF 179 210 … … 212 243 WRITE(numout,*) ' iitiaufin_date = ', iitiaufin_date 213 244 ENDIF 245 246 IF ( ln_slchltotinc .OR. ln_slchldiainc .OR. ln_slchlnoninc .OR. & 247 & ln_schltotinc .OR. ln_slphytotinc .OR. ln_slphydiainc .OR. & 248 & ln_slphynoninc .OR. ln_spco2inc .OR. ln_sfco2inc .OR. & 249 & ln_plchltotinc .OR. ln_pchltotinc .OR. ln_pno3inc .OR. & 250 & ln_psi4inc .OR. ln_pdicinc .OR. ln_palkinc .OR. & 251 & ln_pphinc .OR. ln_po2inc ) THEN 252 lk_bgcinc = .TRUE. 253 ENDIF 214 254 215 255 IF ( nacc /= 0 ) & … … 223 263 224 264 IF ( ( ( .NOT. ln_asmdin ).AND.( .NOT. ln_asmiau ) ) & 225 .AND.( ( ln_trainc ).OR.( ln_dyninc ).OR.( ln_sshinc ) .OR. ( ln_seaiceinc) )) & 226 & CALL ctl_stop( ' One or more of ln_trainc, ln_dyninc, ln_sshinc and ln_seaiceinc is set to .true.', & 265 & .AND.( ( ln_trainc ).OR.( ln_dyninc ).OR.( ln_sshinc ).OR.( ln_seaiceinc ).OR. & 266 & ( lk_bgcinc ) )) & 267 & CALL ctl_stop( ' One or more of ln_trainc, ln_dyninc, ln_sshinc, ln_seaiceinc,', & 268 & ' ln_(bgc-variable)inc is set to .true.', & 227 269 & ' but ln_asmdin and ln_asmiau are both set to .false. :', & 228 270 & ' Inconsistent options') … … 233 275 234 276 IF ( ( .NOT. ln_trainc ).AND.( .NOT. ln_dyninc ).AND.( .NOT. ln_sshinc ).AND.( .NOT. ln_seaiceinc ) & 235 & ) & 236 & CALL ctl_warn( ' ln_trainc, ln_dyninc, ln_sshinc and ln_seaiceinc are set to .false. :', & 277 & .AND.( .NOT. lk_bgcinc ) ) & 278 & CALL ctl_warn( ' ln_trainc, ln_dyninc, ln_sshinc, ln_seaiceinc,', & 279 & ' ln_(bgc-variable)inc are set to .false. :', & 237 280 & ' The assimilation increments are not applied') 238 281 … … 254 297 & ' Background time step for Direct Initialization is outside', & 255 298 & ' the cycle interval') 299 300 IF ( lk_bgcinc ) CALL asm_bgc_check_options 256 301 257 302 IF ( nstop > 0 ) RETURN ! if there are any errors then go no further … … 350 395 ssh_iau(:,:) = 0.0 351 396 #endif 352 IF ( ( ln_trainc ).OR.( ln_dyninc ).OR.( ln_sshinc ).OR.( ln_seaiceinc ) ) THEN 397 IF ( ( ln_trainc ).OR.( ln_dyninc ).OR.( ln_sshinc ).OR.( ln_seaiceinc ) & 398 & .OR.( lk_bgcinc ) ) THEN 353 399 354 400 !-------------------------------------------------------------------- … … 424 470 ENDIF 425 471 472 IF ( lk_bgcinc ) THEN 473 CALL asm_bgc_init_incs( inum ) 474 ENDIF 475 426 476 CALL iom_close( inum ) 427 477 … … 534 584 CALL iom_close( inum ) 535 585 586 ENDIF 587 588 IF ( lk_bgcinc ) THEN 589 CALL asm_bgc_init_bkg 536 590 ENDIF 537 591 ! … … 1155 1209 1156 1210 END SUBROUTINE seaice_asm_inc 1211 1212 1213 SUBROUTINE bgc_asm_inc( kt ) 1214 !!---------------------------------------------------------------------- 1215 !! *** ROUTINE bgc_asm_inc *** 1216 !! 1217 !! ** Purpose : Apply the biogeochemistry assimilation increments 1218 !! 1219 !! ** Method : Call relevant routines in asmbgc 1220 !! 1221 !! ** Action : Call relevant routines in asmbgc 1222 !! 1223 !!---------------------------------------------------------------------- 1224 !! 1225 INTEGER, INTENT(in ) :: kt ! Current time step 1226 ! 1227 INTEGER :: icycper ! Dimension of wgtiau 1228 !! 1229 !!---------------------------------------------------------------------- 1230 1231 icycper = SIZE( wgtiau ) 1232 1233 ! Ocean colour variables first 1234 IF ( ln_slchltotinc .OR. ln_slchldiainc .OR. ln_slchlnoninc .OR. & 1235 & ln_schltotinc .OR. ln_slphytotinc .OR. ln_slphydiainc .OR. & 1236 & ln_slphynoninc ) THEN 1237 CALL phyto2d_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau ) 1238 ENDIF 1239 1240 ! Surface pCO2/fCO2 next 1241 IF ( ln_sfco2inc .OR. ln_spco2inc ) THEN 1242 CALL pco2_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau, & 1243 & ln_trainc, t_bkginc, s_bkginc ) 1244 ENDIF 1245 1246 ! Profile pH next 1247 IF ( ln_pphinc ) THEN 1248 CALL ph_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau, & 1249 & ln_trainc, t_bkginc, s_bkginc ) 1250 ENDIF 1251 1252 ! Then chlorophyll profiles 1253 IF ( ln_plchltotinc .OR. ln_pchltotinc ) THEN 1254 CALL phyto3d_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau ) 1255 ENDIF 1256 1257 ! Remaining bgc profile variables 1258 IF ( ln_pno3inc .OR. ln_psi4inc .OR. ln_pdicinc .OR. & 1259 & ln_palkinc .OR. ln_po2inc ) THEN 1260 CALL bgc3d_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau ) 1261 ENDIF 1262 1263 END SUBROUTINE bgc_asm_inc 1157 1264 1158 1265 !!======================================================================
Note: See TracChangeset
for help on using the changeset viewer.