- Timestamp:
- 2016-06-24T09:50:27+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/NERC/dev_r3874_FASTNEt/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90
r3785 r6736 14 14 15 15 !!---------------------------------------------------------------------- 16 !! 'key_asminc' 16 !! 'key_asminc' : Switch on the assimilation increment interface 17 17 !!---------------------------------------------------------------------- 18 !! asm_inc_init 19 !! calc_date 20 !! tra_asm_inc 21 !! dyn_asm_inc 22 !! ssh_asm_inc 23 !! seaice_asm_inc : Apply the seaice increment18 !! asm_inc_init : Initialize the increment arrays and IAU weights 19 !! calc_date : Compute the calendar date YYYYMMDD on a given step 20 !! tra_asm_inc : Apply the tracer (T and S) increments 21 !! dyn_asm_inc : Apply the dynamic (u and v) increments 22 !! ssh_asm_inc : Apply the SSH increment 23 !! seaice_asm_inc : Apply the seaice increment 24 24 !!---------------------------------------------------------------------- 25 25 USE wrk_nemo ! Memory Allocation 26 26 USE par_oce ! Ocean space and time domain variables 27 27 USE dom_oce ! Ocean space and time domain 28 USE domvvl ! domain: variable volume level29 28 USE oce ! Dynamics and active tracers defined in memory 30 29 USE ldfdyn_oce ! ocean dynamics: lateral physics … … 40 39 #endif 41 40 USE sbc_oce ! Surface boundary condition variables. 41 USE domvvl 42 42 43 43 IMPLICIT NONE … … 92 92 # include "ldfdyn_substitute.h90" 93 93 # include "vectopt_loop_substitute.h90" 94 94 95 !!---------------------------------------------------------------------- 95 96 !! NEMO/OPA 3.3 , NEMO Consortium (2010) … … 109 110 !! ** Action : 110 111 !!---------------------------------------------------------------------- 111 INTEGER :: ji, jj, jk 112 !! 113 !! 114 INTEGER :: ji,jj,jk 112 115 INTEGER :: jt 113 116 INTEGER :: imid … … 939 942 ! Update before fields 940 943 sshb(:,:) = sshn(:,:) 941 944 #if ! defined key_jth_fix 942 945 IF( lk_vvl ) THEN 943 946 DO jk = 1, jpk … … 945 948 END DO 946 949 ENDIF 947 950 #endif 948 951 DEALLOCATE( ssh_bkg ) 949 952 DEALLOCATE( ssh_bkginc ) … … 955 958 END SUBROUTINE ssh_asm_inc 956 959 957 958 960 SUBROUTINE seaice_asm_inc( kt, kindic ) 959 961 !!---------------------------------------------------------------------- … … 966 968 !! ** Action : 967 969 !! 968 !!---------------------------------------------------------------------- 970 !! History : 971 !! ! 07-2011 (D. Lea) Initial version based on ssh_asm_inc 972 !!---------------------------------------------------------------------- 973 969 974 IMPLICIT NONE 970 ! 971 INTEGER, INTENT(in) :: kt ! Current time step 972 INTEGER, INTENT(in), OPTIONAL :: kindic ! flag for disabling the deallocation 973 ! 974 INTEGER :: it 975 REAL(wp) :: zincwgt ! IAU weight for current time step 975 976 !! * Arguments 977 INTEGER, INTENT(IN) :: kt ! Current time step 978 INTEGER, OPTIONAL, INTENT(IN) :: kindic ! flag for disabling the deallocation 979 980 !! * Local declarations 981 INTEGER :: it 982 REAL(wp) :: zincwgt ! IAU weight for current time step 983 976 984 #if defined key_lim2 977 REAL(wp), DIMENSION(jpi,jpj) :: zofrld, zohicif, zseaicendg, zhicifinc ! LIM 978 REAL(wp) :: zhicifmin = 0.5_wp ! ice minimum depth in metres 979 #endif 980 !!---------------------------------------------------------------------- 985 REAL(wp), DIMENSION(jpi,jpj) :: zofrld, zohicif, zseaicendg, zhicifinc ! LIM 986 REAL(wp) :: zhicifmin=0.5_wp ! ice minimum depth in metres 987 988 #endif 989 981 990 982 991 IF ( ln_asmiau ) THEN … … 999 1008 ENDIF 1000 1009 1001 ! Sea-ice : LIM-3 case (to add)1002 1003 1010 #if defined key_lim2 1004 ! Sea-ice : LIM-2 case 1005 zofrld (:,:) =frld(:,:)1006 zohicif(:,:) =hicif(:,:)1007 ! 1008 frld = MIN( MAX( frld(:,:) - seaice_bkginc(:,:) * zincwgt, 0.0_wp), 1.0_wp)1011 1012 zofrld(:,:)=frld(:,:) 1013 zohicif(:,:)=hicif(:,:) 1014 1015 frld = MIN( MAX( frld(:,:) - seaice_bkginc(:,:) * zincwgt, 0.0_wp), 1.0_wp) 1009 1016 pfrld = MIN( MAX( pfrld(:,:) - seaice_bkginc(:,:) * zincwgt, 0.0_wp), 1.0_wp) 1010 1017 fr_i(:,:) = 1.0_wp - frld(:,:) ! adjust ice fraction 1011 ! 1012 zseaicendg(:,:) = zofrld(:,:) - frld(:,:)! find out actual sea ice nudge applied1013 ! 1018 1019 zseaicendg(:,:)=zofrld(:,:) - frld(:,:) ! find out actual sea ice nudge applied 1020 1014 1021 ! Nudge sea ice depth to bring it up to a required minimum depth 1022 1015 1023 WHERE( zseaicendg(:,:) > 0.0_wp .AND. hicif(:,:) < zhicifmin ) 1016 1024 zhicifinc(:,:) = (zhicifmin - hicif(:,:)) * zincwgt … … 1018 1026 zhicifinc(:,:) = 0.0_wp 1019 1027 END WHERE 1020 ! 1021 ! nudge ice depth 1022 hicif (:,:) = hicif (:,:) + zhicifinc(:,:) 1023 phicif(:,:) = phicif(:,:) + zhicifinc(:,:) 1024 ! 1025 ! seaice salinity balancing (to add) 1028 1029 ! nudge ice depth 1030 hicif(:,:)=hicif(:,:) + zhicifinc(:,:) 1031 phicif(:,:)=phicif(:,:) + zhicifinc(:,:) 1032 1033 ! seaice salinity balancing (to add) 1034 1026 1035 #endif 1027 1036 1028 1037 #if defined key_cice 1029 ! Sea-ice : CICE case. Pass ice increment tendency into CICE 1038 1039 ! Pass ice increment tendency into CICE 1030 1040 ndaice_da(:,:) = seaice_bkginc(:,:) * zincwgt / rdt 1041 1031 1042 #endif 1032 1043 … … 1038 1049 1039 1050 #if defined key_cice 1040 ! Sea-ice : CICE case. Zero ice increment tendency into CICE 1051 1052 ! Zero ice increment tendency into CICE 1041 1053 ndaice_da(:,:) = 0.0_wp 1054 1042 1055 #endif 1043 1056 … … 1054 1067 neuler = 0 ! Force Euler forward step 1055 1068 1056 ! Sea-ice : LIM-3 case (to add)1057 1058 1069 #if defined key_lim2 1059 ! Sea-ice : LIM-2 case. 1070 1060 1071 zofrld(:,:)=frld(:,:) 1061 1072 zohicif(:,:)=hicif(:,:) 1062 !1073 1063 1074 ! Initialize the now fields the background + increment 1064 frld (:,:) = MIN( MAX( frld(:,:) - seaice_bkginc(:,:), 0.0_wp), 1.0_wp) 1075 1076 frld(:,:) = MIN( MAX( frld(:,:) - seaice_bkginc(:,:), 0.0_wp), 1.0_wp) 1065 1077 pfrld(:,:) = frld(:,:) 1066 fr_i (:,:) = 1.0_wp - frld(:,:) ! adjust ice fraction 1067 zseaicendg(:,:) = zofrld(:,:) - frld(:,:) ! find out actual sea ice nudge applied 1068 ! 1078 fr_i(:,:) = 1.0_wp - frld(:,:) ! adjust ice fraction 1079 1080 zseaicendg(:,:)=zofrld(:,:) - frld(:,:) ! find out actual sea ice nudge applied 1081 1069 1082 ! Nudge sea ice depth to bring it up to a required minimum depth 1083 1070 1084 WHERE( zseaicendg(:,:) > 0.0_wp .AND. hicif(:,:) < zhicifmin ) 1071 1085 zhicifinc(:,:) = (zhicifmin - hicif(:,:)) * zincwgt … … 1073 1087 zhicifinc(:,:) = 0.0_wp 1074 1088 END WHERE 1075 ! 1076 ! nudge ice depth 1077 hicif (:,:) = hicif (:,:) + zhicifinc(:,:) 1078 phicif(:,:) = phicif(:,:) 1079 ! 1080 ! seaice salinity balancing (to add) 1089 1090 ! nudge ice depth 1091 hicif(:,:)=hicif(:,:) + zhicifinc(:,:) 1092 phicif(:,:)=phicif(:,:) 1093 1094 ! seaice salinity balancing (to add) 1095 1081 1096 #endif 1082 1097 1083 1098 #if defined key_cice 1084 ! Sea-ice : CICE case. Pass ice increment tendency into CICE - is this correct? 1099 1100 ! Pass ice increment tendency into CICE - is this correct? 1085 1101 ndaice_da(:,:) = seaice_bkginc(:,:) / rdt 1102 1086 1103 #endif 1087 1104 IF ( .NOT. PRESENT(kindic) ) THEN … … 1092 1109 1093 1110 #if defined key_cice 1094 ! Sea-ice : CICE case. Zero ice increment tendency into CICE 1111 1112 ! Zero ice increment tendency into CICE 1095 1113 ndaice_da(:,:) = 0.0_wp 1114 1096 1115 #endif 1097 1116 1098 1117 ENDIF 1099 1118 1100 !#if defined definedkey_lim2 || defined key_cice1119 !#if defined key_lim2 || defined key_cice 1101 1120 ! 1102 1121 ! IF (ln_seaicebal ) THEN … … 1173 1192 !#endif 1174 1193 1194 1175 1195 ENDIF 1176 1196 1177 1197 END SUBROUTINE seaice_asm_inc 1178 1179 1198 !!====================================================================== 1180 1199 END MODULE asminc
Note: See TracChangeset
for help on using the changeset viewer.