Changeset 5088 for LMDZ6/branches/Amaury_dev/libf/phylmd
- Timestamp:
- Jul 20, 2024, 4:30:31 PM (6 months ago)
- Location:
- LMDZ6/branches/Amaury_dev/libf/phylmd
- Files:
-
- 53 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/condsurfc.F
r5075 r5088 4 4 . lmt_omnat) 5 5 USE dimphy 6 USE lmdz_netcdf, ONLY: nf_close,nf_noerr,nf_inq_varid,nf_open,nf_nowrite,nf90_get_var6 USE netcdf, ONLY: nf90_close,nf90_noerr,nf90_inq_varid,nf90_open,nf90_nowrite,nf90_get_var 7 7 IMPLICIT none 8 8 ! … … 34 34 ENDIF 35 35 ! 36 ierr = NF_OPEN ("limitcarbon.nc", NF_NOWRITE, nid1)37 if (ierr/= NF_NOERR) then36 ierr = nf90_open ("limitcarbon.nc", nf90_nowrite, nid1) 37 if (ierr/=nf90_noerr) then 38 38 write(6,*)' Pb d''ouverture du fichier limitbc.nc' 39 39 write(6,*)' ierr = ', ierr … … 48 48 ! 49 49 ! 50 ierr = NF_INQ_VARID(nid1, "BCFF", nvarid)50 ierr = nf90_inq_varid (nid1, "BCFF", nvarid) 51 51 ierr = nf90_get_var(nid1, nvarid, lmt_bcff, debut, epais) 52 52 ! print *,'IERR = ',ierr 53 ! print *,' NF_NOERR = ',NF_NOERR53 ! print *,'nf90_noerr = ',nf90_noerr 54 54 ! print *,'debut = ',debut 55 55 ! print *,'epais = ',epais 56 IF (ierr /= NF_NOERR) THEN56 IF (ierr /= nf90_noerr) THEN 57 57 PRINT*, 'Pb de lecture pour les sources BC' 58 58 CALL exit(1) … … 60 60 ! 61 61 ! 62 ierr = NF_INQ_VARID(nid1, "BCBB", nvarid)62 ierr = nf90_inq_varid (nid1, "BCBB", nvarid) 63 63 ierr = nf90_get_var(nid1, nvarid, lmt_bcbb, debut, epais) 64 IF (ierr /= NF_NOERR) THEN64 IF (ierr /= nf90_noerr) THEN 65 65 PRINT*, 'Pb de lecture pour les sources BC-biomass' 66 66 CALL exit(1) … … 68 68 ! 69 69 ! 70 ierr = NF_INQ_VARID(nid1, "BCBL", nvarid)70 ierr = nf90_inq_varid (nid1, "BCBL", nvarid) 71 71 ierr = nf90_get_var(nid1, nvarid, lmt_bcbbl, debut, epais) 72 IF (ierr /= NF_NOERR) THEN72 IF (ierr /= nf90_noerr) THEN 73 73 PRINT*, 'Pb de lecture pour les sources BC low' 74 74 CALL exit(1) … … 76 76 ! 77 77 ! 78 ierr = NF_INQ_VARID(nid1, "BCBH", nvarid)78 ierr = nf90_inq_varid (nid1, "BCBH", nvarid) 79 79 ierr = nf90_get_var (nid1, nvarid, lmt_bcbbh, debut, epais) 80 IF (ierr /= NF_NOERR) THEN80 IF (ierr /= nf90_noerr) THEN 81 81 PRINT*, 'Pb de lecture pour les sources BC high' 82 82 CALL exit(1) 83 83 ENDIF 84 84 ! 85 ierr = NF_INQ_VARID(nid1, "TERP", nvarid)85 ierr = nf90_inq_varid (nid1, "TERP", nvarid) 86 86 ierr = nf90_get_var (nid1, nvarid, lmt_terp, debut, epais) 87 IF (ierr /= NF_NOERR) THEN87 IF (ierr /= nf90_noerr) THEN 88 88 PRINT*, 'Pb de lecture pour les sources Terpene' 89 89 CALL exit(1) … … 91 91 ! 92 92 ! 93 ierr = NF_INQ_VARID(nid1, "BC_penner", nvarid)93 ierr = nf90_inq_varid (nid1, "BC_penner", nvarid) 94 94 ierr = nf90_get_var (nid1, nvarid, lmt_bc_penner, debut, epais) 95 IF (ierr /= NF_NOERR) THEN95 IF (ierr /= nf90_noerr) THEN 96 96 PRINT*, 'Pb de lecture pour les sources BC Penner' 97 97 CALL exit(1) … … 99 99 ! 100 100 ! 101 ierr = NF_INQ_VARID(nid1, "OMFF", nvarid)101 ierr = nf90_inq_varid (nid1, "OMFF", nvarid) 102 102 ierr = nf90_get_var (nid1, nvarid, lmt_omff, debut, epais) 103 IF (ierr /= NF_NOERR) THEN103 IF (ierr /= nf90_noerr) THEN 104 104 PRINT*, 'Pb de lecture pour les sources om-ifossil' 105 105 CALL exit(1) … … 114 114 ENDDO 115 115 ! 116 ierr = NF_CLOSE(nid1)116 ierr = nf90_close(nid1) 117 117 PRINT*, 'Carbon sources lues pour jour: ', jour 118 118 ! -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/condsurfc_new.F
r5075 r5088 6 6 USE mod_phys_lmdz_para 7 7 USE dimphy 8 USE lmdz_netcdf, ONLY:nf90_get_var,nf_close,nf_noerr,nf_inq_varid,nf_open,nf_nowrite8 USE netcdf, ONLY:nf90_get_var,nf90_close,nf90_noerr,nf90_inq_varid,nf90_open,nf90_nowrite 9 9 IMPLICIT none 10 10 c … … 57 57 !======================================================================= 58 58 ! 59 ierr = NF_OPEN ("carbon_emissions.nc", NF_NOWRITE, nid1)60 if (ierr/= NF_NOERR) then59 ierr = nf90_open ("carbon_emissions.nc", nf90_nowrite, nid1) 60 if (ierr/=nf90_noerr) then 61 61 write(6,*)' Pb d''ouverture du fichier limitbc.nc' 62 62 write(6,*)' ierr = ', ierr … … 66 66 ! BC emissions from fossil fuel combustion 67 67 ! 68 ierr = NF_INQ_VARID(nid1, "BCFF", nvarid)68 ierr = nf90_inq_varid (nid1, "BCFF", nvarid) 69 69 ierr = nf90_get_var (nid1, nvarid, lmt_bcff_glo, debut, epais) 70 IF (ierr /= NF_NOERR) THEN70 IF (ierr /= nf90_noerr) THEN 71 71 PRINT*, 'Pb de lecture pour les sources BC' 72 72 CALL exit(1) … … 77 77 ! BC emissions from non fossil fuel combustion 78 78 ! 79 ierr = NF_INQ_VARID(nid1, "BCNFF", nvarid)79 ierr = nf90_inq_varid (nid1, "BCNFF", nvarid) 80 80 ierr = nf90_get_var (nid1, nvarid, lmt_bcnff_glo, debut, epais) 81 IF (ierr /= NF_NOERR) THEN81 IF (ierr /= nf90_noerr) THEN 82 82 PRINT*, 'Pb de lecture pour les sources BC' 83 83 CALL exit(1) … … 86 86 ! Low BC emissions from biomass burning 87 87 ! 88 ierr = NF_INQ_VARID(nid1, "BCBBL", nvarid)88 ierr = nf90_inq_varid (nid1, "BCBBL", nvarid) 89 89 ierr = nf90_get_var (nid1, nvarid, lmt_bcbbl_glo, debut, epais) 90 IF (ierr /= NF_NOERR) THEN90 IF (ierr /= nf90_noerr) THEN 91 91 PRINT*, 'Pb de lecture pour les sources BC low' 92 92 CALL exit(1) … … 95 95 ! High BC emissions from biomass burning 96 96 ! 97 ierr = NF_INQ_VARID(nid1, "BCBBH", nvarid)97 ierr = nf90_inq_varid (nid1, "BCBBH", nvarid) 98 98 ierr = nf90_get_var (nid1, nvarid, lmt_bcbbh_glo, debut, epais) 99 IF (ierr /= NF_NOERR) THEN99 IF (ierr /= nf90_noerr) THEN 100 100 PRINT*, 'Pb de lecture pour les sources BC high' 101 101 CALL exit(1) … … 104 104 ! BC emissions from ship transport 105 105 ! 106 ierr = NF_INQ_VARID(nid1, "BCBA", nvarid)106 ierr = nf90_inq_varid (nid1, "BCBA", nvarid) 107 107 ierr = nf90_get_var (nid1, nvarid, lmt_bcba_glo, debut, epais) 108 IF (ierr /= NF_NOERR) THEN108 IF (ierr /= nf90_noerr) THEN 109 109 PRINT*, 'Pb de lecture pour les sources BC' 110 110 CALL exit(1) … … 119 119 ! OM emissions from fossil fuel combustion 120 120 ! 121 ierr = NF_INQ_VARID(nid1, "OMFF", nvarid)121 ierr = nf90_inq_varid (nid1, "OMFF", nvarid) 122 122 ierr = nf90_get_var (nid1, nvarid, lmt_omff_glo, debut, epais) 123 IF (ierr /= NF_NOERR) THEN123 IF (ierr /= nf90_noerr) THEN 124 124 PRINT*, 'Pb de lecture pour les sources OM' 125 125 CALL exit(1) … … 128 128 ! OM emissions from non fossil fuel combustion 129 129 ! 130 ierr = NF_INQ_VARID(nid1, "OMNFF", nvarid)130 ierr = nf90_inq_varid (nid1, "OMNFF", nvarid) 131 131 ierr = nf90_get_var (nid1, nvarid, lmt_omnff_glo, debut, epais) 132 IF (ierr /= NF_NOERR) THEN132 IF (ierr /= nf90_noerr) THEN 133 133 PRINT*, 'Pb de lecture pour les sources OM' 134 134 CALL exit(1) … … 137 137 ! Low OM emissions from biomass burning - low 138 138 ! 139 ierr = NF_INQ_VARID(nid1, "OMBBL", nvarid)139 ierr = nf90_inq_varid (nid1, "OMBBL", nvarid) 140 140 ierr = nf90_get_var (nid1, nvarid, lmt_ombbl_glo, debut, epais) 141 IF (ierr /= NF_NOERR) THEN141 IF (ierr /= nf90_noerr) THEN 142 142 PRINT*, 'Pb de lecture pour les sources OM low' 143 143 CALL exit(1) … … 146 146 ! High OM emissions from biomass burning - high 147 147 ! 148 ierr = NF_INQ_VARID(nid1, "OMBBH", nvarid)148 ierr = nf90_inq_varid (nid1, "OMBBH", nvarid) 149 149 ierr = nf90_get_var (nid1, nvarid, lmt_ombbh_glo, debut, epais) 150 IF (ierr /= NF_NOERR) THEN150 IF (ierr /= nf90_noerr) THEN 151 151 PRINT*, 'Pb de lecture pour les sources OM high' 152 152 CALL exit(1) … … 155 155 ! High OM emissions from ship 156 156 ! 157 ierr = NF_INQ_VARID(nid1, "OMBA", nvarid)157 ierr = nf90_inq_varid (nid1, "OMBA", nvarid) 158 158 ierr = nf90_get_var (nid1, nvarid, lmt_omba_glo, debut, epais) 159 IF (ierr /= NF_NOERR) THEN159 IF (ierr /= nf90_noerr) THEN 160 160 PRINT*, 'Pb de lecture pour les sources OM ship' 161 161 CALL exit(1) … … 164 164 ! Natural Terpene emissions => Natural OM emissions 165 165 ! 166 ierr = NF_INQ_VARID(nid1, "TERP", nvarid)166 ierr = nf90_inq_varid (nid1, "TERP", nvarid) 167 167 ierr = nf90_get_var (nid1, nvarid, lmt_terp_glo, debut, epais) 168 IF (ierr /= NF_NOERR) THEN168 IF (ierr /= nf90_noerr) THEN 169 169 PRINT*, 'Pb de lecture pour les sources Terpene' 170 170 CALL exit(1) … … 175 175 ENDDO 176 176 177 ierr = NF_CLOSE(nid1)177 ierr = nf90_close(nid1) 178 178 ! 179 179 PRINT*, 'Carbon sources lues pour jour: ', jour -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/condsurfs.F
r5075 r5088 4 4 . lmt_dmsbio, lmt_h2sbio, lmt_dms, lmt_dmsconc) 5 5 USE dimphy 6 USE lmdz_netcdf, ONLY:nf_close,nf_noerr,nf_inq_varid,nf_open,nf_nowrite,nf90_get_var6 USE netcdf, ONLY:nf90_close,nf90_noerr,nf90_inq_varid,nf90_open,nf90_nowrite,nf90_get_var 7 7 IMPLICIT none 8 8 c … … 34 34 ENDIF 35 35 c 36 ierr = NF_OPEN ("limitsoufre.nc", NF_NOWRITE, nid)37 if (ierr/= NF_NOERR) then36 ierr = nf90_open ("limitsoufre.nc", nf90_nowrite, nid) 37 if (ierr/=nf90_noerr) then 38 38 write(6,*)' Pb d''ouverture du fichier limitsoufre.nc' 39 39 write(6,*)' ierr = ', ierr … … 47 47 epais(2) = 1 48 48 c 49 ierr = NF_INQ_VARID(nid, "VOLC", nvarid)49 ierr = nf90_inq_varid (nid, "VOLC", nvarid) 50 50 ierr = nf90_get_var(nid, nvarid, lmt_so2volc, debut, epais) 51 IF (ierr /= NF_NOERR) THEN51 IF (ierr /= nf90_noerr) THEN 52 52 PRINT*, 'Pb de lecture pour les sources so2 volcan' 53 53 CALL exit(1) 54 54 ENDIF 55 55 c 56 ierr = NF_INQ_VARID(nid, "ALTI", nvarid)56 ierr = nf90_inq_varid (nid, "ALTI", nvarid) 57 57 ierr = nf90_get_var(nid, nvarid, lmt_altvolc, debut, epais) 58 IF (ierr /= NF_NOERR) THEN58 IF (ierr /= nf90_noerr) THEN 59 59 PRINT*, 'Pb de lecture pour les altitudes volcan' 60 60 CALL exit(1) … … 63 63 IF (edgar) THEN !--EDGAR w/o ship and biomass burning 64 64 c 65 ierr = NF_INQ_VARID(nid, "SO2ED95L", nvarid)65 ierr = nf90_inq_varid (nid, "SO2ED95L", nvarid) 66 66 ierr = nf90_get_var(nid, nvarid, lmt_so2b, debut, epais) 67 IF (ierr /= NF_NOERR) THEN67 IF (ierr /= nf90_noerr) THEN 68 68 PRINT*, 'Pb de lecture pour les sources so2 edgar low' 69 69 CALL exit(1) 70 70 ENDIF 71 71 c 72 ierr = NF_INQ_VARID(nid, "SO2ED95H", nvarid)72 ierr = nf90_inq_varid (nid, "SO2ED95H", nvarid) 73 73 ierr = nf90_get_var(nid, nvarid, lmt_so2h, debut, epais) 74 IF (ierr /= NF_NOERR) THEN74 IF (ierr /= nf90_noerr) THEN 75 75 PRINT*, 'Pb de lecture pour les sources so2 edgar high' 76 76 CALL exit(1) … … 79 79 ELSE !--GEIA 80 80 c 81 ierr = NF_INQ_VARID(nid, "SO2H", nvarid)81 ierr = nf90_inq_varid (nid, "SO2H", nvarid) 82 82 ierr = nf90_get_var(nid, nvarid, lmt_so2h, debut, epais) 83 IF (ierr /= NF_NOERR) THEN83 IF (ierr /= nf90_noerr) THEN 84 84 PRINT*, 'Pb de lecture pour les sources so2 haut' 85 85 CALL exit(1) 86 86 ENDIF 87 87 c 88 ierr = NF_INQ_VARID(nid, "SO2B", nvarid)88 ierr = nf90_inq_varid (nid, "SO2B", nvarid) 89 89 ierr = nf90_get_var(nid, nvarid, lmt_so2b, debut, epais) 90 IF (ierr /= NF_NOERR) THEN90 IF (ierr /= nf90_noerr) THEN 91 91 PRINT*, 'Pb de lecture pour les sources so2 bas' 92 92 CALL exit(1) … … 95 95 ENDIF !--edgar 96 96 c 97 ierr = NF_INQ_VARID(nid, "SO2BB", nvarid)97 ierr = nf90_inq_varid (nid, "SO2BB", nvarid) 98 98 ierr = nf90_get_var(nid, nvarid, lmt_so2bb, debut, epais) 99 IF (ierr /= NF_NOERR) THEN99 IF (ierr /= nf90_noerr) THEN 100 100 PRINT*, 'Pb de lecture pour les sources so2 bb' 101 101 CALL exit(1) 102 102 ENDIF 103 103 c 104 ierr = NF_INQ_VARID(nid, "SO2BA", nvarid)104 ierr = nf90_inq_varid (nid, "SO2BA", nvarid) 105 105 ierr = nf90_get_var(nid, nvarid, lmt_so2ba, debut, epais) 106 IF (ierr /= NF_NOERR) THEN106 IF (ierr /= nf90_noerr) THEN 107 107 PRINT*, 'Pb de lecture pour les sources so2 bateau' 108 108 CALL exit(1) 109 109 ENDIF 110 110 c 111 ierr = NF_INQ_VARID(nid, "DMSB", nvarid)111 ierr = nf90_inq_varid (nid, "DMSB", nvarid) 112 112 ierr = nf90_get_var(nid, nvarid, lmt_dmsbio, debut, epais) 113 IF (ierr /= NF_NOERR) THEN113 IF (ierr /= nf90_noerr) THEN 114 114 PRINT*, 'Pb de lecture pour les sources dms bio' 115 115 CALL exit(1) 116 116 ENDIF 117 117 c 118 ierr = NF_INQ_VARID(nid, "H2SB", nvarid)118 ierr = nf90_inq_varid (nid, "H2SB", nvarid) 119 119 ierr = nf90_get_var(nid, nvarid, lmt_h2sbio, debut, epais) 120 IF (ierr /= NF_NOERR) THEN120 IF (ierr /= nf90_noerr) THEN 121 121 PRINT*, 'Pb de lecture pour les sources h2s bio' 122 122 CALL exit(1) … … 125 125 IF (flag_dms==1) THEN 126 126 c 127 ierr = NF_INQ_VARID(nid, "DMSL", nvarid)127 ierr = nf90_inq_varid (nid, "DMSL", nvarid) 128 128 ierr = nf90_get_var(nid, nvarid, lmt_dms, debut, epais) 129 IF (ierr /= NF_NOERR) THEN129 IF (ierr /= nf90_noerr) THEN 130 130 PRINT*, 'Pb de lecture pour les sources dms liss' 131 131 CALL exit(1) … … 134 134 ELSEIF (flag_dms==2) THEN 135 135 c 136 ierr = NF_INQ_VARID(nid, "DMSW", nvarid)136 ierr = nf90_inq_varid (nid, "DMSW", nvarid) 137 137 ierr = nf90_get_var(nid, nvarid, lmt_dms, debut, epais) 138 IF (ierr /= NF_NOERR) THEN138 IF (ierr /= nf90_noerr) THEN 139 139 PRINT*, 'Pb de lecture pour les sources dms wann' 140 140 CALL exit(1) … … 143 143 ELSEIF (flag_dms==3) THEN 144 144 c 145 ierr = NF_INQ_VARID(nid, "DMSC1", nvarid)146 ierr = nf90_get_var(nid, nvarid, lmt_dmsconc, debut, epais) 147 IF (ierr /= NF_NOERR) THEN145 ierr = nf90_inq_varid (nid, "DMSC1", nvarid) 146 ierr = nf90_get_var(nid, nvarid, lmt_dmsconc, debut, epais) 147 IF (ierr /= nf90_noerr) THEN 148 148 PRINT*, 'Pb de lecture pour les sources dmsconc old' 149 149 CALL exit(1) … … 152 152 ELSEIF (flag_dms==4) THEN 153 153 c 154 ierr = NF_INQ_VARID(nid, "DMSC2", nvarid)155 ierr = nf90_get_var(nid, nvarid, lmt_dmsconc, debut, epais) 156 IF (ierr /= NF_NOERR) THEN154 ierr = nf90_inq_varid (nid, "DMSC2", nvarid) 155 ierr = nf90_get_var(nid, nvarid, lmt_dmsconc, debut, epais) 156 IF (ierr /= nf90_noerr) THEN 157 157 PRINT*, 'Pb de lecture pour les sources dms conc 2' 158 158 CALL exit(1) … … 161 161 ELSEIF (flag_dms==5) THEN 162 162 c 163 ierr = NF_INQ_VARID(nid, "DMSC3", nvarid)164 ierr = nf90_get_var(nid, nvarid, lmt_dmsconc, debut, epais) 165 IF (ierr /= NF_NOERR) THEN163 ierr = nf90_inq_varid (nid, "DMSC3", nvarid) 164 ierr = nf90_get_var(nid, nvarid, lmt_dmsconc, debut, epais) 165 IF (ierr /= nf90_noerr) THEN 166 166 PRINT*, 'Pb de lecture pour les sources dms conc 3' 167 167 CALL exit(1) … … 170 170 ELSEIF (flag_dms==6) THEN 171 171 c 172 ierr = NF_INQ_VARID(nid, "DMSC4", nvarid)173 ierr = nf90_get_var(nid, nvarid, lmt_dmsconc, debut, epais) 174 IF (ierr /= NF_NOERR) THEN172 ierr = nf90_inq_varid (nid, "DMSC4", nvarid) 173 ierr = nf90_get_var(nid, nvarid, lmt_dmsconc, debut, epais) 174 IF (ierr /= nf90_noerr) THEN 175 175 PRINT*, 'Pb de lecture pour les sources dms conc 4' 176 176 CALL exit(1) … … 179 179 ELSEIF (flag_dms==7) THEN 180 180 c 181 ierr = NF_INQ_VARID(nid, "DMSC5", nvarid)182 ierr = nf90_get_var(nid, nvarid, lmt_dmsconc, debut, epais) 183 IF (ierr /= NF_NOERR) THEN181 ierr = nf90_inq_varid (nid, "DMSC5", nvarid) 182 ierr = nf90_get_var(nid, nvarid, lmt_dmsconc, debut, epais) 183 IF (ierr /= nf90_noerr) THEN 184 184 PRINT*, 'Pb de lecture pour les sources dms conc 5' 185 185 CALL exit(1) … … 188 188 ELSEIF (flag_dms==8) THEN 189 189 c 190 ierr = NF_INQ_VARID(nid, "DMSC6", nvarid)191 ierr = nf90_get_var(nid, nvarid, lmt_dmsconc, debut, epais) 192 IF (ierr /= NF_NOERR) THEN190 ierr = nf90_inq_varid (nid, "DMSC6", nvarid) 191 ierr = nf90_get_var(nid, nvarid, lmt_dmsconc, debut, epais) 192 IF (ierr /= nf90_noerr) THEN 193 193 PRINT*, 'Pb de lecture pour les sources dms conc 6' 194 194 CALL exit(1) … … 197 197 ELSEIF (flag_dms==9) THEN 198 198 c 199 ierr = NF_INQ_VARID(nid, "DMSC7", nvarid)200 ierr = nf90_get_var(nid, nvarid, lmt_dmsconc, debut, epais) 201 IF (ierr /= NF_NOERR) THEN199 ierr = nf90_inq_varid (nid, "DMSC7", nvarid) 200 ierr = nf90_get_var(nid, nvarid, lmt_dmsconc, debut, epais) 201 IF (ierr /= nf90_noerr) THEN 202 202 PRINT*, 'Pb de lecture pour les sources dms conc 7' 203 203 CALL exit(1) … … 206 206 ELSEIF (flag_dms==10) THEN 207 207 c 208 ierr = NF_INQ_VARID(nid, "DMSC8", nvarid)209 ierr = nf90_get_var(nid, nvarid, lmt_dmsconc, debut, epais) 210 IF (ierr /= NF_NOERR) THEN208 ierr = nf90_inq_varid (nid, "DMSC8", nvarid) 209 ierr = nf90_get_var(nid, nvarid, lmt_dmsconc, debut, epais) 210 IF (ierr /= nf90_noerr) THEN 211 211 PRINT*, 'Pb de lecture pour les sources dms conc 8' 212 212 CALL exit(1) … … 220 220 ENDIF 221 221 c 222 ierr = NF_CLOSE(nid)222 ierr = nf90_close(nid) 223 223 c 224 224 IF (flag_dms<=2) THEN -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/condsurfs_new.F
r5075 r5088 9 9 USE mod_phys_lmdz_para 10 10 USE dimphy 11 USE lmdz_netcdf, ONLY: nf90_get_var,nf_inq_varid,nf_close,nf_noerr,nf_open,nf_nowrite11 USE netcdf, ONLY: nf90_get_var,nf90_inq_varid,nf90_close,nf90_noerr,nf90_open,nf90_nowrite 12 12 IMPLICIT none 13 13 c … … 61 61 !======================================================================= 62 62 ! 63 ierr = NF_OPEN ("sulphur_emissions_antro.nc", NF_NOWRITE, nid)64 if (ierr/= NF_NOERR) then63 ierr = nf90_open ("sulphur_emissions_antro.nc", nf90_nowrite, nid) 64 if (ierr/=nf90_noerr) then 65 65 write(6,*)' Pb d''ouverture du fichier sulphur_emissions_antro' 66 66 write(6,*)' ierr = ', ierr … … 71 71 ! SO2 Low level emissions 72 72 ! 73 ierr = NF_INQ_VARID(nid, "SO2FF_LOW", nvarid)73 ierr = nf90_inq_varid (nid, "SO2FF_LOW", nvarid) 74 74 ierr = nf90_get_var(nid, nvarid, lmt_so2b_glo, debut, epais) 75 IF (ierr /= NF_NOERR) THEN75 IF (ierr /= nf90_noerr) THEN 76 76 PRINT*, 'Pb de lecture pour les sources so2 low' 77 77 print *,'JE klon, jour, debut ,epais ',klon_glo,jour,debut,epais … … 83 83 ! SO2 High level emissions 84 84 ! 85 ierr = NF_INQ_VARID(nid, "SO2FF_HIGH", nvarid)85 ierr = nf90_inq_varid (nid, "SO2FF_HIGH", nvarid) 86 86 ierr = nf90_get_var(nid, nvarid, lmt_so2h_glo, debut, epais) 87 IF (ierr /= NF_NOERR) THEN87 IF (ierr /= nf90_noerr) THEN 88 88 PRINT*, 'Pb de lecture pour les sources so2 high' 89 89 CALL exit(1) … … 92 92 ! SO2 Biomass burning High level emissions 93 93 ! 94 ierr = NF_INQ_VARID(nid, "SO2BBH", nvarid)94 ierr = nf90_inq_varid (nid, "SO2BBH", nvarid) 95 95 ierr = nf90_get_var(nid, nvarid, lmt_so2bb_h_glo, debut, epais) 96 IF (ierr /= NF_NOERR) THEN96 IF (ierr /= nf90_noerr) THEN 97 97 PRINT*, 'Pb de lecture pour les sources so2 BB high' 98 98 CALL exit(1) … … 101 101 ! SO2 biomass burning low level emissions 102 102 ! 103 ierr = NF_INQ_VARID(nid, "SO2BBL", nvarid)103 ierr = nf90_inq_varid (nid, "SO2BBL", nvarid) 104 104 ierr = nf90_get_var(nid, nvarid, lmt_so2bb_l_glo, debut, epais) 105 IF (ierr /= NF_NOERR) THEN105 IF (ierr /= nf90_noerr) THEN 106 106 PRINT*, 'Pb de lecture pour les sources so2 BB low' 107 107 CALL exit(1) … … 110 110 ! SO2 ship emissions 111 111 ! 112 ierr = NF_INQ_VARID(nid, "SO2BA", nvarid)112 ierr = nf90_inq_varid (nid, "SO2BA", nvarid) 113 113 ierr = nf90_get_var(nid, nvarid, lmt_so2ba_glo, debut, epais) 114 IF (ierr /= NF_NOERR) THEN114 IF (ierr /= nf90_noerr) THEN 115 115 PRINT*, 'Pb de lecture pour les sources so2 ship' 116 116 CALL exit(1) … … 119 119 ! SO2 Non Fossil Fuel Emissions 120 120 ! 121 ierr = NF_INQ_VARID(nid, "SO2NFF", nvarid)121 ierr = nf90_inq_varid (nid, "SO2NFF", nvarid) 122 122 ierr = nf90_get_var(nid, nvarid, lmt_so2nff_glo, debut, epais) 123 IF (ierr /= NF_NOERR) THEN123 IF (ierr /= nf90_noerr) THEN 124 124 PRINT*, 'Pb de lecture pour les sources so2 non FF' 125 125 CALL exit(1) 126 126 ENDIF 127 127 ! 128 ierr = NF_CLOSE(nid)128 ierr = nf90_close(nid) 129 129 ! 130 130 !======================================================================= 131 131 ! READING NATURAL EMISSIONS 132 132 !======================================================================= 133 ierr = NF_OPEN ("sulphur_emissions_nat.nc", NF_NOWRITE, nid)134 if (ierr/= NF_NOERR) then133 ierr = nf90_open ("sulphur_emissions_nat.nc", nf90_nowrite, nid) 134 if (ierr/=nf90_noerr) then 135 135 write(6,*)' Pb d''ouverture du fichier sulphur_emissions_nat' 136 136 write(6,*)' ierr = ', ierr … … 140 140 c Biologenic source of DMS 141 141 c 142 ierr = NF_INQ_VARID(nid, "DMSB", nvarid)142 ierr = nf90_inq_varid (nid, "DMSB", nvarid) 143 143 ierr = nf90_get_var(nid, nvarid, lmt_dmsbio_glo, debut, epais) 144 IF (ierr /= NF_NOERR) THEN144 IF (ierr /= nf90_noerr) THEN 145 145 PRINT*, 'Pb de lecture pour les sources dms bio' 146 146 CALL exit(1) … … 149 149 c Biologenic source of H2S 150 150 c 151 ierr = NF_INQ_VARID(nid, "H2SB", nvarid)151 ierr = nf90_inq_varid (nid, "H2SB", nvarid) 152 152 ierr = nf90_get_var(nid, nvarid, lmt_h2sbio_glo, debut, epais) 153 IF (ierr /= NF_NOERR) THEN153 IF (ierr /= nf90_noerr) THEN 154 154 PRINT*, 'Pb de lecture pour les sources h2s bio' 155 155 CALL exit(1) … … 160 160 IF (flag_dms==4) THEN 161 161 c 162 ierr = NF_INQ_VARID(nid, "DMSC2", nvarid)162 ierr = nf90_inq_varid (nid, "DMSC2", nvarid) 163 163 ierr = nf90_get_var(nid, nvarid, lmt_dmsconc_glo, debut, epais) 164 IF (ierr /= NF_NOERR) THEN164 IF (ierr /= nf90_noerr) THEN 165 165 PRINT*, 'Pb de lecture pour les sources dms conc 2' 166 166 CALL exit(1) … … 179 179 ENDIF 180 180 c 181 ierr = NF_CLOSE(nid)181 ierr = nf90_close(nid) 182 182 c 183 183 !======================================================================= … … 186 186 print *,' *** READING VOLCANIC EMISSIONS *** ' 187 187 print *,' Jour = ',jour 188 ierr = NF_OPEN ("sulphur_emissions_volc.nc", NF_NOWRITE, nid)189 if (ierr/= NF_NOERR) then188 ierr = nf90_open ("sulphur_emissions_volc.nc", nf90_nowrite, nid) 189 if (ierr/=nf90_noerr) then 190 190 write(6,*)' Pb d''ouverture du fichier sulphur_emissions_volc' 191 191 write(6,*)' ierr = ', ierr … … 195 195 c Continuous Volcanic emissions 196 196 c 197 ! ierr = NF_INQ_VARID(nid, "VOLC", nvarid)198 ierr = NF_INQ_VARID(nid, "flx_volc_cont", nvarid)197 ! ierr = nf90_inq_varid (nid, "VOLC", nvarid) 198 ierr = nf90_inq_varid (nid, "flx_volc_cont", nvarid) 199 199 ierr = nf90_get_var(nid, nvarid, lmt_so2volc_cont_glo, debut, epais) 200 IF (ierr /= NF_NOERR) THEN200 IF (ierr /= nf90_noerr) THEN 201 201 PRINT*, 'Pb de lecture pour les sources so2 volcan (cont)' 202 202 CALL exit(1) … … 208 208 c Altitud of continuous volcanic emissions 209 209 c 210 ! ierr = NF_INQ_VARID(nid, "ALTI", nvarid)211 ierr = NF_INQ_VARID(nid, "flx_volc_altcont", nvarid)210 ! ierr = nf90_inq_varid (nid, "ALTI", nvarid) 211 ierr = nf90_inq_varid (nid, "flx_volc_altcont", nvarid) 212 212 ierr = nf90_get_var(nid, nvarid, lmt_altvolc_cont_glo, debut, epais) 213 IF (ierr /= NF_NOERR) THEN213 IF (ierr /= nf90_noerr) THEN 214 214 PRINT*, 'Pb de lecture pour les altitudes volcan (cont)' 215 215 CALL exit(1) … … 218 218 c Explosive Volcanic emissions 219 219 c 220 ierr = NF_INQ_VARID(nid, "flx_volc_expl", nvarid)220 ierr = nf90_inq_varid (nid, "flx_volc_expl", nvarid) 221 221 ierr = nf90_get_var(nid, nvarid, lmt_so2volc_expl_glo, debut, epais) 222 IF (ierr /= NF_NOERR) THEN222 IF (ierr /= nf90_noerr) THEN 223 223 PRINT*, 'Pb de lecture pour les sources so2 volcan (expl)' 224 224 CALL exit(1) … … 230 230 c Altitud of explosive volcanic emissions 231 231 c 232 ierr = NF_INQ_VARID(nid, "flx_volc_altexpl", nvarid)232 ierr = nf90_inq_varid (nid, "flx_volc_altexpl", nvarid) 233 233 ierr = nf90_get_var(nid, nvarid, lmt_altvolc_expl_glo, debut, epais) 234 IF (ierr /= NF_NOERR) THEN234 IF (ierr /= nf90_noerr) THEN 235 235 PRINT*, 'Pb de lecture pour les altitudes volcan' 236 236 CALL exit(1) … … 238 238 ! lmt_altvolc_expl(:)=0.0 239 239 240 ierr = NF_CLOSE(nid)240 ierr = nf90_close(nid) 241 241 c 242 242 PRINT*, 'Sources SOUFRE lues pour jour: ', jour -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/phys_output_write_spl_mod.F90
r5082 r5088 390 390 USE ioipsl, ONLY: histend, histsync 391 391 USE iophy, ONLY: set_itau_iophy, histwrite_phy 392 USE lmdz_netcdf, ONLY: nf90_fill_real392 USE netcdf, ONLY: nf90_fill_real 393 393 ! ug Pour les sorties XIOS 394 394 USE lmdz_xios, ONLY: xios_update_calendar, using_xios -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/phytracr_spl_mod.F90
r5082 r5088 4568 4568 USE mod_grid_phy_lmdz 4569 4569 USE mod_phys_lmdz_para 4570 USE lmdz_netcdf, ONLY:nf_open,nf_close,nf_inq_varid,nf_nowrite,nf_noerr,nf90_get_var4570 USE netcdf, ONLY:nf90_open,nf90_close,nf90_inq_varid,nf90_nowrite,nf90_noerr,nf90_get_var 4571 4571 IMPLICIT NONE 4572 4572 … … 4587 4587 IF (is_mpi_root .AND. is_omp_root) THEN 4588 4588 !nci=NCOPN(trim(adjustl(filescaleparams)),NCNOWRIT,rcode) 4589 ierr = NF_OPEN (trim(adjustl(filescaleparams)),NF_NOWRITE, nid)4590 if (ierr == NF_NOERR) THEN4589 ierr = nf90_open (trim(adjustl(filescaleparams)),nf90_nowrite, nid) 4590 if (ierr == nf90_noerr) THEN 4591 4591 debutread=step_sca 4592 4592 countread=1 … … 4596 4596 varname= trim(adjustl(paramname))//aux_2s 4597 4597 print *,varname 4598 ierr = NF_INQ_VARID(nid,trim(adjustl(varname)), nvarid)4598 ierr = nf90_inq_varid (nid,trim(adjustl(varname)), nvarid) 4599 4599 ierr = nf90_get_var (nid, nvarid, auxreal, debutread, countread) 4600 IF (ierr /= NF_NOERR) THEN4600 IF (ierr /= nf90_noerr) THEN 4601 4601 PRINT*, 'Pb de lecture pour modvalues' 4602 4602 print *,'JE scale_var, step_sca',trim(adjustl(varname)),step_sca … … 4611 4611 enddo 4612 4612 4613 ierr = NF_CLOSE(nid)4613 ierr = nf90_close(nid) 4614 4614 else 4615 4615 print *,'File '//trim(adjustl(filescaleparams))//' not found' -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/read_dust.F
r5075 r5088 3 3 USE mod_grid_phy_lmdz 4 4 USE mod_phys_lmdz_para 5 USE lmdz_netcdf, ONLY:nf90_get_var5 USE netcdf, ONLY:nf90_get_var 6 6 IMPLICIT NONE 7 7 c -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/read_surface.F90
r5087 r5088 10 10 USE mod_phys_lmdz_para 11 11 USE iophy 12 USE lmdz_netcdf, ONLY:nf_inq_varid,nf_noerr,nf90_get_var12 USE netcdf, ONLY:nf90_inq_varid,nf90_noerr,nf90_get_var 13 13 IMPLICIT NONE 14 14 … … 61 61 if (i==4) aux4s='Latu' 62 62 if (i==5) aux4s='latU' 63 status = NF_INQ_VARID(ncid, aux4s, rcode)63 status = nf90_inq_varid (ncid, aux4s, rcode) 64 64 ! print *,'stat,i',status,i,outcycle,aux4s 65 ! print *,'ifclause',status.NE. NF_NOERR,outcycle == .false.66 IF ((.not.(status/= NF_NOERR) ).and.( .not. outcycle )) THEN65 ! print *,'ifclause',status.NE. nf90_noerr ,outcycle == .false. 66 IF ((.not.(status/= nf90_noerr) ).and.( .not. outcycle )) THEN 67 67 outcycle=.true. 68 68 latstr=aux4s … … 76 76 status=nf90_get_var(ncid,varid,lats_glo,startj,endj) 77 77 ! print *,latstr,varid,status,jjp1,rcode 78 ! IF (status .NE. NF_NOERR) print*,'NOOOOOOO'78 ! IF (status .NE. nf90_noerr) print*,'NOOOOOOO' 79 79 ! print *,lats 80 80 !stop -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/read_vent.F
r5075 r5088 3 3 USE mod_grid_phy_lmdz 4 4 USE mod_phys_lmdz_para 5 USE lmdz_netcdf, ONLY: nf90_get_var5 USE netcdf, ONLY: nf90_get_var 6 6 ! USE write_field_phy 7 7 IMPLICIT NONE -
LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/interp_sulf_input.F90
r5082 r5088 6 6 USE netcdf95, ONLY: nf95_close, nf95_gw_var, nf95_inq_dimid, & 7 7 nf95_inq_varid, nf95_inquire_dimension, nf95_open 8 USE lmdz_netcdf, ONLY: nf90_get_var, nf90_noerr, nf90_nowrite8 USE netcdf, ONLY: nf90_get_var, nf90_noerr, nf90_nowrite 9 9 10 10 USE mod_grid_phy_lmdz -
LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/stratH2O_methox.F90
r5075 r5088 8 8 USE netcdf95, ONLY: nf95_close, nf95_gw_var, nf95_inq_dimid, & 9 9 nf95_inq_varid, nf95_inquire_dimension, nf95_open 10 USE lmdz_netcdf, ONLY: nf90_get_var, nf90_noerr, nf90_nowrite10 USE netcdf, ONLY: nf90_get_var, nf90_noerr, nf90_nowrite 11 11 12 12 USE mod_grid_phy_lmdz -
LMDZ6/branches/Amaury_dev/libf/phylmd/condsurf.F90
r5075 r5088 7 7 USE indice_sol_mod 8 8 USE time_phylmdz_mod, ONLY: annee_ref 9 USE lmdz_netcdf, ONLY: nf90_get_var,nf_open,nf_inq_varid,nf_noerr,nf_close,nf_nowrite9 USE netcdf, ONLY: nf90_get_var,nf90_open,nf90_inq_varid,nf90_noerr,nf90_close,nf90_nowrite 10 10 IMPLICIT NONE 11 11 … … 88 88 !$OMP MASTER 89 89 IF (is_mpi_root) THEN 90 ierr = nf _open(fich, nf_nowrite, nid)91 IF (ierr/=nf _noerr) THEN90 ierr = nf90_open(fich, nf90_nowrite, nid) 91 IF (ierr/=nf90_noerr) THEN 92 92 WRITE (6, *) ' Pb d''ouverture du fichier ', fich 93 93 WRITE (6, *) ' Le fichier limit ', fich, ' (avec 4 chiffres , pour' … … 105 105 ! Bilan flux de chaleur au sol: 106 106 107 ierr = nf _inq_varid(nid, 'BILS', nvarid)108 IF (ierr/=nf _noerr) THEN107 ierr = nf90_inq_varid(nid, 'BILS', nvarid) 108 IF (ierr/=nf90_noerr) THEN 109 109 CALL abort_physic('cond_surf', 'Le champ <BILS> est absent', 1) 110 110 END IF 111 111 PRINT *, 'debut,epais', debut, epais, 'jour,jourvrai', jour, jourvrai 112 112 ierr = nf90_get_var(nid, nvarid, lmt_bils_glo, debut, epais) 113 IF (ierr/=nf _noerr) THEN113 IF (ierr/=nf90_noerr) THEN 114 114 CALL abort_physic('condsurf', 'Lecture echouee pour <BILS>', 1) 115 115 END IF … … 118 118 ! Fermer le fichier: 119 119 120 ierr = nf _close(nid)120 ierr = nf90_close(nid) 121 121 122 122 END IF ! is_mpi_root==0 -
LMDZ6/branches/Amaury_dev/libf/phylmd/create_etat0_unstruct_mod.F90
r5075 r5088 23 23 SUBROUTINE init_create_etat0_unstruct 24 24 USE lmdz_xios 25 USE lmdz_netcdf, ONLY: NF90_NOWRITE,nf90_close,nf90_noerr,nf90_open25 USE netcdf, ONLY: NF90_NOWRITE,nf90_close,nf90_noerr,nf90_open 26 26 USE mod_phys_lmdz_para 27 27 IMPLICIT NONE -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1DUTILS.h
r5075 r5088 673 673 USE logic_mod, ONLY: fxyhypb, ysinus 674 674 USE temps_mod, ONLY: annee_ref, day_ini, day_ref, itau_dyn 675 USE lmdz_netcdf, ONLY:nf_open,nf_write,nf_noerr675 USE netcdf, ONLY:nf90_open,nf90_write,nf90_noerr 676 676 677 677 IMPLICIT NONE … … 820 820 USE logic_mod, ONLY: fxyhypb, ysinus 821 821 USE temps_mod, ONLY: annee_ref,day_end,day_ref,itau_dyn,itaufin 822 USE lmdz_netcdf, ONLY:nf_open,nf_write,nf_noerr822 USE netcdf, ONLY:nf90_open,nf90_write,nf90_noerr 823 823 824 824 IMPLICIT NONE … … 868 868 869 869 ! modname = 'dyn1dredem' 870 ! ierr = NF_OPEN(fichnom, NF_WRITE, nid)871 ! IF (ierr .NE. NF_NOERR) THEN870 ! ierr = nf90_open(fichnom, nf90_write, nid) 871 ! IF (ierr .NE. nf90_noerr) THEN 872 872 ! abort_message="Pb. d ouverture "//fichnom 873 873 ! CALL abort_gcm('Modele 1D',abort_message,1) -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/mod_1D_amma_read.F90
r5087 r5088 1 1 MODULE mod_1D_amma_read 2 USE lmdz_netcdf, ONLY: nf90_get_var,nf_open,nf_noerr,nf_open,nf_nowrite,&3 nf _inq_dimid,nf_inq_dimlen,nf_strerror,nf_inq_varid2 USE netcdf, ONLY: nf90_get_var,nf90_open,nf90_noerr,nf90_open,nf90_nowrite,& 3 nf90_inq_dimid,nf90_inquire_dimension,nf90_strerror,nf90_inq_varid 4 4 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 5 5 !Declarations specifiques au cas AMMA … … 63 63 fich_amma='amma.nc' 64 64 print*,'fich_amma ',fich_amma 65 ierr = NF_OPEN(fich_amma,NF_NOWRITE,nid)66 print*,'fich_amma, NF_NOWRITE,nid ',fich_amma,NF_NOWRITE,nid67 if (ierr/= NF_NOERR) then65 ierr = nf90_open(fich_amma,nf90_nowrite,nid) 66 print*,'fich_amma,nf90_nowrite,nid ',fich_amma,nf90_nowrite,nid 67 if (ierr/=nf90_noerr) then 68 68 write(*,*) 'ERROR: GROS Pb opening forcings nc file ' 69 write(*,*) NF_STRERROR(ierr)69 write(*,*) nf90_strerror(ierr) 70 70 stop "" 71 71 endif 72 72 !....................................................................... 73 ierr= NF_INQ_DIMID(nid,'lev',rid)74 IF (ierr/= NF_NOERR) THEN73 ierr=nf90_inq_dimid(nid,'lev',rid) 74 IF (ierr/=nf90_noerr) THEN 75 75 print*, 'Oh probleme lecture dimension zz' 76 76 ENDIF 77 ierr= NF_INQ_DIMLEN(nid,rid,nlev_amma)77 ierr=nf90_inquire_dimension(nid,rid,len=nlev_amma) 78 78 print*,'OK nid,rid,nlev_amma',nid,rid,nlev_amma 79 79 !....................................................................... 80 ierr= NF_INQ_DIMID(nid,'time',rid)80 ierr=nf90_inq_dimid(nid,'time',rid) 81 81 print*,'nid,rid',nid,rid 82 82 nt_amma=0 83 IF (ierr/= NF_NOERR) THEN83 IF (ierr/=nf90_noerr) THEN 84 84 stop 'probleme lecture dimension sens' 85 85 ENDIF 86 ierr= NF_INQ_DIMLEN(nid,rid,nt_amma)86 ierr=nf90_inquire_dimension(nid,rid,len=nt_amma) 87 87 print*,'nid,rid,nlev_amma',nid,rid,nt_amma 88 88 … … 195 195 integer var3didin(nbvar3d) 196 196 197 ierr= NF_INQ_VARID(nid,"zz",var3didin(1))198 if(ierr/= NF_NOERR) then199 write(*,*) NF_STRERROR(ierr)197 ierr=nf90_inq_varid(nid,"zz",var3didin(1)) 198 if(ierr/=nf90_noerr) then 199 write(*,*) nf90_strerror(ierr) 200 200 stop 'lev' 201 201 endif 202 202 203 203 204 ierr= NF_INQ_VARID(nid,"temp",var3didin(2))205 if(ierr/= NF_NOERR) then206 write(*,*) NF_STRERROR(ierr)204 ierr=nf90_inq_varid(nid,"temp",var3didin(2)) 205 if(ierr/=nf90_noerr) then 206 write(*,*) nf90_strerror(ierr) 207 207 stop 'temp' 208 208 endif 209 209 210 ierr= NF_INQ_VARID(nid,"qv",var3didin(3))211 if(ierr/= NF_NOERR) then212 write(*,*) NF_STRERROR(ierr)210 ierr=nf90_inq_varid(nid,"qv",var3didin(3)) 211 if(ierr/=nf90_noerr) then 212 write(*,*) nf90_strerror(ierr) 213 213 stop 'qv' 214 214 endif 215 215 216 ierr= NF_INQ_VARID(nid,"u",var3didin(4))217 if(ierr/= NF_NOERR) then218 write(*,*) NF_STRERROR(ierr)216 ierr=nf90_inq_varid(nid,"u",var3didin(4)) 217 if(ierr/=nf90_noerr) then 218 write(*,*) nf90_strerror(ierr) 219 219 stop 'u' 220 220 endif 221 221 222 ierr= NF_INQ_VARID(nid,"v",var3didin(5))223 if(ierr/= NF_NOERR) then224 write(*,*) NF_STRERROR(ierr)222 ierr=nf90_inq_varid(nid,"v",var3didin(5)) 223 if(ierr/=nf90_noerr) then 224 write(*,*) nf90_strerror(ierr) 225 225 stop 'v' 226 226 endif 227 227 228 ierr= NF_INQ_VARID(nid,"dw",var3didin(6))229 if(ierr/= NF_NOERR) then230 write(*,*) NF_STRERROR(ierr)228 ierr=nf90_inq_varid(nid,"dw",var3didin(6)) 229 if(ierr/=nf90_noerr) then 230 write(*,*) nf90_strerror(ierr) 231 231 stop 'dw' 232 232 endif 233 233 234 ierr= NF_INQ_VARID(nid,"dt",var3didin(7))235 if(ierr/= NF_NOERR) then236 write(*,*) NF_STRERROR(ierr)234 ierr=nf90_inq_varid(nid,"dt",var3didin(7)) 235 if(ierr/=nf90_noerr) then 236 write(*,*) nf90_strerror(ierr) 237 237 stop 'dt' 238 238 endif 239 239 240 ierr= NF_INQ_VARID(nid,"dq",var3didin(8))241 if(ierr/= NF_NOERR) then242 write(*,*) NF_STRERROR(ierr)240 ierr=nf90_inq_varid(nid,"dq",var3didin(8)) 241 if(ierr/=nf90_noerr) then 242 write(*,*) nf90_strerror(ierr) 243 243 stop 'dq' 244 244 endif 245 245 246 ierr= NF_INQ_VARID(nid,"sens",var3didin(9))247 if(ierr/= NF_NOERR) then248 write(*,*) NF_STRERROR(ierr)246 ierr=nf90_inq_varid(nid,"sens",var3didin(9)) 247 if(ierr/=nf90_noerr) then 248 write(*,*) nf90_strerror(ierr) 249 249 stop 'sens' 250 250 endif 251 251 252 ierr= NF_INQ_VARID(nid,"flat",var3didin(10))253 if(ierr/= NF_NOERR) then254 write(*,*) NF_STRERROR(ierr)252 ierr=nf90_inq_varid(nid,"flat",var3didin(10)) 253 if(ierr/=nf90_noerr) then 254 write(*,*) nf90_strerror(ierr) 255 255 stop 'flat' 256 256 endif 257 257 258 ierr= NF_INQ_VARID(nid,"pp",var3didin(11))259 if(ierr/= NF_NOERR) then260 write(*,*) NF_STRERROR(ierr)258 ierr=nf90_inq_varid(nid,"pp",var3didin(11)) 259 if(ierr/=nf90_noerr) then 260 write(*,*) nf90_strerror(ierr) 261 261 endif 262 262 … … 265 265 266 266 ierr = nf90_get_var(nid,var3didin(1),zz) 267 if(ierr/= NF_NOERR) then268 write(*,*) NF_STRERROR(ierr)267 if(ierr/=nf90_noerr) then 268 write(*,*) nf90_strerror(ierr) 269 269 stop "getvarup" 270 270 endif … … 272 272 273 273 ierr = nf90_get_var(nid,var3didin(2),temp) 274 if(ierr/= NF_NOERR) then275 write(*,*) NF_STRERROR(ierr)274 if(ierr/=nf90_noerr) then 275 write(*,*) nf90_strerror(ierr) 276 276 stop "getvarup" 277 277 endif … … 279 279 280 280 ierr = nf90_get_var(nid,var3didin(3),qv) 281 if(ierr/= NF_NOERR) then282 write(*,*) NF_STRERROR(ierr)281 if(ierr/=nf90_noerr) then 282 write(*,*) nf90_strerror(ierr) 283 283 stop "getvarup" 284 284 endif … … 286 286 287 287 ierr = nf90_get_var(nid,var3didin(4),u) 288 if(ierr/= NF_NOERR) then289 write(*,*) NF_STRERROR(ierr)288 if(ierr/=nf90_noerr) then 289 write(*,*) nf90_strerror(ierr) 290 290 stop "getvarup" 291 291 endif … … 293 293 294 294 ierr = nf90_get_var(nid,var3didin(5),v) 295 if(ierr/= NF_NOERR) then296 write(*,*) NF_STRERROR(ierr)295 if(ierr/=nf90_noerr) then 296 write(*,*) nf90_strerror(ierr) 297 297 stop "getvarup" 298 298 endif … … 300 300 301 301 ierr = nf90_get_var(nid,var3didin(6),dw) 302 if(ierr/= NF_NOERR) then303 write(*,*) NF_STRERROR(ierr)302 if(ierr/=nf90_noerr) then 303 write(*,*) nf90_strerror(ierr) 304 304 stop "getvarup" 305 305 endif … … 307 307 308 308 ierr = nf90_get_var(nid,var3didin(7),dt) 309 if(ierr/= NF_NOERR) then310 write(*,*) NF_STRERROR(ierr)309 if(ierr/=nf90_noerr) then 310 write(*,*) nf90_strerror(ierr) 311 311 stop "getvarup" 312 312 endif … … 314 314 315 315 ierr = nf90_get_var(nid,var3didin(8),dq) 316 if(ierr/= NF_NOERR) then317 write(*,*) NF_STRERROR(ierr)316 if(ierr/=nf90_noerr) then 317 write(*,*) nf90_strerror(ierr) 318 318 stop "getvarup" 319 319 endif … … 321 321 322 322 ierr = nf90_get_var(nid,var3didin(9),sens) 323 if(ierr/= NF_NOERR) then324 write(*,*) NF_STRERROR(ierr)323 if(ierr/=nf90_noerr) then 324 write(*,*) nf90_strerror(ierr) 325 325 stop "getvarup" 326 326 endif … … 328 328 329 329 ierr = nf90_get_var(nid,var3didin(10),flat) 330 if(ierr/= NF_NOERR) then331 write(*,*) NF_STRERROR(ierr)330 if(ierr/=nf90_noerr) then 331 write(*,*) nf90_strerror(ierr) 332 332 stop "getvarup" 333 333 endif … … 335 335 336 336 ierr = nf90_get_var(nid,var3didin(11),pp) 337 if(ierr/= NF_NOERR) then338 write(*,*) NF_STRERROR(ierr)337 if(ierr/=nf90_noerr) then 338 write(*,*) nf90_strerror(ierr) 339 339 stop "getvarup" 340 340 endif -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/mod_1D_cases_read.F90
r5087 r5088 1 1 MODULE mod_1D_cases_read 2 USE lmdz_netcdf, ONLY: nf_noerr,nf_strerror,nf_inq_varid,nf_inq_dimlen,nf_inq_dimid,&3 nf _nowrite,nf_open,nf90_get_var2 USE netcdf, ONLY: nf90_noerr,nf90_strerror,nf90_inq_varid,nf90_inquire_dimension,nf90_inq_dimid,& 3 nf90_nowrite,nf90_open,nf90_get_var 4 4 5 5 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 93 93 fich_cas='setup/cas.nc' 94 94 print*,'fich_cas ',fich_cas 95 ierr = NF_OPEN(fich_cas,NF_NOWRITE,nid)96 print*,'fich_cas, NF_NOWRITE,nid ',fich_cas,NF_NOWRITE,nid97 if (ierr/= NF_NOERR) then95 ierr = nf90_open(fich_cas,nf90_nowrite,nid) 96 print*,'fich_cas,nf90_nowrite,nid ',fich_cas,nf90_nowrite,nid 97 if (ierr/=nf90_noerr) then 98 98 write(*,*) 'ERROR: GROS Pb opening forcings nc file ' 99 write(*,*) NF_STRERROR(ierr)99 write(*,*) nf90_strerror(ierr) 100 100 stop "" 101 101 endif 102 102 !....................................................................... 103 ierr= NF_INQ_DIMID(nid,'lat',rid)104 IF (ierr/= NF_NOERR) THEN103 ierr=nf90_inq_dimid(nid,'lat',rid) 104 IF (ierr/=nf90_noerr) THEN 105 105 print*, 'Oh probleme lecture dimension lat' 106 106 ENDIF 107 ierr= NF_INQ_DIMLEN(nid,rid,ii)107 ierr=nf90_inquire_dimension(nid,rid,len=ii) 108 108 print*,'OK1 nid,rid,lat',nid,rid,ii 109 109 !....................................................................... 110 ierr= NF_INQ_DIMID(nid,'lon',rid)111 IF (ierr/= NF_NOERR) THEN110 ierr=nf90_inq_dimid(nid,'lon',rid) 111 IF (ierr/=nf90_noerr) THEN 112 112 print*, 'Oh probleme lecture dimension lon' 113 113 ENDIF 114 ierr= NF_INQ_DIMLEN(nid,rid,jj)114 ierr=nf90_inquire_dimension(nid,rid,len=jj) 115 115 print*,'OK2 nid,rid,lat',nid,rid,jj 116 116 !....................................................................... 117 ierr= NF_INQ_DIMID(nid,'lev',rid)118 IF (ierr/= NF_NOERR) THEN117 ierr=nf90_inq_dimid(nid,'lev',rid) 118 IF (ierr/=nf90_noerr) THEN 119 119 print*, 'Oh probleme lecture dimension zz' 120 120 ENDIF 121 ierr= NF_INQ_DIMLEN(nid,rid,nlev_cas)121 ierr=nf90_inquire_dimension(nid,rid,len=nlev_cas) 122 122 print*,'OK3 nid,rid,nlev_cas',nid,rid,nlev_cas 123 123 !....................................................................... 124 ierr= NF_INQ_DIMID(nid,'time',rid)124 ierr=nf90_inq_dimid(nid,'time',rid) 125 125 print*,'nid,rid',nid,rid 126 126 nt_cas=0 127 IF (ierr/= NF_NOERR) THEN127 IF (ierr/=nf90_noerr) THEN 128 128 stop 'probleme lecture dimension sens' 129 129 ENDIF 130 ierr= NF_INQ_DIMLEN(nid,rid,nt_cas)130 ierr=nf90_inquire_dimension(nid,rid,len=nt_cas) 131 131 print*,'OK4 nid,rid,nt_cas',nid,rid,nt_cas 132 132 … … 288 288 integer var3didin(nbvar3d) 289 289 290 ierr= NF_INQ_VARID(nid,"zz",var3didin(1))291 if(ierr/= NF_NOERR) then292 write(*,*) NF_STRERROR(ierr)290 ierr=nf90_inq_varid(nid,"zz",var3didin(1)) 291 if(ierr/=nf90_noerr) then 292 write(*,*) nf90_strerror(ierr) 293 293 stop 'lev' 294 294 endif 295 295 296 ierr= NF_INQ_VARID(nid,"pp",var3didin(2))297 if(ierr/= NF_NOERR) then298 write(*,*) NF_STRERROR(ierr)296 ierr=nf90_inq_varid(nid,"pp",var3didin(2)) 297 if(ierr/=nf90_noerr) then 298 write(*,*) nf90_strerror(ierr) 299 299 stop 'plev' 300 300 endif 301 301 302 302 303 ierr= NF_INQ_VARID(nid,"temp",var3didin(3))304 if(ierr/= NF_NOERR) then305 write(*,*) NF_STRERROR(ierr)303 ierr=nf90_inq_varid(nid,"temp",var3didin(3)) 304 if(ierr/=nf90_noerr) then 305 write(*,*) nf90_strerror(ierr) 306 306 stop 'temp' 307 307 endif 308 308 309 ierr= NF_INQ_VARID(nid,"qv",var3didin(4))310 if(ierr/= NF_NOERR) then311 write(*,*) NF_STRERROR(ierr)309 ierr=nf90_inq_varid(nid,"qv",var3didin(4)) 310 if(ierr/=nf90_noerr) then 311 write(*,*) nf90_strerror(ierr) 312 312 stop 'qv' 313 313 endif 314 314 315 ierr= NF_INQ_VARID(nid,"rh",var3didin(5))316 if(ierr/= NF_NOERR) then317 write(*,*) NF_STRERROR(ierr)315 ierr=nf90_inq_varid(nid,"rh",var3didin(5)) 316 if(ierr/=nf90_noerr) then 317 write(*,*) nf90_strerror(ierr) 318 318 stop 'rh' 319 319 endif 320 320 321 ierr= NF_INQ_VARID(nid,"theta",var3didin(6))322 if(ierr/= NF_NOERR) then323 write(*,*) NF_STRERROR(ierr)321 ierr=nf90_inq_varid(nid,"theta",var3didin(6)) 322 if(ierr/=nf90_noerr) then 323 write(*,*) nf90_strerror(ierr) 324 324 stop 'theta' 325 325 endif 326 326 327 ierr= NF_INQ_VARID(nid,"rv",var3didin(7))328 if(ierr/= NF_NOERR) then329 write(*,*) NF_STRERROR(ierr)327 ierr=nf90_inq_varid(nid,"rv",var3didin(7)) 328 if(ierr/=nf90_noerr) then 329 write(*,*) nf90_strerror(ierr) 330 330 stop 'rv' 331 331 endif 332 332 333 333 334 ierr= NF_INQ_VARID(nid,"u",var3didin(8))335 if(ierr/= NF_NOERR) then336 write(*,*) NF_STRERROR(ierr)334 ierr=nf90_inq_varid(nid,"u",var3didin(8)) 335 if(ierr/=nf90_noerr) then 336 write(*,*) nf90_strerror(ierr) 337 337 stop 'u' 338 338 endif 339 339 340 ierr= NF_INQ_VARID(nid,"v",var3didin(9))341 if(ierr/= NF_NOERR) then342 write(*,*) NF_STRERROR(ierr)340 ierr=nf90_inq_varid(nid,"v",var3didin(9)) 341 if(ierr/=nf90_noerr) then 342 write(*,*) nf90_strerror(ierr) 343 343 stop 'v' 344 344 endif 345 345 346 ierr= NF_INQ_VARID(nid,"ug",var3didin(10))347 if(ierr/= NF_NOERR) then348 write(*,*) NF_STRERROR(ierr)346 ierr=nf90_inq_varid(nid,"ug",var3didin(10)) 347 if(ierr/=nf90_noerr) then 348 write(*,*) nf90_strerror(ierr) 349 349 stop 'ug' 350 350 endif 351 351 352 ierr= NF_INQ_VARID(nid,"vg",var3didin(11))353 if(ierr/= NF_NOERR) then354 write(*,*) NF_STRERROR(ierr)352 ierr=nf90_inq_varid(nid,"vg",var3didin(11)) 353 if(ierr/=nf90_noerr) then 354 write(*,*) nf90_strerror(ierr) 355 355 stop 'vg' 356 356 endif 357 357 358 ierr= NF_INQ_VARID(nid,"w",var3didin(12))359 if(ierr/= NF_NOERR) then360 write(*,*) NF_STRERROR(ierr)358 ierr=nf90_inq_varid(nid,"w",var3didin(12)) 359 if(ierr/=nf90_noerr) then 360 write(*,*) nf90_strerror(ierr) 361 361 stop 'w' 362 362 endif 363 363 364 ierr= NF_INQ_VARID(nid,"advu",var3didin(13))365 if(ierr/= NF_NOERR) then366 write(*,*) NF_STRERROR(ierr)364 ierr=nf90_inq_varid(nid,"advu",var3didin(13)) 365 if(ierr/=nf90_noerr) then 366 write(*,*) nf90_strerror(ierr) 367 367 stop 'advu' 368 368 endif 369 369 370 ierr= NF_INQ_VARID(nid,"hu",var3didin(14))371 if(ierr/= NF_NOERR) then372 write(*,*) NF_STRERROR(ierr)370 ierr=nf90_inq_varid(nid,"hu",var3didin(14)) 371 if(ierr/=nf90_noerr) then 372 write(*,*) nf90_strerror(ierr) 373 373 stop 'hu' 374 374 endif 375 375 376 ierr= NF_INQ_VARID(nid,"vu",var3didin(15))377 if(ierr/= NF_NOERR) then378 write(*,*) NF_STRERROR(ierr)376 ierr=nf90_inq_varid(nid,"vu",var3didin(15)) 377 if(ierr/=nf90_noerr) then 378 write(*,*) nf90_strerror(ierr) 379 379 stop 'vu' 380 380 endif 381 381 382 ierr= NF_INQ_VARID(nid,"advv",var3didin(16))383 if(ierr/= NF_NOERR) then384 write(*,*) NF_STRERROR(ierr)382 ierr=nf90_inq_varid(nid,"advv",var3didin(16)) 383 if(ierr/=nf90_noerr) then 384 write(*,*) nf90_strerror(ierr) 385 385 stop 'advv' 386 386 endif 387 387 388 ierr= NF_INQ_VARID(nid,"hv",var3didin(17))389 if(ierr/= NF_NOERR) then390 write(*,*) NF_STRERROR(ierr)388 ierr=nf90_inq_varid(nid,"hv",var3didin(17)) 389 if(ierr/=nf90_noerr) then 390 write(*,*) nf90_strerror(ierr) 391 391 stop 'hv' 392 392 endif 393 393 394 ierr= NF_INQ_VARID(nid,"vv",var3didin(18))395 if(ierr/= NF_NOERR) then396 write(*,*) NF_STRERROR(ierr)394 ierr=nf90_inq_varid(nid,"vv",var3didin(18)) 395 if(ierr/=nf90_noerr) then 396 write(*,*) nf90_strerror(ierr) 397 397 stop 'vv' 398 398 endif 399 399 400 ierr= NF_INQ_VARID(nid,"advT",var3didin(19))401 if(ierr/= NF_NOERR) then402 write(*,*) NF_STRERROR(ierr)400 ierr=nf90_inq_varid(nid,"advT",var3didin(19)) 401 if(ierr/=nf90_noerr) then 402 write(*,*) nf90_strerror(ierr) 403 403 stop 'advT' 404 404 endif 405 405 406 ierr= NF_INQ_VARID(nid,"hT",var3didin(20))407 if(ierr/= NF_NOERR) then408 write(*,*) NF_STRERROR(ierr)406 ierr=nf90_inq_varid(nid,"hT",var3didin(20)) 407 if(ierr/=nf90_noerr) then 408 write(*,*) nf90_strerror(ierr) 409 409 stop 'hT' 410 410 endif 411 411 412 ierr= NF_INQ_VARID(nid,"vT",var3didin(21))413 if(ierr/= NF_NOERR) then414 write(*,*) NF_STRERROR(ierr)412 ierr=nf90_inq_varid(nid,"vT",var3didin(21)) 413 if(ierr/=nf90_noerr) then 414 write(*,*) nf90_strerror(ierr) 415 415 stop 'vT' 416 416 endif 417 417 418 ierr= NF_INQ_VARID(nid,"advq",var3didin(22))419 if(ierr/= NF_NOERR) then420 write(*,*) NF_STRERROR(ierr)418 ierr=nf90_inq_varid(nid,"advq",var3didin(22)) 419 if(ierr/=nf90_noerr) then 420 write(*,*) nf90_strerror(ierr) 421 421 stop 'advq' 422 422 endif 423 423 424 ierr= NF_INQ_VARID(nid,"hq",var3didin(23))425 if(ierr/= NF_NOERR) then426 write(*,*) NF_STRERROR(ierr)424 ierr=nf90_inq_varid(nid,"hq",var3didin(23)) 425 if(ierr/=nf90_noerr) then 426 write(*,*) nf90_strerror(ierr) 427 427 stop 'hq' 428 428 endif 429 429 430 ierr= NF_INQ_VARID(nid,"vq",var3didin(24))431 if(ierr/= NF_NOERR) then432 write(*,*) NF_STRERROR(ierr)430 ierr=nf90_inq_varid(nid,"vq",var3didin(24)) 431 if(ierr/=nf90_noerr) then 432 write(*,*) nf90_strerror(ierr) 433 433 stop 'vq' 434 434 endif 435 435 436 ierr= NF_INQ_VARID(nid,"advth",var3didin(25))437 if(ierr/= NF_NOERR) then438 write(*,*) NF_STRERROR(ierr)436 ierr=nf90_inq_varid(nid,"advth",var3didin(25)) 437 if(ierr/=nf90_noerr) then 438 write(*,*) nf90_strerror(ierr) 439 439 stop 'advth' 440 440 endif 441 441 442 ierr= NF_INQ_VARID(nid,"hth",var3didin(26))443 if(ierr/= NF_NOERR) then444 write(*,*) NF_STRERROR(ierr)442 ierr=nf90_inq_varid(nid,"hth",var3didin(26)) 443 if(ierr/=nf90_noerr) then 444 write(*,*) nf90_strerror(ierr) 445 445 stop 'hth' 446 446 endif 447 447 448 ierr= NF_INQ_VARID(nid,"vth",var3didin(27))449 if(ierr/= NF_NOERR) then450 write(*,*) NF_STRERROR(ierr)448 ierr=nf90_inq_varid(nid,"vth",var3didin(27)) 449 if(ierr/=nf90_noerr) then 450 write(*,*) nf90_strerror(ierr) 451 451 stop 'vth' 452 452 endif 453 453 454 ierr= NF_INQ_VARID(nid,"advr",var3didin(28))455 if(ierr/= NF_NOERR) then456 write(*,*) NF_STRERROR(ierr)454 ierr=nf90_inq_varid(nid,"advr",var3didin(28)) 455 if(ierr/=nf90_noerr) then 456 write(*,*) nf90_strerror(ierr) 457 457 stop 'advr' 458 458 endif 459 459 460 ierr= NF_INQ_VARID(nid,"hr",var3didin(29))461 if(ierr/= NF_NOERR) then462 write(*,*) NF_STRERROR(ierr)460 ierr=nf90_inq_varid(nid,"hr",var3didin(29)) 461 if(ierr/=nf90_noerr) then 462 write(*,*) nf90_strerror(ierr) 463 463 stop 'hr' 464 464 endif 465 465 466 ierr= NF_INQ_VARID(nid,"vr",var3didin(30))467 if(ierr/= NF_NOERR) then468 write(*,*) NF_STRERROR(ierr)466 ierr=nf90_inq_varid(nid,"vr",var3didin(30)) 467 if(ierr/=nf90_noerr) then 468 write(*,*) nf90_strerror(ierr) 469 469 stop 'vr' 470 470 endif 471 471 472 ierr= NF_INQ_VARID(nid,"radT",var3didin(31))473 if(ierr/= NF_NOERR) then474 write(*,*) NF_STRERROR(ierr)472 ierr=nf90_inq_varid(nid,"radT",var3didin(31)) 473 if(ierr/=nf90_noerr) then 474 write(*,*) nf90_strerror(ierr) 475 475 stop 'radT' 476 476 endif 477 477 478 ierr= NF_INQ_VARID(nid,"sens",var3didin(32))479 if(ierr/= NF_NOERR) then480 write(*,*) NF_STRERROR(ierr)478 ierr=nf90_inq_varid(nid,"sens",var3didin(32)) 479 if(ierr/=nf90_noerr) then 480 write(*,*) nf90_strerror(ierr) 481 481 stop 'sens' 482 482 endif 483 483 484 ierr= NF_INQ_VARID(nid,"flat",var3didin(33))485 if(ierr/= NF_NOERR) then486 write(*,*) NF_STRERROR(ierr)484 ierr=nf90_inq_varid(nid,"flat",var3didin(33)) 485 if(ierr/=nf90_noerr) then 486 write(*,*) nf90_strerror(ierr) 487 487 stop 'flat' 488 488 endif 489 489 490 ierr= NF_INQ_VARID(nid,"ts",var3didin(34))491 if(ierr/= NF_NOERR) then492 write(*,*) NF_STRERROR(ierr)490 ierr=nf90_inq_varid(nid,"ts",var3didin(34)) 491 if(ierr/=nf90_noerr) then 492 write(*,*) nf90_strerror(ierr) 493 493 stop 'ts' 494 494 endif 495 495 496 ierr= NF_INQ_VARID(nid,"ustar",var3didin(35))497 if(ierr/= NF_NOERR) then498 write(*,*) NF_STRERROR(ierr)496 ierr=nf90_inq_varid(nid,"ustar",var3didin(35)) 497 if(ierr/=nf90_noerr) then 498 write(*,*) nf90_strerror(ierr) 499 499 stop 'ustar' 500 500 endif 501 501 502 ierr= NF_INQ_VARID(nid,"uw",var3didin(36))503 if(ierr/= NF_NOERR) then504 write(*,*) NF_STRERROR(ierr)502 ierr=nf90_inq_varid(nid,"uw",var3didin(36)) 503 if(ierr/=nf90_noerr) then 504 write(*,*) nf90_strerror(ierr) 505 505 stop 'uw' 506 506 endif 507 507 508 ierr= NF_INQ_VARID(nid,"vw",var3didin(37))509 if(ierr/= NF_NOERR) then510 write(*,*) NF_STRERROR(ierr)508 ierr=nf90_inq_varid(nid,"vw",var3didin(37)) 509 if(ierr/=nf90_noerr) then 510 write(*,*) nf90_strerror(ierr) 511 511 stop 'vw' 512 512 endif 513 513 514 ierr= NF_INQ_VARID(nid,"q1",var3didin(38))515 if(ierr/= NF_NOERR) then516 write(*,*) NF_STRERROR(ierr)514 ierr=nf90_inq_varid(nid,"q1",var3didin(38)) 515 if(ierr/=nf90_noerr) then 516 write(*,*) nf90_strerror(ierr) 517 517 stop 'q1' 518 518 endif 519 519 520 ierr= NF_INQ_VARID(nid,"q2",var3didin(39))521 if(ierr/= NF_NOERR) then522 write(*,*) NF_STRERROR(ierr)520 ierr=nf90_inq_varid(nid,"q2",var3didin(39)) 521 if(ierr/=nf90_noerr) then 522 write(*,*) nf90_strerror(ierr) 523 523 stop 'q2' 524 524 endif 525 525 526 526 ierr = nf90_get_var(nid,var3didin(1),zz) 527 if(ierr/= NF_NOERR) then528 write(*,*) NF_STRERROR(ierr)527 if(ierr/=nf90_noerr) then 528 write(*,*) nf90_strerror(ierr) 529 529 stop "getvarup" 530 530 endif … … 532 532 533 533 ierr = nf90_get_var(nid,var3didin(2),pp) 534 if(ierr/= NF_NOERR) then535 write(*,*) NF_STRERROR(ierr)534 if(ierr/=nf90_noerr) then 535 write(*,*) nf90_strerror(ierr) 536 536 stop "getvarup" 537 537 endif … … 540 540 541 541 ierr = nf90_get_var(nid,var3didin(3),temp) 542 if(ierr/= NF_NOERR) then543 write(*,*) NF_STRERROR(ierr)542 if(ierr/=nf90_noerr) then 543 write(*,*) nf90_strerror(ierr) 544 544 stop "getvarup" 545 545 endif … … 547 547 548 548 ierr = nf90_get_var(nid,var3didin(4),qv) 549 if(ierr/= NF_NOERR) then550 write(*,*) NF_STRERROR(ierr)549 if(ierr/=nf90_noerr) then 550 write(*,*) nf90_strerror(ierr) 551 551 stop "getvarup" 552 552 endif … … 554 554 555 555 ierr = nf90_get_var(nid,var3didin(5),rh) 556 if(ierr/= NF_NOERR) then557 write(*,*) NF_STRERROR(ierr)556 if(ierr/=nf90_noerr) then 557 write(*,*) nf90_strerror(ierr) 558 558 stop "getvarup" 559 559 endif … … 561 561 562 562 ierr = nf90_get_var(nid,var3didin(6),theta) 563 if(ierr/= NF_NOERR) then564 write(*,*) NF_STRERROR(ierr)563 if(ierr/=nf90_noerr) then 564 write(*,*) nf90_strerror(ierr) 565 565 stop "getvarup" 566 566 endif … … 568 568 569 569 ierr = nf90_get_var(nid,var3didin(7),rv) 570 if(ierr/= NF_NOERR) then571 write(*,*) NF_STRERROR(ierr)570 if(ierr/=nf90_noerr) then 571 write(*,*) nf90_strerror(ierr) 572 572 stop "getvarup" 573 573 endif … … 575 575 576 576 ierr = nf90_get_var(nid,var3didin(8),u) 577 if(ierr/= NF_NOERR) then578 write(*,*) NF_STRERROR(ierr)577 if(ierr/=nf90_noerr) then 578 write(*,*) nf90_strerror(ierr) 579 579 stop "getvarup" 580 580 endif … … 582 582 583 583 ierr = nf90_get_var(nid,var3didin(9),v) 584 if(ierr/= NF_NOERR) then585 write(*,*) NF_STRERROR(ierr)584 if(ierr/=nf90_noerr) then 585 write(*,*) nf90_strerror(ierr) 586 586 stop "getvarup" 587 587 endif … … 589 589 590 590 ierr = nf90_get_var(nid,var3didin(10),ug) 591 if(ierr/= NF_NOERR) then592 write(*,*) NF_STRERROR(ierr)591 if(ierr/=nf90_noerr) then 592 write(*,*) nf90_strerror(ierr) 593 593 stop "getvarup" 594 594 endif … … 596 596 597 597 ierr = nf90_get_var(nid,var3didin(11),vg) 598 if(ierr/= NF_NOERR) then599 write(*,*) NF_STRERROR(ierr)598 if(ierr/=nf90_noerr) then 599 write(*,*) nf90_strerror(ierr) 600 600 stop "getvarup" 601 601 endif … … 603 603 604 604 ierr = nf90_get_var(nid,var3didin(12),w) 605 if(ierr/= NF_NOERR) then606 write(*,*) NF_STRERROR(ierr)605 if(ierr/=nf90_noerr) then 606 write(*,*) nf90_strerror(ierr) 607 607 stop "getvarup" 608 608 endif … … 610 610 611 611 ierr = nf90_get_var(nid,var3didin(13),du) 612 if(ierr/= NF_NOERR) then613 write(*,*) NF_STRERROR(ierr)612 if(ierr/=nf90_noerr) then 613 write(*,*) nf90_strerror(ierr) 614 614 stop "getvarup" 615 615 endif … … 617 617 618 618 ierr = nf90_get_var(nid,var3didin(14),hu) 619 if(ierr/= NF_NOERR) then620 write(*,*) NF_STRERROR(ierr)619 if(ierr/=nf90_noerr) then 620 write(*,*) nf90_strerror(ierr) 621 621 stop "getvarup" 622 622 endif … … 624 624 625 625 ierr = nf90_get_var(nid,var3didin(15),vu) 626 if(ierr/= NF_NOERR) then627 write(*,*) NF_STRERROR(ierr)626 if(ierr/=nf90_noerr) then 627 write(*,*) nf90_strerror(ierr) 628 628 stop "getvarup" 629 629 endif … … 631 631 632 632 ierr = nf90_get_var(nid,var3didin(16),dv) 633 if(ierr/= NF_NOERR) then634 write(*,*) NF_STRERROR(ierr)633 if(ierr/=nf90_noerr) then 634 write(*,*) nf90_strerror(ierr) 635 635 stop "getvarup" 636 636 endif … … 638 638 639 639 ierr = nf90_get_var(nid,var3didin(17),hv) 640 if(ierr/= NF_NOERR) then641 write(*,*) NF_STRERROR(ierr)640 if(ierr/=nf90_noerr) then 641 write(*,*) nf90_strerror(ierr) 642 642 stop "getvarup" 643 643 endif … … 645 645 646 646 ierr = nf90_get_var(nid,var3didin(18),vv) 647 if(ierr/= NF_NOERR) then648 write(*,*) NF_STRERROR(ierr)647 if(ierr/=nf90_noerr) then 648 write(*,*) nf90_strerror(ierr) 649 649 stop "getvarup" 650 650 endif … … 652 652 653 653 ierr = nf90_get_var(nid,var3didin(19),dt) 654 if(ierr/= NF_NOERR) then655 write(*,*) NF_STRERROR(ierr)654 if(ierr/=nf90_noerr) then 655 write(*,*) nf90_strerror(ierr) 656 656 stop "getvarup" 657 657 endif … … 659 659 660 660 ierr = nf90_get_var(nid,var3didin(20),ht) 661 if(ierr/= NF_NOERR) then662 write(*,*) NF_STRERROR(ierr)661 if(ierr/=nf90_noerr) then 662 write(*,*) nf90_strerror(ierr) 663 663 stop "getvarup" 664 664 endif … … 666 666 667 667 ierr = nf90_get_var(nid,var3didin(21),vt) 668 if(ierr/= NF_NOERR) then669 write(*,*) NF_STRERROR(ierr)668 if(ierr/=nf90_noerr) then 669 write(*,*) nf90_strerror(ierr) 670 670 stop "getvarup" 671 671 endif … … 673 673 674 674 ierr = nf90_get_var(nid,var3didin(22),dq) 675 if(ierr/= NF_NOERR) then676 write(*,*) NF_STRERROR(ierr)675 if(ierr/=nf90_noerr) then 676 write(*,*) nf90_strerror(ierr) 677 677 stop "getvarup" 678 678 endif … … 680 680 681 681 ierr = nf90_get_var(nid,var3didin(23),hq) 682 if(ierr/= NF_NOERR) then683 write(*,*) NF_STRERROR(ierr)682 if(ierr/=nf90_noerr) then 683 write(*,*) nf90_strerror(ierr) 684 684 stop "getvarup" 685 685 endif … … 687 687 688 688 ierr = nf90_get_var(nid,var3didin(24),vq) 689 if(ierr/= NF_NOERR) then690 write(*,*) NF_STRERROR(ierr)689 if(ierr/=nf90_noerr) then 690 write(*,*) nf90_strerror(ierr) 691 691 stop "getvarup" 692 692 endif … … 694 694 695 695 ierr = nf90_get_var(nid,var3didin(25),dth) 696 if(ierr/= NF_NOERR) then697 write(*,*) NF_STRERROR(ierr)696 if(ierr/=nf90_noerr) then 697 write(*,*) nf90_strerror(ierr) 698 698 stop "getvarup" 699 699 endif … … 701 701 702 702 ierr = nf90_get_var(nid,var3didin(26),hth) 703 if(ierr/= NF_NOERR) then704 write(*,*) NF_STRERROR(ierr)703 if(ierr/=nf90_noerr) then 704 write(*,*) nf90_strerror(ierr) 705 705 stop "getvarup" 706 706 endif … … 708 708 709 709 ierr = nf90_get_var(nid,var3didin(27),vth) 710 if(ierr/= NF_NOERR) then711 write(*,*) NF_STRERROR(ierr)710 if(ierr/=nf90_noerr) then 711 write(*,*) nf90_strerror(ierr) 712 712 stop "getvarup" 713 713 endif … … 715 715 716 716 ierr = nf90_get_var(nid,var3didin(28),dr) 717 if(ierr/= NF_NOERR) then718 write(*,*) NF_STRERROR(ierr)717 if(ierr/=nf90_noerr) then 718 write(*,*) nf90_strerror(ierr) 719 719 stop "getvarup" 720 720 endif … … 722 722 723 723 ierr = nf90_get_var(nid,var3didin(29),hr) 724 if(ierr/= NF_NOERR) then725 write(*,*) NF_STRERROR(ierr)724 if(ierr/=nf90_noerr) then 725 write(*,*) nf90_strerror(ierr) 726 726 stop "getvarup" 727 727 endif … … 729 729 730 730 ierr = nf90_get_var(nid,var3didin(30),vr) 731 if(ierr/= NF_NOERR) then732 write(*,*) NF_STRERROR(ierr)731 if(ierr/=nf90_noerr) then 732 write(*,*) nf90_strerror(ierr) 733 733 stop "getvarup" 734 734 endif … … 736 736 737 737 ierr = nf90_get_var(nid,var3didin(31),dtrad) 738 if(ierr/= NF_NOERR) then739 write(*,*) NF_STRERROR(ierr)738 if(ierr/=nf90_noerr) then 739 write(*,*) nf90_strerror(ierr) 740 740 stop "getvarup" 741 741 endif … … 743 743 744 744 ierr = nf90_get_var(nid,var3didin(32),sens) 745 if(ierr/= NF_NOERR) then746 write(*,*) NF_STRERROR(ierr)745 if(ierr/=nf90_noerr) then 746 write(*,*) nf90_strerror(ierr) 747 747 stop "getvarup" 748 748 endif … … 750 750 751 751 ierr = nf90_get_var(nid,var3didin(33),flat) 752 if(ierr/= NF_NOERR) then753 write(*,*) NF_STRERROR(ierr)752 if(ierr/=nf90_noerr) then 753 write(*,*) nf90_strerror(ierr) 754 754 stop "getvarup" 755 755 endif … … 757 757 758 758 ierr = nf90_get_var(nid,var3didin(34),ts) 759 if(ierr/= NF_NOERR) then760 write(*,*) NF_STRERROR(ierr)759 if(ierr/=nf90_noerr) then 760 write(*,*) nf90_strerror(ierr) 761 761 stop "getvarup" 762 762 endif … … 764 764 765 765 ierr = nf90_get_var(nid,var3didin(35),ustar) 766 if(ierr/= NF_NOERR) then767 write(*,*) NF_STRERROR(ierr)766 if(ierr/=nf90_noerr) then 767 write(*,*) nf90_strerror(ierr) 768 768 stop "getvarup" 769 769 endif … … 771 771 772 772 ierr = nf90_get_var(nid,var3didin(36),uw) 773 if(ierr/= NF_NOERR) then774 write(*,*) NF_STRERROR(ierr)773 if(ierr/=nf90_noerr) then 774 write(*,*) nf90_strerror(ierr) 775 775 stop "getvarup" 776 776 endif … … 778 778 779 779 ierr = nf90_get_var(nid,var3didin(37),vw) 780 if(ierr/= NF_NOERR) then781 write(*,*) NF_STRERROR(ierr)780 if(ierr/=nf90_noerr) then 781 write(*,*) nf90_strerror(ierr) 782 782 stop "getvarup" 783 783 endif … … 785 785 786 786 ierr = nf90_get_var(nid,var3didin(38),q1) 787 if(ierr/= NF_NOERR) then788 write(*,*) NF_STRERROR(ierr)787 if(ierr/=nf90_noerr) then 788 write(*,*) nf90_strerror(ierr) 789 789 stop "getvarup" 790 790 endif … … 792 792 793 793 ierr = nf90_get_var(nid,var3didin(39),q2) 794 if(ierr/= NF_NOERR) then795 write(*,*) NF_STRERROR(ierr)794 if(ierr/=nf90_noerr) then 795 write(*,*) nf90_strerror(ierr) 796 796 stop "getvarup" 797 797 endif -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/mod_1D_cases_read2.F90
r5075 r5088 3 3 ! 4 4 MODULE mod_1D_cases_read2 5 USE lmdz_netcdf, ONLY: nf90_get_var,nf_noerr,nf_inq_varid,nf_inq_dimlen,nf_strerror,nf_open,&6 nf _nowrite,nf_inq_dimid5 USE netcdf, ONLY: nf90_get_var,nf90_noerr,nf90_inq_varid,nf90_inquire_dimension,nf90_strerror,nf90_open,& 6 nf90_nowrite,nf90_inq_dimid 7 7 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 8 8 !Declarations specifiques au cas standard … … 87 87 fich_cas='setup/cas.nc' 88 88 print*,'fich_cas ',fich_cas 89 ierr = NF_OPEN(fich_cas,NF_NOWRITE,nid)90 print*,'fich_cas, NF_NOWRITE,nid ',fich_cas,NF_NOWRITE,nid91 if (ierr/= NF_NOERR) then89 ierr = nf90_open(fich_cas,nf90_nowrite,nid) 90 print*,'fich_cas,nf90_nowrite,nid ',fich_cas,nf90_nowrite,nid 91 if (ierr/=nf90_noerr) then 92 92 write(*,*) 'ERROR: GROS Pb opening forcings nc file ' 93 write(*,*) NF_STRERROR(ierr)93 write(*,*) nf90_strerror(ierr) 94 94 stop "" 95 95 endif 96 96 !....................................................................... 97 ierr= NF_INQ_DIMID(nid,'lat',rid)98 IF (ierr/= NF_NOERR) THEN97 ierr=nf90_inq_dimid(nid,'lat',rid) 98 IF (ierr/=nf90_noerr) THEN 99 99 print*, 'Oh probleme lecture dimension lat' 100 100 ENDIF 101 ierr= NF_INQ_DIMLEN(nid,rid,ii)101 ierr=nf90_inquire_dimension(nid,rid,len=ii) 102 102 print*,'OK1 nid,rid,lat',nid,rid,ii 103 103 !....................................................................... 104 ierr= NF_INQ_DIMID(nid,'lon',rid)105 IF (ierr/= NF_NOERR) THEN104 ierr=nf90_inq_dimid(nid,'lon',rid) 105 IF (ierr/=nf90_noerr) THEN 106 106 print*, 'Oh probleme lecture dimension lon' 107 107 ENDIF 108 ierr= NF_INQ_DIMLEN(nid,rid,jj)108 ierr=nf90_inquire_dimension(nid,rid,len=jj) 109 109 print*,'OK2 nid,rid,lat',nid,rid,jj 110 110 !....................................................................... 111 ierr= NF_INQ_DIMID(nid,'lev',rid)112 IF (ierr/= NF_NOERR) THEN111 ierr=nf90_inq_dimid(nid,'lev',rid) 112 IF (ierr/=nf90_noerr) THEN 113 113 print*, 'Oh probleme lecture dimension zz' 114 114 ENDIF 115 ierr= NF_INQ_DIMLEN(nid,rid,nlev_cas)115 ierr=nf90_inquire_dimension(nid,rid,len=nlev_cas) 116 116 print*,'OK3 nid,rid,nlev_cas',nid,rid,nlev_cas 117 117 !....................................................................... 118 ierr= NF_INQ_DIMID(nid,'time',rid)118 ierr=nf90_inq_dimid(nid,'time',rid) 119 119 print*,'nid,rid',nid,rid 120 120 nt_cas=0 121 IF (ierr/= NF_NOERR) THEN121 IF (ierr/=nf90_noerr) THEN 122 122 stop 'probleme lecture dimension sens' 123 123 ENDIF 124 ierr= NF_INQ_DIMLEN(nid,rid,nt_cas)124 ierr=nf90_inquire_dimension(nid,rid,len=nt_cas) 125 125 print*,'OK4 nid,rid,nt_cas',nid,rid,nt_cas 126 126 … … 196 196 fich_cas='setup/cas.nc' 197 197 print*,'fich_cas ',fich_cas 198 ierr = NF_OPEN(fich_cas,NF_NOWRITE,nid)199 print*,'fich_cas, NF_NOWRITE,nid ',fich_cas,NF_NOWRITE,nid200 if (ierr/= NF_NOERR) then198 ierr = nf90_open(fich_cas,nf90_nowrite,nid) 199 print*,'fich_cas,nf90_nowrite,nid ',fich_cas,nf90_nowrite,nid 200 if (ierr/=nf90_noerr) then 201 201 write(*,*) 'ERROR: GROS Pb opening forcings nc file ' 202 write(*,*) NF_STRERROR(ierr)202 write(*,*) nf90_strerror(ierr) 203 203 stop "" 204 204 endif 205 205 !....................................................................... 206 ierr= NF_INQ_DIMID(nid,'lat',rid)207 IF (ierr/= NF_NOERR) THEN206 ierr=nf90_inq_dimid(nid,'lat',rid) 207 IF (ierr/=nf90_noerr) THEN 208 208 print*, 'Oh probleme lecture dimension lat' 209 209 ENDIF 210 ierr= NF_INQ_DIMLEN(nid,rid,ii)210 ierr=nf90_inquire_dimension(nid,rid,len=ii) 211 211 print*,'OK1 read2: nid,rid,lat',nid,rid,ii 212 212 !....................................................................... 213 ierr= NF_INQ_DIMID(nid,'lon',rid)214 IF (ierr/= NF_NOERR) THEN213 ierr=nf90_inq_dimid(nid,'lon',rid) 214 IF (ierr/=nf90_noerr) THEN 215 215 print*, 'Oh probleme lecture dimension lon' 216 216 ENDIF 217 ierr= NF_INQ_DIMLEN(nid,rid,jj)217 ierr=nf90_inquire_dimension(nid,rid,len=jj) 218 218 print*,'OK2 read2: nid,rid,lat',nid,rid,jj 219 219 !....................................................................... 220 ierr= NF_INQ_DIMID(nid,'nlev',rid)221 IF (ierr/= NF_NOERR) THEN220 ierr=nf90_inq_dimid(nid,'nlev',rid) 221 IF (ierr/=nf90_noerr) THEN 222 222 print*, 'Oh probleme lecture dimension nlev' 223 223 ENDIF 224 ierr= NF_INQ_DIMLEN(nid,rid,nlev_cas)224 ierr=nf90_inquire_dimension(nid,rid,len=nlev_cas) 225 225 print*,'OK3 read2: nid,rid,nlev_cas',nid,rid,nlev_cas 226 226 !....................................................................... 227 ierr= NF_INQ_DIMID(nid,'time',rid)227 ierr=nf90_inq_dimid(nid,'time',rid) 228 228 nt_cas=0 229 IF (ierr/= NF_NOERR) THEN229 IF (ierr/=nf90_noerr) THEN 230 230 stop 'Oh probleme lecture dimension time' 231 231 ENDIF 232 ierr= NF_INQ_DIMLEN(nid,rid,nt_cas)232 ierr=nf90_inquire_dimension(nid,rid,len=nt_cas) 233 233 print*,'OK4 read2: nid,rid,nt_cas',nid,rid,nt_cas 234 234 … … 324 324 fich_cas='cas.nc' 325 325 print*,'fich_cas ',fich_cas 326 ierr = NF_OPEN(fich_cas,NF_NOWRITE,nid)327 print*,'fich_cas, NF_NOWRITE,nid ',fich_cas,NF_NOWRITE,nid328 if (ierr/= NF_NOERR) then326 ierr = nf90_open(fich_cas,nf90_nowrite,nid) 327 print*,'fich_cas,nf90_nowrite,nid ',fich_cas,nf90_nowrite,nid 328 if (ierr/=nf90_noerr) then 329 329 write(*,*) 'ERROR: GROS Pb opening forcings nc file ' 330 write(*,*) NF_STRERROR(ierr)330 write(*,*) nf90_strerror(ierr) 331 331 stop "" 332 332 endif 333 333 !....................................................................... 334 ierr= NF_INQ_DIMID(nid,'lat',rid)335 IF (ierr/= NF_NOERR) THEN334 ierr=nf90_inq_dimid(nid,'lat',rid) 335 IF (ierr/=nf90_noerr) THEN 336 336 print*, 'Oh probleme lecture dimension lat' 337 337 ENDIF 338 ierr= NF_INQ_DIMLEN(nid,rid,ii)338 ierr=nf90_inquire_dimension(nid,rid,len=ii) 339 339 print*,'OK1 read2: nid,rid,lat',nid,rid,ii 340 340 !....................................................................... 341 ierr= NF_INQ_DIMID(nid,'lon',rid)342 IF (ierr/= NF_NOERR) THEN341 ierr=nf90_inq_dimid(nid,'lon',rid) 342 IF (ierr/=nf90_noerr) THEN 343 343 print*, 'Oh probleme lecture dimension lon' 344 344 ENDIF 345 ierr= NF_INQ_DIMLEN(nid,rid,jj)345 ierr=nf90_inquire_dimension(nid,rid,len=jj) 346 346 print*,'OK2 read2: nid,rid,lat',nid,rid,jj 347 347 !....................................................................... 348 ierr= NF_INQ_DIMID(nid,'lev',rid)349 IF (ierr/= NF_NOERR) THEN348 ierr=nf90_inq_dimid(nid,'lev',rid) 349 IF (ierr/=nf90_noerr) THEN 350 350 print*, 'Oh probleme lecture dimension nlev' 351 351 ENDIF 352 ierr= NF_INQ_DIMLEN(nid,rid,nlev_cas)352 ierr=nf90_inquire_dimension(nid,rid,len=nlev_cas) 353 353 print*,'OK3 read2: nid,rid,nlev_cas',nid,rid,nlev_cas 354 354 IF ( .NOT. ( nlev_cas > 10 .AND. nlev_cas < 1000 )) THEN … … 357 357 ENDIF 358 358 !....................................................................... 359 ierr= NF_INQ_DIMID(nid,'time',rid)359 ierr=nf90_inq_dimid(nid,'time',rid) 360 360 nt_cas=0 361 IF (ierr/= NF_NOERR) THEN361 IF (ierr/=nf90_noerr) THEN 362 362 stop 'Oh probleme lecture dimension time' 363 363 ENDIF 364 ierr= NF_INQ_DIMLEN(nid,rid,nt_cas)364 ierr=nf90_inquire_dimension(nid,rid,len=nt_cas) 365 365 print*,'OK4 read2: nid,rid,nt_cas',nid,rid,nt_cas 366 366 ! Lecture de l'axe des temps 367 367 print*,'LECTURE DU TEMPS' 368 ierr= NF_INQ_VARID(nid,'time',timeid)369 if(ierr/= NF_NOERR) then368 ierr=nf90_inq_varid(nid,'time',timeid) 369 if(ierr/=nf90_noerr) then 370 370 print *,'Variable time manquante dans cas.nc:' 371 ierr= NF_NOERR371 ierr=nf90_noerr 372 372 else 373 373 allocate(time_val(nt_cas)) 374 374 ierr = NF90_GET_VAR(nid,timeid,time_val) 375 if(ierr/= NF_NOERR) then375 if(ierr/=nf90_noerr) then 376 376 print *,'Pb a la lecture de time cas.nc: ' 377 377 endif … … 573 573 enddo 574 574 do i=1,nbvar3d 575 ierr= NF_INQ_VARID(nid,name_var(i),var3didin(i))575 ierr=nf90_inq_varid(nid,name_var(i),var3didin(i)) 576 576 print *,'ierr=',i,ierr,name_var(i),var3didin(i) 577 if(ierr/= NF_NOERR) then577 if(ierr/=nf90_noerr) then 578 578 print *,'Variable manquante dans cas.nc:',name_var(i) 579 579 endif … … 584 584 ierr = NF90_GET_VAR(nid,var3didin(i),resul, count = [1, 1, nlevel, ntime]) 585 585 print *,'Dans read_cas2, on a lu ',ierr,var3didin(i),name_var(i) 586 if(ierr/= NF_NOERR) then586 if(ierr/=nf90_noerr) then 587 587 print *,'Pb a la lecture de cas.nc: ',name_var(i) 588 588 stop "getvarup" … … 591 591 print *,'Dans read_cas2, on a lu ',ierr,var3didin(i),name_var(i) 592 592 ierr = NF90_GET_VAR(nid,var3didin(i),resul1, count = [1, 1, ntime]) 593 if(ierr/= NF_NOERR) then593 if(ierr/=nf90_noerr) then 594 594 print *,'Pb a la lecture de cas.nc: ',name_var(i) 595 595 stop "getvarup" … … 694 694 !----------------------------------------------------------------------- 695 695 do i=1,nbvar3d 696 ierr= NF_INQ_VARID(nid,name_var(i),var3didin(i))697 if(ierr/= NF_NOERR) then696 ierr=nf90_inq_varid(nid,name_var(i),var3didin(i)) 697 if(ierr/=nf90_noerr) then 698 698 print *,'Variable manquante dans cas.nc:',i,name_var(i) 699 ierr= NF_NOERR699 ierr=nf90_noerr 700 700 missing_var(i)=1 701 701 else … … 704 704 ierr = NF90_GET_VAR(nid,var3didin(i),apbp, count = [1, 1, nlevel + 1]) 705 705 print *,'read2_cas(apbp), on a lu ',i,name_var(i) 706 if(ierr/= NF_NOERR) then706 if(ierr/=nf90_noerr) then 707 707 print *,'Pb a la lecture de cas.nc: ',name_var(i) 708 708 stop "getvarup" … … 712 712 ierr = NF90_GET_VAR(nid,var3didin(i),resul, count = [1, 1, nlevel, ntime]) 713 713 print *,'read2_cas(resul), on a lu ',i,name_var(i) 714 if(ierr/= NF_NOERR) then714 if(ierr/=nf90_noerr) then 715 715 print *,'Pb a la lecture de cas.nc: ',name_var(i) 716 716 stop "getvarup" … … 720 720 ierr = NF90_GET_VAR(nid,var3didin(i),resul2, count = [1, 1, ntime]) 721 721 print *,'read2_cas(resul2), on a lu ',i,name_var(i) 722 if(ierr/= NF_NOERR) then722 if(ierr/=nf90_noerr) then 723 723 print *,'Pb a la lecture de cas.nc: ',name_var(i) 724 724 stop "getvarup" … … 728 728 ierr = NF90_GET_VAR(nid,var3didin(i),resul3) 729 729 print *,'read2_cas(resul3), on a lu ',i,name_var(i) 730 if(ierr/= NF_NOERR) then730 if(ierr/=nf90_noerr) then 731 731 print *,'Pb a la lecture de cas.nc: ',name_var(i) 732 732 stop "getvarup" … … 869 869 print*,'ON EST LA' 870 870 do i=1,nbvar3d 871 ierr= NF_INQ_VARID(nid,name_var(i),var3didin(i))872 if(ierr/= NF_NOERR) then871 ierr=nf90_inq_varid(nid,name_var(i),var3didin(i)) 872 if(ierr/=nf90_noerr) then 873 873 print *,'Variable manquante dans cas.nc:',i,name_var(i) 874 ierr= NF_NOERR874 ierr=nf90_noerr 875 875 missing_var(i)=1 876 876 else … … 879 879 ierr = NF90_GET_VAR(nid,var3didin(i),apbp) 880 880 print *,'read2_cas(apbp), on a lu ',i,name_var(i) 881 if(ierr/= NF_NOERR) then881 if(ierr/=nf90_noerr) then 882 882 print *,'Pb a la lecture de cas.nc: ',name_var(i) 883 883 stop "getvarup" … … 887 887 ierr = NF90_GET_VAR(nid,var3didin(i),resul1) 888 888 print *,'read2_cas(resul1), on a lu ',i,name_var(i) 889 if(ierr/= NF_NOERR) then889 if(ierr/=nf90_noerr) then 890 890 print *,'Pb a la lecture de cas.nc: ',name_var(i) 891 891 stop "getvarup" … … 896 896 ierr = NF90_GET_VAR(nid,var3didin(i),resul) 897 897 print *,'read2_cas(resul), on a lu ',i,name_var(i) 898 if(ierr/= NF_NOERR) then898 if(ierr/=nf90_noerr) then 899 899 print *,'Pb a la lecture de cas.nc: ',name_var(i) 900 900 stop "getvarup" … … 905 905 ierr = NF90_GET_VAR(nid,var3didin(i),resul2) 906 906 print *,'read2_cas(resul2), on a lu ',i,name_var(i) 907 if(ierr/= NF_NOERR) then907 if(ierr/=nf90_noerr) then 908 908 print *,'Pb a la lecture de cas.nc: ',name_var(i) 909 909 stop "getvarup" … … 914 914 ierr = NF90_GET_VAR(nid,var3didin(i),resul3) 915 915 print *,'read2_cas(resul3), on a lu ',i,name_var(i) 916 if(ierr/= NF_NOERR) then916 if(ierr/=nf90_noerr) then 917 917 print *,'Pb a la lecture de cas.nc: ',name_var(i) 918 918 stop "getvarup" -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/mod_1D_cases_read_std.F90
r5075 r5088 3 3 ! 4 4 MODULE mod_1D_cases_read_std 5 USE lmdz_netcdf, ONLY:nf_noerr,nf_inq_varid,nf_inq_dimid,nf_inq_dimlen,nf_open,nf_nowrite,&6 nf _strerror,nf90_get_var5 USE netcdf, ONLY:nf90_noerr,nf90_inq_varid,nf90_inq_dimid,nf90_inquire_dimension,nf90_open,nf90_nowrite,& 6 nf90_strerror,nf90_get_var 7 7 8 8 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 99 99 fich_cas='cas.nc' 100 100 print*,'fich_cas ',fich_cas 101 ierr = NF_OPEN(fich_cas,NF_NOWRITE,nid)102 print*,'fich_cas, NF_NOWRITE,nid ',fich_cas,NF_NOWRITE,nid103 if (ierr/= NF_NOERR) then101 ierr = nf90_open(fich_cas,nf90_nowrite,nid) 102 print*,'fich_cas,nf90_nowrite,nid ',fich_cas,nf90_nowrite,nid 103 if (ierr/=nf90_noerr) then 104 104 write(*,*) 'ERROR: GROS Pb opening forcings nc file ' 105 write(*,*) NF_STRERROR(ierr)105 write(*,*) nf90_strerror(ierr) 106 106 stop "" 107 107 endif 108 108 !....................................................................... 109 ierr= NF_INQ_DIMID(nid,'lat',rid)110 IF (ierr/= NF_NOERR) THEN109 ierr=nf90_inq_dimid(nid,'lat',rid) 110 IF (ierr/=nf90_noerr) THEN 111 111 print*, 'Oh probleme lecture dimension lat' 112 112 ENDIF 113 ierr= NF_INQ_DIMLEN(nid,rid,ii)113 ierr=nf90_inquire_dimension(nid,rid,len=ii) 114 114 print*,'OK1 read_SCM_cas: nid,rid,lat',nid,rid,ii 115 115 !....................................................................... 116 ierr= NF_INQ_DIMID(nid,'lon',rid)117 IF (ierr/= NF_NOERR) THEN116 ierr=nf90_inq_dimid(nid,'lon',rid) 117 IF (ierr/=nf90_noerr) THEN 118 118 print*, 'Oh probleme lecture dimension lon' 119 119 ENDIF 120 ierr= NF_INQ_DIMLEN(nid,rid,jj)120 ierr=nf90_inquire_dimension(nid,rid,len=jj) 121 121 print*,'OK2 read_SCM_cas: nid,rid,lat',nid,rid,jj 122 122 !....................................................................... 123 ierr= NF_INQ_DIMID(nid,'lev',rid)124 IF (ierr/= NF_NOERR) THEN123 ierr=nf90_inq_dimid(nid,'lev',rid) 124 IF (ierr/=nf90_noerr) THEN 125 125 print*, 'Oh probleme lecture dimension nlev' 126 126 ENDIF 127 ierr= NF_INQ_DIMLEN(nid,rid,nlev_cas)127 ierr=nf90_inquire_dimension(nid,rid,len=nlev_cas) 128 128 print*,'OK3 read_SCM_cas: nid,rid,nlev_cas',nid,rid,nlev_cas 129 129 IF ( .NOT. ( nlev_cas > 10 .AND. nlev_cas < 200000 )) THEN … … 132 132 ENDIF 133 133 !....................................................................... 134 ierr= NF_INQ_DIMID(nid,'time',rid)134 ierr=nf90_inq_dimid(nid,'time',rid) 135 135 nt_cas=0 136 IF (ierr/= NF_NOERR) THEN136 IF (ierr/=nf90_noerr) THEN 137 137 stop 'Oh probleme lecture dimension time' 138 138 ENDIF 139 ierr= NF_INQ_DIMLEN(nid,rid,nt_cas)139 ierr=nf90_inquire_dimension(nid,rid,len=nt_cas) 140 140 print*,'OK4 read_SCM_cas: nid,rid,nt_cas',nid,rid,nt_cas 141 141 ! Lecture de l'axe des temps 142 142 print*,'LECTURE DU TEMPS' 143 ierr= NF_INQ_VARID(nid,'time',timeid)144 if(ierr/= NF_NOERR) then143 ierr=nf90_inq_varid(nid,'time',timeid) 144 if(ierr/=nf90_noerr) then 145 145 print *,'Variable time manquante dans cas.nc:' 146 ierr= NF_NOERR146 ierr=nf90_noerr 147 147 else 148 148 allocate(time_val(nt_cas)) 149 149 ierr = NF90_GET_VAR(nid,timeid,time_val) 150 if(ierr/= NF_NOERR) then150 if(ierr/=nf90_noerr) then 151 151 print *,'A Pb a la lecture de time cas.nc: ' 152 152 endif … … 412 412 413 413 414 ierr= NF_INQ_VARID(nid,'ta',int_test)415 if(ierr/= NF_NOERR) then414 ierr=nf90_inq_varid(nid,'ta',int_test) 415 if(ierr/=nf90_noerr) then 416 416 print*, '++++++++++++++++++++++++++++++' 417 417 print*, 'variable ta missing in cas.nc ' … … 429 429 do i=1,nbvar3d 430 430 missing_var(i)=0. 431 ierr= NF_INQ_VARID(nid,name_var(i),var3didin(i))431 ierr=nf90_inq_varid(nid,name_var(i),var3didin(i)) 432 432 print*, 'name_var(i)', name_var(i), var3didin(i) 433 if(ierr/= NF_NOERR) then433 if(ierr/=nf90_noerr) then 434 434 print *,'Variable manquante dans cas.nc:',i,name_var(i) 435 ierr= NF_NOERR435 ierr=nf90_noerr 436 436 missing_var(i)=1 437 437 else … … 456 456 ierr = NF90_GET_VAR(nid,var3didin(i),apbp) 457 457 print *,'read_SCM(apbp), on a lu ',i,name_var(i) 458 if(ierr/= NF_NOERR) then458 if(ierr/=nf90_noerr) then 459 459 print *,'B Pb a la lecture de cas.nc: ',name_var(i) 460 460 stop "getvarup" … … 467 467 ierr = NF90_GET_VAR(nid,var3didin(i),resul1) 468 468 print *,'read_SCM(resul1), on a lu ',i,name_var(i) 469 if(ierr/= NF_NOERR) then469 if(ierr/=nf90_noerr) then 470 470 print *,'C Pb a la lecture de cas.nc: ',name_var(i) 471 471 stop "getvarup" … … 480 480 ierr = NF90_GET_VAR(nid,var3didin(i),resul) 481 481 print *,'read_SCM(resul), on a lu ',i,name_var(i) 482 if(ierr/= NF_NOERR) then482 if(ierr/=nf90_noerr) then 483 483 print *,'D Pb a la lecture de cas.nc: ',name_var(i) 484 484 stop "getvarup" … … 492 492 ierr = NF90_GET_VAR(nid,var3didin(i),resul2) 493 493 print *,'read_SCM(resul2), on a lu ',i,name_var(i) 494 if(ierr/= NF_NOERR) then494 if(ierr/=nf90_noerr) then 495 495 print *,'E Pb a la lecture de cas.nc: ',name_var(i) 496 496 stop "getvarup" … … 504 504 ierr = NF90_GET_VAR(nid,var3didin(i),resul3) 505 505 print *,'read_SCM(resul3), on a lu ',i,name_var(i) 506 if(ierr/= NF_NOERR) then506 if(ierr/=nf90_noerr) then 507 507 print *,'F Pb a la lecture de cas.nc: ',name_var(i) 508 508 stop "getvarup" -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/old_1DUTILS_read_interp.h
r5086 r5088 146 146 !program reading forcings of the TWP-ICE experiment 147 147 148 use lmdz_netcdf, ONLY: nf_open,nf_nowrite,nf_noerr,nf_strerror,nf_inq_varid,nf90_get_var,&149 nf _inq_dimid,nf_inq_dimlen148 use netcdf, ONLY: nf90_open,nf90_nowrite,nf90_noerr,nf90_strerror,nf90_inq_varid,nf90_get_var,& 149 nf90_inq_dimid,nf90_inquire_dimension 150 150 151 151 … … 177 177 integer var3didin(nbvar3d) 178 178 179 ierr = NF_OPEN(fich_twpice,NF_NOWRITE,nid)180 if (ierr.NE. NF_NOERR) then179 ierr = nf90_open(fich_twpice,nf90_nowrite,nid) 180 if (ierr.NE.nf90_noerr) then 181 181 write(*,*) 'ERROR: Pb opening forcings cdf file ' 182 write(*,*) NF_STRERROR(ierr)182 write(*,*) nf90_strerror(ierr) 183 183 stop "" 184 184 endif 185 185 186 ierr= NF_INQ_VARID(nid,"lat",var3didin(1))187 if(ierr/= NF_NOERR) then188 write(*,*) NF_STRERROR(ierr)186 ierr=nf90_inq_varid(nid,"lat",var3didin(1)) 187 if(ierr/=nf90_noerr) then 188 write(*,*) nf90_strerror(ierr) 189 189 stop 'lat' 190 190 endif 191 191 192 ierr= NF_INQ_VARID(nid,"lon",var3didin(2))193 if(ierr/= NF_NOERR) then194 write(*,*) NF_STRERROR(ierr)192 ierr=nf90_inq_varid(nid,"lon",var3didin(2)) 193 if(ierr/=nf90_noerr) then 194 write(*,*) nf90_strerror(ierr) 195 195 stop 'lon' 196 196 endif 197 197 198 ierr= NF_INQ_VARID(nid,"alt",var3didin(3))199 if(ierr/= NF_NOERR) then200 write(*,*) NF_STRERROR(ierr)198 ierr=nf90_inq_varid(nid,"alt",var3didin(3)) 199 if(ierr/=nf90_noerr) then 200 write(*,*) nf90_strerror(ierr) 201 201 stop 'alt' 202 202 endif 203 203 204 ierr= NF_INQ_VARID(nid,"phis",var3didin(4))205 if(ierr/= NF_NOERR) then206 write(*,*) NF_STRERROR(ierr)204 ierr=nf90_inq_varid(nid,"phis",var3didin(4)) 205 if(ierr/=nf90_noerr) then 206 write(*,*) nf90_strerror(ierr) 207 207 stop 'phis' 208 208 endif 209 209 210 ierr= NF_INQ_VARID(nid,"T",var3didin(5))211 if(ierr/= NF_NOERR) then212 write(*,*) NF_STRERROR(ierr)210 ierr=nf90_inq_varid(nid,"T",var3didin(5)) 211 if(ierr/=nf90_noerr) then 212 write(*,*) nf90_strerror(ierr) 213 213 stop 'T' 214 214 endif 215 215 216 ierr= NF_INQ_VARID(nid,"q",var3didin(6))217 if(ierr/= NF_NOERR) then218 write(*,*) NF_STRERROR(ierr)216 ierr=nf90_inq_varid(nid,"q",var3didin(6)) 217 if(ierr/=nf90_noerr) then 218 write(*,*) nf90_strerror(ierr) 219 219 stop 'q' 220 220 endif 221 221 222 ierr= NF_INQ_VARID(nid,"u",var3didin(7))223 if(ierr/= NF_NOERR) then224 write(*,*) NF_STRERROR(ierr)222 ierr=nf90_inq_varid(nid,"u",var3didin(7)) 223 if(ierr/=nf90_noerr) then 224 write(*,*) nf90_strerror(ierr) 225 225 stop 'u' 226 226 endif 227 227 228 ierr= NF_INQ_VARID(nid,"v",var3didin(8))229 if(ierr/= NF_NOERR) then230 write(*,*) NF_STRERROR(ierr)228 ierr=nf90_inq_varid(nid,"v",var3didin(8)) 229 if(ierr/=nf90_noerr) then 230 write(*,*) nf90_strerror(ierr) 231 231 stop 'v' 232 232 endif 233 233 234 ierr= NF_INQ_VARID(nid,"omega",var3didin(9))235 if(ierr/= NF_NOERR) then236 write(*,*) NF_STRERROR(ierr)234 ierr=nf90_inq_varid(nid,"omega",var3didin(9)) 235 if(ierr/=nf90_noerr) then 236 write(*,*) nf90_strerror(ierr) 237 237 stop 'omega' 238 238 endif 239 239 240 ierr= NF_INQ_VARID(nid,"div",var3didin(10))241 if(ierr/= NF_NOERR) then242 write(*,*) NF_STRERROR(ierr)240 ierr=nf90_inq_varid(nid,"div",var3didin(10)) 241 if(ierr/=nf90_noerr) then 242 write(*,*) nf90_strerror(ierr) 243 243 stop 'div' 244 244 endif 245 245 246 ierr= NF_INQ_VARID(nid,"T_adv_h",var3didin(11))247 if(ierr/= NF_NOERR) then248 write(*,*) NF_STRERROR(ierr)246 ierr=nf90_inq_varid(nid,"T_adv_h",var3didin(11)) 247 if(ierr/=nf90_noerr) then 248 write(*,*) nf90_strerror(ierr) 249 249 stop 'T_adv_h' 250 250 endif 251 251 252 ierr= NF_INQ_VARID(nid,"T_adv_v",var3didin(12))253 if(ierr/= NF_NOERR) then254 write(*,*) NF_STRERROR(ierr)252 ierr=nf90_inq_varid(nid,"T_adv_v",var3didin(12)) 253 if(ierr/=nf90_noerr) then 254 write(*,*) nf90_strerror(ierr) 255 255 stop 'T_adv_v' 256 256 endif 257 257 258 ierr= NF_INQ_VARID(nid,"q_adv_h",var3didin(13))259 if(ierr/= NF_NOERR) then260 write(*,*) NF_STRERROR(ierr)258 ierr=nf90_inq_varid(nid,"q_adv_h",var3didin(13)) 259 if(ierr/=nf90_noerr) then 260 write(*,*) nf90_strerror(ierr) 261 261 stop 'q_adv_h' 262 262 endif 263 263 264 ierr= NF_INQ_VARID(nid,"q_adv_v",var3didin(14))265 if(ierr/= NF_NOERR) then266 write(*,*) NF_STRERROR(ierr)264 ierr=nf90_inq_varid(nid,"q_adv_v",var3didin(14)) 265 if(ierr/=nf90_noerr) then 266 write(*,*) nf90_strerror(ierr) 267 267 stop 'q_adv_v' 268 268 endif 269 269 270 ierr= NF_INQ_VARID(nid,"s",var3didin(15))271 if(ierr/= NF_NOERR) then272 write(*,*) NF_STRERROR(ierr)270 ierr=nf90_inq_varid(nid,"s",var3didin(15)) 271 if(ierr/=nf90_noerr) then 272 write(*,*) nf90_strerror(ierr) 273 273 stop 's' 274 274 endif 275 275 276 ierr= NF_INQ_VARID(nid,"s_adv_h",var3didin(16))277 if(ierr/= NF_NOERR) then278 write(*,*) NF_STRERROR(ierr)276 ierr=nf90_inq_varid(nid,"s_adv_h",var3didin(16)) 277 if(ierr/=nf90_noerr) then 278 write(*,*) nf90_strerror(ierr) 279 279 stop 's_adv_h' 280 280 endif 281 281 282 ierr= NF_INQ_VARID(nid,"s_adv_v",var3didin(17))283 if(ierr/= NF_NOERR) then284 write(*,*) NF_STRERROR(ierr)282 ierr=nf90_inq_varid(nid,"s_adv_v",var3didin(17)) 283 if(ierr/=nf90_noerr) then 284 write(*,*) nf90_strerror(ierr) 285 285 stop 's_adv_v' 286 286 endif 287 287 288 ierr= NF_INQ_VARID(nid,"p_srf_aver",var3didin(18))289 if(ierr/= NF_NOERR) then290 write(*,*) NF_STRERROR(ierr)288 ierr=nf90_inq_varid(nid,"p_srf_aver",var3didin(18)) 289 if(ierr/=nf90_noerr) then 290 write(*,*) nf90_strerror(ierr) 291 291 stop 'p_srf_aver' 292 292 endif 293 293 294 ierr= NF_INQ_VARID(nid,"p_srf_center",var3didin(19))295 if(ierr/= NF_NOERR) then296 write(*,*) NF_STRERROR(ierr)294 ierr=nf90_inq_varid(nid,"p_srf_center",var3didin(19)) 295 if(ierr/=nf90_noerr) then 296 write(*,*) nf90_strerror(ierr) 297 297 stop 'p_srf_center' 298 298 endif 299 299 300 ierr= NF_INQ_VARID(nid,"T_srf",var3didin(20))301 if(ierr/= NF_NOERR) then302 write(*,*) NF_STRERROR(ierr)300 ierr=nf90_inq_varid(nid,"T_srf",var3didin(20)) 301 if(ierr/=nf90_noerr) then 302 write(*,*) nf90_strerror(ierr) 303 303 stop 'T_srf' 304 304 endif … … 315 315 316 316 ierr = NF90_GET_VAR(nid,var3didin(1),lat) 317 if(ierr/= NF_NOERR) then318 write(*,*) NF_STRERROR(ierr)317 if(ierr/=nf90_noerr) then 318 write(*,*) nf90_strerror(ierr) 319 319 stop "getvarup" 320 320 endif … … 322 322 323 323 ierr = NF90_GET_VAR(nid,var3didin(2),lon) 324 if(ierr/= NF_NOERR) then325 write(*,*) NF_STRERROR(ierr)324 if(ierr/=nf90_noerr) then 325 write(*,*) nf90_strerror(ierr) 326 326 stop "getvarup" 327 327 endif … … 329 329 330 330 ierr = NF90_GET_VAR(nid,var3didin(3),alt) 331 if(ierr/= NF_NOERR) then332 write(*,*) NF_STRERROR(ierr)331 if(ierr/=nf90_noerr) then 332 write(*,*) nf90_strerror(ierr) 333 333 stop "getvarup" 334 334 endif … … 336 336 337 337 ierr = NF90_GET_VAR(nid,var3didin(4),phis) 338 if(ierr/= NF_NOERR) then339 write(*,*) NF_STRERROR(ierr)338 if(ierr/=nf90_noerr) then 339 write(*,*) nf90_strerror(ierr) 340 340 stop "getvarup" 341 341 endif … … 343 343 344 344 ierr = NF90_GET_VAR(nid,var3didin(5),T) 345 if(ierr/= NF_NOERR) then346 write(*,*) NF_STRERROR(ierr)345 if(ierr/=nf90_noerr) then 346 write(*,*) nf90_strerror(ierr) 347 347 stop "getvarup" 348 348 endif … … 350 350 351 351 ierr = NF90_GET_VAR(nid,var3didin(6),q) 352 if(ierr/= NF_NOERR) then353 write(*,*) NF_STRERROR(ierr)352 if(ierr/=nf90_noerr) then 353 write(*,*) nf90_strerror(ierr) 354 354 stop "getvarup" 355 355 endif … … 362 362 enddo 363 363 ierr = NF90_GET_VAR(nid,var3didin(7),u) 364 if(ierr/= NF_NOERR) then365 write(*,*) NF_STRERROR(ierr)364 if(ierr/=nf90_noerr) then 365 write(*,*) nf90_strerror(ierr) 366 366 stop "getvarup" 367 367 endif … … 369 369 370 370 ierr = NF90_GET_VAR(nid,var3didin(8),v) 371 if(ierr/= NF_NOERR) then372 write(*,*) NF_STRERROR(ierr)371 if(ierr/=nf90_noerr) then 372 write(*,*) nf90_strerror(ierr) 373 373 stop "getvarup" 374 374 endif … … 376 376 377 377 ierr = NF90_GET_VAR(nid,var3didin(9),omega) 378 if(ierr/= NF_NOERR) then379 write(*,*) NF_STRERROR(ierr)378 if(ierr/=nf90_noerr) then 379 write(*,*) nf90_strerror(ierr) 380 380 stop "getvarup" 381 381 endif … … 389 389 390 390 ierr = NF90_GET_VAR(nid,var3didin(10),div) 391 if(ierr/= NF_NOERR) then392 write(*,*) NF_STRERROR(ierr)391 if(ierr/=nf90_noerr) then 392 write(*,*) nf90_strerror(ierr) 393 393 stop "getvarup" 394 394 endif … … 396 396 397 397 ierr = NF90_GET_VAR(nid,var3didin(11),T_adv_h) 398 if(ierr/= NF_NOERR) then399 write(*,*) NF_STRERROR(ierr)398 if(ierr/=nf90_noerr) then 399 write(*,*) nf90_strerror(ierr) 400 400 stop "getvarup" 401 401 endif … … 410 410 411 411 ierr = NF90_GET_VAR(nid,var3didin(12),T_adv_v) 412 if(ierr/= NF_NOERR) then413 write(*,*) NF_STRERROR(ierr)412 if(ierr/=nf90_noerr) then 413 write(*,*) nf90_strerror(ierr) 414 414 stop "getvarup" 415 415 endif … … 423 423 424 424 ierr = NF90_GET_VAR(nid,var3didin(13),q_adv_h) 425 if(ierr/= NF_NOERR) then426 write(*,*) NF_STRERROR(ierr)425 if(ierr/=nf90_noerr) then 426 write(*,*) nf90_strerror(ierr) 427 427 stop "getvarup" 428 428 endif … … 437 437 438 438 ierr = NF90_GET_VAR(nid,var3didin(14),q_adv_v) 439 if(ierr/= NF_NOERR) then440 write(*,*) NF_STRERROR(ierr)439 if(ierr/=nf90_noerr) then 440 write(*,*) nf90_strerror(ierr) 441 441 stop "getvarup" 442 442 endif … … 451 451 452 452 ierr = NF90_GET_VAR(nid,var3didin(15),s) 453 if(ierr/= NF_NOERR) then454 write(*,*) NF_STRERROR(ierr)453 if(ierr/=nf90_noerr) then 454 write(*,*) nf90_strerror(ierr) 455 455 stop "getvarup" 456 456 endif 457 457 458 458 ierr = NF90_GET_VAR(nid,var3didin(16),s_adv_h) 459 if(ierr/= NF_NOERR) then460 write(*,*) NF_STRERROR(ierr)459 if(ierr/=nf90_noerr) then 460 write(*,*) nf90_strerror(ierr) 461 461 stop "getvarup" 462 462 endif 463 463 464 464 ierr = NF90_GET_VAR(nid,var3didin(17),s_adv_v) 465 if(ierr/= NF_NOERR) then466 write(*,*) NF_STRERROR(ierr)465 if(ierr/=nf90_noerr) then 466 write(*,*) nf90_strerror(ierr) 467 467 stop "getvarup" 468 468 endif 469 469 470 470 ierr = NF90_GET_VAR(nid,var3didin(18),p_srf_aver) 471 if(ierr/= NF_NOERR) then472 write(*,*) NF_STRERROR(ierr)471 if(ierr/=nf90_noerr) then 472 write(*,*) nf90_strerror(ierr) 473 473 stop "getvarup" 474 474 endif 475 475 476 476 ierr = NF90_GET_VAR(nid,var3didin(19),p_srf_center) 477 if(ierr/= NF_NOERR) then478 write(*,*) NF_STRERROR(ierr)477 if(ierr/=nf90_noerr) then 478 write(*,*) nf90_strerror(ierr) 479 479 stop "getvarup" 480 480 endif 481 481 482 482 ierr = NF90_GET_VAR(nid,var3didin(20),T_srf) 483 if(ierr/= NF_NOERR) then484 write(*,*) NF_STRERROR(ierr)483 if(ierr/=nf90_noerr) then 484 write(*,*) nf90_strerror(ierr) 485 485 stop "getvarup" 486 486 endif … … 492 492 subroutine catchaxis(nid,ttm,llm,time,lev,ierr) 493 493 494 use lmdz_netcdf, ONLY: nf_open,nf_nowrite,nf_noerr,nf_strerror,nf_inq_varid,nf90_get_var,&495 nf _inq_dimid,nf_inq_dimlen494 use netcdf, ONLY: nf90_open,nf90_nowrite,nf90_noerr,nf90_strerror,nf90_inq_varid,nf90_get_var,& 495 nf90_inq_dimid,nf90_inquire_dimension 496 496 497 497 implicit none … … 507 507 ! Control & lecture on dimensions 508 508 ! =============================== 509 ierr= NF_INQ_DIMID(nid,"time",timedimin)510 ierr= NF_INQ_VARID(nid,"time",timevar)511 if (ierr.NE. NF_NOERR) then509 ierr=nf90_inq_dimid(nid,"time",timedimin) 510 ierr=nf90_inq_varid(nid,"time",timevar) 511 if (ierr.NE.nf90_noerr) then 512 512 write(*,*) 'ERROR: Field <time> is missing' 513 513 stop "" 514 514 endif 515 ierr= NF_INQ_DIMLEN(nid,timedimin,timelen)516 517 ierr= NF_INQ_DIMID(nid,"lev",levdimin)518 ierr= NF_INQ_VARID(nid,"lev",levvar)519 if (ierr.NE. NF_NOERR) then515 ierr=nf90_inquire_dimension(nid,timedimin,len=timelen) 516 517 ierr=nf90_inq_dimid(nid,"lev",levdimin) 518 ierr=nf90_inq_varid(nid,"lev",levvar) 519 if (ierr.NE.nf90_noerr) then 520 520 write(*,*) 'ERROR: Field <lev> is lacking' 521 521 stop "" 522 522 endif 523 ierr= NF_INQ_DIMLEN(nid,levdimin,levlen)523 ierr=nf90_inquire_dimension(nid,levdimin,len=levlen) 524 524 525 525 if((timelen/=ttm).or.(levlen/=llm)) then … … 2170 2170 2171 2171 2172 use lmdz_netcdf, ONLY: nf_open,nf_nowrite,nf_noerr,nf_strerror,nf_inq_varid,nf90_get_var,&2173 nf _inq_dimid,nf_inq_dimlen2172 use netcdf, ONLY: nf90_open,nf90_nowrite,nf90_noerr,nf90_strerror,nf90_inq_varid,nf90_get_var,& 2173 nf90_inq_dimid,nf90_inquire_dimension 2174 2174 implicit none 2175 2175 … … 2190 2190 integer var3didin(nbvar3d) 2191 2191 2192 ierr = NF_OPEN(fich_fire,NF_NOWRITE,nid)2193 if (ierr.NE. NF_NOERR) then2192 ierr = nf90_open(fich_fire,nf90_nowrite,nid) 2193 if (ierr.NE.nf90_noerr) then 2194 2194 write(*,*) 'ERROR: Pb opening forcings nc file ' 2195 write(*,*) NF_STRERROR(ierr)2195 write(*,*) nf90_strerror(ierr) 2196 2196 stop "" 2197 2197 endif 2198 2198 2199 2199 2200 ierr= NF_INQ_VARID(nid,"zz",var3didin(1))2201 if(ierr/= NF_NOERR) then2202 write(*,*) NF_STRERROR(ierr)2200 ierr=nf90_inq_varid(nid,"zz",var3didin(1)) 2201 if(ierr/=nf90_noerr) then 2202 write(*,*) nf90_strerror(ierr) 2203 2203 stop 'lev' 2204 2204 endif 2205 2205 2206 2206 2207 ierr= NF_INQ_VARID(nid,"thetal",var3didin(2))2208 if(ierr/= NF_NOERR) then2209 write(*,*) NF_STRERROR(ierr)2207 ierr=nf90_inq_varid(nid,"thetal",var3didin(2)) 2208 if(ierr/=nf90_noerr) then 2209 write(*,*) nf90_strerror(ierr) 2210 2210 stop 'temp' 2211 2211 endif 2212 2212 2213 ierr= NF_INQ_VARID(nid,"qt",var3didin(3))2214 if(ierr/= NF_NOERR) then2215 write(*,*) NF_STRERROR(ierr)2213 ierr=nf90_inq_varid(nid,"qt",var3didin(3)) 2214 if(ierr/=nf90_noerr) then 2215 write(*,*) nf90_strerror(ierr) 2216 2216 stop 'qv' 2217 2217 endif 2218 2218 2219 ierr= NF_INQ_VARID(nid,"u",var3didin(4))2220 if(ierr/= NF_NOERR) then2221 write(*,*) NF_STRERROR(ierr)2219 ierr=nf90_inq_varid(nid,"u",var3didin(4)) 2220 if(ierr/=nf90_noerr) then 2221 write(*,*) nf90_strerror(ierr) 2222 2222 stop 'u' 2223 2223 endif 2224 2224 2225 ierr= NF_INQ_VARID(nid,"v",var3didin(5))2226 if(ierr/= NF_NOERR) then2227 write(*,*) NF_STRERROR(ierr)2225 ierr=nf90_inq_varid(nid,"v",var3didin(5)) 2226 if(ierr/=nf90_noerr) then 2227 write(*,*) nf90_strerror(ierr) 2228 2228 stop 'v' 2229 2229 endif 2230 2230 2231 ierr= NF_INQ_VARID(nid,"tke",var3didin(6))2232 if(ierr/= NF_NOERR) then2233 write(*,*) NF_STRERROR(ierr)2231 ierr=nf90_inq_varid(nid,"tke",var3didin(6)) 2232 if(ierr/=nf90_noerr) then 2233 write(*,*) nf90_strerror(ierr) 2234 2234 stop 'tke' 2235 2235 endif 2236 2236 2237 ierr= NF_INQ_VARID(nid,"ugeo",var3didin(7))2238 if(ierr/= NF_NOERR) then2239 write(*,*) NF_STRERROR(ierr)2237 ierr=nf90_inq_varid(nid,"ugeo",var3didin(7)) 2238 if(ierr/=nf90_noerr) then 2239 write(*,*) nf90_strerror(ierr) 2240 2240 stop 'ug' 2241 2241 endif 2242 2242 2243 ierr= NF_INQ_VARID(nid,"vgeo",var3didin(8))2244 if(ierr/= NF_NOERR) then2245 write(*,*) NF_STRERROR(ierr)2243 ierr=nf90_inq_varid(nid,"vgeo",var3didin(8)) 2244 if(ierr/=nf90_noerr) then 2245 write(*,*) nf90_strerror(ierr) 2246 2246 stop 'vg' 2247 2247 endif 2248 2248 2249 ierr= NF_INQ_VARID(nid,"wls",var3didin(9))2250 if(ierr/= NF_NOERR) then2251 write(*,*) NF_STRERROR(ierr)2249 ierr=nf90_inq_varid(nid,"wls",var3didin(9)) 2250 if(ierr/=nf90_noerr) then 2251 write(*,*) nf90_strerror(ierr) 2252 2252 stop 'wls' 2253 2253 endif 2254 2254 2255 ierr= NF_INQ_VARID(nid,"dqtdx",var3didin(10))2256 if(ierr/= NF_NOERR) then2257 write(*,*) NF_STRERROR(ierr)2255 ierr=nf90_inq_varid(nid,"dqtdx",var3didin(10)) 2256 if(ierr/=nf90_noerr) then 2257 write(*,*) nf90_strerror(ierr) 2258 2258 stop 'dqtdx' 2259 2259 endif 2260 2260 2261 ierr= NF_INQ_VARID(nid,"dqtdy",var3didin(11))2262 if(ierr/= NF_NOERR) then2263 write(*,*) NF_STRERROR(ierr)2261 ierr=nf90_inq_varid(nid,"dqtdy",var3didin(11)) 2262 if(ierr/=nf90_noerr) then 2263 write(*,*) nf90_strerror(ierr) 2264 2264 stop 'dqtdy' 2265 2265 endif 2266 2266 2267 ierr= NF_INQ_VARID(nid,"dqtdt",var3didin(12))2268 if(ierr/= NF_NOERR) then2269 write(*,*) NF_STRERROR(ierr)2267 ierr=nf90_inq_varid(nid,"dqtdt",var3didin(12)) 2268 if(ierr/=nf90_noerr) then 2269 write(*,*) nf90_strerror(ierr) 2270 2270 stop 'dqtdt' 2271 2271 endif 2272 2272 2273 ierr= NF_INQ_VARID(nid,"thl_rad",var3didin(13))2274 if(ierr/= NF_NOERR) then2275 write(*,*) NF_STRERROR(ierr)2273 ierr=nf90_inq_varid(nid,"thl_rad",var3didin(13)) 2274 if(ierr/=nf90_noerr) then 2275 write(*,*) nf90_strerror(ierr) 2276 2276 stop 'thl_rad' 2277 2277 endif … … 2280 2280 2281 2281 ierr = NF90_GET_VAR(nid,var3didin(1),zz) 2282 if(ierr/= NF_NOERR) then2283 write(*,*) NF_STRERROR(ierr)2282 if(ierr/=nf90_noerr) then 2283 write(*,*) nf90_strerror(ierr) 2284 2284 stop "getvarup" 2285 2285 endif … … 2287 2287 2288 2288 ierr = NF90_GET_VAR(nid,var3didin(2),thl) 2289 if(ierr/= NF_NOERR) then2290 write(*,*) NF_STRERROR(ierr)2289 if(ierr/=nf90_noerr) then 2290 write(*,*) nf90_strerror(ierr) 2291 2291 stop "getvarup" 2292 2292 endif … … 2294 2294 2295 2295 ierr = NF90_GET_VAR(nid,var3didin(3),qt) 2296 if(ierr/= NF_NOERR) then2297 write(*,*) NF_STRERROR(ierr)2296 if(ierr/=nf90_noerr) then 2297 write(*,*) nf90_strerror(ierr) 2298 2298 stop "getvarup" 2299 2299 endif … … 2301 2301 2302 2302 ierr = NF90_GET_VAR(nid,var3didin(4),u) 2303 if(ierr/= NF_NOERR) then2304 write(*,*) NF_STRERROR(ierr)2303 if(ierr/=nf90_noerr) then 2304 write(*,*) nf90_strerror(ierr) 2305 2305 stop "getvarup" 2306 2306 endif … … 2308 2308 2309 2309 ierr = NF90_GET_VAR(nid,var3didin(5),v) 2310 if(ierr/= NF_NOERR) then2311 write(*,*) NF_STRERROR(ierr)2310 if(ierr/=nf90_noerr) then 2311 write(*,*) nf90_strerror(ierr) 2312 2312 stop "getvarup" 2313 2313 endif … … 2315 2315 2316 2316 ierr = NF90_GET_VAR(nid,var3didin(6),tke) 2317 if(ierr/= NF_NOERR) then2318 write(*,*) NF_STRERROR(ierr)2317 if(ierr/=nf90_noerr) then 2318 write(*,*) nf90_strerror(ierr) 2319 2319 stop "getvarup" 2320 2320 endif … … 2322 2322 2323 2323 ierr = NF90_GET_VAR(nid,var3didin(7),ug) 2324 if(ierr/= NF_NOERR) then2325 write(*,*) NF_STRERROR(ierr)2324 if(ierr/=nf90_noerr) then 2325 write(*,*) nf90_strerror(ierr) 2326 2326 stop "getvarup" 2327 2327 endif … … 2329 2329 2330 2330 ierr = NF90_GET_VAR(nid,var3didin(8),vg) 2331 if(ierr/= NF_NOERR) then2332 write(*,*) NF_STRERROR(ierr)2331 if(ierr/=nf90_noerr) then 2332 write(*,*) nf90_strerror(ierr) 2333 2333 stop "getvarup" 2334 2334 endif … … 2336 2336 2337 2337 ierr = NF90_GET_VAR(nid,var3didin(9),wls) 2338 if(ierr/= NF_NOERR) then2339 write(*,*) NF_STRERROR(ierr)2338 if(ierr/=nf90_noerr) then 2339 write(*,*) nf90_strerror(ierr) 2340 2340 stop "getvarup" 2341 2341 endif … … 2343 2343 2344 2344 ierr = NF90_GET_VAR(nid,var3didin(10),dqtdx) 2345 if(ierr/= NF_NOERR) then2346 write(*,*) NF_STRERROR(ierr)2345 if(ierr/=nf90_noerr) then 2346 write(*,*) nf90_strerror(ierr) 2347 2347 stop "getvarup" 2348 2348 endif … … 2350 2350 2351 2351 ierr = NF90_GET_VAR(nid,var3didin(11),dqtdy) 2352 if(ierr/= NF_NOERR) then2353 write(*,*) NF_STRERROR(ierr)2352 if(ierr/=nf90_noerr) then 2353 write(*,*) nf90_strerror(ierr) 2354 2354 stop "getvarup" 2355 2355 endif … … 2357 2357 2358 2358 ierr = NF90_GET_VAR(nid,var3didin(12),dqtdt) 2359 if(ierr/= NF_NOERR) then2360 write(*,*) NF_STRERROR(ierr)2359 if(ierr/=nf90_noerr) then 2360 write(*,*) nf90_strerror(ierr) 2361 2361 stop "getvarup" 2362 2362 endif … … 2364 2364 2365 2365 ierr = NF90_GET_VAR(nid,var3didin(13),thl_rad) 2366 if(ierr/= NF_NOERR) then2367 write(*,*) NF_STRERROR(ierr)2366 if(ierr/=nf90_noerr) then 2367 write(*,*) nf90_strerror(ierr) 2368 2368 stop "getvarup" 2369 2369 endif … … 2380 2380 !program reading initial profils and forcings of the Dice case study 2381 2381 2382 use lmdz_netcdf, ONLY: nf_open,nf_nowrite,nf_noerr,nf_strerror,nf_inq_varid,nf90_get_var,&2383 nf _inq_dimid,nf_inq_dimlen2382 use netcdf, ONLY: nf90_open,nf90_nowrite,nf90_noerr,nf90_strerror,nf90_inq_varid,nf90_get_var,& 2383 nf90_inq_dimid,nf90_inquire_dimension 2384 2384 2385 2385 implicit none … … 2407 2407 2408 2408 pzero=100000. 2409 ierr = NF_OPEN(fich_dice,NF_NOWRITE,nid)2410 if (ierr.NE. NF_NOERR) then2409 ierr = nf90_open(fich_dice,nf90_nowrite,nid) 2410 if (ierr.NE.nf90_noerr) then 2411 2411 write(*,*) 'ERROR: Pb opening forcings nc file ' 2412 write(*,*) NF_STRERROR(ierr)2412 write(*,*) nf90_strerror(ierr) 2413 2413 stop "" 2414 2414 endif 2415 2415 2416 2416 2417 ierr= NF_INQ_VARID(nid,"height",var3didin(1))2418 if(ierr/= NF_NOERR) then2419 write(*,*) NF_STRERROR(ierr)2417 ierr=nf90_inq_varid(nid,"height",var3didin(1)) 2418 if(ierr/=nf90_noerr) then 2419 write(*,*) nf90_strerror(ierr) 2420 2420 stop 'height' 2421 2421 endif 2422 2422 2423 ierr= NF_INQ_VARID(nid,"pf",var3didin(11))2424 if(ierr/= NF_NOERR) then2425 write(*,*) NF_STRERROR(ierr)2423 ierr=nf90_inq_varid(nid,"pf",var3didin(11)) 2424 if(ierr/=nf90_noerr) then 2425 write(*,*) nf90_strerror(ierr) 2426 2426 stop 'pf' 2427 2427 endif 2428 2428 2429 ierr= NF_INQ_VARID(nid,"theta",var3didin(12))2430 if(ierr/= NF_NOERR) then2431 write(*,*) NF_STRERROR(ierr)2429 ierr=nf90_inq_varid(nid,"theta",var3didin(12)) 2430 if(ierr/=nf90_noerr) then 2431 write(*,*) nf90_strerror(ierr) 2432 2432 stop 'theta' 2433 2433 endif 2434 2434 2435 ierr= NF_INQ_VARID(nid,"qv",var3didin(13))2436 if(ierr/= NF_NOERR) then2437 write(*,*) NF_STRERROR(ierr)2435 ierr=nf90_inq_varid(nid,"qv",var3didin(13)) 2436 if(ierr/=nf90_noerr) then 2437 write(*,*) nf90_strerror(ierr) 2438 2438 stop 'qv' 2439 2439 endif 2440 2440 2441 ierr= NF_INQ_VARID(nid,"u",var3didin(14))2442 if(ierr/= NF_NOERR) then2443 write(*,*) NF_STRERROR(ierr)2441 ierr=nf90_inq_varid(nid,"u",var3didin(14)) 2442 if(ierr/=nf90_noerr) then 2443 write(*,*) nf90_strerror(ierr) 2444 2444 stop 'u' 2445 2445 endif 2446 2446 2447 ierr= NF_INQ_VARID(nid,"v",var3didin(15))2448 if(ierr/= NF_NOERR) then2449 write(*,*) NF_STRERROR(ierr)2447 ierr=nf90_inq_varid(nid,"v",var3didin(15)) 2448 if(ierr/=nf90_noerr) then 2449 write(*,*) nf90_strerror(ierr) 2450 2450 stop 'v' 2451 2451 endif 2452 2452 2453 ierr= NF_INQ_VARID(nid,"o3mmr",var3didin(16))2454 if(ierr/= NF_NOERR) then2455 write(*,*) NF_STRERROR(ierr)2453 ierr=nf90_inq_varid(nid,"o3mmr",var3didin(16)) 2454 if(ierr/=nf90_noerr) then 2455 write(*,*) nf90_strerror(ierr) 2456 2456 stop 'o3' 2457 2457 endif 2458 2458 2459 ierr= NF_INQ_VARID(nid,"shf",var3didin(2))2460 if(ierr/= NF_NOERR) then2461 write(*,*) NF_STRERROR(ierr)2459 ierr=nf90_inq_varid(nid,"shf",var3didin(2)) 2460 if(ierr/=nf90_noerr) then 2461 write(*,*) nf90_strerror(ierr) 2462 2462 stop 'shf' 2463 2463 endif 2464 2464 2465 ierr= NF_INQ_VARID(nid,"lhf",var3didin(3))2466 if(ierr/= NF_NOERR) then2467 write(*,*) NF_STRERROR(ierr)2465 ierr=nf90_inq_varid(nid,"lhf",var3didin(3)) 2466 if(ierr/=nf90_noerr) then 2467 write(*,*) nf90_strerror(ierr) 2468 2468 stop 'lhf' 2469 2469 endif 2470 2470 2471 ierr= NF_INQ_VARID(nid,"lwup",var3didin(4))2472 if(ierr/= NF_NOERR) then2473 write(*,*) NF_STRERROR(ierr)2471 ierr=nf90_inq_varid(nid,"lwup",var3didin(4)) 2472 if(ierr/=nf90_noerr) then 2473 write(*,*) nf90_strerror(ierr) 2474 2474 stop 'lwup' 2475 2475 endif 2476 2476 2477 ierr= NF_INQ_VARID(nid,"swup",var3didin(5))2478 if(ierr/= NF_NOERR) then2479 write(*,*) NF_STRERROR(ierr)2477 ierr=nf90_inq_varid(nid,"swup",var3didin(5)) 2478 if(ierr/=nf90_noerr) then 2479 write(*,*) nf90_strerror(ierr) 2480 2480 stop 'dqtdx' 2481 2481 endif 2482 2482 2483 ierr= NF_INQ_VARID(nid,"Tg",var3didin(6))2484 if(ierr/= NF_NOERR) then2485 write(*,*) NF_STRERROR(ierr)2483 ierr=nf90_inq_varid(nid,"Tg",var3didin(6)) 2484 if(ierr/=nf90_noerr) then 2485 write(*,*) nf90_strerror(ierr) 2486 2486 stop 'Tg' 2487 2487 endif 2488 2488 2489 ierr= NF_INQ_VARID(nid,"ustar",var3didin(7))2490 if(ierr/= NF_NOERR) then2491 write(*,*) NF_STRERROR(ierr)2489 ierr=nf90_inq_varid(nid,"ustar",var3didin(7)) 2490 if(ierr/=nf90_noerr) then 2491 write(*,*) nf90_strerror(ierr) 2492 2492 stop 'ustar' 2493 2493 endif 2494 2494 2495 ierr= NF_INQ_VARID(nid,"psurf",var3didin(8))2496 if(ierr/= NF_NOERR) then2497 write(*,*) NF_STRERROR(ierr)2495 ierr=nf90_inq_varid(nid,"psurf",var3didin(8)) 2496 if(ierr/=nf90_noerr) then 2497 write(*,*) nf90_strerror(ierr) 2498 2498 stop 'psurf' 2499 2499 endif 2500 2500 2501 ierr= NF_INQ_VARID(nid,"Ug",var3didin(9))2502 if(ierr/= NF_NOERR) then2503 write(*,*) NF_STRERROR(ierr)2501 ierr=nf90_inq_varid(nid,"Ug",var3didin(9)) 2502 if(ierr/=nf90_noerr) then 2503 write(*,*) nf90_strerror(ierr) 2504 2504 stop 'Ug' 2505 2505 endif 2506 2506 2507 ierr= NF_INQ_VARID(nid,"Vg",var3didin(10))2508 if(ierr/= NF_NOERR) then2509 write(*,*) NF_STRERROR(ierr)2507 ierr=nf90_inq_varid(nid,"Vg",var3didin(10)) 2508 if(ierr/=nf90_noerr) then 2509 write(*,*) nf90_strerror(ierr) 2510 2510 stop 'Vg' 2511 2511 endif 2512 2512 2513 ierr= NF_INQ_VARID(nid,"hadvT",var3didin(17))2514 if(ierr/= NF_NOERR) then2515 write(*,*) NF_STRERROR(ierr)2513 ierr=nf90_inq_varid(nid,"hadvT",var3didin(17)) 2514 if(ierr/=nf90_noerr) then 2515 write(*,*) nf90_strerror(ierr) 2516 2516 stop 'hadvT' 2517 2517 endif 2518 2518 2519 ierr= NF_INQ_VARID(nid,"hadvq",var3didin(18))2520 if(ierr/= NF_NOERR) then2521 write(*,*) NF_STRERROR(ierr)2519 ierr=nf90_inq_varid(nid,"hadvq",var3didin(18)) 2520 if(ierr/=nf90_noerr) then 2521 write(*,*) nf90_strerror(ierr) 2522 2522 stop 'hadvq' 2523 2523 endif 2524 2524 2525 ierr= NF_INQ_VARID(nid,"hadvu",var3didin(19))2526 if(ierr/= NF_NOERR) then2527 write(*,*) NF_STRERROR(ierr)2525 ierr=nf90_inq_varid(nid,"hadvu",var3didin(19)) 2526 if(ierr/=nf90_noerr) then 2527 write(*,*) nf90_strerror(ierr) 2528 2528 stop 'hadvu' 2529 2529 endif 2530 2530 2531 ierr= NF_INQ_VARID(nid,"hadvv",var3didin(20))2532 if(ierr/= NF_NOERR) then2533 write(*,*) NF_STRERROR(ierr)2531 ierr=nf90_inq_varid(nid,"hadvv",var3didin(20)) 2532 if(ierr/=nf90_noerr) then 2533 write(*,*) nf90_strerror(ierr) 2534 2534 stop 'hadvv' 2535 2535 endif 2536 2536 2537 ierr= NF_INQ_VARID(nid,"w",var3didin(21))2538 if(ierr/= NF_NOERR) then2539 write(*,*) NF_STRERROR(ierr)2537 ierr=nf90_inq_varid(nid,"w",var3didin(21)) 2538 if(ierr/=nf90_noerr) then 2539 write(*,*) nf90_strerror(ierr) 2540 2540 stop 'w' 2541 2541 endif 2542 2542 2543 ierr= NF_INQ_VARID(nid,"omega",var3didin(22))2544 if(ierr/= NF_NOERR) then2545 write(*,*) NF_STRERROR(ierr)2543 ierr=nf90_inq_varid(nid,"omega",var3didin(22)) 2544 if(ierr/=nf90_noerr) then 2545 write(*,*) nf90_strerror(ierr) 2546 2546 stop 'omega' 2547 2547 endif … … 2550 2550 2551 2551 ierr = NF90_GET_VAR(nid,var3didin(1),zz) 2552 if(ierr/= NF_NOERR) then2553 write(*,*) NF_STRERROR(ierr)2552 if(ierr/=nf90_noerr) then 2553 write(*,*) nf90_strerror(ierr) 2554 2554 stop "getvarup" 2555 2555 endif … … 2557 2557 2558 2558 ierr = NF90_GET_VAR(nid,var3didin(11),pres) 2559 if(ierr/= NF_NOERR) then2560 write(*,*) NF_STRERROR(ierr)2559 if(ierr/=nf90_noerr) then 2560 write(*,*) nf90_strerror(ierr) 2561 2561 stop "getvarup" 2562 2562 endif … … 2564 2564 2565 2565 ierr = NF90_GET_VAR(nid,var3didin(12),th) 2566 if(ierr/= NF_NOERR) then2567 write(*,*) NF_STRERROR(ierr)2566 if(ierr/=nf90_noerr) then 2567 write(*,*) nf90_strerror(ierr) 2568 2568 stop "getvarup" 2569 2569 endif … … 2574 2574 2575 2575 ierr = NF90_GET_VAR(nid,var3didin(13),qv) 2576 if(ierr/= NF_NOERR) then2577 write(*,*) NF_STRERROR(ierr)2576 if(ierr/=nf90_noerr) then 2577 write(*,*) nf90_strerror(ierr) 2578 2578 stop "getvarup" 2579 2579 endif … … 2581 2581 2582 2582 ierr = NF90_GET_VAR(nid,var3didin(14),u) 2583 if(ierr/= NF_NOERR) then2584 write(*,*) NF_STRERROR(ierr)2583 if(ierr/=nf90_noerr) then 2584 write(*,*) nf90_strerror(ierr) 2585 2585 stop "getvarup" 2586 2586 endif … … 2588 2588 2589 2589 ierr = NF90_GET_VAR(nid,var3didin(15),v) 2590 if(ierr/= NF_NOERR) then2591 write(*,*) NF_STRERROR(ierr)2590 if(ierr/=nf90_noerr) then 2591 write(*,*) nf90_strerror(ierr) 2592 2592 stop "getvarup" 2593 2593 endif … … 2595 2595 2596 2596 ierr = NF90_GET_VAR(nid,var3didin(16),o3) 2597 if(ierr/= NF_NOERR) then2598 write(*,*) NF_STRERROR(ierr)2597 if(ierr/=nf90_noerr) then 2598 write(*,*) nf90_strerror(ierr) 2599 2599 stop "getvarup" 2600 2600 endif … … 2602 2602 2603 2603 ierr = NF90_GET_VAR(nid,var3didin(2),shf) 2604 if(ierr/= NF_NOERR) then2605 write(*,*) NF_STRERROR(ierr)2604 if(ierr/=nf90_noerr) then 2605 write(*,*) nf90_strerror(ierr) 2606 2606 stop "getvarup" 2607 2607 endif … … 2609 2609 2610 2610 ierr = NF90_GET_VAR(nid,var3didin(3),lhf) 2611 if(ierr/= NF_NOERR) then2612 write(*,*) NF_STRERROR(ierr)2611 if(ierr/=nf90_noerr) then 2612 write(*,*) nf90_strerror(ierr) 2613 2613 stop "getvarup" 2614 2614 endif … … 2616 2616 2617 2617 ierr = NF90_GET_VAR(nid,var3didin(4),lwup) 2618 if(ierr/= NF_NOERR) then2619 write(*,*) NF_STRERROR(ierr)2618 if(ierr/=nf90_noerr) then 2619 write(*,*) nf90_strerror(ierr) 2620 2620 stop "getvarup" 2621 2621 endif … … 2623 2623 2624 2624 ierr = NF90_GET_VAR(nid,var3didin(5),swup) 2625 if(ierr/= NF_NOERR) then2626 write(*,*) NF_STRERROR(ierr)2625 if(ierr/=nf90_noerr) then 2626 write(*,*) nf90_strerror(ierr) 2627 2627 stop "getvarup" 2628 2628 endif … … 2630 2630 2631 2631 ierr = NF90_GET_VAR(nid,var3didin(6),tg) 2632 if(ierr/= NF_NOERR) then2633 write(*,*) NF_STRERROR(ierr)2632 if(ierr/=nf90_noerr) then 2633 write(*,*) nf90_strerror(ierr) 2634 2634 stop "getvarup" 2635 2635 endif … … 2637 2637 2638 2638 ierr = NF90_GET_VAR(nid,var3didin(7),ustar) 2639 if(ierr/= NF_NOERR) then2640 write(*,*) NF_STRERROR(ierr)2639 if(ierr/=nf90_noerr) then 2640 write(*,*) nf90_strerror(ierr) 2641 2641 stop "getvarup" 2642 2642 endif … … 2644 2644 2645 2645 ierr = NF90_GET_VAR(nid,var3didin(8),psurf) 2646 if(ierr/= NF_NOERR) then2647 write(*,*) NF_STRERROR(ierr)2646 if(ierr/=nf90_noerr) then 2647 write(*,*) nf90_strerror(ierr) 2648 2648 stop "getvarup" 2649 2649 endif … … 2651 2651 2652 2652 ierr = NF90_GET_VAR(nid,var3didin(9),ug) 2653 if(ierr/= NF_NOERR) then2654 write(*,*) NF_STRERROR(ierr)2653 if(ierr/=nf90_noerr) then 2654 write(*,*) nf90_strerror(ierr) 2655 2655 stop "getvarup" 2656 2656 endif … … 2658 2658 2659 2659 ierr = NF90_GET_VAR(nid,var3didin(10),vg) 2660 if(ierr/= NF_NOERR) then2661 write(*,*) NF_STRERROR(ierr)2660 if(ierr/=nf90_noerr) then 2661 write(*,*) nf90_strerror(ierr) 2662 2662 stop "getvarup" 2663 2663 endif … … 2665 2665 2666 2666 ierr = NF90_GET_VAR(nid,var3didin(17),hadvt) 2667 if(ierr/= NF_NOERR) then2668 write(*,*) NF_STRERROR(ierr)2667 if(ierr/=nf90_noerr) then 2668 write(*,*) nf90_strerror(ierr) 2669 2669 stop "getvarup" 2670 2670 endif … … 2672 2672 2673 2673 ierr = NF90_GET_VAR(nid,var3didin(18),hadvq) 2674 if(ierr/= NF_NOERR) then2675 write(*,*) NF_STRERROR(ierr)2674 if(ierr/=nf90_noerr) then 2675 write(*,*) nf90_strerror(ierr) 2676 2676 stop "getvarup" 2677 2677 endif … … 2679 2679 2680 2680 ierr = NF90_GET_VAR(nid,var3didin(19),hadvu) 2681 if(ierr/= NF_NOERR) then2682 write(*,*) NF_STRERROR(ierr)2681 if(ierr/=nf90_noerr) then 2682 write(*,*) nf90_strerror(ierr) 2683 2683 stop "getvarup" 2684 2684 endif … … 2686 2686 2687 2687 ierr = NF90_GET_VAR(nid,var3didin(20),hadvv) 2688 if(ierr/= NF_NOERR) then2689 write(*,*) NF_STRERROR(ierr)2688 if(ierr/=nf90_noerr) then 2689 write(*,*) nf90_strerror(ierr) 2690 2690 stop "getvarup" 2691 2691 endif … … 2693 2693 2694 2694 ierr = NF90_GET_VAR(nid,var3didin(21),w) 2695 if(ierr/= NF_NOERR) then2696 write(*,*) NF_STRERROR(ierr)2695 if(ierr/=nf90_noerr) then 2696 write(*,*) nf90_strerror(ierr) 2697 2697 stop "getvarup" 2698 2698 endif … … 2700 2700 2701 2701 ierr = NF90_GET_VAR(nid,var3didin(22),omega) 2702 if(ierr/= NF_NOERR) then2703 write(*,*) NF_STRERROR(ierr)2702 if(ierr/=nf90_noerr) then 2703 write(*,*) nf90_strerror(ierr) 2704 2704 stop "getvarup" 2705 2705 endif … … 2714 2714 !program reading initial profils and forcings of the Gabls4 case study 2715 2715 2716 use lmdz_netcdf, ONLY: nf_open,nf_nowrite,nf_noerr,nf_strerror,nf_inq_varid,nf90_get_var,&2717 nf _inq_dimid,nf_inq_dimlen2716 use netcdf, ONLY: nf90_open,nf90_nowrite,nf90_noerr,nf90_strerror,nf90_inq_varid,nf90_get_var,& 2717 nf90_inq_dimid,nf90_inquire_dimension 2718 2718 2719 2719 implicit none … … 2743 2743 integer var3didin(nbvar3d) 2744 2744 2745 ierr = NF_OPEN(fich_gabls4,NF_NOWRITE,nid)2746 if (ierr.NE. NF_NOERR) then2745 ierr = nf90_open(fich_gabls4,nf90_nowrite,nid) 2746 if (ierr.NE.nf90_noerr) then 2747 2747 write(*,*) 'ERROR: Pb opening forcings nc file ' 2748 write(*,*) NF_STRERROR(ierr)2748 write(*,*) nf90_strerror(ierr) 2749 2749 stop "" 2750 2750 endif 2751 2751 2752 2752 2753 ierr= NF_INQ_VARID(nid,"height",var3didin(1))2754 if(ierr/= NF_NOERR) then2755 write(*,*) NF_STRERROR(ierr)2753 ierr=nf90_inq_varid(nid,"height",var3didin(1)) 2754 if(ierr/=nf90_noerr) then 2755 write(*,*) nf90_strerror(ierr) 2756 2756 stop 'height' 2757 2757 endif 2758 2758 2759 ierr= NF_INQ_VARID(nid,"depth_sn",var3didin(2))2760 if(ierr/= NF_NOERR) then2761 write(*,*) NF_STRERROR(ierr)2759 ierr=nf90_inq_varid(nid,"depth_sn",var3didin(2)) 2760 if(ierr/=nf90_noerr) then 2761 write(*,*) nf90_strerror(ierr) 2762 2762 stop 'depth_sn' 2763 2763 endif 2764 2764 2765 ierr= NF_INQ_VARID(nid,"Ug",var3didin(3))2766 if(ierr/= NF_NOERR) then2767 write(*,*) NF_STRERROR(ierr)2765 ierr=nf90_inq_varid(nid,"Ug",var3didin(3)) 2766 if(ierr/=nf90_noerr) then 2767 write(*,*) nf90_strerror(ierr) 2768 2768 stop 'Ug' 2769 2769 endif 2770 2770 2771 ierr= NF_INQ_VARID(nid,"Vg",var3didin(4))2772 if(ierr/= NF_NOERR) then2773 write(*,*) NF_STRERROR(ierr)2771 ierr=nf90_inq_varid(nid,"Vg",var3didin(4)) 2772 if(ierr/=nf90_noerr) then 2773 write(*,*) nf90_strerror(ierr) 2774 2774 stop 'Vg' 2775 2775 endif 2776 ierr= NF_INQ_VARID(nid,"pf",var3didin(5))2777 if(ierr/= NF_NOERR) then2778 write(*,*) NF_STRERROR(ierr)2776 ierr=nf90_inq_varid(nid,"pf",var3didin(5)) 2777 if(ierr/=nf90_noerr) then 2778 write(*,*) nf90_strerror(ierr) 2779 2779 stop 'pf' 2780 2780 endif 2781 2781 2782 ierr= NF_INQ_VARID(nid,"theta",var3didin(6))2783 if(ierr/= NF_NOERR) then2784 write(*,*) NF_STRERROR(ierr)2782 ierr=nf90_inq_varid(nid,"theta",var3didin(6)) 2783 if(ierr/=nf90_noerr) then 2784 write(*,*) nf90_strerror(ierr) 2785 2785 stop 'theta' 2786 2786 endif 2787 2787 2788 ierr= NF_INQ_VARID(nid,"tempe",var3didin(7))2789 if(ierr/= NF_NOERR) then2790 write(*,*) NF_STRERROR(ierr)2788 ierr=nf90_inq_varid(nid,"tempe",var3didin(7)) 2789 if(ierr/=nf90_noerr) then 2790 write(*,*) nf90_strerror(ierr) 2791 2791 stop 'tempe' 2792 2792 endif 2793 2793 2794 ierr= NF_INQ_VARID(nid,"qv",var3didin(8))2795 if(ierr/= NF_NOERR) then2796 write(*,*) NF_STRERROR(ierr)2794 ierr=nf90_inq_varid(nid,"qv",var3didin(8)) 2795 if(ierr/=nf90_noerr) then 2796 write(*,*) nf90_strerror(ierr) 2797 2797 stop 'qv' 2798 2798 endif 2799 2799 2800 ierr= NF_INQ_VARID(nid,"u",var3didin(9))2801 if(ierr/= NF_NOERR) then2802 write(*,*) NF_STRERROR(ierr)2800 ierr=nf90_inq_varid(nid,"u",var3didin(9)) 2801 if(ierr/=nf90_noerr) then 2802 write(*,*) nf90_strerror(ierr) 2803 2803 stop 'u' 2804 2804 endif 2805 2805 2806 ierr= NF_INQ_VARID(nid,"v",var3didin(10))2807 if(ierr/= NF_NOERR) then2808 write(*,*) NF_STRERROR(ierr)2806 ierr=nf90_inq_varid(nid,"v",var3didin(10)) 2807 if(ierr/=nf90_noerr) then 2808 write(*,*) nf90_strerror(ierr) 2809 2809 stop 'v' 2810 2810 endif 2811 2811 2812 ierr= NF_INQ_VARID(nid,"hadvT",var3didin(11))2813 if(ierr/= NF_NOERR) then2814 write(*,*) NF_STRERROR(ierr)2812 ierr=nf90_inq_varid(nid,"hadvT",var3didin(11)) 2813 if(ierr/=nf90_noerr) then 2814 write(*,*) nf90_strerror(ierr) 2815 2815 stop 'hadvt' 2816 2816 endif 2817 2817 2818 ierr= NF_INQ_VARID(nid,"hadvQ",var3didin(12))2819 if(ierr/= NF_NOERR) then2820 write(*,*) NF_STRERROR(ierr)2818 ierr=nf90_inq_varid(nid,"hadvQ",var3didin(12)) 2819 if(ierr/=nf90_noerr) then 2820 write(*,*) nf90_strerror(ierr) 2821 2821 stop 'hadvq' 2822 2822 endif 2823 2823 2824 ierr= NF_INQ_VARID(nid,"Tsnow",var3didin(14))2825 if(ierr/= NF_NOERR) then2826 write(*,*) NF_STRERROR(ierr)2824 ierr=nf90_inq_varid(nid,"Tsnow",var3didin(14)) 2825 if(ierr/=nf90_noerr) then 2826 write(*,*) nf90_strerror(ierr) 2827 2827 stop 'tsnow' 2828 2828 endif 2829 2829 2830 ierr= NF_INQ_VARID(nid,"snow_density",var3didin(15))2831 if(ierr/= NF_NOERR) then2832 write(*,*) NF_STRERROR(ierr)2830 ierr=nf90_inq_varid(nid,"snow_density",var3didin(15)) 2831 if(ierr/=nf90_noerr) then 2832 write(*,*) nf90_strerror(ierr) 2833 2833 stop 'snow_density' 2834 2834 endif 2835 2835 2836 ierr= NF_INQ_VARID(nid,"Tg",var3didin(16))2837 if(ierr/= NF_NOERR) then2838 write(*,*) NF_STRERROR(ierr)2836 ierr=nf90_inq_varid(nid,"Tg",var3didin(16)) 2837 if(ierr/=nf90_noerr) then 2838 write(*,*) nf90_strerror(ierr) 2839 2839 stop 'Tg' 2840 2840 endif … … 2845 2845 2846 2846 ierr = NF90_GET_VAR(nid,var3didin(1),zz_i) 2847 if(ierr/= NF_NOERR) then2848 write(*,*) NF_STRERROR(ierr)2847 if(ierr/=nf90_noerr) then 2848 write(*,*) nf90_strerror(ierr) 2849 2849 stop "getvarup" 2850 2850 endif 2851 2851 2852 2852 ierr = NF90_GET_VAR(nid,var3didin(2),depth_sn) 2853 if(ierr/= NF_NOERR) then2854 write(*,*) NF_STRERROR(ierr)2853 if(ierr/=nf90_noerr) then 2854 write(*,*) nf90_strerror(ierr) 2855 2855 stop "getvarup" 2856 2856 endif 2857 2857 2858 2858 ierr = NF90_GET_VAR(nid,var3didin(3),ug_i) 2859 if(ierr/= NF_NOERR) then2860 write(*,*) NF_STRERROR(ierr)2859 if(ierr/=nf90_noerr) then 2860 write(*,*) nf90_strerror(ierr) 2861 2861 stop "getvarup" 2862 2862 endif 2863 2863 2864 2864 ierr = NF90_GET_VAR(nid,var3didin(4),vg_i) 2865 if(ierr/= NF_NOERR) then2866 write(*,*) NF_STRERROR(ierr)2865 if(ierr/=nf90_noerr) then 2866 write(*,*) nf90_strerror(ierr) 2867 2867 stop "getvarup" 2868 2868 endif 2869 2869 2870 2870 ierr = NF90_GET_VAR(nid,var3didin(5),pf_i) 2871 if(ierr/= NF_NOERR) then2872 write(*,*) NF_STRERROR(ierr)2871 if(ierr/=nf90_noerr) then 2872 write(*,*) nf90_strerror(ierr) 2873 2873 stop "getvarup" 2874 2874 endif 2875 2875 2876 2876 ierr = NF90_GET_VAR(nid,var3didin(6),th_i) 2877 if(ierr/= NF_NOERR) then2878 write(*,*) NF_STRERROR(ierr)2877 if(ierr/=nf90_noerr) then 2878 write(*,*) nf90_strerror(ierr) 2879 2879 stop "getvarup" 2880 2880 endif 2881 2881 2882 2882 ierr = NF90_GET_VAR(nid,var3didin(7),t_i) 2883 if(ierr/= NF_NOERR) then2884 write(*,*) NF_STRERROR(ierr)2883 if(ierr/=nf90_noerr) then 2884 write(*,*) nf90_strerror(ierr) 2885 2885 stop "getvarup" 2886 2886 endif 2887 2887 2888 2888 ierr = NF90_GET_VAR(nid,var3didin(8),qv_i) 2889 if(ierr/= NF_NOERR) then2890 write(*,*) NF_STRERROR(ierr)2889 if(ierr/=nf90_noerr) then 2890 write(*,*) nf90_strerror(ierr) 2891 2891 stop "getvarup" 2892 2892 endif 2893 2893 2894 2894 ierr = NF90_GET_VAR(nid,var3didin(9),u_i) 2895 if(ierr/= NF_NOERR) then2896 write(*,*) NF_STRERROR(ierr)2895 if(ierr/=nf90_noerr) then 2896 write(*,*) nf90_strerror(ierr) 2897 2897 stop "getvarup" 2898 2898 endif 2899 2899 2900 2900 ierr = NF90_GET_VAR(nid,var3didin(10),v_i) 2901 if(ierr/= NF_NOERR) then2902 write(*,*) NF_STRERROR(ierr)2901 if(ierr/=nf90_noerr) then 2902 write(*,*) nf90_strerror(ierr) 2903 2903 stop "getvarup" 2904 2904 endif 2905 2905 2906 2906 ierr = NF90_GET_VAR(nid,var3didin(11),hadvt_i) 2907 if(ierr/= NF_NOERR) then2908 write(*,*) NF_STRERROR(ierr)2907 if(ierr/=nf90_noerr) then 2908 write(*,*) nf90_strerror(ierr) 2909 2909 stop "getvarup" 2910 2910 endif 2911 2911 2912 2912 ierr = NF90_GET_VAR(nid,var3didin(12),hadvq_i) 2913 if(ierr/= NF_NOERR) then2914 write(*,*) NF_STRERROR(ierr)2913 if(ierr/=nf90_noerr) then 2914 write(*,*) nf90_strerror(ierr) 2915 2915 stop "getvarup" 2916 2916 endif 2917 2917 2918 2918 ierr = NF90_GET_VAR(nid,var3didin(14),tsnow) 2919 if(ierr/= NF_NOERR) then2920 write(*,*) NF_STRERROR(ierr)2919 if(ierr/=nf90_noerr) then 2920 write(*,*) nf90_strerror(ierr) 2921 2921 stop "getvarup" 2922 2922 endif 2923 2923 2924 2924 ierr = NF90_GET_VAR(nid,var3didin(15),snow_dens) 2925 if(ierr/= NF_NOERR) then2926 write(*,*) NF_STRERROR(ierr)2925 if(ierr/=nf90_noerr) then 2926 write(*,*) nf90_strerror(ierr) 2927 2927 stop "getvarup" 2928 2928 endif 2929 2929 2930 2930 ierr = NF90_GET_VAR(nid,var3didin(16),tg) 2931 if(ierr/= NF_NOERR) then2932 write(*,*) NF_STRERROR(ierr)2931 if(ierr/=nf90_noerr) then 2932 write(*,*) nf90_strerror(ierr) 2933 2933 stop "getvarup" 2934 2934 endif -
LMDZ6/branches/Amaury_dev/libf/phylmd/grid_noro_m.F90
r5087 r5088 435 435 ! Purpose: Read parameters usually determined with grid_noro from a file. 436 436 !=============================================================================== 437 USE lmdz_netcdf, ONLY: NF90_OPEN, NF90_INQ_DIMID, NF90_INQUIRE_DIMENSION, &437 USE netcdf, ONLY: NF90_OPEN, nf90_inq_dimid, NF90_INQUIRE_DIMENSION, & 438 438 NF90_NOERR, NF90_CLOSE, NF90_INQ_VARID, NF90_GET_VAR, NF90_STRERROR, & 439 439 NF90_NOWRITE … … 509 509 REAL, ALLOCATABLE :: tmp(:) 510 510 INTEGER :: n 511 CALL ncerr( NF90_INQ_DIMID(fid,dimd,did))511 CALL ncerr(nf90_inq_dimid(fid,dimd,did)) 512 512 CALL ncerr(NF90_INQUIRE_DIMENSION(fid,did,len=n)); ALLOCATE(tmp(n)) 513 513 CALL ncerr(NF90_INQ_VARID(fid,dimd,did)) -
LMDZ6/branches/Amaury_dev/libf/phylmd/ice_sursat_mod.F90
r5075 r5088 96 96 USE mod_phys_lmdz_para, ONLY: scatter, bcast 97 97 USE print_control_mod, ONLY: lunout 98 USE lmdz_netcdf, ONLY: nf90_get_var, nf_inq_varid, nf_inq_dimlen, nf_inq_dimid, &99 nf _open, nf_noerr98 USE netcdf, ONLY: nf90_get_var, nf90_inq_varid, nf90_inquire_dimension, nf90_inq_dimid, & 99 nf90_open, nf90_noerr 100 100 101 101 IMPLICIT NONE … … 134 134 IF (is_mpi_root .AND. is_omp_root) THEN 135 135 ! 136 iret = nf _open('aircraft_phy.nc', 0, ncida)137 IF (iret /= NF_NOERR) CALL abort_physic(modname,'problem to open aircraft_phy.nc file',1)136 iret = nf90_open('aircraft_phy.nc', 0, ncida) 137 IF (iret /= nf90_noerr) CALL abort_physic(modname,'problem to open aircraft_phy.nc file',1) 138 138 ! ... Get lengths 139 iret = nf _inq_dimid(ncida, 'time', varid)140 IF (iret /= NF_NOERR) CALL abort_physic(modname,'problem to get time dimid in aircraft_phy.nc file',1)141 iret = nf _inq_dimlen(ncida, varid,ntimea)142 IF (iret /= NF_NOERR) CALL abort_physic(modname,'problem to get time dimlen aircraft_phy.nc file',1)143 iret = nf _inq_dimid(ncida, 'vector', varid)144 IF (iret /= NF_NOERR) CALL abort_physic(modname,'problem to get vector dimid aircraft_phy.nc file',1)145 iret = nf _inq_dimlen(ncida, varid,klona)146 IF (iret /= NF_NOERR) CALL abort_physic(modname,'problem to get vector dimlen aircraft_phy.nc file',1)147 iret = nf _inq_dimid(ncida, 'lev', varid)148 IF (iret /= NF_NOERR) CALL abort_physic(modname,'problem to get lev dimid aircraft_phy.nc file',1)149 iret = nf _inq_dimlen(ncida, varid,nleva)150 IF (iret /= NF_NOERR) CALL abort_physic(modname,'problem to get lev dimlen aircraft_phy.nc file',1)139 iret = nf90_inq_dimid(ncida, 'time', varid) 140 IF (iret /= nf90_noerr) CALL abort_physic(modname,'problem to get time dimid in aircraft_phy.nc file',1) 141 iret = nf90_inquire_dimension(ncida, varid,len= ntimea) 142 IF (iret /= nf90_noerr) CALL abort_physic(modname,'problem to get time dimlen aircraft_phy.nc file',1) 143 iret = nf90_inq_dimid(ncida, 'vector', varid) 144 IF (iret /= nf90_noerr) CALL abort_physic(modname,'problem to get vector dimid aircraft_phy.nc file',1) 145 iret = nf90_inquire_dimension(ncida, varid,len= klona) 146 IF (iret /= nf90_noerr) CALL abort_physic(modname,'problem to get vector dimlen aircraft_phy.nc file',1) 147 iret = nf90_inq_dimid(ncida, 'lev', varid) 148 IF (iret /= nf90_noerr) CALL abort_physic(modname,'problem to get lev dimid aircraft_phy.nc file',1) 149 iret = nf90_inquire_dimension(ncida, varid,len= nleva) 150 IF (iret /= nf90_noerr) CALL abort_physic(modname,'problem to get lev dimlen aircraft_phy.nc file',1) 151 151 ! 152 152 IF ( klona /= klon_glo ) THEN … … 167 167 IF (error /= 0) CALL abort_physic(modname,'problem to allocate ph2o_airpl_glo',1) 168 168 ! 169 iret = nf _inq_varid(ncida, 'lev', varid)170 IF (iret /= NF_NOERR) CALL abort_physic(modname,'problem to get lev dimid aircraft_phy.nc file',1)169 iret = nf90_inq_varid(ncida, 'lev', varid) 170 IF (iret /= nf90_noerr) CALL abort_physic(modname,'problem to get lev dimid aircraft_phy.nc file',1) 171 171 iret = nf90_get_var(ncida, varid, zmida) 172 IF (iret /= NF_NOERR) CALL abort_physic(modname,'problem to read zmida file',1)172 IF (iret /= nf90_noerr) CALL abort_physic(modname,'problem to read zmida file',1) 173 173 ! 174 iret = nf _inq_varid(ncida, 'emi_co2_aircraft', varid) !--CO2 as a proxy for m flown -175 IF (iret /= NF_NOERR) CALL abort_physic(modname,'problem to get emi_distance dimid aircraft_phy.nc file',1)174 iret = nf90_inq_varid(ncida, 'emi_co2_aircraft', varid) !--CO2 as a proxy for m flown - 175 IF (iret /= nf90_noerr) CALL abort_physic(modname,'problem to get emi_distance dimid aircraft_phy.nc file',1) 176 176 iret = nf90_get_var(ncida, varid, pkm_airpl_glo) 177 IF (iret /= NF_NOERR) CALL abort_physic(modname,'problem to read pkm_airpl file',1)177 IF (iret /= nf90_noerr) CALL abort_physic(modname,'problem to read pkm_airpl file',1) 178 178 ! 179 iret = nf _inq_varid(ncida, 'emi_h2o_aircraft', varid)180 IF (iret /= NF_NOERR) CALL abort_physic(modname,'problem to get emi_h2o_aircraft dimid aircraft_phy.nc file',1)179 iret = nf90_inq_varid(ncida, 'emi_h2o_aircraft', varid) 180 IF (iret /= nf90_noerr) CALL abort_physic(modname,'problem to get emi_h2o_aircraft dimid aircraft_phy.nc file',1) 181 181 iret = nf90_get_var(ncida, varid, ph2o_airpl_glo) 182 IF (iret /= NF_NOERR) CALL abort_physic(modname,'problem to read ph2o_airpl file',1)182 IF (iret /= nf90_noerr) CALL abort_physic(modname,'problem to read ph2o_airpl file',1) 183 183 ! 184 184 ENDIF !--is_mpi_root and is_omp_root -
LMDZ6/branches/Amaury_dev/libf/phylmd/interfoce_lim.F90
r5075 r5088 10 10 USE mod_phys_lmdz_para 11 11 USE indice_sol_mod 12 USE lmdz_netcdf, ONLY: nf90_get_var,nf_close,nf_noerr,nf_inq_varid,nf_open,nf_nowrite12 USE netcdf, ONLY: nf90_get_var,nf90_close,nf90_noerr,nf90_inq_varid,nf90_open,nf90_nowrite 13 13 14 14 IMPLICIT NONE … … 114 114 115 115 fich = TRIM(fich) 116 ierr = NF_OPEN (fich, NF_NOWRITE,nid)117 IF (ierr/= NF_NOERR) THEN116 ierr = nf90_open (fich, nf90_nowrite,nid) 117 IF (ierr/=nf90_noerr) THEN 118 118 abort_message = 'Pb d''ouverture du fichier de conditions aux limites' 119 119 CALL abort_physic(modname,abort_message,1) … … 131 131 ! Fraction "ocean" 132 132 ! 133 ierr = NF_INQ_VARID(nid, 'FOCE', nvarid)134 IF (ierr /= NF_NOERR) THEN133 ierr = nf90_inq_varid(nid, 'FOCE', nvarid) 134 IF (ierr /= nf90_noerr) THEN 135 135 abort_message = 'Le champ <FOCE> est absent' 136 136 CALL abort_physic(modname,abort_message,1) 137 137 ENDIF 138 138 ierr = nf90_get_var(nid,nvarid,pct_tmp(:,is_oce),start,epais) 139 IF (ierr /= NF_NOERR) THEN139 IF (ierr /= nf90_noerr) THEN 140 140 abort_message = 'Lecture echouee pour <FOCE>' 141 141 CALL abort_physic(modname,abort_message,1) … … 144 144 ! Fraction "glace de mer" 145 145 ! 146 ierr = NF_INQ_VARID(nid, 'FSIC', nvarid)147 IF (ierr /= NF_NOERR) THEN146 ierr = nf90_inq_varid(nid, 'FSIC', nvarid) 147 IF (ierr /= nf90_noerr) THEN 148 148 abort_message = 'Le champ <FSIC> est absent' 149 149 CALL abort_physic(modname,abort_message,1) 150 150 ENDIF 151 151 ierr = nf90_get_var(nid,nvarid,pct_tmp(:,is_sic),start,epais) 152 IF (ierr /= NF_NOERR) THEN152 IF (ierr /= nf90_noerr) THEN 153 153 abort_message = 'Lecture echouee pour <FSIC>' 154 154 CALL abort_physic(modname,abort_message,1) … … 157 157 ! Fraction "terre" 158 158 ! 159 ierr = NF_INQ_VARID(nid, 'FTER', nvarid)160 IF (ierr /= NF_NOERR) THEN159 ierr = nf90_inq_varid(nid, 'FTER', nvarid) 160 IF (ierr /= nf90_noerr) THEN 161 161 abort_message = 'Le champ <FTER> est absent' 162 162 CALL abort_physic(modname,abort_message,1) 163 163 ENDIF 164 164 ierr = nf90_get_var(nid,nvarid,pct_tmp(:,is_ter),start,epais) 165 IF (ierr /= NF_NOERR) THEN165 IF (ierr /= nf90_noerr) THEN 166 166 abort_message = 'Lecture echouee pour <FTER>' 167 167 CALL abort_physic(modname,abort_message,1) … … 170 170 ! Fraction "glacier terre" 171 171 ! 172 ierr = NF_INQ_VARID(nid, 'FLIC', nvarid)173 IF (ierr /= NF_NOERR) THEN172 ierr = nf90_inq_varid(nid, 'FLIC', nvarid) 173 IF (ierr /= nf90_noerr) THEN 174 174 abort_message = 'Le champ <FLIC> est absent' 175 175 CALL abort_physic(modname,abort_message,1) 176 176 ENDIF 177 177 ierr = nf90_get_var(nid,nvarid,pct_tmp(:,is_lic),start,epais) 178 IF (ierr /= NF_NOERR) THEN178 IF (ierr /= nf90_noerr) THEN 179 179 abort_message = 'Lecture echouee pour <FLIC>' 180 180 CALL abort_physic(modname,abort_message,1) … … 183 183 ELSE ! on en est toujours a rnatur 184 184 ! 185 ierr = NF_INQ_VARID(nid, 'NAT', nvarid)186 IF (ierr /= NF_NOERR) THEN185 ierr = nf90_inq_varid(nid, 'NAT', nvarid) 186 IF (ierr /= nf90_noerr) THEN 187 187 abort_message = 'Le champ <NAT> est absent' 188 188 CALL abort_physic(modname,abort_message,1) 189 189 ENDIF 190 190 ierr = nf90_get_var(nid,nvarid,nat_lu,start,epais) 191 IF (ierr /= NF_NOERR) THEN191 IF (ierr /= nf90_noerr) THEN 192 192 abort_message = 'Lecture echouee pour <NAT>' 193 193 CALL abort_physic(modname,abort_message,1) … … 213 213 ! Lecture SST 214 214 ! 215 ierr = NF_INQ_VARID(nid, 'SST', nvarid)216 IF (ierr /= NF_NOERR) THEN215 ierr = nf90_inq_varid(nid, 'SST', nvarid) 216 IF (ierr /= nf90_noerr) THEN 217 217 abort_message = 'Le champ <SST> est absent' 218 218 CALL abort_physic(modname,abort_message,1) 219 219 ENDIF 220 220 ierr = nf90_get_var(nid,nvarid,sst_lu,start,epais) 221 IF (ierr /= NF_NOERR) THEN221 IF (ierr /= nf90_noerr) THEN 222 222 abort_message = 'Lecture echouee pour <SST>' 223 223 CALL abort_physic(modname,abort_message,1) … … 228 228 ! 229 229 !**************************************************************************************** 230 ierr = NF_CLOSE(nid)230 ierr = nf90_close(nid) 231 231 ENDIF ! is_mpi_root 232 232 -
LMDZ6/branches/Amaury_dev/libf/phylmd/iostart.F90
r5075 r5088 30 30 31 31 SUBROUTINE Open_startphy(filename) 32 USE lmdz_netcdf, ONLY: nf90_nowrite, nf90_noerr,nf90_open32 USE netcdf, ONLY: nf90_nowrite, nf90_noerr,nf90_open 33 33 USE mod_phys_lmdz_para 34 34 IMPLICIT NONE … … 48 48 49 49 SUBROUTINE Close_startphy 50 USE lmdz_netcdf, ONLY: nf90_close50 USE netcdf, ONLY: nf90_close 51 51 USE mod_phys_lmdz_para 52 52 IMPLICIT NONE … … 61 61 62 62 FUNCTION Inquire_Field(Field_name) 63 USE lmdz_netcdf, ONLY: nf90_noerr,nf90_inq_varid63 USE netcdf, ONLY: nf90_noerr,nf90_inq_varid 64 64 USE mod_phys_lmdz_para 65 65 IMPLICIT NONE … … 115 115 116 116 SUBROUTINE Get_field_rgen(field_name,field,field_size,found) 117 USE lmdz_netcdf, ONLY: nf90_inq_varid,nf90_noerr,nf90_get_var117 USE netcdf, ONLY: nf90_inq_varid,nf90_noerr,nf90_get_var 118 118 USE dimphy 119 119 USE geometry_mod … … 251 251 252 252 SUBROUTINE Get_var_rgen(var_name,var,var_size,found) 253 USE lmdz_netcdf, ONLY: nf90_noerr,nf90_get_var,nf90_inq_varid253 USE netcdf, ONLY: nf90_noerr,nf90_get_var,nf90_inq_varid 254 254 USE dimphy 255 255 USE mod_grid_phy_lmdz … … 301 301 302 302 SUBROUTINE open_restartphy(filename) 303 USE lmdz_netcdf, ONLY: nf90_create,nf90_clobber,nf90_64bit_offset,nf90_noerr,nf90_strerror,&303 USE netcdf, ONLY: nf90_create,nf90_clobber,nf90_64bit_offset,nf90_noerr,nf90_strerror,& 304 304 nf90_global,nf90_put_att,nf90_def_dim 305 305 USE mod_phys_lmdz_para, ONLY: is_master … … 333 333 334 334 SUBROUTINE enddef_restartphy 335 USE lmdz_netcdf, ONLY: nf90_enddef335 USE netcdf, ONLY: nf90_enddef 336 336 USE mod_phys_lmdz_para 337 337 IMPLICIT NONE … … 343 343 344 344 SUBROUTINE close_restartphy 345 USE lmdz_netcdf, ONLY: nf90_close345 USE netcdf, ONLY: nf90_close 346 346 USE mod_phys_lmdz_para 347 347 IMPLICIT NONE … … 386 386 387 387 SUBROUTINE put_field_rgen(pass, field_name,title,field,field_size) 388 USE lmdz_netcdf, ONLY: nf90_def_var,nf90_format,nf90_put_att,nf90_inq_varid,nf90_put_var 388 USE netcdf, ONLY: nf90_def_var,nf90_put_att,nf90_inq_varid,nf90_put_var 389 USE lmdz_netcdf_format, ONLY: nf90_format 389 390 USE dimphy 390 391 USE geometry_mod … … 425 426 426 427 ! ierr = NF90_REDEF (nid_restart) 427 ierr = NF90_DEF_VAR (nid_restart, field_name, NF90_FORMAT,(/ idim /),nvarid)428 ierr = NF90_DEF_VAR (nid_restart, field_name, nf90_format,(/ idim /),nvarid) 428 429 IF (LEN_TRIM(title) > 0) ierr = NF90_PUT_ATT (nid_restart,nvarid,"title", title) 429 430 ! ierr = NF90_ENDDEF(nid_restart) … … 509 510 510 511 SUBROUTINE put_var_rgen(pass, var_name,title,var,var_size) 511 USE lmdz_netcdf, ONLY: nf90_format,nf90_def_var,nf90_put_var,nf90_inq_varid,nf90_put_att 512 USE netcdf, ONLY: nf90_def_var,nf90_put_var,nf90_inq_varid,nf90_put_att 513 USE lmdz_netcdf_format, ONLY: nf90_format 512 514 USE dimphy 513 515 USE mod_phys_lmdz_para … … 534 536 ! ierr = NF90_REDEF (nid_restart) 535 537 536 ierr = NF90_DEF_VAR (nid_restart, var_name, NF90_FORMAT,(/ idim1 /),nvarid)538 ierr = NF90_DEF_VAR (nid_restart, var_name, nf90_format,(/ idim1 /),nvarid) 537 539 IF (LEN_TRIM(title)>0) ierr = NF90_PUT_ATT (nid_restart,nvarid,"title", title) 538 540 ! ierr = NF90_ENDDEF(nid_restart) -
LMDZ6/branches/Amaury_dev/libf/phylmd/iotd_ecrit.F90
r5082 r5088 22 22 !================================================================= 23 23 24 USE lmdz_netcdf, ONLY: nf90_put_var,nf_inq_varid,nf_enddef,nf_redef,nf_sync,nf_noerr,&25 nf _float,nf_def_var24 USE netcdf, ONLY: nf90_put_var,nf90_inq_varid,nf90_enddef,nf90_redef,nf90_sync,nf90_noerr,& 25 nf90_float,nf90_def_var 26 26 implicit none 27 27 … … 103 103 ! Get NetCDF ID of 'time' variable 104 104 105 ierr= NF_SYNC(nid)105 ierr=nf90_sync(nid) 106 106 107 ierr= NF_INQ_VARID(nid,"time",varid)107 ierr= nf90_inq_varid(nid,"time",varid) 108 108 ! Write (append) the new date to the 'time' array 109 109 … … 114 114 ! print*,'IOTD Date ,varid,nid,ntime,date',varid,nid,ntime,date 115 115 116 if (ierr/= NF_NOERR) then116 if (ierr/=nf90_noerr) then 117 117 write(*,*) "***** PUT_VAR matter in writediagfi_nc" 118 118 write(*,*) "***** with time" … … 161 161 162 162 if (ntime==1) then 163 ierr = NF_REDEF(nid)164 ierr = NF_DEF_VAR(nid,nom,NF_FLOAT,ndim,dim_cc,varid)163 ierr = nf90_redef (nid) 164 ierr = nf90_def_var(nid,nom,nf90_float,dim_cc,varid) 165 165 !print*,'DEF ',nom,nid,varid 166 ierr = NF_ENDDEF(nid)166 ierr = nf90_enddef(nid) 167 167 else 168 ierr= NF_INQ_VARID(nid,nom,varid)168 ierr= nf90_inq_varid(nid,nom,varid) 169 169 !print*,'INQ ',nom,nid,varid 170 170 ! Commandes pour recuperer automatiquement les coordonnees 171 ! ierr= NF_INQ_DIMID(nid,"longitude",id(1))171 ! ierr= nf90_inq_dimid(nid,"longitude",id(1)) 172 172 endif 173 173 … … 175 175 ierr= NF90_PUT_VAR(nid,varid,zx,corner,edges) 176 176 177 if (ierr/= NF_NOERR) then177 if (ierr/=nf90_noerr) then 178 178 write(*,*) "***** PUT_VAR problem in writediagfi" 179 179 write(*,*) "***** with ",nom -
LMDZ6/branches/Amaury_dev/libf/phylmd/iotd_fin.F90
r5075 r5088 1 1 SUBROUTINE iotd_fin 2 USE lmdz_netcdf, ONLY : nf_close2 USE netcdf, ONLY : nf90_close 3 3 4 4 IMPLICIT NONE … … 21 21 ! ---------- 22 22 23 ierr = NF_close(nid)23 ierr = nf90_close(nid) 24 24 25 25 END -
LMDZ6/branches/Amaury_dev/libf/phylmd/iotd_ini.F90
r5087 r5088 1 1 SUBROUTINE iotd_ini(fichnom,iim,jjm,llm,prlon,prlat,pcoordv,jour0,mois0,an0,t0,timestep,calendrier) 2 USE lmdz_netcdf, ONLY: nf_enddef,nf_put_att_text,nf_float,nf_def_var,nf_redef,&3 nf _global,nf_def_dim,nf_create,nf_clobber,nf_unlimited,nf90_put_var2 USE netcdf, ONLY: nf90_enddef,nf90_put_att,nf90_float,nf90_def_var,nf90_redef,& 3 nf90_global,nf90_def_dim,nf90_create,nf90_clobber,nf90_unlimited,nf90_put_var 4 4 IMPLICIT NONE 5 5 … … 91 91 92 92 ! Create the NetCDF file 93 ierr= NF_CREATE(fichnom, NF_CLOBBER, nid)94 ierr= NF_DEF_DIM(nid, "lon", iim, dim_coord(1))95 ierr= NF_DEF_DIM(nid, "lat", jjm, dim_coord(2))96 ierr= NF_DEF_DIM(nid, "lev", llm, dim_coord(3))97 ierr= NF_DEF_DIM(nid,"time",NF_UNLIMITED,dim_coord(4))98 ierr = NF_PUT_ATT_TEXT(nid,NF_GLOBAL,'Conventions',6,"CF-1.1")99 !ierr = NF_PUT_ATT_TEXT(nid,NF_GLOBAL,'file_name',TRIM(fname))100 ierr= NF_ENDDEF(nid)93 ierr=nf90_create(fichnom, nf90_clobber, nid) 94 ierr=nf90_def_dim(nid, "lon", iim, dim_coord(1)) 95 ierr=nf90_def_dim(nid, "lat", jjm, dim_coord(2)) 96 ierr=nf90_def_dim(nid, "lev", llm, dim_coord(3)) 97 ierr=nf90_def_dim(nid,"time",nf90_unlimited,dim_coord(4)) 98 ierr = nf90_put_att(nid,nf90_global,'Conventions',"CF-1.1") 99 !ierr = nf90_put_att(nid,nf90_global,'file_name',TRIM(fname)) 100 ierr=nf90_enddef(nid) 101 101 102 102 ! Switch out of NetCDF Define mode 103 103 104 104 105 ierr= NF_ENDDEF(nid)105 ierr=nf90_enddef(nid) 106 106 ! 107 107 ! Contol parameters for this run 108 108 ! ---- longitude ----------- 109 109 110 ierr= NF_REDEF(nid)111 ierr= NF_DEF_VAR(nid,"lon", NF_FLOAT, 1, dim_coord(1),nvarid)112 ierr = NF_PUT_ATT_TEXT(nid,nvarid,'axis',1,'X')113 ierr= NF_PUT_ATT_TEXT(nid,nvarid,'units',12,"degrees_east")114 ierr= NF_ENDDEF(nid)110 ierr=nf90_redef(nid) 111 ierr=nf90_def_var(nid,"lon", nf90_float, dim_coord(1),nvarid) 112 ierr = nf90_put_att(nid,nvarid,'axis','X') 113 ierr=nf90_put_att(nid,nvarid,'units',"degrees_east") 114 ierr=nf90_enddef(nid) 115 115 ierr=nf90_put_var(nid,nvarid,rlon) 116 116 print*,ierr 117 117 118 118 ! ---- latitude ------------ 119 ierr= NF_REDEF(nid)120 ierr= NF_DEF_VAR(nid, "lat", NF_FLOAT, 1, dim_coord(2),nvarid)121 ierr = NF_PUT_ATT_TEXT(nid,nvarid,'axis',1,'Y')122 ierr= NF_PUT_ATT_TEXT(nid,nvarid,'units',13,"degrees_north")123 ierr= NF_ENDDEF(nid)119 ierr=nf90_redef(nid) 120 ierr=nf90_def_var(nid, "lat", nf90_float, dim_coord(2),nvarid) 121 ierr = nf90_put_att(nid,nvarid,'axis','Y') 122 ierr=nf90_put_att(nid,nvarid,'units',"degrees_north") 123 ierr=nf90_enddef(nid) 124 124 ierr=nf90_put_var(nid,nvarid,rlat) 125 125 ! 126 126 ! ---- vertical ------------ 127 ierr= NF_REDEF(nid)128 ierr= NF_DEF_VAR(nid, "lev", NF_FLOAT, 1,dim_coord(3),nvarid)129 ierr= NF_PUT_ATT_TEXT(nid,nvarid,"long_name",10,"vert level")127 ierr=nf90_redef(nid) 128 ierr=nf90_def_var(nid, "lev", nf90_float,dim_coord(3),nvarid) 129 ierr=nf90_put_att(nid,nvarid,"long_name","vert level") 130 130 if ( coordv(2)>coordv(1) ) then 131 ierr= NF_PUT_ATT_TEXT(nid,nvarid,"long_name",10,"pseudo-alt")132 ierr= NF_PUT_ATT_TEXT(nid,nvarid,'positive',2,"up")131 ierr=nf90_put_att(nid,nvarid,"long_name","pseudo-alt") 132 ierr=nf90_put_att(nid,nvarid,'positive',"up") 133 133 else 134 ierr= NF_PUT_ATT_TEXT(nid,nvarid,"long_name",8,"pressure")135 ierr = NF_PUT_ATT_TEXT (nid,nvarid,'positive',4,"down")134 ierr=nf90_put_att(nid,nvarid,"long_name","pressure") 135 ierr = nf90_put_att(nid,nvarid,'positive',"down") 136 136 endif 137 ierr= NF_ENDDEF(nid)137 ierr=nf90_enddef(nid) 138 138 ierr=nf90_put_var(nid,nvarid,coordv) 139 139 140 140 ! 141 141 ! ---- time ---------------- 142 ierr= NF_REDEF(nid)142 ierr=nf90_redef(nid) 143 143 ! Define the 'time' variable 144 ierr= NF_DEF_VAR(nid, "time", NF_FLOAT, 1, dim_coord(4),nvarid)144 ierr=nf90_def_var(nid, "time", nf90_float, dim_coord(4),nvarid) 145 145 ! ! Add attributes 146 ierr = NF_PUT_ATT_TEXT(nid,nvarid,'axis',1,'T')147 ierr = NF_PUT_ATT_TEXT(nid,nvarid,'standard_name',4,'time')146 ierr = nf90_put_att(nid,nvarid,'axis','T') 147 ierr = nf90_put_att(nid,nvarid,'standard_name','time') 148 148 WRITE(date0,'(i4.4,"-",i2.2,"-",i2.2)') an0,mois0,jour0 149 ierr= NF_PUT_ATT_TEXT(nid, nvarid,'units',33, &149 ierr=nf90_put_att(nid, nvarid,'units', & 150 150 "seconds since "//date0//" 00:00:00") 151 ierr = NF_PUT_ATT_TEXT(nid,nvarid,'calendar',9,calendrier)152 !ierr = NF_PUT_ATT_TEXT(nid,nvarid,'calendar',4,'360d')153 ierr = NF_PUT_ATT_TEXT(nid,nvarid,'title',4,'Time')154 ierr = NF_PUT_ATT_TEXT(nid,nvarid,'long_name',9,'Time axis')151 ierr = nf90_put_att(nid,nvarid,'calendar',calendrier) 152 !ierr = nf90_put_att(nid,nvarid,'calendar','360d') 153 ierr = nf90_put_att(nid,nvarid,'title','Time') 154 ierr = nf90_put_att(nid,nvarid,'long_name','Time axis') 155 155 WRITE(date0b,'(i4.4,"-",a3,"-",i2.2)') an0,cmois(mois0),jour0 156 ierr = NF_PUT_ATT_TEXT(nid,nvarid,'time_origin',20, &156 ierr = nf90_put_att(nid,nvarid,'time_origin', & 157 157 date0b//' 00:00:00') 158 ierr= NF_ENDDEF(nid)158 ierr=nf90_enddef(nid) 159 159 160 160 -
LMDZ6/branches/Amaury_dev/libf/phylmd/limit_read_mod.F90
r5075 r5088 165 165 USE mod_phys_lmdz_para 166 166 USE surface_data, ONLY : type_ocean, ok_veget 167 USE lmdz_netcdf, ONLY:nf90_get_var,nf90_inq_varid,nf90_close,nf90_inquire_dimension,&167 USE netcdf, ONLY:nf90_get_var,nf90_inq_varid,nf90_close,nf90_inquire_dimension,& 168 168 nf90_inquire,nf90_get_att,nf90_inq_dimid,nf90_nowrite,nf90_noerr,nf90_open 169 169 USE indice_sol_mod … … 249 249 !--- ERROR IF FILE RECORDS NUMBER IS NOT EQUAL TO EXPECTED NUMBER OF DAYS 250 250 IF (grid_type==unstructured) THEN 251 ierr= NF90_INQ_DIMID(nid,"time_year",ndimid)251 ierr=nf90_inq_dimid(nid,"time_year",ndimid) 252 252 ELSE 253 253 ierr=NF90_INQUIRE(nid, UnlimitedDimID=ndimid) … … 260 260 !--- ERROR IF FILES AND LMDZ HORIZONTAL RESOLUTIONS DO NOT MATCH 261 261 IF (grid_type==unstructured) THEN 262 ierr= NF90_INQ_DIMID(nid, 'cell', ndimid)262 ierr=nf90_inq_dimid(nid, 'cell', ndimid) 263 263 ELSE 264 ierr= NF90_INQ_DIMID(nid, 'points_physiques', ndimid)264 ierr=nf90_inq_dimid(nid, 'points_physiques', ndimid) 265 265 ENDIF 266 266 ierr=NF90_INQUIRE_DIMENSION(nid, ndimid, len=nn) -
LMDZ6/branches/Amaury_dev/libf/phylmd/limit_slab.F90
r5075 r5088 6 6 USE mod_grid_phy_lmdz, ONLY: klon_glo 7 7 USE mod_phys_lmdz_para 8 USE lmdz_netcdf, ONLY: nf90_close,nf90_get_var,nf90_inq_varid,nf90_nowrite,nf90_noerr,nf90_open8 USE netcdf, ONLY: nf90_close,nf90_get_var,nf90_inq_varid,nf90_nowrite,nf90_noerr,nf90_open 9 9 USE indice_sol_mod 10 10 USE ocean_slab_mod, ONLY: nslay -
LMDZ6/branches/Amaury_dev/libf/phylmd/mo_simple_plumes.F90
r5075 r5088 24 24 MODULE MO_SIMPLE_PLUMES 25 25 26 USE lmdz_netcdf, ONLY:nf90_get_var,nf90_close,nf90_inq_varid,nf90_inq_dimid,&26 USE netcdf, ONLY:nf90_get_var,nf90_close,nf90_inq_varid,nf90_inq_dimid,& 27 27 nf90_inquire_dimension,nf90_noerr,nf90_nowrite,nf90_open 28 28 -
LMDZ6/branches/Amaury_dev/libf/phylmd/moy_undefSTD.F90
r5075 r5088 3 3 4 4 SUBROUTINE moy_undefstd(itap, itapm1) 5 USE lmdz_netcdf, ONLY: nf90_fill_real5 USE netcdf, ONLY: nf90_fill_real 6 6 USE dimphy 7 7 #ifdef CPP_IOIPSL -
LMDZ6/branches/Amaury_dev/libf/phylmd/open_climoz_m.F90
r5087 r5088 13 13 !------------------------------------------------------------------------------- 14 14 USE netcdf95, ONLY: nf95_open, nf95_close, nf95_gw_var, nf95_inq_varid 15 USE lmdz_netcdf, ONLY: nf90_nowrite15 USE netcdf, ONLY: nf90_nowrite 16 16 USE mod_phys_lmdz_mpi_data, ONLY: is_mpi_root 17 17 USE mod_phys_lmdz_mpi_transfert, ONLY: bcast_mpi -
LMDZ6/branches/Amaury_dev/libf/phylmd/pbl_surface_mod.F90
r5087 r5088 415 415 use lmdz_blowing_snow_ini, only : zeta_bs 416 416 USE wxios, ONLY: missing_val_xios => missing_val, using_xios 417 USE lmdz_netcdf, only: missing_val_netcdf => nf90_fill_real417 USE netcdf, only: missing_val_netcdf => nf90_fill_real 418 418 419 419 -
LMDZ6/branches/Amaury_dev/libf/phylmd/phyaqua_mod.F90
r5073 r5088 570 570 USE mod_phys_lmdz_transfert_para, ONLY: gather 571 571 USE phys_cal_mod, ONLY: year_len 572 use lmdz_netcdf, ONLY: nf90_def_var, nf90_put_var, nf90_get_var, nf_strerror, nf_close, & 573 nf_enddef, nf_put_att_text, nf_unlimited, nf_noerr, nf_global, nf_clobber, & 574 nf_64bit_offset, nf90_format, nf_def_dim, nf_create 572 USE netcdf, ONLY: nf90_def_var, nf90_put_var, nf90_get_var, nf90_strerror, nf90_close, & 573 nf90_enddef, nf90_put_att, nf90_unlimited, nf90_noerr, nf90_global, nf90_clobber, & 574 nf90_64bit_offset, nf90_def_dim, nf90_create 575 USE lmdz_netcdf_format, ONLY: nf90_format 575 576 IMPLICIT NONE 576 577 … … 604 605 PRINT *, 'writelim: Ecriture du fichier limit' 605 606 606 ierr = nf _create('limit.nc', IOR(NF_CLOBBER,NF_64BIT_OFFSET), nid)607 608 ierr = nf _put_att_text(nid, nf_global, 'title', 30, &607 ierr = nf90_create('limit.nc', IOR(nf90_clobber,nf90_64bit_offset), nid) 608 609 ierr = nf90_put_att(nid, nf90_global, 'title', & 609 610 'Fichier conditions aux limites') 610 ! ! ierr = NF_DEF_DIM(nid, "points_physiques", klon, ndim)611 ierr = nf _def_dim(nid, 'points_physiques', klon_glo, ndim)612 ierr = nf _def_dim(nid, 'time', nf_unlimited, ntim)611 ! ! ierr = nf90_def_dim (nid, "points_physiques", klon, ndim) 612 ierr = nf90_def_dim(nid, 'points_physiques', klon_glo, ndim) 613 ierr = nf90_def_dim(nid, 'time', nf90_unlimited, ntim) 613 614 614 615 dims(1) = ndim 615 616 dims(2) = ntim 616 617 617 ierr = nf90_def_var(nid, 'TEMPS', NF90_FORMAT, [ntim], id_tim)618 ierr = nf _put_att_text(nid, id_tim, 'title', 17, 'Jour dans l annee')619 620 ierr = nf90_def_var(nid, 'NAT', NF90_FORMAT, dims, id_nat)621 ierr = nf _put_att_text(nid, id_nat, 'title', 23, &618 ierr = nf90_def_var(nid, 'TEMPS', nf90_format, [ntim], id_tim) 619 ierr = nf90_put_att(nid, id_tim, 'title', 'Jour dans l annee') 620 621 ierr = nf90_def_var(nid, 'NAT', nf90_format, dims, id_nat) 622 ierr = nf90_put_att(nid, id_nat, 'title', & 622 623 'Nature du sol (0,1,2,3)') 623 624 624 ierr = nf90_def_var(nid, 'SST', NF90_FORMAT, dims, id_sst)625 ierr = nf _put_att_text(nid, id_sst, 'title', 35, &625 ierr = nf90_def_var(nid, 'SST', nf90_format, dims, id_sst) 626 ierr = nf90_put_att(nid, id_sst, 'title', & 626 627 'Temperature superficielle de la mer') 627 628 628 ierr = nf90_def_var(nid, 'BILS', NF90_FORMAT, dims, id_bils)629 ierr = nf _put_att_text(nid, id_bils, 'title', 32, &629 ierr = nf90_def_var(nid, 'BILS', nf90_format, dims, id_bils) 630 ierr = nf90_put_att(nid, id_bils, 'title', & 630 631 'Reference flux de chaleur au sol') 631 632 632 ierr = nf90_def_var(nid, 'ALB', NF90_FORMAT, dims, id_alb)633 ierr = nf _put_att_text(nid, id_alb, 'title', 19, 'Albedo a la surface')634 635 ierr = nf90_def_var(nid, 'RUG', NF90_FORMAT, dims, id_rug)636 ierr = nf _put_att_text(nid, id_rug, 'title', 8, 'Rugosite')637 638 ierr = nf90_def_var(nid, 'FTER', NF90_FORMAT, dims, id_fter)639 ierr = nf _put_att_text(nid, id_fter, 'title',10,'Frac. Land')640 ierr = nf90_def_var(nid, 'FOCE', NF90_FORMAT, dims, id_foce)641 ierr = nf _put_att_text(nid, id_foce, 'title',11,'Frac. Ocean')642 ierr = nf90_def_var(nid, 'FSIC', NF90_FORMAT, dims, id_fsic)643 ierr = nf _put_att_text(nid, id_fsic, 'title',13,'Frac. Sea Ice')644 ierr = nf90_def_var(nid, 'FLIC', NF90_FORMAT, dims, id_flic)645 ierr = nf _put_att_text(nid, id_flic, 'title',14,'Frac. Land Ice')646 647 ierr = nf _enddef(nid)648 IF (ierr/=nf _noerr) THEN633 ierr = nf90_def_var(nid, 'ALB', nf90_format, dims, id_alb) 634 ierr = nf90_put_att(nid, id_alb, 'title', 'Albedo a la surface') 635 636 ierr = nf90_def_var(nid, 'RUG', nf90_format, dims, id_rug) 637 ierr = nf90_put_att(nid, id_rug, 'title', 'Rugosite') 638 639 ierr = nf90_def_var(nid, 'FTER', nf90_format, dims, id_fter) 640 ierr = nf90_put_att(nid, id_fter, 'title','Frac. Land') 641 ierr = nf90_def_var(nid, 'FOCE', nf90_format, dims, id_foce) 642 ierr = nf90_put_att(nid, id_foce, 'title','Frac. Ocean') 643 ierr = nf90_def_var(nid, 'FSIC', nf90_format, dims, id_fsic) 644 ierr = nf90_put_att(nid, id_fsic, 'title','Frac. Sea Ice') 645 ierr = nf90_def_var(nid, 'FLIC', nf90_format, dims, id_flic) 646 ierr = nf90_put_att(nid, id_flic, 'title','Frac. Land Ice') 647 648 ierr = nf90_enddef(nid) 649 IF (ierr/=nf90_noerr) THEN 649 650 WRITE (*, *) 'writelim error: failed to end define mode' 650 WRITE (*, *) nf _strerror(ierr)651 WRITE (*, *) nf90_strerror(ierr) 651 652 END IF 652 653 … … 655 656 DO k = 1, year_len 656 657 ierr = nf90_put_var(nid, id_tim, k, [k]) 657 IF (ierr/=nf _noerr) THEN658 IF (ierr/=nf90_noerr) THEN 658 659 WRITE (*, *) 'writelim error with temps(k),k=', k 659 WRITE (*, *) nf _strerror(ierr)660 WRITE (*, *) nf90_strerror(ierr) 660 661 END IF 661 662 END DO … … 668 669 IF (is_master) THEN 669 670 ierr = nf90_put_var(nid, id_nat, phy_glo) 670 IF (ierr/=nf _noerr) THEN671 IF (ierr/=nf90_noerr) THEN 671 672 WRITE (*, *) 'writelim error with phy_nat' 672 WRITE (*, *) nf _strerror(ierr)673 WRITE (*, *) nf90_strerror(ierr) 673 674 END IF 674 675 END IF … … 677 678 IF (is_master) THEN 678 679 ierr = nf90_put_var(nid, id_sst, phy_glo) 679 IF (ierr/=nf _noerr) THEN680 IF (ierr/=nf90_noerr) THEN 680 681 WRITE (*, *) 'writelim error with phy_sst' 681 WRITE (*, *) nf _strerror(ierr)682 WRITE (*, *) nf90_strerror(ierr) 682 683 END IF 683 684 END IF … … 686 687 IF (is_master) THEN 687 688 ierr = nf90_put_var(nid, id_bils, phy_glo) 688 IF (ierr/=nf _noerr) THEN689 IF (ierr/=nf90_noerr) THEN 689 690 WRITE (*, *) 'writelim error with phy_bil' 690 WRITE (*, *) nf _strerror(ierr)691 WRITE (*, *) nf90_strerror(ierr) 691 692 END IF 692 693 END IF … … 695 696 IF (is_master) THEN 696 697 ierr = nf90_put_var(nid, id_alb, phy_glo) 697 IF (ierr/=nf _noerr) THEN698 IF (ierr/=nf90_noerr) THEN 698 699 WRITE (*, *) 'writelim error with phy_alb' 699 WRITE (*, *) nf _strerror(ierr)700 WRITE (*, *) nf90_strerror(ierr) 700 701 END IF 701 702 END IF … … 704 705 IF (is_master) THEN 705 706 ierr = nf90_put_var(nid, id_rug, phy_glo) 706 IF (ierr/=nf _noerr) THEN707 IF (ierr/=nf90_noerr) THEN 707 708 WRITE (*, *) 'writelim error with phy_rug' 708 WRITE (*, *) nf _strerror(ierr)709 WRITE (*, *) nf90_strerror(ierr) 709 710 END IF 710 711 END IF … … 713 714 IF (is_master) THEN 714 715 ierr = nf90_put_var(nid, id_fter, phy_glo) 715 IF (ierr/=nf _noerr) THEN716 IF (ierr/=nf90_noerr) THEN 716 717 WRITE (*, *) 'writelim error with phy_fter' 717 WRITE (*, *) nf _strerror(ierr)718 WRITE (*, *) nf90_strerror(ierr) 718 719 END IF 719 720 END IF … … 722 723 IF (is_master) THEN 723 724 ierr = nf90_put_var(nid, id_foce, phy_glo) 724 IF (ierr/=nf _noerr) THEN725 IF (ierr/=nf90_noerr) THEN 725 726 WRITE (*, *) 'writelim error with phy_foce' 726 WRITE (*, *) nf _strerror(ierr)727 WRITE (*, *) nf90_strerror(ierr) 727 728 END IF 728 729 END IF … … 731 732 IF (is_master) THEN 732 733 ierr = nf90_put_var(nid, id_fsic, phy_glo) 733 IF (ierr/=nf _noerr) THEN734 IF (ierr/=nf90_noerr) THEN 734 735 WRITE (*, *) 'writelim error with phy_fsic' 735 WRITE (*, *) nf _strerror(ierr)736 WRITE (*, *) nf90_strerror(ierr) 736 737 END IF 737 738 END IF … … 740 741 IF (is_master) THEN 741 742 ierr = nf90_put_var(nid, id_flic, phy_glo) 742 IF (ierr/=nf _noerr) THEN743 IF (ierr/=nf90_noerr) THEN 743 744 WRITE (*, *) 'writelim error with phy_flic' 744 WRITE (*, *) nf _strerror(ierr)745 WRITE (*, *) nf90_strerror(ierr) 745 746 END IF 746 747 END IF … … 748 749 ! close file: 749 750 IF (is_master) THEN 750 ierr = nf _close(nid)751 ierr = nf90_close(nid) 751 752 END IF 752 753 -
LMDZ6/branches/Amaury_dev/libf/phylmd/phyetat0_mod.F90
r5086 r5088 40 40 USE time_phylmdz_mod, ONLY: init_iteration, pdtphys, itau_phy 41 41 USE wxios, ONLY: missing_val_xios => missing_val, using_xios 42 use lmdz_netcdf, only: missing_val_netcdf => nf90_fill_real42 use netcdf, only: missing_val_netcdf => nf90_fill_real 43 43 use config_ocean_skin_m, only: activate_ocean_skin 44 44 -
LMDZ6/branches/Amaury_dev/libf/phylmd/phys_output_write_mod.F90
r5075 r5088 456 456 USE ioipsl, ONLY: histend, histsync 457 457 USE iophy, ONLY: set_itau_iophy, histwrite_phy 458 USE lmdz_netcdf, ONLY: nf90_fill_real458 USE netcdf, ONLY: nf90_fill_real 459 459 USE print_control_mod, ONLY: prt_level,lunout 460 460 ! ug Pour les sorties XIOS -
LMDZ6/branches/Amaury_dev/libf/phylmd/phys_state_var_mod.F90
r5075 r5088 10 10 ! Declaration des variables 11 11 USE dimphy 12 USE lmdz_netcdf, only: nf90_fill_real12 USE netcdf, only: nf90_fill_real 13 13 INTEGER, PARAMETER :: nlevSTD=17 14 14 INTEGER, PARAMETER :: nlevSTD8=8 -
LMDZ6/branches/Amaury_dev/libf/phylmd/physiq_mod.F90
r5087 r5088 48 48 USE mod_phys_lmdz_para 49 49 USE netcdf95, only: nf95_close 50 USE lmdz_netcdf, only: nf90_fill_real ! IM for NMC files50 USE netcdf, only: nf90_fill_real ! IM for NMC files 51 51 USE open_climoz_m, only: open_climoz ! ozone climatology from a file 52 52 USE ozonecm_m, only: ozonecm ! ozone of J.-F. Royer -
LMDZ6/branches/Amaury_dev/libf/phylmd/plevel.F90
r5075 r5088 7 7 ! ================================================================ 8 8 ! ================================================================ 9 USE lmdz_netcdf, ONLY: nf90_fill_real9 USE netcdf, ONLY: nf90_fill_real 10 10 USE dimphy 11 11 #ifdef CPP_IOIPSL -
LMDZ6/branches/Amaury_dev/libf/phylmd/press_coefoz_m.F90
r5075 r5088 24 24 25 25 use netcdf95, only: nf95_open, nf95_close, nf95_gw_var, nf95_inq_varid 26 use lmdz_netcdf, only: nf90_nowrite26 use netcdf, only: nf90_nowrite 27 27 28 28 use mod_phys_lmdz_mpi_data, only: is_mpi_root -
LMDZ6/branches/Amaury_dev/libf/phylmd/read_map2D.F90
r5075 r5088 3 3 ! Return variable for the given timestep. 4 4 USE dimphy 5 USE lmdz_netcdf, ONLY: nf90_open,nf90_close,nf90_nowrite,nf90_noerr,nf90_get_var,nf90_inq_varid5 USE netcdf, ONLY: nf90_open,nf90_close,nf90_nowrite,nf90_noerr,nf90_get_var,nf90_inq_varid 6 6 USE mod_grid_phy_lmdz 7 7 USE mod_phys_lmdz_para -
LMDZ6/branches/Amaury_dev/libf/phylmd/read_pstoke.F90
r5075 r5088 17 17 ! ****************************************************************************** 18 18 19 USE lmdz_netcdf, ONLY: nf90_open,nf90_inq_varid,nf90_nowrite,nf90_get_var,nf_inq_dim,&20 nf _inq_dimid19 USE netcdf, ONLY: nf90_open,nf90_inq_varid,nf90_nowrite,nf90_get_var,nf90_inquire_dimension,& 20 nf90_inq_dimid 21 21 USE dimphy 22 22 USE indice_sol_mod … … 225 225 ! ID pour les dimensions 226 226 227 status = nf _inq_dimid(ncidp, 'y', yid)228 status = nf _inq_dimid(ncidp, 'x', xid)229 status = nf _inq_dimid(ncidp, 'sig_s', zid)230 status = nf _inq_dimid(ncidp, 'time_counter', tid)227 status = nf90_inq_dimid(ncidp, 'y', yid) 228 status = nf90_inq_dimid(ncidp, 'x', xid) 229 status = nf90_inq_dimid(ncidp, 'sig_s', zid) 230 status = nf90_inq_dimid(ncidp, 'time_counter', tid) 231 231 232 232 ! lecture des dimensions 233 233 234 status = nf _inq_dim(ncidp, yid, namedim, ncjm)235 status = nf _inq_dim(ncidp, xid, namedim, ncim)236 status = nf _inq_dim(ncidp, zid, namedim, ncklevo)237 status = nf _inq_dim(ncidp, tid, namedim, ncrec)234 status = nf90_inquire_dimension(ncidp, yid, namedim, ncjm) 235 status = nf90_inquire_dimension(ncidp, xid, namedim, ncim) 236 status = nf90_inquire_dimension(ncidp, zid, namedim, ncklevo) 237 status = nf90_inquire_dimension(ncidp, tid, namedim, ncrec) 238 238 239 239 zrec = ncrec -
LMDZ6/branches/Amaury_dev/libf/phylmd/read_pstoke0.F90
r5075 r5088 16 16 ! ****************************************************************************** 17 17 18 USE lmdz_netcdf, ONLY: nf_inq_dimid,nf_inq_dim,nf90_get_var,nf90_inq_varid,nf90_open,&18 USE netcdf, ONLY: nf90_inq_dimid,nf90_inquire_dimension,nf90_get_var,nf90_inq_varid,nf90_open,& 19 19 nf90_nowrite 20 20 USE dimphy … … 225 225 ! ID pour les dimensions 226 226 227 status = nf _inq_dimid(ncidp, 'y', yid)228 status = nf _inq_dimid(ncidp, 'x', xid)229 status = nf _inq_dimid(ncidp, 'sig_s', zid)230 status = nf _inq_dimid(ncidp, 'time_counter', tid)227 status = nf90_inq_dimid(ncidp, 'y', yid) 228 status = nf90_inq_dimid(ncidp, 'x', xid) 229 status = nf90_inq_dimid(ncidp, 'sig_s', zid) 230 status = nf90_inq_dimid(ncidp, 'time_counter', tid) 231 231 232 232 ! lecture des dimensions 233 233 234 status = nf _inq_dim(ncidp, yid, namedim, ncjm)235 status = nf _inq_dim(ncidp, xid, namedim, ncim)236 status = nf _inq_dim(ncidp, zid, namedim, nckev)237 status = nf _inq_dim(ncidp, tid, namedim, ncrec)234 status = nf90_inquire_dimension(ncidp, yid, namedim, ncjm) 235 status = nf90_inquire_dimension(ncidp, xid, namedim, ncim) 236 status = nf90_inquire_dimension(ncidp, zid, namedim, nckev) 237 status = nf90_inquire_dimension(ncidp, tid, namedim, ncrec) 238 238 239 239 zrec = ncrec -
LMDZ6/branches/Amaury_dev/libf/phylmd/readaerosol_mod.F90
r5075 r5088 3 3 MODULE readaerosol_mod 4 4 5 USE lmdz_netcdf, ONLY: nf90_strerror,nf90_noerr,nf90_get_var,nf90_inq_varid,&5 USE netcdf, ONLY: nf90_strerror,nf90_noerr,nf90_get_var,nf90_inq_varid,& 6 6 nf90_inquire_dimension,nf90_inq_dimid,nf90_open,nf90_nowrite,nf90_close 7 7 … … 205 205 206 206 ! Read and test longitudes 207 CALL check_err( nf90_inq_dimid(ncid, "lon", dimID),"pb inq dim lon") 207 CALL check_err( nf90_inq_dimid(ncid, "lon", dimID),"pb inq dim lon") 208 208 CALL check_err( nf90_inquire_dimension(ncid, dimID, len = nbp_lon_src),"pb inq dim lon") 209 209 CALL check_err( nf90_inq_varid(ncid, 'lon', varid),"pb inq lon" ) … … 212 212 213 213 ! Read and test latitudes 214 CALL check_err( nf90_inq_dimid(ncid, "lat", dimID),"pb inq dim lat") 214 CALL check_err( nf90_inq_dimid(ncid, "lat", dimID),"pb inq dim lat") 215 215 CALL check_err( nf90_inquire_dimension(ncid, dimID, len = nbp_lat_src),"pb inq dim lat") 216 216 CALL check_err( nf90_inq_varid(ncid, 'lat', varid),"pb inq lat" ) … … 398 398 ! Old type of file should contain the dimension 'PRESNIVS' 399 399 !**************************************************************************************** 400 ierr = nf90_inq_dimid(ncid, 'lev', dimid) 400 ierr = nf90_inq_dimid(ncid, 'lev', dimid) 401 401 IF (ierr /= NF90_NOERR) THEN 402 402 ! Coordinate axe lev not found. Check for presnivs. 403 ierr = nf90_inq_dimid(ncid, 'presnivs', dimid) 403 ierr = nf90_inq_dimid(ncid, 'presnivs', dimid) 404 404 IF (ierr /= NF90_NOERR) THEN 405 405 ierr = nf90_inq_dimid(ncid, 'PRESNIVS', dimid) -
LMDZ6/branches/Amaury_dev/libf/phylmd/readaerosolstrato.F90
r5075 r5088 3 3 use netcdf95, only: nf95_close, nf95_gw_var, nf95_inq_dimid, & 4 4 nf95_inq_varid, nf95_open 5 use lmdz_netcdf, only: nf90_get_var, nf90_noerr, nf90_nowrite5 use netcdf, only: nf90_get_var, nf90_noerr, nf90_nowrite 6 6 7 7 USE phys_cal_mod, ONLY : mth_cur -
LMDZ6/branches/Amaury_dev/libf/phylmd/readaerosolstrato_m.F90
r5075 r5088 24 24 25 25 SUBROUTINE init_readaerosolstrato1 26 USE lmdz_netcdf, ONLY: nf90_nowrite26 USE netcdf, ONLY: nf90_nowrite 27 27 USE netcdf95, ONLY: nf95_close, nf95_gw_var, nf95_inq_dimid, & 28 28 nf95_inq_varid, nf95_open … … 67 67 68 68 SUBROUTINE init_readaerosolstrato2 69 USE lmdz_netcdf, ONLY: nf90_nowrite69 USE netcdf, ONLY: nf90_nowrite 70 70 USE netcdf95, ONLY: nf95_close, nf95_gw_var, nf95_inq_dimid, & 71 71 nf95_inq_varid, nf95_open -
LMDZ6/branches/Amaury_dev/libf/phylmd/readchlorophyll.F90
r5075 r5088 8 8 9 9 USE netcdf95, ONLY: nf95_close, nf95_gw_var, nf95_inq_dimid, nf95_inq_varid, nf95_open 10 USE lmdz_netcdf, ONLY: nf90_get_var, nf90_noerr, nf90_nowrite10 USE netcdf, ONLY: nf90_get_var, nf90_noerr, nf90_nowrite 11 11 USE phys_cal_mod, ONLY: mth_cur 12 12 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, klon_glo, grid2dto1d_glo -
LMDZ6/branches/Amaury_dev/libf/phylmd/regr_horiz_time_climoz_m.F90
r5087 r5088 4 4 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, grid_type, unstructured 5 5 USE nrtype, ONLY: pi 6 USE lmdz_netcdf, ONLY: NF90_CLOBBER, NF90_FLOAT, NF90_OPEN, &6 USE netcdf, ONLY: NF90_CLOBBER, NF90_FLOAT, NF90_OPEN, & 7 7 NF90_NOWRITE, NF90_NOERR, NF90_GET_ATT, NF90_GLOBAL 8 8 USE netcdf95, ONLY: NF95_DEF_DIM, NF95_INQ_DIMID, NF95_INQUIRE_DIMENSION, & … … 702 702 ! 703 703 !------------------------------------------------------------------------------- 704 USE lmdz_netcdf, ONLY: NF90_NOERR, NF90_strerror704 USE netcdf, ONLY: NF90_NOERR, NF90_strerror 705 705 !------------------------------------------------------------------------------- 706 706 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/phylmd/regr_lat_time_coefoz_m.F90
r5087 r5088 45 45 use netcdf95, only: nf95_open, nf95_close, nf95_inq_varid, nf95_get_var, & 46 46 nf95_put_var, nf95_gw_var 47 use lmdz_netcdf, only: nf90_nowrite47 use netcdf, only: nf90_nowrite 48 48 use nrtype, only: pi 49 49 use regular_lonlat_mod, only: boundslat_reg, south … … 245 245 use netcdf95, only: nf95_create, nf95_def_dim, nf95_def_var, & 246 246 nf95_put_att, nf95_enddef, nf95_copy_att, nf95_put_var 247 use lmdz_netcdf, only: nf90_clobber, nf90_float, nf90_copy_att, nf90_global247 use netcdf, only: nf90_clobber, nf90_float, nf90_copy_att, nf90_global 248 248 use nrtype, only: pi 249 249 use regular_lonlat_mod, only : lat_reg … … 328 328 subroutine handle_err_copy_att(att_name) 329 329 330 use lmdz_netcdf, only: nf90_noerr, nf90_strerror330 use netcdf, only: nf90_noerr, nf90_strerror 331 331 332 332 character(len=*), intent(in):: att_name -
LMDZ6/branches/Amaury_dev/libf/phylmd/regr_pr_comb_coefoz_m.F90
r5075 r5088 72 72 73 73 use netcdf95, only: nf95_open, nf95_close 74 use lmdz_netcdf, only: nf90_nowrite74 use netcdf, only: nf90_nowrite 75 75 use assert_m, only: assert 76 76 use dimphy, only: klon -
LMDZ6/branches/Amaury_dev/libf/phylmd/regr_pr_o3_m.F90
r5086 r5088 26 26 27 27 use netcdf95, only: nf95_open, nf95_close, nf95_inq_varid, nf95_get_var 28 use lmdz_netcdf, only: nf90_nowrite28 use netcdf, only: nf90_nowrite 29 29 use assert_m, only: assert 30 30 use regr_conserv_m, only: regr_conserv -
LMDZ6/branches/Amaury_dev/libf/phylmd/regr_pr_time_av_m.F90
r5075 r5088 115 115 USE netcdf95, ONLY: NF95_INQ_VARID, NF95_INQUIRE_VARIABLE, & 116 116 NF95_INQ_DIMID, NF95_INQUIRE_DIMENSION, nf95_get_var 117 USE lmdz_netcdf, ONLY: NF90_INQ_VARID, NF90_NOERR117 USE netcdf, ONLY: NF90_INQ_VARID, NF90_NOERR 118 118 USE assert_m, ONLY: assert 119 119 USE assert_eq_m, ONLY: assert_eq -
LMDZ6/branches/Amaury_dev/libf/phylmd/tracco2i_mod.F90
r5075 r5088 351 351 352 352 USE netcdf95, ONLY: nf95_close, nf95_gw_var, nf95_inq_varid, nf95_open 353 USE lmdz_netcdf, ONLY: nf90_get_var, nf90_noerr, nf90_nowrite353 USE netcdf, ONLY: nf90_get_var, nf90_noerr, nf90_nowrite 354 354 355 355 USE carbon_cycle_mod, ONLY : fco2_ff, fco2_bb, fco2_land, fco2_ocean -
LMDZ6/branches/Amaury_dev/libf/phylmd/undefSTD.F90
r5075 r5088 3 3 4 4 SUBROUTINE undefstd(itap, read_climoz) 5 USE lmdz_netcdf, ONLY: nf90_fill_real5 USE netcdf, ONLY: nf90_fill_real 6 6 USE dimphy 7 7 #ifdef CPP_IOIPSL
Note: See TracChangeset
for help on using the changeset viewer.