Opened 3 years ago

Closed 3 years ago

#1974 closed help (fixed)

Compiling Nemovar SST bias 'matchup' code

Reported by: cthomas Owned by: annette
Component: NEMO/CICE Keywords: Nemovar, SST bias, matchup
Cc: Platform: MONSooN
UM Version: <select version>



I have recently run into the problem that the matchup code used in the SST bias part of Nemovar doesn't work for leap years. This is because the number of days in February is hard-coded as 28 in nemovar/NEMO_MATCHUP/mtu_globvar.f90. Whenever SST datasets on the 29th of Feb are used, the code crashes, meaning that SST bias estimation is not possible for that day. (Maybe 1 day every 4 years is not too bad, but it would be good to try to fix it if possible!)

I am running this on Monsoon. I am currently using a precompiled version of matchup.exe, rather than the version produced when I compile Nemovar myself. I have been trying to recompile this code on Monsoon, replacing 28 with 29, but the resulting code crashes when it is run in a job. The process dies with a floating point exception. I think this might be due to the use of multiple cores - it happens even without the mtu_globvar fix. However, changing the number of "i" and "j" processors when compiling doesn't help.

I guess there are two possibilities here: get the code to compile, or find a way to fool it into accepting data on the 29th by temporarily changing the date to March the 1st. That might be tricky if date ranges are imposed on the SST data, and would require manual bookkeeping. Any advice would be much appreciated!


Change History (1)

comment:1 Changed 3 years ago by cthomas

  • Resolution set to fixed
  • Status changed from new to closed

I've managed to get this working by using the "365day" calendar instead of "gregorian", and temporarily renaming the 29th Feb data to 1st Mar. After running the sstbias procedure for the 29th I then renamed everything back and proceeded with the real 1st Mar data. It's a bit fiddly but much less difficult than getting the code to compile!

Note: See TracTickets for help on using tickets.