Changeset 12607 for branches/UKMO/AMM15_v3_6_STABLE_package_collate_sit/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90
- Timestamp:
- 2020-03-26T11:43:10+01:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/AMM15_v3_6_STABLE_package_collate_sit/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90
r10728 r12607 21 21 !! dyn_asm_inc : Apply the dynamic (u and v) increments 22 22 !! ssh_asm_inc : Apply the SSH increment 23 !! seaice_asm_inc : Apply the seaice increment 23 !! seaice_asm_inc : Apply the sea ice concentration increment 24 !! sit_asm_inc : Apply the sea ice thickness increment 24 25 !!---------------------------------------------------------------------- 25 26 USE wrk_nemo ! Memory Allocation … … 62 63 PUBLIC dyn_asm_inc !: Apply the dynamic (u and v) increments 63 64 PUBLIC ssh_asm_inc !: Apply the SSH increment 64 PUBLIC seaice_asm_inc !: Apply the seaice increment 65 PUBLIC seaice_asm_inc !: Apply the seaice concentration increment 66 PUBLIC sit_asm_inc !: Apply the seaice thickness increment 65 67 PUBLIC bgc_asm_inc !: Apply the biogeochemistry increments 66 68 … … 77 79 LOGICAL, PUBLIC :: ln_dyninc = .FALSE. !: No dynamics (u and v) assimilation increments 78 80 LOGICAL, PUBLIC :: ln_sshinc = .FALSE. !: No sea surface height assimilation increment 79 LOGICAL, PUBLIC :: ln_seaiceinc !: No sea ice concentration increment 81 LOGICAL, PUBLIC :: ln_seaiceinc = .FALSE. !: No sea ice concentration increment 82 LOGICAL, PUBLIC :: ln_sitinc = .FALSE. !: No sea ice thickness increment 80 83 LOGICAL, PUBLIC :: lk_bgcinc = .FALSE. !: No biogeochemistry increments 81 84 LOGICAL, PUBLIC :: ln_salfix = .FALSE. !: Apply minimum salinity check … … 189 192 ln_dyninc = .FALSE. 190 193 ln_sshinc = .FALSE. 191 ln_seaiceinc = .FALSE.192 194 ln_asmdin = .FALSE. 193 195 ln_asmiau = .TRUE. 194 196 ln_salfix = .FALSE. 197 198 ln_seaiceinc = .FALSE. 199 ln_sitinc = .FALSE. 195 200 ln_temnofreeze = .FALSE. 201 196 202 salfixmin = -9999 197 203 nitbkg = 0 … … 223 229 WRITE(numout,*) ' Logical switch for applying velocity increments ln_dyninc = ', ln_dyninc 224 230 WRITE(numout,*) ' Logical switch for applying SSH increments ln_sshinc = ', ln_sshinc 231 WRITE(numout,*) ' Logical switch for applying SIC increments ln_seaiceinc = ', ln_seaiceinc 232 WRITE(numout,*) ' Logical switch for applying SIT increments ln_sitinc = ', ln_sitinc 225 233 WRITE(numout,*) ' Logical switch for Direct Initialization (DI) ln_asmdin = ', ln_asmdin 226 WRITE(numout,*) ' Logical switch for applying sea ice increments ln_seaiceinc = ', ln_seaiceinc227 WRITE(numout,*) ' Logical switch for phytoplankton balancing ln_phytobal = ', ln_phytobal228 WRITE(numout,*) ' Logical switch for applying slchltot increments ln_slchltotinc = ', ln_slchltotinc229 WRITE(numout,*) ' Logical switch for applying slchldia increments ln_slchldiainc = ', ln_slchldiainc230 WRITE(numout,*) ' Logical switch for applying slchlnon increments ln_slchlnoninc = ', ln_slchlnoninc231 WRITE(numout,*) ' Logical switch for applying slchlnan increments ln_slchlnaninc = ', ln_slchlnaninc232 WRITE(numout,*) ' Logical switch for applying slchlpic increments ln_slchlpicinc = ', ln_slchlpicinc233 WRITE(numout,*) ' Logical switch for applying slchldin increments ln_slchldininc = ', ln_slchldininc234 WRITE(numout,*) ' Logical switch for applying schltot increments ln_schltotinc = ', ln_schltotinc235 WRITE(numout,*) ' Logical switch for applying slphytot increments ln_slphytotinc = ', ln_slphytotinc236 WRITE(numout,*) ' Logical switch for applying slphydia increments ln_slphydiainc = ', ln_slphydiainc237 WRITE(numout,*) ' Logical switch for applying slphynon increments ln_slphynoninc = ', ln_slphynoninc238 WRITE(numout,*) ' Logical switch for applying spco2 increments ln_spco2inc = ', ln_spco2inc239 WRITE(numout,*) ' Logical switch for applying sfco2 increments ln_sfco2inc = ', ln_sfco2inc240 WRITE(numout,*) ' Logical switch for applying plchltot increments ln_plchltotinc = ', ln_plchltotinc241 WRITE(numout,*) ' Logical switch for applying pchltot increments ln_pchltotinc = ', ln_pchltotinc242 WRITE(numout,*) ' Logical switch for applying pno3 increments ln_pno3inc = ', ln_pno3inc243 WRITE(numout,*) ' Logical switch for applying psi4 increments ln_psi4inc = ', ln_psi4inc244 WRITE(numout,*) ' Logical switch for applying ppo4 increments ln_ppo4inc = ', ln_ppo4inc245 WRITE(numout,*) ' Logical switch for applying pdic increments ln_pdicinc = ', ln_pdicinc246 WRITE(numout,*) ' Logical switch for applying palk increments ln_palkinc = ', ln_palkinc247 WRITE(numout,*) ' Logical switch for applying pph increments ln_pphinc = ', ln_pphinc248 WRITE(numout,*) ' Logical switch for applying po2 increments ln_po2inc = ', ln_po2inc249 234 WRITE(numout,*) ' Logical switch for Incremental Analysis Updating (IAU) ln_asmiau = ', ln_asmiau 250 235 WRITE(numout,*) ' Timestep of background in [0,nitend-nit000-1] nitbkg = ', nitbkg … … 259 244 WRITE(numout,*) ' Choice of MLD for BGC assimilation mld_choice_bgc = ', mld_choice_bgc 260 245 WRITE(numout,*) ' Maximum absolute chlorophyll increment (<=0 = off) rn_maxchlinc = ', rn_maxchlinc 246 WRITE(numout,*) ' Logical switch for phytoplankton balancing ln_phytobal = ', ln_phytobal 247 WRITE(numout,*) ' Logical switch for applying slchltot increments ln_slchltotinc = ', ln_slchltotinc 248 WRITE(numout,*) ' Logical switch for applying slchldia increments ln_slchldiainc = ', ln_slchldiainc 249 WRITE(numout,*) ' Logical switch for applying slchlnon increments ln_slchlnoninc = ', ln_slchlnoninc 250 WRITE(numout,*) ' Logical switch for applying slchlnan increments ln_slchlnaninc = ', ln_slchlnaninc 251 WRITE(numout,*) ' Logical switch for applying slchlpic increments ln_slchlpicinc = ', ln_slchlpicinc 252 WRITE(numout,*) ' Logical switch for applying slchldin increments ln_slchldininc = ', ln_slchldininc 253 WRITE(numout,*) ' Logical switch for applying schltot increments ln_schltotinc = ', ln_schltotinc 254 WRITE(numout,*) ' Logical switch for applying slphytot increments ln_slphytotinc = ', ln_slphytotinc 255 WRITE(numout,*) ' Logical switch for applying slphydia increments ln_slphydiainc = ', ln_slphydiainc 256 WRITE(numout,*) ' Logical switch for applying slphynon increments ln_slphynoninc = ', ln_slphynoninc 257 WRITE(numout,*) ' Logical switch for applying spco2 increments ln_spco2inc = ', ln_spco2inc 258 WRITE(numout,*) ' Logical switch for applying sfco2 increments ln_sfco2inc = ', ln_sfco2inc 259 WRITE(numout,*) ' Logical switch for applying plchltot increments ln_plchltotinc = ', ln_plchltotinc 260 WRITE(numout,*) ' Logical switch for applying pchltot increments ln_pchltotinc = ', ln_pchltotinc 261 WRITE(numout,*) ' Logical switch for applying pno3 increments ln_pno3inc = ', ln_pno3inc 262 WRITE(numout,*) ' Logical switch for applying psi4 increments ln_psi4inc = ', ln_psi4inc 263 WRITE(numout,*) ' Logical switch for applying ppo4 increments ln_ppo4inc = ', ln_ppo4inc 264 WRITE(numout,*) ' Logical switch for applying pdic increments ln_pdicinc = ', ln_pdicinc 265 WRITE(numout,*) ' Logical switch for applying palk increments ln_palkinc = ', ln_palkinc 266 WRITE(numout,*) ' Logical switch for applying pph increments ln_pphinc = ', ln_pphinc 267 WRITE(numout,*) ' Logical switch for applying po2 increments ln_po2inc = ', ln_po2inc 261 268 ENDIF 262 269 … … 320 327 IF ( ( ( .NOT. ln_asmdin ).AND.( .NOT. ln_asmiau ) ) & 321 328 & .AND.( ( ln_trainc ).OR.( ln_dyninc ).OR.( ln_sshinc ).OR.( ln_seaiceinc ).OR. & 322 & ( l k_bgcinc ) )) &329 & ( ln_sitinc ).OR.( lk_bgcinc ) )) & 323 330 & CALL ctl_stop( ' One or more of ln_trainc, ln_dyninc, ln_sshinc, ln_seaiceinc,', & 324 & ' ln_ (bgc-variable)inc is set to .true.', &331 & ' ln_sitinc and ln_(bgc-variable)inc is set to .true.', & 325 332 & ' but ln_asmdin and ln_asmiau are both set to .false. :', & 326 333 & ' Inconsistent options') … … 331 338 332 339 IF ( ( .NOT. ln_trainc ).AND.( .NOT. ln_dyninc ).AND.( .NOT. ln_sshinc ).AND.( .NOT. ln_seaiceinc ) & 333 & .AND.( .NOT. l k_bgcinc ) ) &340 & .AND.( .NOT. ln_sitinc ).AND.( .NOT. lk_bgcinc ) ) & 334 341 & CALL ctl_warn( ' ln_trainc, ln_dyninc, ln_sshinc, ln_seaiceinc,', & 335 & ' ln_ (bgc-variable)inc are set to .false. :', &342 & ' ln_sitinc and ln_(bgc-variable)inc are set to .false. :', & 336 343 & ' The assimilation increments are not applied') 337 344 … … 458 465 seaice_bkginc(:,:) = 0.0 459 466 ENDIF 467 IF ( ln_sitinc ) THEN 468 ALLOCATE( sit_bkginc(jpi,jpj)) 469 sit_bkginc(:,:) = 0.0 470 ENDIF 460 471 #if defined key_asminc 461 472 ALLOCATE( ssh_iau(jpi,jpj) ) … … 463 474 #endif 464 475 IF ( ( ln_trainc ).OR.( ln_dyninc ).OR.( ln_sshinc ).OR.( ln_seaiceinc ) & 465 & .OR.( l k_bgcinc ) ) THEN476 & .OR.( ln_sitinc ).OR.( lk_bgcinc ) ) THEN 466 477 467 478 !-------------------------------------------------------------------- … … 953 964 ! Perhaps the following call should be in step 954 965 IF ( ln_seaiceinc ) CALL seaice_asm_inc ( kt ) ! apply sea ice concentration increment 966 IF ( ln_sitinc ) CALL sit_asm_inc ( kt ) ! apply sea ice thickness increment 955 967 ! 956 968 END SUBROUTINE tra_asm_inc … … 1114 1126 END SUBROUTINE ssh_asm_inc 1115 1127 1128 SUBROUTINE sit_asm_inc( kt, kindic ) 1129 !!---------------------------------------------------------------------- 1130 !! *** ROUTINE sit_asm_inc *** 1131 !! 1132 !! ** Purpose : Apply the sea ice thickness assimilation increment. 1133 !! 1134 !! ** Method : Direct initialization or Incremental Analysis Updating. 1135 !! 1136 !! ** Action : 1137 !! 1138 !!---------------------------------------------------------------------- 1139 IMPLICIT NONE 1140 ! 1141 INTEGER, INTENT(in) :: kt ! Current time step 1142 INTEGER, INTENT(in), OPTIONAL :: kindic ! flag for disabling the deallocation 1143 ! 1144 INTEGER :: it 1145 REAL(wp) :: zincwgt ! IAU weight for current time step 1146 !!---------------------------------------------------------------------- 1147 1148 IF ( ln_asmiau ) THEN 1149 1150 !-------------------------------------------------------------------- 1151 ! Incremental Analysis Updating 1152 !-------------------------------------------------------------------- 1153 1154 IF ( ( kt >= nitiaustr_r ).AND.( kt <= nitiaufin_r ) ) THEN 1155 1156 it = kt - nit000 + 1 1157 zincwgt = wgtiau(it) ! IAU weight for the current time step 1158 ! note this is not a tendency so should not be divided by rdt (as with the tracer and other increments) 1159 ! EF: Actually CICE is expecting a tendency so is divided by rdt below 1160 1161 IF(lwp) THEN 1162 WRITE(numout,*) 1163 WRITE(numout,*) 'sit_asm_inc : sea ice thick IAU at time step = ', & 1164 & kt,' with IAU weight = ', wgtiau(it) 1165 WRITE(numout,*) '~~~~~~~~~~~~' 1166 ENDIF 1167 1168 #if defined key_cice && defined key_asminc 1169 ! Sea-ice thickness : CICE case. Pass ice thickness increment tendency into CICE 1170 ndsit_da(:,:) = sit_bkginc(:,:) * zincwgt / rdt 1171 #endif 1172 1173 IF ( kt == nitiaufin_r ) THEN 1174 DEALLOCATE( sit_bkginc ) 1175 ENDIF 1176 1177 ELSE 1178 1179 #if defined key_cice && defined key_asminc 1180 ! Sea-ice thickness : CICE case. Zero ice increment tendency into CICE 1181 ndsit_da(:,:) = 0.0_wp 1182 #endif 1183 1184 ENDIF 1185 1186 ELSEIF ( ln_asmdin ) THEN 1187 1188 !-------------------------------------------------------------------- 1189 ! Direct Initialization 1190 !-------------------------------------------------------------------- 1191 1192 IF ( kt == nitdin_r ) THEN 1193 1194 neuler = 0 ! Force Euler forward step 1195 1196 #if defined key_cice && defined key_asminc 1197 ! Sea-ice thickness : CICE case. Pass ice thickness increment tendency into CICE 1198 ndsit_da(:,:) = sit_bkginc(:,:) / rdt 1199 #endif 1200 IF ( .NOT. PRESENT(kindic) ) THEN 1201 DEALLOCATE( sit_bkginc ) 1202 END IF 1203 1204 ELSE 1205 1206 #if defined key_cice && defined key_asminc 1207 ! Sea-ice thicnkness : CICE case. Zero ice thickness increment tendency into CICE 1208 ndsit_da(:,:) = 0.0_wp 1209 #endif 1210 1211 ENDIF 1212 1213 ENDIF 1214 1215 END SUBROUTINE sit_asm_inc 1116 1216 1117 1217 SUBROUTINE seaice_asm_inc( kt, kindic )
Note: See TracChangeset
for help on using the changeset viewer.