From 2ae84dc18e3dfa9185df9419e5adcf8aa4fb473c Mon Sep 17 00:00:00 2001 From: vsicardi Date: Tue, 2 Jul 2019 10:47:34 +0200 Subject: [PATCH 01/16] interpolation nudging files tool was added --- interpolation_nudging/compute_density.py | 36 ++ interpolation_nudging/compute_density.pyc | Bin 0 -> 1219 bytes interpolation_nudging/interp_fc01_s4.sh | 83 ++++ interpolation_nudging/interp_fc02_s4.sh | 83 ++++ interpolation_nudging/interp_fc03_s4.sh | 83 ++++ interpolation_nudging/interp_fc04_s4.sh | 83 ++++ interpolation_nudging/interp_s4.sh | 83 ++++ .../library_interp_extrap.py | 400 ++++++++++++++++++ .../library_interp_extrap.pyc | Bin 0 -> 12477 bytes interpolation_nudging/prep_restart_interp.py | 188 ++++++++ 10 files changed, 1039 insertions(+) create mode 100644 interpolation_nudging/compute_density.py create mode 100644 interpolation_nudging/compute_density.pyc create mode 100755 interpolation_nudging/interp_fc01_s4.sh create mode 100755 interpolation_nudging/interp_fc02_s4.sh create mode 100755 interpolation_nudging/interp_fc03_s4.sh create mode 100755 interpolation_nudging/interp_fc04_s4.sh create mode 100755 interpolation_nudging/interp_s4.sh create mode 100644 interpolation_nudging/library_interp_extrap.py create mode 100644 interpolation_nudging/library_interp_extrap.pyc create mode 100644 interpolation_nudging/prep_restart_interp.py diff --git a/interpolation_nudging/compute_density.py b/interpolation_nudging/compute_density.py new file mode 100644 index 0000000..438bbd0 --- /dev/null +++ b/interpolation_nudging/compute_density.py @@ -0,0 +1,36 @@ +import numpy as np +from numpy import ma as ma +def compute_density(ptemp, psal): + """Compute the density using the Jackett and McDougall (1994) equation of state + (adapted from fortran routine eosbn2 from NEMO 3.3) + by C. Prodhomme -- 2016 + Arguments: + ptemp: numpy array of potential temperature + psal: numpy array of potential salinity + Output: + zrhop: numpy array of density + """ + + #??? + rau0 = 1035 + + zrau0r = 1.e0 / rau0 + #square root salinity + psalr = np.sqrt( np.absolute(psal)) + + + # compute volumic mass pure water at atm pressure + zr1= ( ( ( ( 6.536332e-9*ptemp-1.120083e-6 )*ptemp+1.001685e-4 )*ptemp + -9.095290e-3 )*ptemp+6.793952e-2 )*ptemp+999.842594 + # seawater volumic mass atm pressure + zr2= ( ( ( 5.3875e-9*ptemp-8.2467e-7 )*ptemp+7.6438e-5 ) *ptemp + -4.0899e-3 ) *ptemp+0.824493 + zr3= ( -1.6546e-6*ptemp+1.0227e-4 )*ptemp-5.72466e-3 + zr4= 4.8314e-4 + + # potential volumic mass (reference to the surface) + zrhop= ( zr4*psal + zr3*psalr + zr2 ) *psal + zr1 + + return(zrhop) + + diff --git a/interpolation_nudging/compute_density.pyc b/interpolation_nudging/compute_density.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2d0b997adf94c7c22b2f4acace94341148b1e2eb GIT binary patch literal 1219 zcmcIjO^6gn6n@<^JG(os`^UPoh)O|1GE3MU_XpRNW!kt3Ca^!Ol7kqQ+V0+(*6yyh zs#=+42Jt7SAO*eGAqP>sDdts8L%@JHi>mii@2mG- zy?T{OH)YnYOy7*C0(jjmR8MB@g`s9Uczw|9fCf$r1{&?q$iqOX zQ9z8=F>Vu`cj7hs^&P5s!&x3Bsq%@c`NZ>M8K^o*We_v7^Eq{o`$`cSdt}bt&r?Rj zkd()!rzeMre=%Z$#PQ5w zi;p+{y5B!jWxqc7;^23W?o`?OH_yKx+qczWb1#1?U$}bKVIO^U1{&UNhl%-ruB}%u z?qyTk{^VCan5wev=LgUJar0)CeLXYvkXVJ}wPR+lbkwI5CD zss|mvwXO4$gGivOU>EJ7e90==C9B68v=1,mask=maskin<0.5) + #read the thickness + thickin=np.array(fmin.variables["e3t_0"][:].squeeze()) + #read the depth + depthin=np.array(fmin.variables["gdept_0"][:].squeeze()) + #read the longitude + lonin=np.array(fmin.variables[varlon][:].squeeze()) + #read the latitude + latin=np.array(fmin.variables[varlat][:].squeeze()) + + + fieldin=np.array(fin.variables[varin][:].squeeze()) + #diemnsion name + dimnames=list(fin.variables[varin].dimensions) + + + + #if the last level of the input field is fully masked () + #or almost fully masked (less than 20points) + #remove it + #check if the variable is 2D or 3D: + if len(fieldin.shape)==3: + lastlev=maskin.shape[0]-1 + if (np.sum(maskin[lastlev,:,:])<=20) or (ma.sum(maskin[lastlev,:,:]).mask): + maskin=maskin[0:lastlev,:,:] + fieldin=np.array(fieldin[0:lastlev,:,:]) + thickin=thickin[0:lastlev] + depthin=depthin[0:lastlev] + + + #read the mask field + maskout=np.array(fmout.variables[varmask][:].squeeze()) + #thickness + thickout=np.array(fmout.variables["e3t_0"][:].squeeze()) + #depth + depthout=np.array(fmout.variables["gdept_0"][:].squeeze()) + #read the longitude + lonout=np.array(fmout.variables[varlon][:].squeeze()) + #read the latitude + latout=np.array(fmout.variables[varlat][:].squeeze()) + #generate a masked array to mask the land + maskout=ma.array(maskout,mask=maskout<0.5) + + #permute the dimensions if needed + # not take into account t dimension (size 1) + if len(fieldin.shape)==3: + correctdimorder=(u'z', u'y', u'x') + else: + correctdimorder=(u'y', u'x') + + dimnames.remove(u't') + #the correctdimension order + for idim,dimname in enumerate(dimnames): + if dimname!=correctdimorder[idim]: + print("Dimension"+dimname+"permuted") + fieldin=moveaxis(fieldin, idim, + correctdimorder.index(dimname)) + + # extend the input depth in 3D + #(needed because from Nemo 3.6 both vary with time ans space) + lz0, ly0, lx0 = maskin.shape + lzout, lyout, lxout = maskout.shape + if len(depthin.shape)==1: + depthin.shape=(lz0,1,1) + depthin=np.repeat(np.repeat(depthin,ly0, axis=1), lx0, axis=2) + if len(depthout.shape)==1: + depthout.shape=(lzout,1,1) + depthout=np.repeat(np.repeat(depthout, ly0, axis=1), lx0, axis=2) + # extend the input thickness in 3D + if len(thickin.shape)==1: + thickin.shape=(lz0,1,1) + thickin=np.repeat(np.repeat(thickin,ly0, axis=1), lx0, axis=2) + if len(thickout.shape)==1: + thickout.shape=(lzout,1,1) + thickout=np.repeat(np.repeat(thickout,ly0, axis=1), lx0, axis=2) + + + #construct mask and thickness for 2D variables + if len(fieldin.shape)==2: + ly0,lx0=fieldin.shape + maskin=maskin[0,:,:] + thickin=np.zeros((ly0,lx0),'d') + depthin=np.zeros((ly0,lx0),'d') + thickout=np.zeros((ly0,lx0),'d') + depthout=np.zeros((ly0,lx0),'d') + maskout=maskout[0,:,:] + + #check that the mask corresponds to the input file + #(in s4 restarts continents are filled with 0) + + if (fieldin[np.where(maskin.mask)]!=0).any(): + print("the variable: "+varmask) + print("the input mask:") + print(fmin.filepath()) + print("does not corespond to the input file:") + print(fin.filepath()) + print("for the variable:"+varin) + sys.exit(1) + + #apply the mask + fieldin=ma.array(fieldin,mask=1-maskin) + + #check that the field is not empty + if (np.sum(fieldin)==0): + print("The field written from the file: "+f) + print("for the variable"+varin) + print("mask with the file: "+fmask) + print("seems to be empty") + print("Please check your input") + sys.exit(1) + + return(fieldin, thickin, depthin, lonin, latin, + maskout, thickout, depthout, lonout, latout) + +def interp_vert(fieldin, thick_in, thick_out): + """This function interpolates vertically a (x,y,z) field using the + conservative method. + Arguments: + fieldin: Input Field type mask array + thick_int: input thickness thickness of the level + thick_out: output thickness of the level + History : Chloe Prodhomme - Initial version adpated + from Cfutools extrap_vert function + written by V. Guemas - 2016""" + + (lz0,ly0,lx0)=fieldin.shape + (lz1,ly1,lx1)=thick_out.shape + + var0_a=np.array(fieldin) + var0=np.array(fieldin) + var0=ma.masked_array(var0,mask=None,fill_value=None) + + var0=var0.astype('d') + + mask_in=1-fieldin.mask + + var1=np.zeros((lz1,ly0,lx0),'d') + thick_jk1=np.zeros((ly0,lx0),'d') + mask_out=np.zeros((lz1,ly0,lx0),'d') + thick_bis=np.zeros((ly0,lx0),'d') + + jk0=0 + for jk1 in np.arange(lz1) : + while ( (jk0 <= (lz0-1)) & ((np.add.reduce(thick_in[0:(jk0+1)]) <= np.add.reduce(thick_out[0:(jk1+1)])) ).any()) : + thick_bis=np.multiply(np.minimum(thick_in[jk0],np.add.reduce(thick_in[0:(jk0+1)])-np.add.reduce(thick_out[0:jk1])),mask_in[jk0,:,:]) + var1[jk1,:,:]=var1[jk1,:,:]+np.multiply(var0[jk0,:,:],thick_bis) + thick_jk1=thick_jk1+thick_bis + jk0=jk0+1 + if True: #( jk0 <= (lz0-1)) : + jk0in=min(jk0,lz0-1) + thick_bis=np.multiply(np.minimum(thick_out[jk1],np.add.reduce(thick_out[0:(jk1+1)])-np.add.reduce(thick_in[0:jk0])),mask_in[jk0in,:,:]) + var1[jk1,:,:]=var1[jk1,:,:]+np.multiply(var0[jk0in,:,:],thick_bis) + thick_jk1=thick_jk1+thick_bis + mask_out[jk1,:,:]=np.where(thick_jk1>0.01,False,True) + thick_jk1=np.where(thick_jk1==0.,1.,thick_jk1) + var1[jk1,:,:]=var1[jk1,:,:]/thick_jk1 + thick_jk1[:,:]=0 + #mask the output field + fieldout=ma.array(var1, mask=mask_out) + + return(fieldout) + + +def lon_lat_to_cartesian(lon, lat, R=1): + """calculates lon, lat coordinates of a point on a sphere with + radius R + """ + lon_r = np.radians(lon) + lat_r = np.radians(lat) + x = R * np.cos(lat_r) * np.cos(lon_r) + y = R * np.cos(lat_r) * np.sin(lon_r) + z = R * np.sin(lat_r) + return x, y, z + + +def extrap(fieldin,lonin,latin,maskout): + """This function extrapolates horizontally each level of a (x,y,z) + field using the nearest neighbour method. + Argument: + fieldin: Input field (ma.array type) + lonin: 2d longitude + latin: 2d longitude + maskout: mask of the field after extrapolation + Output: + fieldout: output field (ma.array) + """ + #add a dimension of size 1 for 2d field + if len(fieldin.shape)==2: + fieldin.shape=(1,)+fieldin.shape + + #construct points to fill + Pfill=ma.array((fieldin.mask)&(maskout!=0), mask=1-maskout) + + # fieldout intitialization + fieldout=np.array(fieldin) + + + #each level has a different mask, loop over the levels + lz0=fieldin.shape[0] + + for lev in np.arange(lz0): + newvar = ma.array(fieldin[lev,:,:], + mask=fieldin.mask[lev,:,:]) + Pfilllev = Pfill[lev,:,:] + + #not masked coordinates for the present level + nomlon = lonin[np.where(newvar.mask==False)] + nomlat = latin[np.where(newvar.mask==False)] + #cartesian coordinates of not masked points + levxs, levys, levzs = lon_lat_to_cartesian(nomlon, nomlat) + levkdt = ckdtree.cKDTree(np.array([levxs, levys, levzs]).T) + #points to extrapolate at the current level + newindexes = np.where(Pfilllev==1) + latidxs = newindexes[0] + lonidxs = newindexes[1] + #print(newindexes) + exlon = lonin[latidxs, lonidxs] + exlat = latin[latidxs, lonidxs] + #print(newvar[levkdt.data[0,0], levkdt.data[0,1]]) + + #cartesian coordinates of the points to extrapolate + xt, yt, zt = lon_lat_to_cartesian(exlon, exlat) + #calculates distances and indexes of the nearest neighbours + dist, idx = levkdt.query(np.array([xt, yt, zt]).T, k=1, p=2) + + #assign to the result matrix the found values + fieldout[lev,latidxs, lonidxs] = newvar[np.where(newvar.mask==False)].flatten()[idx] + + #mask field out + fieldout=fieldout*maskout + fieldout=ma.array(fieldout,mask=1-maskout) + return(fieldout) + + + +def vertinterp_extrap(filein, varin, fmask, fmaskout, month="", modvers=""): + """read and interpolate verticaly and extrapolate horizontal the given variable + from a restart file + Arguments: + filein: Input restart file + varin: name of the variable to extrapolate + fmask: mask file corresponding to varin + fmaskout: mask to define the grid toward which the extrapolation if done + month: starting month of the restart + (needed only if there are points to fill in the caspienne sea) + modelvers: name of the model version to find the climatology to fill the caspienne + (needed only if there are points to fill in the caspienne sea) + + """ + + #read files and define variables needed for the rest of the process + (fieldin, thickin, depthin, lonin, latin, + maskout, + thickout, depthout, + lonout, latout) = read_files(filein, + varin, fmask, fmaskout) + + #check if the variable is 2D or 3D: + if len(fieldin.shape)==3: + #perform the vertical extrapolation + fieldin=interp_vert(fieldin, thickin,thickout) + + #construct points to fill + Pfill=ma.array((fieldin.mask)&(maskout!=0), mask=1-maskout) + + #find if the caspienne sea need to be filled + caspbox=np.where((lonin>45)&(lonin<56)&(latin>35)&(latin<50)) + #longitude and latitude boundary of the caspienne sea + loncasp1,loncasp2=caspbox[0].min(),caspbox[0].max() + latcasp1,latcasp2=caspbox[1].min(),caspbox[1].max() + #check is there are points to fill in the caspienne sea + if len(fieldin.shape)==2: + casptest=np.sum(Pfill[loncasp1:loncasp2,latcasp1:latcasp2], + axis=(0,1))!=0 + else: + casptest=np.sum(Pfill[:,loncasp1:loncasp2,latcasp1:latcasp2], + axis=(0,1,2))!=0 + #If there are points to be filled + if casptest: + + #if ((varin=="so")|(varin=="so"))|((varin=="thetao")|(varin=="thetao")): + if ((varin=="so")|(varin=="thetao")): + + #Ugly solution, to be improve would need levitus file at all resolution + if modvers=="Ec3.1": + pathclim="/esnas/releases/ic/ocean/ORCA1L46/levitus_clim/" + if ((varin=="tn")|(varin=="tb")): + #name of the file + varclim="votemper" + fileclim=pathclim+"temperature_m%02d.nc"%month + + if ((varin=="sn")|(varin=="sb")): + #open climatological files + varclim="vosaline" + fileclim=pathclim+"salinity_m%02d.nc"%month + + elif modvers=="Ec2.3": + #in this case we use an old restart for the climatology + fileclim=glob("/esnas/releases/ic/ocean/ORCA1/s4/s4_fc0_1993%02d*_restart.nc.gz"%month) + print(fileclim) + shutil.copy(fileclim[0], "fileclim.nc.gz") + fileclim="fileclim.nc" + inF = gzip.open('fileclim.nc.gz', 'rb') + outF = open(fileclim, 'wb') + outF.write( inF.read() ) + inF.close() + outF.close() + varclim=varin + else: + print("no climatology is available for this model version to fill the caspienne sea:") + print(modvers) + sys.exit(1) + + #open the file + print(fileclim) + fclim=nc(fileclim, "r") + #read variable for the given month + clim=np.array(fclim.variables[varclim][:].squeeze()) + + #add the caspienne sea + fieldin[:,caspbox[0],caspbox[1]]=clim[:,caspbox[0],caspbox[1]] + else: + print(fieldin.shape) + print(caspbox[1].min()) + print(caspbox[1].max()) + print(caspbox[0].min()) + print(caspbox[0].max()) + if (len(fieldin.shape)==3): + fieldin[:,caspbox[0],caspbox[1]]=0 + elif (len(fieldin.shape)==2): + fieldin[caspbox[0],caspbox[1]]=0 + else: + print("vertinterp_extrap function can handle only 2 and 3d arrays") + sys.exit(1) + + #horizontal extrapolation + fieldout=extrap(fieldin,lonin,latin,maskout) + return(fieldout) + + + + diff --git a/interpolation_nudging/library_interp_extrap.pyc b/interpolation_nudging/library_interp_extrap.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c2eafa778adf970a07802964036295e5e3fe8c94 GIT binary patch literal 12477 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 Jc6R#Se*xh1?EU}% literal 0 HcmV?d00001 diff --git a/interpolation_nudging/prep_restart_interp.py b/interpolation_nudging/prep_restart_interp.py new file mode 100644 index 0000000..470839a --- /dev/null +++ b/interpolation_nudging/prep_restart_interp.py @@ -0,0 +1,188 @@ +from library_interp_extrap import * +from compute_density import compute_density +from glob import glob +import os +import shutil +import gzip +#This fonction generate a restart interpolated verticaly on the output grid +########### +#Arguments# +########### +#filein: input restart file +#fmask: input mask corresponding to the input file +#ex: fmask="/esnas/autosubmit/con_files/mesh_mask_nemo.nemovar_O1L42.nc" +#resout: output resolution ex: resout="1L75" +#versout: corresponding model version ex:versout="Ec3.2" + + +# Input arguments +filein=sys.argv[1] +fmask=sys.argv[2] +resout=sys.argv[3] +versout=sys.argv[4] + +#go in the working directory +#workdir="/scratch/Earth/"+os.environ["USER"]+"/restart_"+resout+"_"+versout +#if (not os.path.isdir(workdir)): +# os.makedirs(workdir) +#os.chdir(workdir) + +# mask file describing the output grid +fmaskout="/esarchive/autosubmit/con_files/mesh_mask_nemo."+versout+"_O"+resout+".nc" + +#dirout="/esnas/releases/ic/ocean/ORCA"+resout+"/s4" +dirout="/esarchive/scratch/Earth/vsicardi/ORAS_interp" +#print("before entering in the loop") +#check if the output file is already there +if len(glob(os.path.join(dirout, filein+".gz")))==0: + #print("enter agin in the loop") + #copy the file from the /esnas into the + dirin,fileinloc=os.path.split(filein) + if dirin!="": + shutil.copy(filein, fileinloc) + + #copy the mask from the /esnas into the + dirmask,fmaskloc=os.path.split(fmask) + if dirmask!="": + shutil.copy(fmask, fmaskloc) + + #temporary output file + fileout=filein.replace(".nc","_new.nc") + + #define the variable name of longitude latitude depth + #to be copied from the mask + vardim=["nav_lon", "nav_lat", "nav_lev"] + + #variable copied with no interpolation + varnointerp=["time_counter"] + + lstfieldout=[] + + #Open the output file + fin=nc(fileinloc, "r") + print(fin) + fmout=nc(fmaskout, "r") + fmin=nc(fmaskloc, "r") + fout=nc(fileout, "w", format="NETCDF3_CLASSIC") + nlev=fmout.dimensions["z"].size + #print(fileout) + + #copy all th dimension for fin except the level + for name, dimension in fin.dimensions.iteritems(): + if name != "z": + fout.createDimension(str(name), len(dimension) if not dimension.isunlimited() else None) + #create the level dimension + fout.createDimension("z", nlev) + #print(fileout) + + #write the variable corresponding to the dimension (from the input mask) + for name in vardim: + variable=fmout.variables[name] + # print(fileout) + #print(fout) + fout.createVariable(name, variable.datatype, variable.dimensions) + fout.variables[name][:]=variable[:] + #print("after writting dimension variable") + + listdens=[] + listdens_varname=[] + # print(fin.variables) + + + for varin, variable in fin.variables.iteritems(): + print ('print1') + print (varin) + ##take out the variable nav_lev, lon ,lat + if not(varin in vardim): + print ('print2') + print (varin) + ##for the variable which no need interpolation copy them + if varin in varnointerp: + print ('print3') + print (varin) + #print(variable.datatype) + #print(variable.dimensions) + #print(fout) + var=fout.createVariable(varin, variable.datatype, variable.dimensions) + var[:]=variable[:] + #print("after writting variable:") + #print(varin) + else: + month=int(fileinloc.split("_")[2][4:6]) + ##perform the interpolation vertical y horizontal + print ('print4') + print (varin) + print ("test") + fieldout=vertinterp_extrap(fin, varin, fmin, fmout, + month=month, modvers=versout) + ##add the temporal dimension + shapeout=(1,)+fieldout.shape + fieldout.shape=shapeout + print(varin) + if varin in ["so","sn"]: + print("Iam here") + listdens.append(fieldout) + listdens_varname.append(varin) + ##put 0 for mask value (only by converting from ma into np array) + fieldout=np.array(fieldout) + print("before defining variable") + print(varin) + #print(variable.datatype) + #print(variable.dimensions) + #print(fout) + #add a test to avoid negative values in en + if varin =="en": + fieldout[fieldout<0]=0 + print("negative values removed from en") + var=fout.createVariable(varin, variable.datatype, variable.dimensions) + var[:]=fieldout + #print("after writting variable:") + print(varin) + #get temperature + print(listdens_varname) + #ptemp=listdens[listdens_varname.index("thetao")] + #get salinity + psal=listdens[listdens_varname.index("so")] + + #print("rhop") + #rhop=compute_density(ptemp, psal) + #convert into numpy array (0 instead of mask) + #rhop=np.array(rhop) + #write density into the output file + #print("before writting variable:") + #print(rhop) + #var=fout.createVariable("rhop", + # fin.variables["tn"].datatype, + # fin.variables["tn"].dimensions) + ##print("after defining rhop in the file") + + #var[:]=rhop + #print("after writting rhop") + + + fin.close() + #print("after closing fin") + fout.close() + #print("after closing fout") + fmin.close() + #print("after closing fmin") + fmout.close() + #print("after closing fmout") + + #gzip the files + + #print("before gzip: "+ fileout) + with open(fileout, 'rb') as f_in, gzip.open(fileout+'.gz', 'wb') as f_out: + shutil.copyfileobj(f_in, f_out) + #print("after gzip") + #copy the output file into /esnas + shutil.copy(fileout+'.gz', os.path.join(dirout,fileinloc+'.gz')) + print("the interpolated file has been created and copied into:") + print(os.path.join(dirout,fileinloc+'.gz')) + + #remove the local files + os.remove(fileinloc) + os.remove(fileout+'.gz') + os.remove(fileout) + + print("local files have been removed") -- GitLab From 385bb97fbf36b1d2aadbbac6d1ae41afb326c2ff Mon Sep 17 00:00:00 2001 From: Juan Date: Sun, 8 Mar 2020 21:08:42 +0100 Subject: [PATCH 02/16] Add new file --- interpolation/Interp_ORAS5.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 interpolation/Interp_ORAS5.sh diff --git a/interpolation/Interp_ORAS5.sh b/interpolation/Interp_ORAS5.sh new file mode 100644 index 0000000..3df2940 --- /dev/null +++ b/interpolation/Interp_ORAS5.sh @@ -0,0 +1,13 @@ +#!/bin/ksh +#SBATCH -n 1 +#SBATCH -t 78:00:00 +#SBATCH -J remaporas5 +#SBATCH -o remaporas5-%j.log + + +set -exv + +year1=1991 +year2=1999 +for year in `seq $year1 $year2` ; do +cdo remapbil,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA1.nc -fillmiss2 -setctomiss,0 -setgrid,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA025.nc /esarchive/releases/nudging/ocean/s5_fc0_${year}.nc /esarchive/releases/nudging/ocean/s5/ORCA1L75/fc00/s5_fc0_${year}b.nc ; done \ No newline at end of file -- GitLab From 3c4916abd57ecbe982a0f8404f967c519147e0d0 Mon Sep 17 00:00:00 2001 From: Juan Date: Mon, 9 Mar 2020 11:51:02 +0100 Subject: [PATCH 03/16] Update Interp_ORAS5.sh --- interpolation/Interp_ORAS5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interpolation/Interp_ORAS5.sh b/interpolation/Interp_ORAS5.sh index 3df2940..2707101 100644 --- a/interpolation/Interp_ORAS5.sh +++ b/interpolation/Interp_ORAS5.sh @@ -10,4 +10,4 @@ set -exv year1=1991 year2=1999 for year in `seq $year1 $year2` ; do -cdo remapbil,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA1.nc -fillmiss2 -setctomiss,0 -setgrid,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA025.nc /esarchive/releases/nudging/ocean/s5_fc0_${year}.nc /esarchive/releases/nudging/ocean/s5/ORCA1L75/fc00/s5_fc0_${year}b.nc ; done \ No newline at end of file +cdo setmisstoc,0 -remapbil,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA1.nc -fillmiss2 -setctomiss,0 -setgrid,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA025.nc /esarchive/releases/nudging/ocean/s5_fc0_${year}.nc /esarchive/releases/nudging/ocean/s5/ORCA1L75/fc00/s5_fc0_${year}b.nc ; done \ No newline at end of file -- GitLab From af26ebe93280bd962aa8ee482dfb3f68ed468785 Mon Sep 17 00:00:00 2001 From: Juan Date: Mon, 9 Mar 2020 11:51:18 +0100 Subject: [PATCH 04/16] Delete Interp_ORAS5.sh --- interpolation/Interp_ORAS5.sh | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 interpolation/Interp_ORAS5.sh diff --git a/interpolation/Interp_ORAS5.sh b/interpolation/Interp_ORAS5.sh deleted file mode 100644 index 2707101..0000000 --- a/interpolation/Interp_ORAS5.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/ksh -#SBATCH -n 1 -#SBATCH -t 78:00:00 -#SBATCH -J remaporas5 -#SBATCH -o remaporas5-%j.log - - -set -exv - -year1=1991 -year2=1999 -for year in `seq $year1 $year2` ; do -cdo setmisstoc,0 -remapbil,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA1.nc -fillmiss2 -setctomiss,0 -setgrid,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA025.nc /esarchive/releases/nudging/ocean/s5_fc0_${year}.nc /esarchive/releases/nudging/ocean/s5/ORCA1L75/fc00/s5_fc0_${year}b.nc ; done \ No newline at end of file -- GitLab From 7c0edfc99a14d75c48cfea712a68a1aafe7da27b Mon Sep 17 00:00:00 2001 From: Juan Date: Mon, 9 Mar 2020 11:51:54 +0100 Subject: [PATCH 05/16] Add new file --- interpolation_nudging/Interp_ORAS5.nc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 interpolation_nudging/Interp_ORAS5.nc diff --git a/interpolation_nudging/Interp_ORAS5.nc b/interpolation_nudging/Interp_ORAS5.nc new file mode 100644 index 0000000..2436684 --- /dev/null +++ b/interpolation_nudging/Interp_ORAS5.nc @@ -0,0 +1,14 @@ +#!/bin/ksh +#SBATCH -n 1 +#SBATCH -t 78:00:00 +#SBATCH -J remaporas5 +#SBATCH -o remaporas5-%j.log + + +set -exv + +year1=1991 +year2=1999 +for year in `seq $year1 $year2` ; do +cdo setmisstoc,0 -remapbil,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA1.nc -fillmiss2 -setctomiss,0 -setgrid,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA025.nc /esarchive/releases/nudging/ocean/s5_fc0_${year}.nc /esarchive/releases/nudging/ocean/s5/ORCA1L75/fc00/s5_fc0_${year}b.nc ; +done -- GitLab From ae0a01b8e5d66d5731088f4d6cd8fd8ae17fa1c8 Mon Sep 17 00:00:00 2001 From: Juan Date: Mon, 9 Mar 2020 11:54:20 +0100 Subject: [PATCH 06/16] Update Interp_ORAS5.nc --- interpolation_nudging/{Interp_ORAS5.nc => Interp_ORAS5.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename interpolation_nudging/{Interp_ORAS5.nc => Interp_ORAS5.sh} (100%) diff --git a/interpolation_nudging/Interp_ORAS5.nc b/interpolation_nudging/Interp_ORAS5.sh similarity index 100% rename from interpolation_nudging/Interp_ORAS5.nc rename to interpolation_nudging/Interp_ORAS5.sh -- GitLab From e9d3697a38079680769f244671ea14be246a3099 Mon Sep 17 00:00:00 2001 From: Juan Date: Mon, 9 Mar 2020 12:20:51 +0100 Subject: [PATCH 07/16] Update Interp_ORAS5.sh --- interpolation_nudging/Interp_ORAS5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interpolation_nudging/Interp_ORAS5.sh b/interpolation_nudging/Interp_ORAS5.sh index 2436684..83d9097 100644 --- a/interpolation_nudging/Interp_ORAS5.sh +++ b/interpolation_nudging/Interp_ORAS5.sh @@ -10,5 +10,5 @@ set -exv year1=1991 year2=1999 for year in `seq $year1 $year2` ; do -cdo setmisstoc,0 -remapbil,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA1.nc -fillmiss2 -setctomiss,0 -setgrid,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA025.nc /esarchive/releases/nudging/ocean/s5_fc0_${year}.nc /esarchive/releases/nudging/ocean/s5/ORCA1L75/fc00/s5_fc0_${year}b.nc ; +cdo setmisstoc,0 -remapbil,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA1.nc -fillmiss2 -setctomiss,0 -setgrid,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA025.nc /esarchive/releases/nudging/ocean/ORCA025L75/fc00/s5_fc0_${year}.nc /esarchive/releases/nudging/ocean/s5/ORCA1L75/fc00/s5_fc0_${year}b.nc ; done -- GitLab From ff6b3c49eec721de926ee691b73676ca6f371460 Mon Sep 17 00:00:00 2001 From: Juan Date: Thu, 12 Nov 2020 14:56:13 +0100 Subject: [PATCH 08/16] Update Interp_ORAS5.sh --- interpolation_nudging/Interp_ORAS5.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/interpolation_nudging/Interp_ORAS5.sh b/interpolation_nudging/Interp_ORAS5.sh index 83d9097..fde90a1 100644 --- a/interpolation_nudging/Interp_ORAS5.sh +++ b/interpolation_nudging/Interp_ORAS5.sh @@ -7,8 +7,8 @@ set -exv -year1=1991 -year2=1999 +year1=1990 +year2=2019 for year in `seq $year1 $year2` ; do -cdo setmisstoc,0 -remapbil,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA1.nc -fillmiss2 -setctomiss,0 -setgrid,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA025.nc /esarchive/releases/nudging/ocean/ORCA025L75/fc00/s5_fc0_${year}.nc /esarchive/releases/nudging/ocean/s5/ORCA1L75/fc00/s5_fc0_${year}b.nc ; +cdo setmisstoc,0 -remapbil,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA1.nc -fillmiss2 -setctomiss,0 -setgrid,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA025.nc /esarchive/releases/nudging/ocean/s5/ORCA025L75_ORAS5/fc00/s5_fc0_${year}.nc /esarchive/releases/nudging/ocean/s5/ORCA1L75/fc0/s5_fc0_${year}.nc ; done -- GitLab From 2f4ab43d5989d400c42a3ef18846d6fb31aff940 Mon Sep 17 00:00:00 2001 From: Juan Date: Thu, 12 Nov 2020 14:59:40 +0100 Subject: [PATCH 09/16] Add new file --- interpolation_nudging/Interp_ORAS5_ORCA025 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 interpolation_nudging/Interp_ORAS5_ORCA025 diff --git a/interpolation_nudging/Interp_ORAS5_ORCA025 b/interpolation_nudging/Interp_ORAS5_ORCA025 new file mode 100644 index 0000000..d39bfab --- /dev/null +++ b/interpolation_nudging/Interp_ORAS5_ORCA025 @@ -0,0 +1,14 @@ +#!/bin/ksh +#SBATCH -n 1 +#SBATCH -t 78:00:00 +#SBATCH -J remaporas5 +#SBATCH -o remaporas5-%j.log + + +set -exv + +year1=1990 +year2=2019 +for year in `seq $year1 $year2` ; do +cdo setmisstoc,0 -remapbil,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA025.nc -fillmiss2 -setctomiss,0 -setgrid,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA025.nc /esarchive/releases/nudging/ocean/s5/ORCA025L75_ORAS5/fc00/s5_fc0_${year}.nc /esarchive/releases/nudging/ocean/s5/ORCA1L75/fc0/s5_fc0_${year}.nc ; +done -- GitLab From a0faa1ea8cf2dc96be792b311d137a2640741549 Mon Sep 17 00:00:00 2001 From: Juan Date: Thu, 12 Nov 2020 15:00:29 +0100 Subject: [PATCH 10/16] Update Interp_ORAS5_ORCA025 --- interpolation_nudging/Interp_ORAS5_ORCA025 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interpolation_nudging/Interp_ORAS5_ORCA025 b/interpolation_nudging/Interp_ORAS5_ORCA025 index d39bfab..a8a4669 100644 --- a/interpolation_nudging/Interp_ORAS5_ORCA025 +++ b/interpolation_nudging/Interp_ORAS5_ORCA025 @@ -10,5 +10,5 @@ set -exv year1=1990 year2=2019 for year in `seq $year1 $year2` ; do -cdo setmisstoc,0 -remapbil,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA025.nc -fillmiss2 -setctomiss,0 -setgrid,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA025.nc /esarchive/releases/nudging/ocean/s5/ORCA025L75_ORAS5/fc00/s5_fc0_${year}.nc /esarchive/releases/nudging/ocean/s5/ORCA1L75/fc0/s5_fc0_${year}.nc ; +cdo setmisstoc,0 -remapbil,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA025.nc -fillmiss2 -setctomiss,0 -setgrid,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA025.nc /esarchive/releases/nudging/ocean/s5/ORCA025L75_ORAS5/fc00/s5_fc0_${year}.nc /esarchive/releases/nudging/ocean/s5/ORCA025L75/fc0/s5_fc0_${year}.nc ; done -- GitLab From 5e4b1acd25ea1acd599958286e0083cef8e8bf67 Mon Sep 17 00:00:00 2001 From: Juan Date: Thu, 12 Nov 2020 15:02:55 +0100 Subject: [PATCH 11/16] Update Interp_ORAS5_ORCA025 --- interpolation_nudging/Interp_ORAS5_ORCA025 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interpolation_nudging/Interp_ORAS5_ORCA025 b/interpolation_nudging/Interp_ORAS5_ORCA025 index a8a4669..e64af75 100644 --- a/interpolation_nudging/Interp_ORAS5_ORCA025 +++ b/interpolation_nudging/Interp_ORAS5_ORCA025 @@ -10,5 +10,5 @@ set -exv year1=1990 year2=2019 for year in `seq $year1 $year2` ; do -cdo setmisstoc,0 -remapbil,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA025.nc -fillmiss2 -setctomiss,0 -setgrid,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA025.nc /esarchive/releases/nudging/ocean/s5/ORCA025L75_ORAS5/fc00/s5_fc0_${year}.nc /esarchive/releases/nudging/ocean/s5/ORCA025L75/fc0/s5_fc0_${year}.nc ; +cdo setmisstoc,0 -fillmiss2 -remapbil,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA025.nc -setctomiss,0 -setgrid,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA025.nc /esarchive/releases/nudging/ocean/s5/ORCA025L75_ORAS5/fc00/s5_fc0_${year}.nc /esarchive/releases/nudging/ocean/s5/ORCA025L75/fc0/s5_fc0_${year}.nc ; done -- GitLab From d587b0b0669bdc5b536d1226fe9f14f76831823e Mon Sep 17 00:00:00 2001 From: Juan Date: Thu, 12 Nov 2020 15:03:24 +0100 Subject: [PATCH 12/16] Update Interp_ORAS5.sh --- interpolation_nudging/Interp_ORAS5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interpolation_nudging/Interp_ORAS5.sh b/interpolation_nudging/Interp_ORAS5.sh index fde90a1..d8fa6e0 100644 --- a/interpolation_nudging/Interp_ORAS5.sh +++ b/interpolation_nudging/Interp_ORAS5.sh @@ -10,5 +10,5 @@ set -exv year1=1990 year2=2019 for year in `seq $year1 $year2` ; do -cdo setmisstoc,0 -remapbil,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA1.nc -fillmiss2 -setctomiss,0 -setgrid,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA025.nc /esarchive/releases/nudging/ocean/s5/ORCA025L75_ORAS5/fc00/s5_fc0_${year}.nc /esarchive/releases/nudging/ocean/s5/ORCA1L75/fc0/s5_fc0_${year}.nc ; +cdo setmisstoc,0 -fillmiss2 -remapbil,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA1.nc -setctomiss,0 -setgrid,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA025.nc /esarchive/releases/nudging/ocean/s5/ORCA025L75_ORAS5/fc00/s5_fc0_${year}.nc /esarchive/releases/nudging/ocean/s5/ORCA1L75/fc0/s5_fc0_${year}.nc ; done -- GitLab From 67cf7356a13d12757d29b7e08369e4d0dc514d52 Mon Sep 17 00:00:00 2001 From: Juan Date: Thu, 12 Nov 2020 15:13:14 +0100 Subject: [PATCH 13/16] Update Interp_ORAS5_ORCA025 --- .../{Interp_ORAS5_ORCA025 => Interp_ORAS5_ORCA025.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename interpolation_nudging/{Interp_ORAS5_ORCA025 => Interp_ORAS5_ORCA025.sh} (100%) diff --git a/interpolation_nudging/Interp_ORAS5_ORCA025 b/interpolation_nudging/Interp_ORAS5_ORCA025.sh similarity index 100% rename from interpolation_nudging/Interp_ORAS5_ORCA025 rename to interpolation_nudging/Interp_ORAS5_ORCA025.sh -- GitLab From a8b341db9a420cf23e1f09625152bfa6703344b8 Mon Sep 17 00:00:00 2001 From: Juan Date: Thu, 25 Feb 2021 16:01:54 +0100 Subject: [PATCH 14/16] Update Interp_ORAS5.sh --- interpolation_nudging/Interp_ORAS5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interpolation_nudging/Interp_ORAS5.sh b/interpolation_nudging/Interp_ORAS5.sh index d8fa6e0..00519fe 100644 --- a/interpolation_nudging/Interp_ORAS5.sh +++ b/interpolation_nudging/Interp_ORAS5.sh @@ -10,5 +10,5 @@ set -exv year1=1990 year2=2019 for year in `seq $year1 $year2` ; do -cdo setmisstoc,0 -fillmiss2 -remapbil,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA1.nc -setctomiss,0 -setgrid,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA025.nc /esarchive/releases/nudging/ocean/s5/ORCA025L75_ORAS5/fc00/s5_fc0_${year}.nc /esarchive/releases/nudging/ocean/s5/ORCA1L75/fc0/s5_fc0_${year}.nc ; +cdo setmisstoc,0 -fillmiss2 -remapbil,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA1.nc -setctomiss,0 -setgrid,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA025.nc /esarchive/releases/nudging/ocean/s5/ORCA025L75_ORAS5/fc0/s5_fc0_${year}.nc /esarchive/releases/nudging/ocean/s5/ORCA1L75/fc00/s5_fc0_${year}.nc ; done -- GitLab From 50ab1acfa3fec5ecedda10983d25c05bb64515a4 Mon Sep 17 00:00:00 2001 From: Juan Date: Thu, 25 Feb 2021 16:02:17 +0100 Subject: [PATCH 15/16] Update Interp_ORAS5.sh --- interpolation_nudging/Interp_ORAS5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interpolation_nudging/Interp_ORAS5.sh b/interpolation_nudging/Interp_ORAS5.sh index 00519fe..049f484 100644 --- a/interpolation_nudging/Interp_ORAS5.sh +++ b/interpolation_nudging/Interp_ORAS5.sh @@ -10,5 +10,5 @@ set -exv year1=1990 year2=2019 for year in `seq $year1 $year2` ; do -cdo setmisstoc,0 -fillmiss2 -remapbil,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA1.nc -setctomiss,0 -setgrid,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA025.nc /esarchive/releases/nudging/ocean/s5/ORCA025L75_ORAS5/fc0/s5_fc0_${year}.nc /esarchive/releases/nudging/ocean/s5/ORCA1L75/fc00/s5_fc0_${year}.nc ; +cdo setmisstoc,0 -fillmiss2 -remapbil,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA1.nc -setctomiss,0 -setgrid,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA025.nc /esarchive/releases/nudging/ocean/s5/ORCA025L75_ORAS5/fc0/s5_fc0_${year}.nc /esarchive/releases/nudging/ocean/s5/ORCA1L75/fc00/s5_fc00_${year}.nc ; done -- GitLab From 4f831c585e87caa09bb3ab9a0e00a0fbda8a9953 Mon Sep 17 00:00:00 2001 From: Juan Date: Wed, 4 Aug 2021 18:08:30 +0000 Subject: [PATCH 16/16] Update Interp_ORAS5_ORCA025.sh --- interpolation_nudging/Interp_ORAS5_ORCA025.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interpolation_nudging/Interp_ORAS5_ORCA025.sh b/interpolation_nudging/Interp_ORAS5_ORCA025.sh index e64af75..b9be890 100644 --- a/interpolation_nudging/Interp_ORAS5_ORCA025.sh +++ b/interpolation_nudging/Interp_ORAS5_ORCA025.sh @@ -10,5 +10,5 @@ set -exv year1=1990 year2=2019 for year in `seq $year1 $year2` ; do -cdo setmisstoc,0 -fillmiss2 -remapbil,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA025.nc -setctomiss,0 -setgrid,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA025.nc /esarchive/releases/nudging/ocean/s5/ORCA025L75_ORAS5/fc00/s5_fc0_${year}.nc /esarchive/releases/nudging/ocean/s5/ORCA025L75/fc0/s5_fc0_${year}.nc ; +cdo setmisstoc,0 -fillmiss2 -remapbil,/esarchive/scratch/jacosta/TMP/bathy_meter_ORCA025.nc -setctomiss,0 /esarchive/releases/nudging/ocean/s5/ORCA025L75_ORAS5/fc0/s5_fc0_${year}.nc /esarchive/releases/nudging/ocean/s5/ORCA025L75/fc0/s5_fc0_${year}.nc ; done -- GitLab