New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 12611 – NEMO

Changeset 12611


Ignore:
Timestamp:
2020-03-26T12:16:27+01:00 (4 years ago)
Author:
dcarneir
Message:

Including sea ice thickness variable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/AMM15_v3_6_STABLE_package_collate/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90

    r10728 r12611  
    2121   !!   dyn_asm_inc    : Apply the dynamic (u and v) increments 
    2222   !!   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 
    2425   !!---------------------------------------------------------------------- 
    2526   USE wrk_nemo         ! Memory Allocation 
     
    6263   PUBLIC   dyn_asm_inc    !: Apply the dynamic (u and v) increments 
    6364   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 
    6567   PUBLIC   bgc_asm_inc    !: Apply the biogeochemistry increments 
    6668 
     
    7779   LOGICAL, PUBLIC :: ln_dyninc = .FALSE.      !: No dynamics (u and v) assimilation increments 
    7880   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 
    8083   LOGICAL, PUBLIC :: lk_bgcinc = .FALSE.      !: No biogeochemistry increments 
    8184   LOGICAL, PUBLIC :: ln_salfix = .FALSE.      !: Apply minimum salinity check 
     
    189192      ln_dyninc = .FALSE. 
    190193      ln_sshinc = .FALSE. 
    191       ln_seaiceinc = .FALSE. 
    192194      ln_asmdin = .FALSE. 
    193195      ln_asmiau = .TRUE. 
    194196      ln_salfix = .FALSE. 
     197 
     198      ln_seaiceinc = .FALSE. 
     199      ln_sitinc = .FALSE. 
    195200      ln_temnofreeze = .FALSE. 
     201 
    196202      salfixmin = -9999 
    197203      nitbkg    = 0 
     
    223229         WRITE(numout,*) '      Logical switch for applying velocity increments          ln_dyninc = ', ln_dyninc 
    224230         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 
    225233         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_seaiceinc 
    227          WRITE(numout,*) '      Logical switch for phytoplankton balancing             ln_phytobal = ', ln_phytobal 
    228          WRITE(numout,*) '      Logical switch for applying slchltot increments     ln_slchltotinc = ', ln_slchltotinc 
    229          WRITE(numout,*) '      Logical switch for applying slchldia increments     ln_slchldiainc = ', ln_slchldiainc 
    230          WRITE(numout,*) '      Logical switch for applying slchlnon increments     ln_slchlnoninc = ', ln_slchlnoninc 
    231          WRITE(numout,*) '      Logical switch for applying slchlnan increments     ln_slchlnaninc = ', ln_slchlnaninc 
    232          WRITE(numout,*) '      Logical switch for applying slchlpic increments     ln_slchlpicinc = ', ln_slchlpicinc 
    233          WRITE(numout,*) '      Logical switch for applying slchldin increments     ln_slchldininc = ', ln_slchldininc 
    234          WRITE(numout,*) '      Logical switch for applying schltot increments       ln_schltotinc = ', ln_schltotinc 
    235          WRITE(numout,*) '      Logical switch for applying slphytot increments     ln_slphytotinc = ', ln_slphytotinc 
    236          WRITE(numout,*) '      Logical switch for applying slphydia increments     ln_slphydiainc = ', ln_slphydiainc 
    237          WRITE(numout,*) '      Logical switch for applying slphynon increments     ln_slphynoninc = ', ln_slphynoninc 
    238          WRITE(numout,*) '      Logical switch for applying spco2 increments           ln_spco2inc = ', ln_spco2inc 
    239          WRITE(numout,*) '      Logical switch for applying sfco2 increments           ln_sfco2inc = ', ln_sfco2inc 
    240          WRITE(numout,*) '      Logical switch for applying plchltot increments     ln_plchltotinc = ', ln_plchltotinc 
    241          WRITE(numout,*) '      Logical switch for applying pchltot increments       ln_pchltotinc = ', ln_pchltotinc 
    242          WRITE(numout,*) '      Logical switch for applying pno3 increments             ln_pno3inc = ', ln_pno3inc 
    243          WRITE(numout,*) '      Logical switch for applying psi4 increments             ln_psi4inc = ', ln_psi4inc 
    244          WRITE(numout,*) '      Logical switch for applying ppo4 increments             ln_ppo4inc = ', ln_ppo4inc 
    245          WRITE(numout,*) '      Logical switch for applying pdic increments             ln_pdicinc = ', ln_pdicinc 
    246          WRITE(numout,*) '      Logical switch for applying palk increments             ln_palkinc = ', ln_palkinc 
    247          WRITE(numout,*) '      Logical switch for applying pph increments               ln_pphinc = ', ln_pphinc 
    248          WRITE(numout,*) '      Logical switch for applying po2 increments               ln_po2inc = ', ln_po2inc 
    249234         WRITE(numout,*) '      Logical switch for Incremental Analysis Updating (IAU)   ln_asmiau = ', ln_asmiau 
    250235         WRITE(numout,*) '      Timestep of background in [0,nitend-nit000-1]            nitbkg    = ', nitbkg 
     
    259244         WRITE(numout,*) '      Choice of MLD for BGC assimilation                  mld_choice_bgc = ', mld_choice_bgc 
    260245         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 
    261268      ENDIF 
    262269 
     
    320327      IF (      ( ( .NOT. ln_asmdin ).AND.( .NOT. ln_asmiau ) ) & 
    321328         & .AND.( ( ln_trainc ).OR.( ln_dyninc ).OR.( ln_sshinc ).OR.( ln_seaiceinc ).OR. & 
    322          &        ( lk_bgcinc ) )) & 
     329         &        ( ln_sitinc ).OR.( lk_bgcinc ) )) & 
    323330         & 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.', & 
    325332         &                ' but ln_asmdin and ln_asmiau are both set to .false. :', & 
    326333         &                ' Inconsistent options') 
     
    331338 
    332339      IF ( ( .NOT. ln_trainc ).AND.( .NOT. ln_dyninc ).AND.( .NOT. ln_sshinc ).AND.( .NOT. ln_seaiceinc ) & 
    333          & .AND.( .NOT. lk_bgcinc ) )  & 
     340         & .AND.( .NOT. ln_sitinc ).AND.( .NOT. lk_bgcinc ) )  & 
    334341         & 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. :', & 
    336343         &                ' The assimilation increments are not applied') 
    337344 
     
    458465         seaice_bkginc(:,:) = 0.0 
    459466      ENDIF 
     467      IF ( ln_sitinc ) THEN  
     468         ALLOCATE( sit_bkginc(jpi,jpj)) 
     469         sit_bkginc(:,:) = 0.0 
     470      ENDIF 
    460471#if defined key_asminc 
    461472      ALLOCATE( ssh_iau(jpi,jpj)      ) 
     
    463474#endif 
    464475      IF ( ( ln_trainc ).OR.( ln_dyninc ).OR.( ln_sshinc ).OR.( ln_seaiceinc ) & 
    465          &  .OR.( lk_bgcinc ) ) THEN 
     476         &  .OR.( ln_sitinc ).OR.( lk_bgcinc ) ) THEN 
    466477 
    467478         !-------------------------------------------------------------------- 
     
    953964      ! Perhaps the following call should be in step 
    954965      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 
    955967      ! 
    956968   END SUBROUTINE tra_asm_inc 
     
    11141126   END SUBROUTINE ssh_asm_inc 
    11151127 
     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 
    11161216 
    11171217   SUBROUTINE seaice_asm_inc( kt, kindic ) 
Note: See TracChangeset for help on using the changeset viewer.