- Timestamp:
- Nov 21, 2019, 4:43:45 PM (5 years ago)
- Location:
- LMDZ6/branches/Ocean_skin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Ocean_skin
-
LMDZ6/branches/Ocean_skin/libf/phylmd/mo_simple_plumes.F90
r3297 r3605 78 78 ! 79 79 INTEGER :: iret, ncid, DimID, VarID, xdmy 80 CHARACTER (len = 50) :: modname = 'mo_simple_plumes.sp_setup' 81 CHARACTER (len = 80) :: abort_message 82 80 83 ! 81 84 ! ---------- … … 84 87 ! 85 88 iret = nf90_open("MACv2.0-SP_v1.nc", NF90_NOWRITE, ncid) 86 IF (iret /= NF90_NOERR) STOP 'NetCDF File not opened' 89 IF (iret /= NF90_NOERR) THEN 90 abort_message='NetCDF File not opened' 91 CALL abort_physic(modname,abort_message,1) 92 ENDIF 87 93 ! 88 94 ! read dimensions and make sure file conforms to expected size … … 90 96 iret = nf90_inq_dimid(ncid, "plume_number" , DimId) 91 97 iret = nf90_inquire_dimension(ncid, DimId, len = xdmy) 92 IF (xdmy /= nplumes) STOP 'NetCDF improperly dimensioned -- plume_number' 98 IF (xdmy /= nplumes) THEN 99 abort_message='NetCDF improperly dimensioned -- plume_number' 100 CALL abort_physic(modname,abort_message,1) 101 ENDIF 93 102 ! 94 103 iret = nf90_inq_dimid(ncid, "plume_feature", DimId) 95 104 iret = nf90_inquire_dimension(ncid, DimId, len = xdmy) 96 IF (xdmy /= nfeatures) STOP 'NetCDF improperly dimensioned -- plume_feature' 105 IF (xdmy /= nfeatures) THEN 106 abort_message='NetCDF improperly dimensioned -- plume_feature' 107 CALL abort_physic(modname,abort_message,1) 108 ENDIF 97 109 ! 98 110 iret = nf90_inq_dimid(ncid, "year_fr" , DimId) 99 111 iret = nf90_inquire_dimension(ncid, DimID, len = xdmy) 100 IF (xdmy /= ntimes) STOP 'NetCDF improperly dimensioned -- year_fr' 112 IF (xdmy /= ntimes) THEN 113 abort_message='NetCDF improperly dimensioned -- year_fr' 114 CALL abort_physic(modname,abort_message,1) 115 ENDIF 101 116 ! 102 117 iret = nf90_inq_dimid(ncid, "years" , DimId) 103 118 iret = nf90_inquire_dimension(ncid, DimID, len = xdmy) 104 IF (xdmy /= nyears) STOP 'NetCDF improperly dimensioned -- years' 119 IF (xdmy /= nyears) THEN 120 abort_message='NetCDF improperly dimensioned -- years' 121 CALL abort_physic(modname,abort_message,1) 122 ENDIF 105 123 ! 106 124 ! read variables that define the simple plume climatology … … 108 126 iret = nf90_inq_varid(ncid, "plume_lat", VarId) 109 127 iret = nf90_get_var(ncid, VarID, plume_lat(:), start=(/1/),count=(/nplumes/)) 110 IF (iret /= NF90_NOERR) STOP 'NetCDF Error reading plume_lat' 128 IF (iret /= NF90_NOERR) THEN 129 abort_message='NetCDF Error reading plume_lat' 130 CALL abort_physic(modname,abort_message,1) 131 ENDIF 111 132 iret = nf90_inq_varid(ncid, "plume_lon", VarId) 112 133 iret = nf90_get_var(ncid, VarID, plume_lon(:), start=(/1/),count=(/nplumes/)) 113 IF (iret /= NF90_NOERR) STOP 'NetCDF Error reading plume_lon' 134 IF (iret /= NF90_NOERR) THEN 135 abort_message='NetCDF Error reading plume_lon' 136 CALL abort_physic(modname,abort_message,1) 137 ENDIF 114 138 iret = nf90_inq_varid(ncid, "beta_a" , VarId) 115 139 iret = nf90_get_var(ncid, VarID, beta_a(:) , start=(/1/),count=(/nplumes/)) 116 IF (iret /= NF90_NOERR) STOP 'NetCDF Error reading beta_a' 140 IF (iret /= NF90_NOERR) THEN 141 abort_message='NetCDF Error reading beta_a' 142 CALL abort_physic(modname,abort_message,1) 143 ENDIF 117 144 iret = nf90_inq_varid(ncid, "beta_b" , VarId) 118 145 iret = nf90_get_var(ncid, VarID, beta_b(:) , start=(/1/),count=(/nplumes/)) 119 IF (iret /= NF90_NOERR) STOP 'NetCDF Error reading beta_b' 146 IF (iret /= NF90_NOERR) THEN 147 abort_message='NetCDF Error reading beta_b' 148 CALL abort_physic(modname,abort_message,1) 149 ENDIF 120 150 iret = nf90_inq_varid(ncid, "aod_spmx" , VarId) 121 151 iret = nf90_get_var(ncid, VarID, aod_spmx(:) , start=(/1/),count=(/nplumes/)) 122 IF (iret /= NF90_NOERR) STOP 'NetCDF Error reading aod_spmx' 152 IF (iret /= NF90_NOERR) THEN 153 abort_message='NetCDF Error reading aod_spmx' 154 CALL abort_physic(modname,abort_message,1) 155 ENDIF 123 156 iret = nf90_inq_varid(ncid, "aod_fmbg" , VarId) 124 157 iret = nf90_get_var(ncid, VarID, aod_fmbg(:) , start=(/1/),count=(/nplumes/)) 125 IF (iret /= NF90_NOERR) STOP 'NetCDF Error reading aod_fmbg' 158 IF (iret /= NF90_NOERR) THEN 159 abort_message='NetCDF Error reading aod_fmbg' 160 CALL abort_physic(modname,abort_message,1) 161 ENDIF 126 162 iret = nf90_inq_varid(ncid, "ssa550" , VarId) 127 163 iret = nf90_get_var(ncid, VarID, ssa550(:) , start=(/1/),count=(/nplumes/)) 128 IF (iret /= NF90_NOERR) STOP 'NetCDF Error reading ssa550' 164 IF (iret /= NF90_NOERR) THEN 165 abort_message='NetCDF Error reading ssa550' 166 CALL abort_physic(modname,abort_message,1) 167 ENDIF 129 168 iret = nf90_inq_varid(ncid, "asy550" , VarId) 130 169 iret = nf90_get_var(ncid, VarID, asy550(:) , start=(/1/),count=(/nplumes/)) 131 IF (iret /= NF90_NOERR) STOP 'NetCDF Error reading asy550' 170 IF (iret /= NF90_NOERR) THEN 171 abort_message='NetCDF Error reading asy550' 172 CALL abort_physic(modname,abort_message,1) 173 ENDIF 132 174 iret = nf90_inq_varid(ncid, "angstrom" , VarId) 133 175 iret = nf90_get_var(ncid, VarID, angstrom(:), start=(/1/),count=(/nplumes/)) 134 IF (iret /= NF90_NOERR) STOP 'NetCDF Error reading angstrom' 176 IF (iret /= NF90_NOERR) THEN 177 abort_message='NetCDF Error reading angstrom' 178 CALL abort_physic(modname,abort_message,1) 179 ENDIF 135 180 ! 136 181 iret = nf90_inq_varid(ncid, "sig_lat_W" , VarId) 137 182 iret = nf90_get_var(ncid, VarID, sig_lat_W(:,:) , start=(/1,1/),count=(/nfeatures,nplumes/)) 138 IF (iret /= NF90_NOERR) STOP 'NetCDF Error reading sig_lat_W' 183 IF (iret /= NF90_NOERR) THEN 184 abort_message='NetCDF Error reading sig_lat_W' 185 CALL abort_physic(modname,abort_message,1) 186 ENDIF 139 187 iret = nf90_inq_varid(ncid, "sig_lat_E" , VarId) 140 188 iret = nf90_get_var(ncid, VarID, sig_lat_E(:,:) , start=(/1,1/),count=(/nfeatures,nplumes/)) 141 IF (iret /= NF90_NOERR) STOP 'NetCDF Error reading sig_lat_E' 189 IF (iret /= NF90_NOERR) THEN 190 abort_message='NetCDF Error reading sig_lat_E' 191 CALL abort_physic(modname,abort_message,1) 192 ENDIF 142 193 iret = nf90_inq_varid(ncid, "sig_lon_E" , VarId) 143 194 iret = nf90_get_var(ncid, VarID, sig_lon_E(:,:) , start=(/1,1/),count=(/nfeatures,nplumes/)) 144 IF (iret /= NF90_NOERR) STOP 'NetCDF Error reading sig_lon_E' 195 IF (iret /= NF90_NOERR) THEN 196 abort_message='NetCDF Error reading sig_lon_E' 197 CALL abort_physic(modname,abort_message,1) 198 ENDIF 145 199 iret = nf90_inq_varid(ncid, "sig_lon_W" , VarId) 146 200 iret = nf90_get_var(ncid, VarID, sig_lon_W(:,:) , start=(/1,1/),count=(/nfeatures,nplumes/)) 147 IF (iret /= NF90_NOERR) STOP 'NetCDF Error reading sig_lon_W' 201 IF (iret /= NF90_NOERR) THEN 202 abort_message='NetCDF Error reading sig_lon_W' 203 CALL abort_physic(modname,abort_message,1) 204 ENDIF 148 205 iret = nf90_inq_varid(ncid, "theta" , VarId) 149 206 iret = nf90_get_var(ncid, VarID, theta(:,:) , start=(/1,1/),count=(/nfeatures,nplumes/)) 150 IF (iret /= NF90_NOERR) STOP 'NetCDF Error reading theta' 207 IF (iret /= NF90_NOERR) THEN 208 abort_message='NetCDF Error reading theta' 209 CALL abort_physic(modname,abort_message,1) 210 ENDIF 151 211 iret = nf90_inq_varid(ncid, "ftr_weight" , VarId) 152 212 iret = nf90_get_var(ncid, VarID, ftr_weight(:,:) , start=(/1,1/),count=(/nfeatures,nplumes/)) 153 IF (iret /= NF90_NOERR) STOP 'NetCDF Error reading plume_lat' 213 IF (iret /= NF90_NOERR) THEN 214 abort_message='NetCDF Error reading plume_lat' 215 CALL abort_physic(modname,abort_message,1) 216 ENDIF 154 217 iret = nf90_inq_varid(ncid, "year_weight" , VarId) 155 218 iret = nf90_get_var(ncid, VarID, year_weight(:,:) , start=(/1,1/),count=(/nyears,nplumes /)) 156 IF (iret /= NF90_NOERR) STOP 'NetCDF Error reading year_weight' 219 IF (iret /= NF90_NOERR) THEN 220 abort_message='NetCDF Error reading year_weight' 221 CALL abort_physic(modname,abort_message,1) 222 ENDIF 157 223 iret = nf90_inq_varid(ncid, "ann_cycle" , VarId) 158 224 iret = nf90_get_var(ncid, VarID, ann_cycle(:,:,:) , start=(/1,1,1/),count=(/nfeatures,ntimes,nplumes/)) 159 IF (iret /= NF90_NOERR) STOP 'NetCDF Error reading ann_cycle' 225 IF (iret /= NF90_NOERR) THEN 226 abort_message='NetCDF Error reading ann_cycle' 227 CALL abort_physic(modname,abort_message,1) 228 ENDIF 160 229 ! 161 230 iret = nf90_close(ncid)
Note: See TracChangeset
for help on using the changeset viewer.